text:
/**
 */
package CIM.IEC61970.Core;

import CIM.IEC61970.Domain.UnitMultiplier;
import CIM.IEC61970.Domain.UnitSymbol;

import org.eclipse.emf.common.util.EList;

/**
 *
 * A representation of the model object 'Curve'.
 *
 *
 *

 * The following features are supported:
 *

 *

 *
{@link CIM.IEC61970.Core.Curve#getY2Unit Y2 Unit}

 *
{@link CIM.IEC61970.Core.Curve#getXMultiplier XMultiplier}

 *
{@link CIM.IEC61970.Core.Curve#getY3Multiplier Y3 Multiplier}

 *
{@link CIM.IEC61970.Core.Curve#getY1Unit Y1 Unit}

 *
{@link CIM.IEC61970.Core.Curve#getCurveStyle Curve Style}

 *
{@link CIM.IEC61970.Core.Curve#getY3Unit Y3 Unit}

 *
{@link CIM.IEC61970.Core.Curve#getXUnit XUnit}

 *
{@link CIM.IEC61970.Core.Curve#getCurveDatas Curve Datas}

 *
{@link CIM.IEC61970.Core.Curve#getY2Multiplier Y2 Multiplier}

 *
{@link CIM.IEC61970.Core.Curve#getY1Multiplier Y1 Multiplier}

 *

 *
 * @see CIM.IEC61970.Core.CorePackage#getCurve()
 * @model annotation="http://iec.ch/TC57/2009/CIM-schema-cim14 Documentation='A multi-purpose curve or functional relationship between an independent variable (X-axis) and dependent (Y-axis) variables.'"
 *        annotation="http://langdale.com.au/2005/UML Profile\040documentation='A multi-purpose curve or functional relationship between an independent variable (X-axis) and dependent (Y-axis) variables.'"
 *        annotation="http://www.eclipse.org/emf/2002/GenModel Documentation='A multi-purpose curve or functional relationship between an independent variable (X-axis) and dependent (Y-axis) variables.' Profile\040documentation='A multi-purpose curve or functional relationship between an independent variable (X-axis) and dependent (Y-axis) variables.'"
 * @generated
 */
public interface Curve extends IdentifiedObject {
	/**
	 * Returns the value of the 'Y2 Unit' attribute.
	 * The literals are from the enumeration {@link CIM.IEC61970.Domain.UnitSymbol}.
	 *
	 *

	 * If the meaning of the 'Y2 Unit' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Y2 Unit' attribute.
	 * @see CIM.IEC61970.Domain.UnitSymbol
	 * @see #setY2Unit(UnitSymbol)
	 * @see CIM.IEC61970.Core.CorePackage#getCurve_Y2Unit()
	 * @model annotation="http://iec.ch/TC57/2009/CIM-schema-cim14 Documentation='The Y2-axis units of measure.'"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel Documentation='The Y2-axis units of measure.'"
	 * @generated
	 */
	UnitSymbol getY2Unit();

	/**
	 * Sets the value of the '{@link CIM.IEC61970.Core.Curve#getY2Unit Y2 Unit}' attribute.
	 *
	 *
	 * @param value the new value of the 'Y2 Unit' attribute.
	 * @see CIM.IEC61970.Domain.UnitSymbol
	 * @see #getY2Unit()
	 * @generated
	 */
	void setY2Unit(UnitSymbol value);

	/**
	 * Returns the value of the 'XMultiplier' attribute.
	 * The literals are from the enumeration {@link CIM.IEC61970.Domain.UnitMultiplier}.
	 *
	 *

	 * If the meaning of the 'XMultiplier' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'XMultiplier' attribute.
	 * @see CIM.IEC61970.Domain.UnitMultiplier
	 * @see #setXMultiplier(UnitMultiplier)
	 * @see CIM.IEC61970.Core.CorePackage#getCurve_XMultiplier()
	 * @model annotation="http://iec.ch/TC57/2009/CIM-schema-cim14 Documentation='Multiplier for X-axis.'"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel Documentation='Multiplier for X-axis.'"
	 * @generated
	 */
	UnitMultiplier getXMultiplier();

	/**
	 * Sets the value of the '{@link CIM.IEC61970.Core.Curve#getXMultiplier XMultiplier}' attribute.
	 *
	 *
	 * @param value the new value of the 'XMultiplier' attribute.
	 * @see CIM.IEC61970.Domain.UnitMultiplier
	 * @see #getXMultiplier()
	 * @generated
	 */
	void setXMultiplier(UnitMultiplier value);

	/**
	 * Returns the value of the 'Y3 Multiplier' attribute.
	 * The literals are from the enumeration {@link CIM.IEC61970.Domain.UnitMultiplier}.
	 *
	 *

	 * If the meaning of the 'Y3 Multiplier' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Y3 Multiplier' attribute.
	 * @see CIM.IEC61970.Domain.UnitMultiplier
	 * @see #setY3Multiplier(UnitMultiplier)
	 * @see CIM.IEC61970.Core.CorePackage#getCurve_Y3Multiplier()
	 * @model annotation="http://iec.ch/TC57/2009/CIM-schema-cim14 Documentation='Multiplier for Y3-axis.'"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel Documentation='Multiplier for Y3-axis.'"
	 * @generated
	 */
	UnitMultiplier getY3Multiplier();

	/**
	 * Sets the value of the '{@link CIM.IEC61970.Core.Curve#getY3Multiplier Y3 Multiplier}' attribute.
	 *
	 *
	 * @param value the new value of the 'Y3 Multiplier' attribute.
	 * @see CIM.IEC61970.Domain.UnitMultiplier
	 * @see #getY3Multiplier()
	 * @generated
	 */
	void setY3Multiplier(UnitMultiplier value);

	/**
	 * Returns the value of the 'Y1 Unit' attribute.
	 * The literals are from the enumeration {@link CIM.IEC61970.Domain.UnitSymbol}.
	 *
	 *

	 * If the meaning of the 'Y1 Unit' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Y1 Unit' attribute.
	 * @see CIM.IEC61970.Domain.UnitSymbol
	 * @see #setY1Unit(UnitSymbol)
	 * @see CIM.IEC61970.Core.CorePackage#getCurve_Y1Unit()
	 * @model annotation="http://iec.ch/TC57/2009/CIM-schema-cim14 Documentation='The Y1-axis units of measure.'"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel Documentation='The Y1-axis units of measure.'"
	 * @generated
	 */
	UnitSymbol getY1Unit();

	/**
	 * Sets the value of the '{@link CIM.IEC61970.Core.Curve#getY1Unit Y1 Unit}' attribute.
	 *
	 *
	 * @param value the new value of the 'Y1 Unit' attribute.
	 * @see CIM.IEC61970.Domain.UnitSymbol
	 * @see #getY1Unit()
	 * @generated
	 */
	void setY1Unit(UnitSymbol value);

	/**
	 * Returns the value of the 'Curve Style' attribute.
	 * The literals are from the enumeration {@link CIM.IEC61970.Core.CurveStyle}.
	 *
	 *

	 * If the meaning of the 'Curve Style' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Curve Style' attribute.
	 * @see CIM.IEC61970.Core.CurveStyle
	 * @see #setCurveStyle(CurveStyle)
	 * @see CIM.IEC61970.Core.CorePackage#getCurve_CurveStyle()
	 * @model annotation="http://iec.ch/TC57/2009/CIM-schema-cim14 Documentation='The style or shape of the curve.'"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel Documentation='The style or shape of the curve.'"
	 * @generated
	 */
	CurveStyle getCurveStyle();

	/**
	 * Sets the value of the '{@link CIM.IEC61970.Core.Curve#getCurveStyle Curve Style}' attribute.
	 *
	 *
	 * @param value the new value of the 'Curve Style' attribute.
	 * @see CIM.IEC61970.Core.CurveStyle
	 * @see #getCurveStyle()
	 * @generated
	 */
	void setCurveStyle(CurveStyle value);

	/**
	 * Returns the value of the 'Y3 Unit' attribute.
	 * The literals are from the enumeration {@link CIM.IEC61970.Domain.UnitSymbol}.
	 *
	 *

	 * If the meaning of the 'Y3 Unit' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Y3 Unit' attribute.
	 * @see CIM.IEC61970.Domain.UnitSymbol
	 * @see #setY3Unit(UnitSymbol)
	 * @see CIM.IEC61970.Core.CorePackage#getCurve_Y3Unit()
	 * @model annotation="http://iec.ch/TC57/2009/CIM-schema-cim14 Documentation='The Y3-axis units of measure.'"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel Documentation='The Y3-axis units of measure.'"
	 * @generated
	 */
	UnitSymbol getY3Unit();

	/**
	 * Sets the value of the '{@link CIM.IEC61970.Core.Curve#getY3Unit Y3 Unit}' attribute.
	 *
	 *
	 * @param value the new value of the 'Y3 Unit' attribute.
	 * @see CIM.IEC61970.Domain.UnitSymbol
	 * @see #getY3Unit()
	 * @generated
	 */
	void setY3Unit(UnitSymbol value);

	/**
	 * Returns the value of the 'XUnit' attribute.
	 * The literals are from the enumeration {@link CIM.IEC61970.Domain.UnitSymbol}.
	 *
	 *

	 * If the meaning of the 'XUnit' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'XUnit' attribute.
	 * @see CIM.IEC61970.Domain.UnitSymbol
	 * @see #setXUnit(UnitSymbol)
	 * @see CIM.IEC61970.Core.CorePackage#getCurve_XUnit()
	 * @model annotation="http://iec.ch/TC57/2009/CIM-schema-cim14 Documentation='The X-axis units of measure.'"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel Documentation='The X-axis units of measure.'"
	 * @generated
	 */
	UnitSymbol getXUnit();

	/**
	 * Sets the value of the '{@link CIM.IEC61970.Core.Curve#getXUnit XUnit}' attribute.
	 *
	 *
	 * @param value the new value of the 'XUnit' attribute.
	 * @see CIM.IEC61970.Domain.UnitSymbol
	 * @see #getXUnit()
	 * @generated
	 */
	void setXUnit(UnitSymbol value);

	/**
	 * Returns the value of the 'Curve Datas' reference list.
	 * The list contents are of type {@link CIM.IEC61970.Core.CurveData}.
	 * It is bidirectional and its opposite is '{@link CIM.IEC61970.Core.CurveData#getCurve Curve}'.
	 *
	 *

	 * If the meaning of the 'Curve Datas' reference list isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Curve Datas' reference list.
	 * @see CIM.IEC61970.Core.CorePackage#getCurve_CurveDatas()
	 * @see CIM.IEC61970.Core.CurveData#getCurve
	 * @model opposite="Curve"
	 *        annotation="http://iec.ch/TC57/2009/CIM-schema-cim14 Documentation='The point data values that define a curve'"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel Documentation='The point data values that define a curve'"
	 * @generated
	 */
	EList<CurveData> getCurveDatas();

	/**
	 * Returns the value of the 'Y2 Multiplier' attribute.
	 * The literals are from the enumeration {@link CIM.IEC61970.Domain.UnitMultiplier}.
	 *
	 *

	 * If the meaning of the 'Y2 Multiplier' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Y2 Multiplier' attribute.
	 * @see CIM.IEC61970.Domain.UnitMultiplier
	 * @see #setY2Multiplier(UnitMultiplier)
	 * @see CIM.IEC61970.Core.CorePackage#getCurve_Y2Multiplier()
	 * @model annotation="http://iec.ch/TC57/2009/CIM-schema-cim14 Documentation='Multiplier for Y2-axis.'"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel Documentation='Multiplier for Y2-axis.'"
	 * @generated
	 */
	UnitMultiplier getY2Multiplier();

	/**
	 * Sets the value of the '{@link CIM.IEC61970.Core.Curve#getY2Multiplier Y2 Multiplier}' attribute.
	 *
	 *
	 * @param value the new value of the 'Y2 Multiplier' attribute.
	 * @see CIM.IEC61970.Domain.UnitMultiplier
	 * @see #getY2Multiplier()
	 * @generated
	 */
	void setY2Multiplier(UnitMultiplier value);

	/**
	 * Returns the value of the 'Y1 Multiplier' attribute.
	 * The literals are from the enumeration {@link CIM.IEC61970.Domain.UnitMultiplier}.
	 *
	 *

	 * If the meaning of the 'Y1 Multiplier' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Y1 Multiplier' attribute.
	 * @see CIM.IEC61970.Domain.UnitMultiplier
	 * @see #setY1Multiplier(UnitMultiplier)
	 * @see CIM.IEC61970.Core.CorePackage#getCurve_Y1Multiplier()
	 * @model annotation="http://iec.ch/TC57/2009/CIM-schema-cim14 Documentation='Multiplier for Y1-axis'"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel Documentation='Multiplier for Y1-axis'"
	 * @generated
	 */
	UnitMultiplier getY1Multiplier();

	/**
	 * Sets the value of the '{@link CIM.IEC61970.Core.Curve#getY1Multiplier Y1 Multiplier}' attribute.
	 *
	 *
	 * @param value the new value of the 'Y1 Multiplier' attribute.
	 * @see CIM.IEC61970.Domain.UnitMultiplier
	 * @see #getY1Multiplier()
	 * @generated
	 */
	void setY1Multiplier(UnitMultiplier value);

} // Curve


text:
export function confirm (callback) {
  return window.confirm(window.FolioConsole.translations.removePrompt)
}

export function confirmed (callback) {
  if (confirm()) {
    callback()
  }
}

export function makeConfirmed (callback) {
  return () => confirmed(callback)
}

export default confirmed

redpajama_set_name: RedPajamaGithub


text:
namespace BitFunnel
{
    class ITermToText;

    class DocumentFrequencyTable : public IDocumentFrequencyTable
    {
    public:
        // Constructs an empty DocumentFrequencyTable.
        DocumentFrequencyTable();

        // Constructs a DocumentFrequencyTable from data previously persisted
        // to a stream by DocumentFrequencyTableBuilder::WriteFrequencies().
        // The file format is a sequence of entries, one per line. Each entry
        // consists of the following comma-separated fields:
        //    term hash (16 digit hexidecimal)
        //    gram size (e.g. 1 for unigram, 2 for bigram phrase, etc.)
        //    stream id (e.g. 0 for body, 1 for title, etc.)
        //    frequency of term in corpus (double precision floating point)
        // Entries must be ordered by non-increasing frequency.
        DocumentFrequencyTable(std::istream& input);

        // Sorts the entries by descending frequency then writes to a stream.
        // If the optional termToText parameter is not nullptr, the file will
        // contain a "text" column with the text for each term, if available
        // via the ITermToText. Note: method is not const because it sorts
        // the entries.
        virtual void Write(std::ostream & output,
                           ITermToText const * termToText) override;

        // Adds an Entry to the table. Note that this method does not guard
        // against duplicate Term::Hash values and it does not enforce any
        // ordering on the frequencies. Entries are sorted on write.
        virtual void AddEntry(Entry const & entry) override;

        // Returns the entry corresponding a specific index.
        virtual Entry const & operator[](size_t index) const override;

        virtual std::vector<Entry>::const_iterator begin() const override;
        virtual std::vector<Entry>::const_iterator end() const override;

        virtual size_t size() const override;

    private:
        std::vector<Entry> m_entries;
    };
}


text:
use strict;
use warnings;
#phylocatenator.pl
#Written by Todd H. Oakley UCSB
#Version 1.0 May, 2012
#
#phyloconcatenator.pl [infile] [also requires arguments 1-8 detailed below]
#
#Version 1.0.1 Sept 2012 -- fixed a bug that led sometimes to species with no data being retained.
#This bug would not affect the data that was retained, so if raxml ran all was fine. However,
#raxml will not run with species that have completely missing data. Added extra section to remove
#those species.

#For debugging command line pass, uncomment next
#for(my $i=0; $i < @ARGV; $i++){
#	print "Arg $i:  $ARGV[$i] \n\n";
#}
#exit;

die "Check arguments" unless @ARGV == 10;

#Obtain Arguments
my $infile1=shift(@ARGV);		#0 input file
my $mingf_persp=shift(@ARGV);		#1 minimum number of genefamiles to keep species
my $minsp_pergf=shift(@ARGV);		#2 minimum number of species to keep genefamily
my $min_gf_len =shift(@ARGV);		#3 minimum gene family length
my $speciesfile=shift(@ARGV);		#4 optional species file 'None' if false
my $modelsfile=shift(@ARGV);		#5 models file
my $outfile=shift(@ARGV);		#6 data outfile
my $partfile=shift(@ARGV);		#7 partition file
my $htmlfile=shift(@ARGV);		#8 html file
my $htmlfile2=shift(@ARGV);		#9 html file for accession numbers

#Open 2 output files
open (OUT, ">$outfile") or die "Cannot create $outfile \n";
open (PART, ">$partfile") or die "Cannot create $partfile\n";
open (TABLE, ">$htmlfile") or die "Cannot create $htmlfile\n";
open (TABLE2, ">$htmlfile2") or die "Cannot create $htmlfile2\n";

my %HashAccession;
my %HoAdatatable;
my %HoGF;
my %lengthof;
my %ModelFor;
my $line = "";

my @specieslist;
my @genelist;
my @nsp;
my $nsl=1;
my @uniquemodels;
my @nullmodels;
my @retainedspecies;

# read file with species
unless($speciesfile eq 'None'){
	open SPFILE, $speciesfile or die "ERROR: Cannot open file $speciesfile\n\n";
	$nsl=0;
while (<SPFILE>) {
        chomp;
	my $currentinput = "$_";
        if($currentinput =~m /\w/){     #must have a word otherwise empty
                push(@nsp, $currentinput);
        }else{
                die "ERROR: Fewer than 4 species meet your specified criteria.\n";
        }
#	if(@nsp < 4){
#		die "ERROR: Species file must have more than 4 species.\n";
#	}
}
#print "\n\n";
} #end of unless

#Determine models used for each partition, make hash
unless($modelsfile eq 'None'){
	open MODFILE, $modelsfile or die "ERROR: Cannot open file $modelsfile\n\n";
	while (<MODFILE>) {
	        chomp;
		my $currentinput = "$_";
	        if($currentinput =~m /\t/){     #must have a tab otherwise wrong file format
			if($currentinput =~m /\t\t/){
				print OUT "ERROR: file contains 2 tabs in a row.  Check phytab format.\n";
				die;
			}else{
				my @genemodel = split(/\t/, $currentinput);
				my $genefamily=$genemodel[0];
				my $curmodel = $genemodel[1];
				if (exists $ModelFor{$genefamily}) {
					print OUT "ERROR: Model specification for $genefamily is duplicated\n";
					die;
				}else{
					$ModelFor{$genefamily}=$curmodel;
					push(@uniquemodels,$curmodel);
				}
			}
		}else{
			die "ERROR: Model LUT must be genefamily\tmodel and contain no blank lines\n";
		}
	}
}
@uniquemodels = uniq(@uniquemodels); 	#remove redundant models - uniq is subroutine at end of script

#Now check that models are valid raxml models NOT DONE YET
checkraxmlmodel();

#INPUT ALL DATA
open(INFILE1, $infile1);
foreach $line(<INFILE1>) {
	chop($line);
	my $getline = $line;
	my @column = split(/\t/, $getline);
	my $species = $column[0];
	my $genefamily = $column[1];
	my $genename = $column[2];
	my $sequence = $column[3];

	if (exists $HoAdatatable{$species}{$genefamily}) {
		print OUT "ERROR: $species $genefamily is duplicated\n";
		die;
	}else{
		$HashAccession{$species}{$genefamily} = $genename;
		$HoAdatatable{$species}{$genefamily} = $sequence;
		$HoGF{$genefamily}{$species}=$sequence;
	}
}

#If no models file selected, set every gene family to GTR model
if($modelsfile eq 'None'){
	foreach my $gfkey (sort keys %HoGF){
		$ModelFor{$gfkey} = 'GTR';
	}
	push(@uniquemodels, 'GTR');
}

#First, keep all species with enough total partitions present
foreach my $specieskey (sort keys %HoAdatatable)
{
	#Count species with minimum gfs
	my $ngf_persp=0;
	foreach my $genefamilykey (sort keys %{$HoAdatatable{$specieskey}})
	{
		$ngf_persp++;
	}
	unless($ngf_persp < $mingf_persp){	#too few genes for this species, delete the sp
		if($nsl){	#No species list supplied, push all species into list
			push(@specieslist,$specieskey);
		}else{
			#See if current specieskey is in inputted species list
			my $nsp;
			foreach $nsp(@nsp){
        			if (index($nsp,$specieskey) ge 0){
					push(@specieslist,$specieskey);
				}
        		}
		}
	}
}
print OUT "\n";
unless (@specieslist){
	print OUT "ERROR: No species with more than $mingf_persp genes\n";
	die;
}
if(@specieslist < 4){
	print OUT "ERROR: Less than 4 species with more than $mingf_persp genes\n";
	die;
}

my $oldgenelen = 0;
my $currentseqlen = 0;
foreach my $gfkey (sort keys %HoGF)
{
	$oldgenelen=0;
	#Count gfs  with minimum species
	my $nsp_pergf=0;
	for(my $j=0; $j<@specieslist; $j++){
		if(exists $HoGF{$gfkey}{$specieslist[$j]}){
			$nsp_pergf++ ; ###if exists $HoGF{$gfkey}{$specieslist[$j]};

	##get length of gene and check it is consistent
			if(exists $lengthof{$gfkey}){
				$currentseqlen = length($HoGF{$gfkey}{$specieslist[$j]});
			#	$lengthof{$gfkey} = $currentseqlen;
				if($currentseqlen == $oldgenelen){
					#$oldgenelen = $lengthof{$gfkey};
					#okay
				}else{
					print OUT "ERROR: $specieslist[$j] $gfkey sequences ".
						"different lengths than previous. Sequences must be aligned. If ".
						"sequences are aligned, check that the line ".
						"does not have an extra data column before the ".
						"sequence.\n\n";
					die "ERROR: $specieslist[$j] $gfkey sequences ".
						"different lengths than previous. Sequences must be aligned. If ".
						"sequences are aligned, check that the line ".
						"does not have an extra data column before the ".
						"sequence.\n\n";
				}
			}else{
				$currentseqlen = length($HoGF{$gfkey}{$specieslist[$j]});
				if($currentseqlen == 0){
					die "ERROR: Zero length sequence in file.\n"
				}
				$lengthof{$gfkey} = $currentseqlen;
				$oldgenelen = $lengthof{$gfkey};
			}
		}
	}
	if($nsp_pergf < $minsp_pergf){
		#too few species for this gene family
	}else{
		if(exists $lengthof{$gfkey}){
			if($lengthof{$gfkey}>$min_gf_len){
				push(@genelist,$gfkey);
			}
		}
	}
}
if (@genelist==0){
	print OUT "ERROR: No gene families/partitions meet the specified criteria\n";
	die "ERROR: No gene families/partitions meet the specified criteria\n";
}

#Now must delete species that lack any *retained* partitions, ie some species may be all missing
foreach(@specieslist)
{
	my $curspecies=$_;
	#Count species with minimum gfs
	my $ngf_persp=0;
	my $nonmissing=0;
	foreach (@genelist)
	{
		if (exists $HoAdatatable{$curspecies}{$_}){
			my $cursequence = $HoAdatatable{$curspecies}{$_};
			$cursequence =~ s/\?//g;
			$cursequence =~ s/\-//g;
			#Will not remove N's assumes those are not missing data. Revisit?
			my $curlen = length($cursequence);
			$nonmissing = $nonmissing + $curlen;
		}
	}
	if($nonmissing > 0)	#must remove species as it contains none of the genes retained
	{
		print "$curspecies has $nonmissing Non-Missing characters\n";
		push(@retainedspecies, $curspecies);
	}
}
@specieslist=@retainedspecies;

#Remove blankspecies from
#print phylip file
#calculate n characters
my $nchar=0;	#total characters
my $ncharPs =0;	#start count for characters in current partition
my $ncharPe =0;	#end count for characters in current partition

#First count total characters for first line
for(my $k=0; $k<@genelist; $k++){
	if (exists $lengthof{$genelist[$k]}){			#check that length was calculated
		$nchar = $nchar + $lengthof{$genelist[$k]};
	}else{
		die "ERROR: $genelist[$k] LENGTH MISSING\n";
	}
}
print OUT @specieslist." ".$nchar."\n";
htmlheader();

#Need to determine gene list order, which will change due to partitioning
#then write header line of gene names, hopefully in correct order
#print TABLE "	"; #Blank line in species column
print TABLE "Partition:	";
print TABLE2 "Partition:	";
for(my $part=0; $part < @uniquemodels; $part++){
	for(my $k=0; $k<@genelist; $k++){
		#First check if current gf matches current partition
		if(exists $ModelFor{$genelist[$k]}){
			if($ModelFor{$genelist[$k]} eq $uniquemodels[$part]){
				if($ModelFor{$genelist[$k]} eq $uniquemodels[$part]){
					print TABLE "$genelist[$k]	";
					print TABLE2 "$genelist[$k]	";
				}
			}
		}
	}
}
print TABLE "
";
print TABLE2 "
";

#print TABLE "	"; #Blank line in species column
print TABLE "Model:	";
print TABLE2 "Model:	";
for(my $part=0; $part < @uniquemodels; $part++){
	for(my $k=0; $k<@genelist; $k++){
		#First check if current gf matches current partition
		if(exists $ModelFor{$genelist[$k]}){
			if($ModelFor{$genelist[$k]} eq $uniquemodels[$part]){
				if($ModelFor{$genelist[$k]} eq $uniquemodels[$part]){
					print TABLE "$uniquemodels[$part]	";
					print TABLE2 "$uniquemodels[$part]	";
				}
			}
		}
	}
}
#End of htmlheader printing

for(my $j=0; $j<@specieslist; $j++){
	print OUT "$specieslist[$j]\t";
	print TABLE "

		$specieslist[$j]	";
	print TABLE2 "

		$specieslist[$j]	";
	for(my $part=0; $part < @uniquemodels; $part++){
		for(my $k=0; $k<@genelist; $k++){
			#First check if current gf matches current partition
			if(exists $ModelFor{$genelist[$k]}){
				if($ModelFor{$genelist[$k]} eq $uniquemodels[$part]){
					if (exists $HoAdatatable{$specieslist[$j]}{$genelist[$k]}){
						print OUT $HoAdatatable{$specieslist[$j]}{$genelist[$k]};
						print TABLE "	";
						my $acc = $HashAccession{$specieslist[$j]}{$genelist[$k]};
						print TABLE2 "".$acc."	";
						$ncharPe = $ncharPe + $lengthof{$genelist[$k]};
					}else{
						if (exists $lengthof{$genelist[$k]}){
							for(my $gap=0; $gap<$lengthof{$genelist[$k]}; $gap++){
								print OUT "?";
							}
							$ncharPe = $ncharPe + $lengthof{$genelist[$k]};
							print TABLE "	";
							print TABLE2 "	";
							#print TABLE "$genelist[$k]	";
						}else{
							die "ERROR: BUG!! $genelist[$k] LENGTH MISSING\n";
						}
					}
				}
			}else{
				die "ERROR: $genelist[$k] is not assigned a model.  Check model LUT input.\n";
			}

		}
		if($j==0){		#print partitions first time through gene lists
			if(($ncharPe==0) || ($ncharPs > $ncharPe)){
				push(@nullmodels, $uniquemodels[$part]);
				#print "NOTE: no partitions under the model $uniquemodels[$part] made final dataset\n";
			}else{
				print PART "$uniquemodels[$part], $uniquemodels[$part] = $ncharPs - $ncharPe \n";
			}
			$ncharPs=$ncharPe + 1;
		}
	}
	print TABLE "
";
	print TABLE2 "
";
	print OUT "\n";
}
if($ncharPe/@genelist != $nchar){
	# Have to account for multiple times through gene lists -- ncharPe is summed multiple times but printed once
	#die "ERROR:  BUG!! Last partition number doesn't match total n characters\n";
}

#print Statistics to screen can be redirected for Log File
print "\nSPECIES:\n";
unless($speciesfile eq 'None'){
	print "Used species file to select species. \n";
}
print "Number of species with $mingf_persp or more genefamilies/partitions: ".@specieslist."\n";
print "Species list: @specieslist\n\n\n";
print "\nPARTITIONS/GENE FAMILIES:\n";
print "Number genefamilies/partitions longer than $min_gf_len characters and present in at least $minsp_pergf genefamilies/partitions: ".@genelist."\n";
for(my $i=0; $i < @genelist; $i++){
	print "$genelist[$i] Length:$lengthof{$genelist[$i]}\n";
}

	#Printing Model stats
print "\nMODELS:\n";
if($modelsfile eq 'None'){
	print "All partitions set to GTR (no model LUT supplied)\n\n";
}else{
	print "A LUT of models was supplied.\n";
	print "The following models were present in the model LUT file:\n";
	print join(" ", @uniquemodels), "\n";
	print "\n";
	for(my $i=0; $i < @nullmodels; $i++){
		print "NOTE: no partitions under the model $nullmodels[$i] made final dataset\n";
	}
}
close PART;
close OUT;
close SPFILE;
close TABLE;
close TABLE2;

sub uniq {
    return keys %{{ map { $_ => 1 } @_ }};
}

sub checkraxmlmodel {
	my @raxmlmodels = ("DNA","BIN","MULTI","DAYHOFF", "DCMUT", "JTT", "MTREV", "WAG", "RTREV", "CPREV", "VT", "BLOSUM62", "MTMAM", "LG", "GTR", "MTART", "MTZOA", "FLU","PMB", "HIVB","HIVW","JTTDCMUT");
	return(1);	#Not yet implemented
}
sub htmlheader {
	print TABLE '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
		"http://www.w3.org/TR/html4/loose.dtd">

		<title>Dataset Presences and Absences</title>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

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

		<title>Accession Numbers</title>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

			Species
';
	for(my $i=1; $i < @genelist+1; $i++){
#Genes are printing in wrong order
#		print TABLE "$genelist[$i]	";
		print TABLE "$i	";
		print TABLE2 "$i	";
	}
	print TABLE "

";
	print TABLE2 "

";
}
sub htmltail {
	print TABLE '

		';
	print TABLE2 '

		';
}


text:
using System;
using System.Runtime.InteropServices;

namespace SharpVk.Khronos
{
    /// <summary>
    ///
    /// </summary>
    [StructLayout(LayoutKind.Sequential)]
    public partial struct BindImageMemorySwapchainInfo
    {
        /// <summary>
        ///
        /// </summary>
        public SharpVk.Khronos.Swapchain Swapchain
        {
            get;
            set;
        }

        /// <summary>
        ///
        /// </summary>
        public uint ImageIndex
        {
            get;
            set;
        }

        /// <summary>
        ///
        /// </summary>
        /// <param name="pointer">
        /// </param>
        internal unsafe void MarshalTo(SharpVk.Interop.Khronos.BindImageMemorySwapchainInfo* pointer)
        {
            pointer->SType = StructureType.BindImageMemorySwapchainInfo;
            pointer->Next = null;
            pointer->Swapchain = this.Swapchain?.handle ?? default(SharpVk.Interop.Khronos.Swapchain);
            pointer->ImageIndex = this.ImageIndex;
        }
    }
}


text:
.class Lcom/android/server/connectivity/Tethering$TetherMasterSM$InitialState;
.super Lcom/android/server/connectivity/Tethering$TetherMasterSM$TetherMasterUtilState;
.source "Tethering.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/android/server/connectivity/Tethering$TetherMasterSM;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "InitialState"
.end annotation

# instance fields
.field final synthetic this$1:Lcom/android/server/connectivity/Tethering$TetherMasterSM;

# direct methods
.method constructor <init>(Lcom/android/server/connectivity/Tethering$TetherMasterSM;)V
    .locals 0

    .prologue
    .line 1998
    iput-object p1, p0, Lcom/android/server/connectivity/Tethering$TetherMasterSM$InitialState;->this$1:Lcom/android/server/connectivity/Tethering$TetherMasterSM;

    invoke-direct {p0, p1}, Lcom/android/server/connectivity/Tethering$TetherMasterSM$TetherMasterUtilState;-><init>(Lcom/android/server/connectivity/Tethering$TetherMasterSM;)V

    return-void
.end method

# virtual methods
.method public enter()V
    .locals 0

    .prologue
    .line 2001
    return-void
.end method

.method public processMessage(Landroid/os/Message;)Z
    .locals 6
    .param p1, "message"    # Landroid/os/Message;

    .prologue
    .line 2004
    const-string v3, "Tethering"

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "MasterInitialState.processMessage what="

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    iget v5, p1, Landroid/os/Message;->what:I

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 2005
    const/4 v1, 0x1

    .line 2006
    .local v1, "retValue":Z
    iget v3, p1, Landroid/os/Message;->what:I

    packed-switch v3, :pswitch_data_0

    .line 2022
    const/4 v1, 0x0

    .line 2025
    :cond_0
    :goto_0
    return v1

    .line 2008
    :pswitch_0
    iget-object v2, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v2, Lcom/android/server/connectivity/Tethering$TetherInterfaceSM;

    .line 2010
    .local v2, "who":Lcom/android/server/connectivity/Tethering$TetherInterfaceSM;
    iget-object v3, p0, Lcom/android/server/connectivity/Tethering$TetherMasterSM$InitialState;->this$1:Lcom/android/server/connectivity/Tethering$TetherMasterSM;

    # getter for: Lcom/android/server/connectivity/Tethering$TetherMasterSM;->mNotifyList:Ljava/util/ArrayList;
    invoke-static {v3}, Lcom/android/server/connectivity/Tethering$TetherMasterSM;->access$4800(Lcom/android/server/connectivity/Tethering$TetherMasterSM;)Ljava/util/ArrayList;

    move-result-object v3

    invoke-virtual {v3, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 2011
    iget-object v3, p0, Lcom/android/server/connectivity/Tethering$TetherMasterSM$InitialState;->this$1:Lcom/android/server/connectivity/Tethering$TetherMasterSM;

    iget-object v4, p0, Lcom/android/server/connectivity/Tethering$TetherMasterSM$InitialState;->this$1:Lcom/android/server/connectivity/Tethering$TetherMasterSM;

    # getter for: Lcom/android/server/connectivity/Tethering$TetherMasterSM;->mTetherModeAliveState:Lcom/android/internal/util/State;
    invoke-static {v4}, Lcom/android/server/connectivity/Tethering$TetherMasterSM;->access$6100(Lcom/android/server/connectivity/Tethering$TetherMasterSM;)Lcom/android/internal/util/State;

    move-result-object v4

    # invokes: Lcom/android/server/connectivity/Tethering$TetherMasterSM;->transitionTo(Lcom/android/internal/util/IState;)V
    invoke-static {v3, v4}, Lcom/android/server/connectivity/Tethering$TetherMasterSM;->access$6200(Lcom/android/server/connectivity/Tethering$TetherMasterSM;Lcom/android/internal/util/IState;)V

    goto :goto_0

    .line 2014
    .end local v2    # "who":Lcom/android/server/connectivity/Tethering$TetherInterfaceSM;
    :pswitch_1
    iget-object v2, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v2, Lcom/android/server/connectivity/Tethering$TetherInterfaceSM;

    .line 2016
    .restart local v2    # "who":Lcom/android/server/connectivity/Tethering$TetherInterfaceSM;
    iget-object v3, p0, Lcom/android/server/connectivity/Tethering$TetherMasterSM$InitialState;->this$1:Lcom/android/server/connectivity/Tethering$TetherMasterSM;

    # getter for: Lcom/android/server/connectivity/Tethering$TetherMasterSM;->mNotifyList:Ljava/util/ArrayList;
    invoke-static {v3}, Lcom/android/server/connectivity/Tethering$TetherMasterSM;->access$4800(Lcom/android/server/connectivity/Tethering$TetherMasterSM;)Ljava/util/ArrayList;

    move-result-object v3

    invoke-virtual {v3, v2}, Ljava/util/ArrayList;->indexOf(Ljava/lang/Object;)I

    move-result v0

    .line 2017
    .local v0, "index":I
    const/4 v3, -0x1

    if-eq v0, v3, :cond_0

    .line 2018
    iget-object v3, p0, Lcom/android/server/connectivity/Tethering$TetherMasterSM$InitialState;->this$1:Lcom/android/server/connectivity/Tethering$TetherMasterSM;

    # getter for: Lcom/android/server/connectivity/Tethering$TetherMasterSM;->mNotifyList:Ljava/util/ArrayList;
    invoke-static {v3}, Lcom/android/server/connectivity/Tethering$TetherMasterSM;->access$4800(Lcom/android/server/connectivity/Tethering$TetherMasterSM;)Ljava/util/ArrayList;

    move-result-object v3

    invoke-virtual {v3, v2}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z

    goto :goto_0

    .line 2006
    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method


text:
[View Javadoc](../../../../../apidocs/org/apache/struts/config/BaseConfig.html.md)

    1
    21  package org.apache.struts.config;
    22
    23  import java.io.Serializable;
    24
    25  import java.util.Enumeration;
    26  import java.util.Properties;
    27
    28  /**
    29   *
 A abstract base class for all config classes.  Provide basic support
    30   * for arbitrary properties

    31   *
    32   * @since Struts 1.3
    33   */
    34  public abstract class BaseConfig implements Serializable {
    35      /**
    36       * Indicates if configuration of this component been completed. TODO
    37       * change protected to private and use methods provided by extenders?
    38       */
    39      protected boolean configured = false;
    40
    41      /**
    42       * A map of arbitrary properties configured for this component.
    43       *
    44       * @since Struts 1.3
    45       */
    46      private Properties properties = new Properties();
    47
    48      /**
    49       * Freeze the configuration of this action.
    50       */
    51      public void freeze() {
    52          configured = true;
    53      }
    54
    55      /**
    56       * Throw IllegalStateException if configuration is frozen.
    57       *
    58       * @throws IllegalStateException if configuration is frozen
    59       */
    60      public void throwIfConfigured() {
    61          if (configured) {
    62              throw new IllegalStateException("Configuration is frozen");
    63          }
    64      }
    65
    66      /**
    67       *
 Set an arbitary key/value pair which can be retrieved by this
    68       * config class. This facility should eliminate many use cases for
    69       * subclassing *Config classes by providing a mechanism to
    70       * pass any amount of arbitrary configuration information into an config
    71       * class.
 This method must not be called after configuration is
    72       * complete, or an IllegalStateException will be thrown.

    73       *
    74       *
Example
    75       *

    76       * <action path="/example" type="com.example.MyAction">
    77       *    <set-property key="foo" property="bar" />
    78       * </action>
    79       *

    80       *

    81       *
    82       * @param key   the key by which this value will be retrieved
    83       * @param value the value to store with the supplied key
    84       * @throws IllegalStateException if this module configuration has been
    85       *                               frozen
    86       * @since Struts 1.3
    87       */
    88      public void setProperty(String key, String value) {
    89          throwIfConfigured();
    90          properties.setProperty(key, value);
    91      }
    92
    93      /**
    94       * Return the property-value for the specified key, if any; otherwise
    95       * return null.
    96       *
    97       * @param key a key specified in the struts-config file
    98       * @return the value stored with the supplied key
    99       * @since Struts 1.3
    100      */
    101     public String getProperty(String key) {
    102         return properties.getProperty(key);
    103     }
    104
    105     /**
    106      *
 Return the entire set of properties configured for this object. At
    107      * this time, this only needs to be exposed to support inheritance, so
    108      * choosing a conservative access modifier ("protected").

    109      *
    110      * @return set of properties configured for this object
    111      */
    112     protected Properties getProperties() {
    113         return this.properties;
    114     }
    115
    116     /**
    117      * Set the entire set of properties configured for this object. At this
    118      * time, this only needs to be exposed to support inheritance, so choosing
    119      * a conservative access modifier ("protected").
    120      */
    121     protected void setProperties(Properties properties) {
    122         this.properties = properties;
    123     }
    124
    125     /**
    126      *
Compare the properties of this config with that of the given and
    127      * copy those that are not present.  This method is used by subclasses
    128      * that support configuration inheritance.

    129      *
    130      * @param baseConfig The config object to copy properties from.
    131      */
    132     protected void inheritProperties(BaseConfig baseConfig) {
    133         throwIfConfigured();
    134
    135         // Inherit forward properties
    136         Properties baseProperties = baseConfig.getProperties();
    137         Enumeration keys = baseProperties.propertyNames();
    138
    139         while (keys.hasMoreElements()) {
    140             String key = (String) keys.nextElement();
    141
    142             // Check if we have this property before copying it
    143             String value = this.getProperty(key);
    144
    145             if (value == null) {
    146                 value = baseProperties.getProperty(key);
    147                 setProperty(key, value);
    148             }
    149         }
    150     }
    151
    152     /**
    153      *
Return a copy of the properties held by this object.

    154      */
    155     protected Properties copyProperties() {
    156         Properties copy = new Properties();
    157
    158         Enumeration keys = properties.propertyNames();
    159
    160         while (keys.hasMoreElements()) {
    161             String key = (String) keys.nextElement();
    162
    163             copy.setProperty(key, properties.getProperty(key));
    164         }
    165
    166         return copy;
    167     }
    168 }

------------------------------------------------------------------------

This page was automatically generated by [Maven](http://maven.apache.org/)


text: export const NAME = 'bazel';


text:
/*******************************************************************************
 *
 * Module Name: utmisc - common utility procedures
 *
 ******************************************************************************/

/*
 * Copyright (C) 2000 - 2016, Intel Corp.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions, and the following disclaimer,
 *    without modification.
 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
 *    substantially similar to the "NO WARRANTY" disclaimer below
 *    ("Disclaimer") and any redistribution must be conditioned upon
 *    including a substantially similar Disclaimer requirement for further
 *    binary redistribution.
 * 3. Neither the names of the above-listed copyright holders nor the names
 *    of any contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * Alternatively, this software may be distributed under the terms of the
 * GNU General Public License ("GPL") version 2 as published by the Free
 * Software Foundation.
 *
 * NO WARRANTY
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGES.
 */

#include <acpi/acpi.h>
#include "accommon.h"
#include "acnamesp.h"

#define _COMPONENT          ACPI_UTILITIES
ACPI_MODULE_NAME("utmisc")

/*******************************************************************************
 *
 * FUNCTION:    acpi_ut_is_pci_root_bridge
 *
 * PARAMETERS:  id              - The HID/CID in string format
 *
 * RETURN:      TRUE if the Id is a match for a PCI/PCI-Express Root Bridge
 *
 * DESCRIPTION: Determine if the input ID is a PCI Root Bridge ID.
 *
 ******************************************************************************/
u8 acpi_ut_is_pci_root_bridge(char *id)
{

	/*
	 * Check if this is a PCI root bridge.
	 * ACPI 3.0+: check for a PCI Express root also.
	 */
	if (!(strcmp(id,
		     PCI_ROOT_HID_STRING)) ||
	    !(strcmp(id, PCI_EXPRESS_ROOT_HID_STRING))) {
		return (TRUE);
	}

	return (FALSE);
}

#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_NAMES_APP)
/*******************************************************************************
 *
 * FUNCTION:    acpi_ut_is_aml_table
 *
 * PARAMETERS:  table               - An ACPI table
 *
 * RETURN:      TRUE if table contains executable AML; FALSE otherwise
 *
 * DESCRIPTION: Check ACPI Signature for a table that contains AML code.
 *              Currently, these are DSDT,SSDT,PSDT. All other table types are
 *              data tables that do not contain AML code.
 *
 ******************************************************************************/

u8 acpi_ut_is_aml_table(struct acpi_table_header *table)
{

	/* These are the only tables that contain executable AML */

	if (ACPI_COMPARE_NAME(table->signature, ACPI_SIG_DSDT) ||
	    ACPI_COMPARE_NAME(table->signature, ACPI_SIG_PSDT) ||
	    ACPI_COMPARE_NAME(table->signature, ACPI_SIG_SSDT) ||
	    ACPI_COMPARE_NAME(table->signature, ACPI_SIG_OSDT)) {
		return (TRUE);
	}

	return (FALSE);
}
#endif

/*******************************************************************************
 *
 * FUNCTION:    acpi_ut_dword_byte_swap
 *
 * PARAMETERS:  value           - Value to be converted
 *
 * RETURN:      u32 integer with bytes swapped
 *
 * DESCRIPTION: Convert a 32-bit value to big-endian (swap the bytes)
 *
 ******************************************************************************/

u32 acpi_ut_dword_byte_swap(u32 value)
{
	union {
		u32 value;
		u8 bytes[4];
	} out;
	union {
		u32 value;
		u8 bytes[4];
	} in;

	ACPI_FUNCTION_ENTRY();

	in.value = value;

	out.bytes[0] = in.bytes[3];
	out.bytes[1] = in.bytes[2];
	out.bytes[2] = in.bytes[1];
	out.bytes[3] = in.bytes[0];

	return (out.value);
}

/*******************************************************************************
 *
 * FUNCTION:    acpi_ut_set_integer_width
 *
 * PARAMETERS:  Revision            From DSDT header
 *
 * RETURN:      None
 *
 * DESCRIPTION: Set the global integer bit width based upon the revision
 *              of the DSDT. For Revision 1 and 0, Integers are 32 bits.
 *              For Revision 2 and above, Integers are 64 bits. Yes, this
 *              makes a difference.
 *
 ******************************************************************************/

void acpi_ut_set_integer_width(u8 revision)
{

	if (revision < 2) {

		/* 32-bit case */

		acpi_gbl_integer_bit_width = 32;
		acpi_gbl_integer_nybble_width = 8;
		acpi_gbl_integer_byte_width = 4;
	} else {
		/* 64-bit case (ACPI 2.0+) */

		acpi_gbl_integer_bit_width = 64;
		acpi_gbl_integer_nybble_width = 16;
		acpi_gbl_integer_byte_width = 8;
	}
}

/*******************************************************************************
 *
 * FUNCTION:    acpi_ut_create_update_state_and_push
 *
 * PARAMETERS:  object          - Object to be added to the new state
 *              action          - Increment/Decrement
 *              state_list      - List the state will be added to
 *
 * RETURN:      Status
 *
 * DESCRIPTION: Create a new state and push it
 *
 ******************************************************************************/

acpi_status
acpi_ut_create_update_state_and_push(union acpi_operand_object *object,
				     u16 action,
				     union acpi_generic_state **state_list)
{
	union acpi_generic_state *state;

	ACPI_FUNCTION_ENTRY();

	/* Ignore null objects; these are expected */

	if (!object) {
		return (AE_OK);
	}

	state = acpi_ut_create_update_state(object, action);
	if (!state) {
		return (AE_NO_MEMORY);
	}

	acpi_ut_push_generic_state(state_list, state);
	return (AE_OK);
}

/*******************************************************************************
 *
 * FUNCTION:    acpi_ut_walk_package_tree
 *
 * PARAMETERS:  source_object       - The package to walk
 *              target_object       - Target object (if package is being copied)
 *              walk_callback       - Called once for each package element
 *              context             - Passed to the callback function
 *
 * RETURN:      Status
 *
 * DESCRIPTION: Walk through a package
 *
 ******************************************************************************/

acpi_status
acpi_ut_walk_package_tree(union acpi_operand_object *source_object,
			  void *target_object,
			  acpi_pkg_callback walk_callback, void *context)
{
	acpi_status status = AE_OK;
	union acpi_generic_state *state_list = NULL;
	union acpi_generic_state *state;
	u32 this_index;
	union acpi_operand_object *this_source_obj;

	ACPI_FUNCTION_TRACE(ut_walk_package_tree);

	state = acpi_ut_create_pkg_state(source_object, target_object, 0);
	if (!state) {
		return_ACPI_STATUS(AE_NO_MEMORY);
	}

	while (state) {

		/* Get one element of the package */

		this_index = state->pkg.index;
		this_source_obj = (union acpi_operand_object *)
		    state->pkg.source_object->package.elements[this_index];

		/*
		 * Check for:
		 * 1) An uninitialized package element. It is completely
		 *    legal to declare a package and leave it uninitialized
		 * 2) Not an internal object - can be a namespace node instead
		 * 3) Any type other than a package. Packages are handled in else
		 *    case below.
		 */
		if ((!this_source_obj) ||
		    (ACPI_GET_DESCRIPTOR_TYPE(this_source_obj) !=
		     ACPI_DESC_TYPE_OPERAND) ||
		    (this_source_obj->common.type != ACPI_TYPE_PACKAGE)) {
			status =
			    walk_callback(ACPI_COPY_TYPE_SIMPLE,
					  this_source_obj, state, context);
			if (ACPI_FAILURE(status)) {
				return_ACPI_STATUS(status);
			}

			state->pkg.index++;
			while (state->pkg.index >=
			       state->pkg.source_object->package.count) {
				/*
				 * We've handled all of the objects at this level,  This means
				 * that we have just completed a package. That package may
				 * have contained one or more packages itself.
				 *
				 * Delete this state and pop the previous state (package).
				 */
				acpi_ut_delete_generic_state(state);
				state = acpi_ut_pop_generic_state(&state_list);

				/* Finished when there are no more states */

				if (!state) {
					/*
					 * We have handled all of the objects in the top level
					 * package just add the length of the package objects
					 * and exit
					 */
					return_ACPI_STATUS(AE_OK);
				}

				/*
				 * Go back up a level and move the index past the just
				 * completed package object.
				 */
				state->pkg.index++;
			}
		} else {
			/* This is a subobject of type package */

			status =
			    walk_callback(ACPI_COPY_TYPE_PACKAGE,
					  this_source_obj, state, context);
			if (ACPI_FAILURE(status)) {
				return_ACPI_STATUS(status);
			}

			/*
			 * Push the current state and create a new one
			 * The callback above returned a new target package object.
			 */
			acpi_ut_push_generic_state(&state_list, state);
			state =
			    acpi_ut_create_pkg_state(this_source_obj,
						     state->pkg.this_target_obj,
						     0);
			if (!state) {

				/* Free any stacked Update State objects */

				while (state_list) {
					state =
					    acpi_ut_pop_generic_state
					    (&state_list);
					acpi_ut_delete_generic_state(state);
				}
				return_ACPI_STATUS(AE_NO_MEMORY);
			}
		}
	}

	/* We should never get here */

	return_ACPI_STATUS(AE_AML_INTERNAL);
}

#ifdef ACPI_DEBUG_OUTPUT
/*******************************************************************************
 *
 * FUNCTION:    acpi_ut_display_init_pathname
 *
 * PARAMETERS:  type                - Object type of the node
 *              obj_handle          - Handle whose pathname will be displayed
 *              path                - Additional path string to be appended.
 *                                      (NULL if no extra path)
 *
 * RETURN:      acpi_status
 *
 * DESCRIPTION: Display full pathname of an object, DEBUG ONLY
 *
 ******************************************************************************/

void
acpi_ut_display_init_pathname(u8 type,
			      struct acpi_namespace_node *obj_handle,
			      const char *path)
{
	acpi_status status;
	struct acpi_buffer buffer;

	ACPI_FUNCTION_ENTRY();

	/* Only print the path if the appropriate debug level is enabled */

	if (!(acpi_dbg_level & ACPI_LV_INIT_NAMES)) {
		return;
	}

	/* Get the full pathname to the node */

	buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER;
	status = acpi_ns_handle_to_pathname(obj_handle, &buffer, TRUE);
	if (ACPI_FAILURE(status)) {
		return;
	}

	/* Print what we're doing */

	switch (type) {
	case ACPI_TYPE_METHOD:

		acpi_os_printf("Executing  ");
		break;

	default:

		acpi_os_printf("Initializing ");
		break;
	}

	/* Print the object type and pathname */

	acpi_os_printf("%-12s %s",
		       acpi_ut_get_type_name(type), (char *)buffer.pointer);

	/* Extra path is used to append names like _STA, _INI, etc. */

	if (path) {
		acpi_os_printf(".%s", path);
	}
	acpi_os_printf("\n");

	ACPI_FREE(buffer.pointer);
}
#endif


text:
<?php

namespace Zephir;

/**
 * BranchGraph
 *
 * Represents a group of branch nodes
 */
class BranchGraph
{
    protected $root;

    protected $branchMap;

    /**
     * Adds a leaf to the branch tree
     *
     * @param Branch $branch
     */
    public function addLeaf(Branch $branch)
    {
        if (isset($this->branchMap[$branch->getUniqueId()])) {
            $branchNode = $this->branchMap[$branch->getUniqueId()];
        } else {
            $branchNode = new BranchGraphNode($branch);
        }
        $branchNode->increase();

        $tempBranch = $branch->getParentBranch();
        while ($tempBranch) {
            if (isset($this->branchMap[$tempBranch->getUniqueId()])) {
                $parentBranchNode = $this->branchMap[$tempBranch->getUniqueId()];
            } else {
                $parentBranchNode = new BranchGraphNode($tempBranch);
                $this->branchMap[$tempBranch->getUniqueId()] = $parentBranchNode;
            }
            $parentBranchNode->insert($branchNode);
            $branchNode = $parentBranchNode;
            $tempBranch = $tempBranch->getParentBranch();
            if (!$tempBranch) {
                $this->root = $parentBranchNode;
            }
        }
    }

    /**
     * Returns the tree's root node
     *
     * @return BranchGraphNode
     */
    public function getRoot()
    {
        return $this->root;
    }
}


text:
using log4net.ObjectRenderer;
using Newtonsoft.Json;

namespace log4net.Util.Serializer
{
    public class JsonDotNetSerializer : ISerializer, ISerializerFactory
    {
        public bool IncludeNullValues { get; set; }

        public object Serialize(object obj)
        {
            var settings = new JsonSerializerSettings
            {
                NullValueHandling = IncludeNullValues ?
                    NullValueHandling.Include :
                    NullValueHandling.Ignore
            };

            return JsonConvert.SerializeObject(obj, settings);
        }

        public ISerializer GetSerializer(object obj, RendererMap map)
        {
            return this;
        }
    }
}


text:
A simple node app to tell Slack users about the daily Boston food trucks!

![](http://i.imgur.com/wsb04Nf.png)

## Usage

First create a [Slack incoming webhook](https://slack.com/apps/A0F7XDUAZ-incoming-webhooks).

Set config (locations, Slack URL) in `config.js`.

Run `npm start`.

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)


text:
Looper.js
=========

Audio looper in pure JavaScript (Web Audio API)

Input/Output/Loops features : stereo gain controls, filters*, mute

Loops features : unlimited tracks, overdubing, skip too short track, ...

*filters provided by Tuna : https://github.com/Dinahmoe/tuna

[Live Demo](http://www.onlfait.ch/Looper.js/)

![screenshot](/images/screen.png?raw=true)

Work In Progress
----------------

- ~~add/remove loop~~ done!
- add/remove track on loop
- recording individual loop (wav)
- recording complete session (wav)
- playing loop in a sequencer
- patch maker for filters

Inspiration / Credits / Tutorials
---------------------------------

- http://webaudioapi.com/
- http://webaudiodemos.appspot.com/
- http://forestmist.org/share/web-audio-api-demo/
- http://forestmist.org/blog/web-audio-api-loops/
- https://github.com/cwilso/metronome
- http://www.html5rocks.com/en/tutorials/audio/scheduling/
- https://github.com/cwilso/Audio-Input-Effects
- http://noisehack.com/custom-audio-effects-javascript-web-audio-api/
- http://www.smartjava.org/content/exploring-html5-web-audio-visualizing-sound
- http://chimera.labs.oreilly.com/books/1234000001552/index.html
- https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API

----------

(excuse me for my bad English)


text:
namespace blink {

class ScrollState final : public RefCountedWillBeGarbageCollected<ScrollState>, public ScriptWrappable {
    DEFINE_WRAPPERTYPEINFO();

public:
    static PassRefPtrWillBeRawPtr<ScrollState> create(
        double deltaX, double deltaY, double deltaGranularity, double velocityX,
        double velocityY, bool inInertialPhase, bool isEnding, bool fromUserInput = false,
        bool shouldPropagate = true, bool deltaConsumedForScrollSequence = false);

    // Web exposed methods.

    // Reduce deltas by x, y.
    void consumeDelta(double x, double y, ExceptionState&);
    // Positive when scrolling left.
    double deltaX() const { return m_deltaX; }
    // Positive when scrolling up.
    double deltaY() const { return m_deltaY; }
    // Indicates the smallest delta the input device can produce. 0 for unquantized inputs.
    double deltaGranularity() const { return m_deltaGranularity; }
    // Positive if moving right.
    double velocityX() const { return m_velocityX; }
    // Positive if moving down.
    double velocityY() const { return m_velocityY; }
    // True for events dispatched after the users's gesture has finished.
    bool inInertialPhase() const { return m_inInertialPhase; }
    // True if this is the last event for this scroll.
    bool isEnding() const { return m_isEnding; }
    // True if this scroll is the direct result of user input.
    bool fromUserInput() const { return m_fromUserInput; }
    // True if this scroll is allowed to bubble upwards.
    bool shouldPropagate() const { return m_shouldPropagate; }

    // Non web exposed methods.
    void consumeDeltaNative(double x, double y);

    void setCurrentNativeScrollingElement(Element* element)
    {
        m_currentNativeScrollingElement = element;
    }

    Element* currentNativeScrollingElement() const
    {
        return m_currentNativeScrollingElement.get();
    }

    void setDeltaConsumedForScrollSequence(bool deltaConsumedForScrollSequence)
    {
        m_deltaConsumedForScrollSequence = deltaConsumedForScrollSequence;
    }

    bool deltaConsumedForScrollSequence() const
    {
        return m_deltaConsumedForScrollSequence;
    }

    bool fullyConsumed() const
    {
        return !m_deltaX && !m_deltaY && !m_isEnding;
    }

    DEFINE_INLINE_TRACE()
    {
        visitor->trace(m_currentNativeScrollingElement);
    };

private:
    ScrollState();
    ScrollState(double deltaX, double deltaY, double deltaGranularity,
        double velocityX, double velocityY, bool inInertialPhase, bool isEnding,
        bool fromUserInput, bool shouldPropagate, bool deltaConsumedForScrollSequence);

    double m_deltaX;
    double m_deltaY;
    double m_deltaGranularity;
    double m_velocityX;
    double m_velocityY;
    bool m_inInertialPhase;
    bool m_isEnding;

    bool m_fromUserInput;
    bool m_shouldPropagate;
    // The last native element to respond to a scroll, or null if none exists.
    RefPtrWillBeMember<Element> m_currentNativeScrollingElement;
    // Whether the scroll sequence has had any delta consumed.
    bool m_deltaConsumedForScrollSequence;
};

} // namespace blink

#endif // ScrollState_h


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Staurothele sienae B. de Lesd.

### Remarks
null


text:
require 'rails_helper'

RSpec.describe Course::Assessment::Answer::CommentNotifier, type: :mailer do
  let!(:instance) { Instance.default }

  with_tenant(:instance) do
    def set_assessment_email_setting(course, category_id, setting, regular, phantom)
      email_setting = course.
                      setting_emails.
                      where(component: :assessments,
                            course_assessment_category_id: category_id,
                            setting: setting).first
      email_setting.update!(regular: regular, phantom: phantom)
    end

    describe '#annotation_replied' do
      let(:user) { create(:user) }
      let(:course) { create(:course) }
      let(:course_creator) { course.course_users.first }
      let(:course_user) { create(:course_user, course: course, user: user) }
      let(:other_user) { create(:course_user, course: course).user }
      let(:assessment) { create(:assessment, :published_with_programming_question, course: course) }
      let(:category_id) { assessment.tab.category_id }
      let(:programming_file) do
        sub = create(:submission, assessment: assessment, course_user: course_user, creator: user)
        ans = create(:course_assessment_answer_programming, question: assessment.questions.first,
                                                            file_count: 1, submission: sub)
        ans.files.first
      end
      let(:code_annotation) do
        create(:course_assessment_answer_programming_file_annotation, :with_post,
               file: programming_file, course: course)
      end
      let(:post) do
        create(:course_discussion_post, topic: code_annotation.acting_as, creator: other_user)
      end

      before do
        code_annotation.acting_as.ensure_subscribed_by(user)
        code_annotation.acting_as.ensure_subscribed_by(course_creator.user)
      end
      subject { Course::Assessment::Answer::CommentNotifier.annotation_replied(post) }

      it 'sends email notifications' do
        expect { subject }.to change(ActionMailer::Base.deliveries, :count).by(2)
      end

      context 'when a user unsubscribes' do
        before do
          setting_email = course.
                          setting_emails.
                          where(component: :assessments,
                                course_assessment_category_id: category_id,
                                setting: :new_comment).first
          course_creator.email_unsubscriptions.create!(course_setting_email: setting_email)
        end

        it 'does not send an email notification to the user' do
          expect { subject }.to change { ActionMailer::Base.deliveries.count }.by(1)
        end
      end

      context 'when "new comment" email setting is disabled for regular users' do
        before { set_assessment_email_setting(course, category_id, 'new_comment', false, true) }

        it 'does not send email notifications to the regular users' do
          expect { subject }.to change { ActionMailer::Base.deliveries.count }.by(0)
        end

        it 'sends email notifications to phantom users' do
          course_user.update!(phantom: true)
          expect { subject }.to change { ActionMailer::Base.deliveries.count }.by(1)
        end
      end

      context 'when "new comment" email setting is disabled for phantom users' do
        before { set_assessment_email_setting(course, category_id, 'new_comment', true, false) }

        it 'does not send email notifications to the phantom users but sends email notifications to regular users' do
          course_user.update!(phantom: true)
          expect { subject }.to change { ActionMailer::Base.deliveries.count }.by(1)
        end
      end

      context 'when "new comment" email setting is disabled' do
        before { set_assessment_email_setting(course, category_id, 'new_comment', false, false) }

        it 'does not send email notifications to everyone' do
          expect { subject }.to change { ActionMailer::Base.deliveries.count }.by(0)
        end
      end
    end
  end
end


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="shortcut icon" type="image/png" href="img/Mining_Task.png"/>
    <title>Monero Web Miner - Using CoinHive</title>
    <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="css/freelancer.css" rel="stylesheet">

        Monero Web Miner
        <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
          Menu

        </button>

              Notice

              Get Started

              CoinHive API

              Start Mining Monero!!!

Your Site Key Here

            <input class="form-control" style="width: 100%" id="site_key" type="text" placeholder="Please input your CoinHive site key.">

            <button id="mine_btn" class="btn btn-danger btn-block" type="button" style="cursor: pointer; width: 100%;">Start Mining!!!</button>

Notice

 This site is using CoinHive as web miner program. When you open this website, you use 10% calculating power of your CPU mining Monero to donate developer of this site. If you want to stop helping us, just close the website.

We use CoinHive as our short link provider as well. Every link you click in this website, will lead you to a calculating process for mining Monero, then redirect you to the right page after that.

              What's going on?

Get Started

Get My Site Key

Register as a CoinHive User

Get Your Site Key

Come Here and Start Mining!

Support Device

Mobile Device

Personal Computer

Everything That Can Open Browser!

CoinHive API

Coming Soon

Donate Us!

                XMR: Our Monero Address on PASTEBIN

                ETH: 0x44e5c125d776d8768aecc7f7a85888d547fb731a

                BTC: 3J23QxDqQE5gaXMsob6cLhpknAvGZvf1KA

                Github: Here

About This Site

                      We use the following tools to build this site:

                      000webhost

                      BootStrap

                      CoinHive

                      Freelancer

                      jQuery

              Copyright © Monero Web Miner 2017


text:
import React, { useState, useEffect } from 'react';
import { connect, useSelector, useDispatch } from 'react-redux';
import { bindActionCreators } from 'redux';
import { find, groupBy, map } from 'lodash';
import VolumeControl from './VolumeControl';
import MuteControl from './MuteControl';
import Icon from '../Icon';
import Thumbnail from '../Thumbnail';
import LinksSentence from '../LinksSentence';
import DropdownField from './DropdownField';
import * as coreActions from '../../services/core/actions';
import * as mopidyActions from '../../services/mopidy/actions';
import * as pusherActions from '../../services/pusher/actions';
import * as snapcastActions from '../../services/snapcast/actions';
import { sortItems, indexToArray } from '../../util/arrays';
import { titleCase } from '../../util/helpers';
import { I18n, i18n } from '../../locale';
import Link from '../Link';
import ErrorBoundary from '../ErrorBoundary';

const Header = ({
  stream,
  server,
}) => {
  const dispatch = useDispatch();
  const {
    id,
    status,
    properties: {
      playbackStatus,
      canPlay,
      canPause,
      canControl,
      metadata: {
        title,
        artist: artists = [],
        artUrl,
      } = {},
    } = {},
  } = stream || {};
  let onClick = null;
  switch (playbackStatus) {
    case 'playing':
      if (canPause) onClick = () => dispatch(snapcastActions.controlStream(id, 'pause'));
      break;
    default:
      if (canPlay) onClick = () => dispatch(snapcastActions.controlStream(id, 'play'));
      break;
  }

  return (

      <div
        className={[
          'output-control__stream__header__art',
          `output-control__stream__header__art--${onClick !== null ? playbackStatus : 'disabled'}`
        ].join(' ')}
        onClick={onClick}
      >
        <Thumbnail
          image={artUrl}
          size="small"
        />

          {server?.name || id}
          {!canControl && (

              {i18n('snapcast.not_controllable').toUpperCase()}

          )}

        {!title && !artists?.length ? (

            <I18n path={`common.play_state.${playbackStatus || status}`} />

        ) : (

{title}

            {artists && (

                <LinksSentence items={artists.map((name) => ({ name }))} type="artist" nolinks />

            )}

        )}

  );
};

const Group = ({
  group: {
    id: groupId,
    name: groupName,
    stream_id,
    clients_ids = [],
  } = {},
}) => {
  const allClients = useSelector((state) => state.snapcast.clients || {});
  const allStreams = indexToArray(useSelector((state) => state.snapcast.streams || {}));
  const clients = clients_ids.length > 0 && Object.keys(allClients).length > 0
    ? clients_ids.map((c) => allClients[c]).filter((c) => c.connected)
    : [];
  const dispatch = useDispatch();

  if (!clients || !clients.length) return null;

  return (

        <Link
          className="text"
          to={`/settings/services/snapcast/${groupId}`}
          scrollTo="#services-snapcast-groups"
        >
          {titleCase(groupName)}
        </Link>
        <DropdownField
          name="Stream"
          value={stream_id}
          icon="settings_input_component"
          options={allStreams.map((s) => ({ value: s.id, label: titleCase(s.id) }))}
          noLabel
          handleChange={
            (value) => dispatch(snapcastActions.setGroupStream(groupId, value))
          }
        />

        {clients.map((client) => {
          const {
            id: clientId,
            name: clientName,
            mute,
            volume,
          } = client;
          return (

                {titleCase(clientName)}

                <MuteControl
                  noTooltip
                  mute={mute}
                  onMuteChange={
                    (value) => dispatch(snapcastActions.setClientMute(clientId, value))
                  }
                />
                <VolumeControl
                  volume={volume}
                  mute={mute}
                  onVolumeChange={
                    (value) => dispatch(snapcastActions.setClientVolume(clientId, value))
                  }
                />

          );
        })}

  );
};

const Outputs = () => {
  const snapcastEnabled = useSelector((state) => state.snapcast.enabled);
  const allGroups = indexToArray(useSelector((state) => state.snapcast.groups || {}));
  const allStreams = useSelector((state) => state.snapcast.streams || {});
  const allServers = indexToArray(useSelector((state) => state.mopidy.servers || {}));
  const groupsByStream = groupBy(allGroups, 'stream_id');
  if (!snapcastEnabled) {
    return (

        <I18n path="playback_controls.snapcast_not_enabled" />

    );
  }

  return (
    <ErrorBoundary>
      {map(groupsByStream, (groups, id) => {
        const stream = {
          id,
          ...find(allStreams, (s) => s.id === id) || {},
          server: find(allServers, (s) => s.snapcast_stream === id),
          groups,
        };
        return (
          <div className="output-control__stream" key={`stream_${id}`}>

            {groups.map((group) => <Group group={group} key={`group_${group.id}`} />)}

        );
      })}
    </ErrorBoundary>
  );
}

const Commands = () => {
  const dispatch = useDispatch();
  const commandsObj = useSelector((state) => state.pusher.commands || {});
  if (!commandsObj) return null;

  let items = indexToArray(commandsObj);
  if (items.length <= 0) return null;

  items = sortItems(items, 'sort_order');

  return (
    <ErrorBoundary>

        {
          items.map((command) => (

 dispatch(pusherActions.runCommand(command.id))}
            >
              <Icon className="commands__item__icon" name={command.icon} />
              <span className={`${command.colour}-background commands__item__background`} />

          ))
        }

    </ErrorBoundary>
  );
};

const OutputControl = ({ force_expanded }) => {
  const [expanded, setExpanded] = useState(false);

  useEffect(() => {
    if (force_expanded && !expanded) {
      setExpanded(true);
    }
  }, [force_expanded]);

  if (expanded) {
    const outputs = <Outputs />;
    const commands = <Commands />;
    return (

        {!force_expanded &&
 setExpanded(false)} />}
        <button
          className="control speakers active"
          onClick={() => setExpanded(false)}
        >
          <Icon name="speaker" />
        </button>

          {commands}
          {outputs}

    );
  }
  return (

      <button
        className="control speakers"
        onClick={() => setExpanded(true)}
      >
        <Icon name="speaker" />
      </button>

  );
}

export default OutputControl;


text:
module WiserTrails
  class Activity < inherit_orm("Activity")
  end
end


text:
:before:
<%= buildForm('test/fixtures/min_example.form.js') %>
:after:


text:
#import "ANAdAdapterMoPubBase.h"

@implementation ANAdAdapterMoPubBase

@synthesize delegate;

- (NSString *)keywordsFromTargetingParameters:(ANTargetingParameters *)targetingParameters {
    NSMutableArray *keywordArray = [[NSMutableArray alloc] init];

    ANGender gender = targetingParameters.gender;
    switch (gender) {
        case ANGenderMale:
            [keywordArray addObject:@"m_gender:male"];
            break;
        case ANGenderFemale:
            [keywordArray addObject:@"m_gender:female"];
            break;
        default:
            break;
    }

    if ([targetingParameters age]) {
        [keywordArray addObject:[NSString stringWithFormat:@"m_age:%@", targetingParameters.age]];
    }

    [targetingParameters.customKeywords enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
        [keywordArray addObject:[NSString stringWithFormat:@"%@:%@", key, obj]];
    }];

    return [keywordArray componentsJoinedByString:@","];
}

- (CLLocation *)locationFromTargetingParameters:(ANTargetingParameters *)targetingParameters {
    ANLocation *location = targetingParameters.location;
    if (location) {
        CLLocation *mpLoc = [[CLLocation alloc] initWithCoordinate:CLLocationCoordinate2DMake(location.latitude, location.longitude)
                                                          altitude:0
                                                horizontalAccuracy:location.horizontalAccuracy
                                                  verticalAccuracy:0
                                                         timestamp:location.timestamp];
        return mpLoc;
    }
    return nil;
}

@end


text:
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Snowball.Platforms.OpenGL;

namespace Snowball
{
    internal static class NativeLibraryLoader
    {
        [ModuleInitializer]
        public static void Initialize()
        {
            NativeLibrary.SetDllImportResolver(typeof(NativeLibraryLoader).Assembly, ResolveDllImport);
        }

        private static IntPtr ResolveDllImport(string libraryName, Assembly assembly, DllImportSearchPath? searchPath)
        {
            if (libraryName == GL.LibraryName)
            {
                return NativeLibrary.Load("opengl32");
            }

            return IntPtr.Zero;
        }
    }
}


text:
@class StoryDetailViewController;

@interface StoryPagesObjCViewController : BaseViewController
<UIScrollViewDelegate, UIPopoverControllerDelegate, UIPopoverPresentationControllerDelegate, UIGestureRecognizerDelegate> {
    NewsBlurAppDelegate *appDelegate;
    THCircularProgressView *circularProgressView;
    UIButton *buttonPrevious;
    UIButton *buttonNext;
    UIButton *buttonText;
    UIBarButtonItem *markReadBarButton;
    UIBarButtonItem *separatorBarButton2;
    UIActivityIndicatorView *loadingIndicator;
    UIBarButtonItem *buttonBack;
    UIView *traverseView;
    UIView *progressView;
    UIView *progressViewContainer;

    BOOL isDraggingScrollview;
    BOOL isAnimatedIntoPlace;
    BOOL inRotation;
    BOOL waitingForNextUnreadFromServer;
    UIInterfaceOrientation _orientation;
    CGFloat scrollPct;
}

@property (nonatomic, strong) NewsBlurAppDelegate *appDelegate;
@property (nonatomic) StoryDetailViewController *currentPage;
@property (nonatomic) StoryDetailViewController *nextPage;
@property (nonatomic) StoryDetailViewController *previousPage;
@property (nonatomic, strong) IBOutlet UIScrollView *scrollView;
@property (nonatomic, strong) IBOutlet UIPageControl *pageControl;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *scrollViewTopConstraint;

@property (weak, nonatomic) IBOutlet UIView *autoscrollView;
@property (weak, nonatomic) IBOutlet UIImageView *autoscrollBackgroundImageView;
@property (weak, nonatomic) IBOutlet UIButton *autoscrollDisableButton;
@property (weak, nonatomic) IBOutlet UIButton *autoscrollPauseResumeButton;
@property (weak, nonatomic) IBOutlet UIButton *autoscrollSlowerButton;
@property (weak, nonatomic) IBOutlet UIButton *autoscrollFasterButton;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *autoscrollBottomConstraint;

@property (nonatomic, strong) IBOutlet UIActivityIndicatorView *loadingIndicator;
@property (nonatomic) IBOutlet UIImageView *textStorySendBackgroundImageView;
@property (nonatomic) IBOutlet UIImageView *prevNextBackgroundImageView;
@property (nonatomic) IBOutlet THCircularProgressView *circularProgressView;
@property (nonatomic) IBOutlet UIButton *buttonPrevious;
@property (nonatomic) IBOutlet UIButton *buttonNext;
@property (nonatomic) IBOutlet UIButton *buttonText;
@property (nonatomic) IBOutlet UIButton *buttonSend;
@property (nonatomic) UIBarButtonItem *buttonBack;
@property (nonatomic) IBOutlet UIBarButtonItem *buttonAction;
@property (nonatomic) IBOutlet UIView *bottomSize;
@property (nonatomic) IBOutlet NSLayoutConstraint *bottomSizeHeightConstraint;
@property (nonatomic) IBOutlet UIBarButtonItem * spacerBarButton;
@property (nonatomic) IBOutlet UIBarButtonItem * spacer2BarButton;
@property (nonatomic) IBOutlet UIBarButtonItem * spacer3BarButton;
@property (nonatomic) IBOutlet UIBarButtonItem * separatorBarButton;
@property (nonatomic) IBOutlet UIView *traverseView;
@property (nonatomic) IBOutlet UIView *progressView;
@property (nonatomic) IBOutlet UIView *progressViewContainer;
@property (nonatomic) IBOutlet UIBarButtonItem *fontSettingsButton;
@property (nonatomic) IBOutlet UIBarButtonItem *originalStoryButton;
@property (nonatomic, strong) IBOutlet UIBarButtonItem *subscribeButton;
@property (nonatomic) IBOutlet NSLayoutConstraint *traverseBottomConstraint;
@property (nonatomic) IBOutlet NSLayoutConstraint *scrollBottomConstraint;
@property (nonatomic) IBOutlet UIView *statusBarBackgroundView;
@property (nonatomic) BOOL autoscrollAvailable;
@property (nonatomic) BOOL autoscrollActive;
@property (nonatomic) NSTimeInterval autoscrollSpeed;
@property (readwrite) BOOL traversePinned;
@property (readwrite) BOOL traverseFloating;
@property (readwrite) CGFloat inTouchMove;
@property (assign) BOOL isDraggingScrollview;
@property (assign) BOOL isAnimatedIntoPlace;
@property (assign) BOOL waitingForNextUnreadFromServer;
@property (nonatomic) MBProgressHUD *storyHUD;
@property (nonatomic, strong) NBNotifier *notifier;
@property (nonatomic) NSInteger scrollingToPage;
@property (nonatomic, readonly) BOOL shouldHideStatusBar;
@property (nonatomic, readonly) BOOL isNavigationBarHidden;
@property (nonatomic, readonly) BOOL allowFullscreen;
@property (nonatomic) BOOL forceNavigationBarShown;
@property (nonatomic) BOOL currentlyTogglingNavigationBar;
@property (nonatomic, readonly) BOOL isHorizontal;
@property (nonatomic) BOOL temporarilyMarkedUnread;

- (void)resizeScrollView;
- (void)applyNewIndex:(NSInteger)newIndex pageController:(StoryDetailViewController *)pageController;
- (void)layoutForInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;
- (void)updateStatusBarState;
- (void)setNavigationBarHidden:(BOOL)hide;
- (void)setNavigationBarHidden:(BOOL)hide alsoTraverse:(BOOL)alsoTraverse;

//- (void)transitionFromFeedDetail;
- (void)resetPages;
- (void)hidePages;
- (void)refreshPages;
- (void)reorientPages;
- (void)refreshHeaders;
- (void)setStoryFromScroll;
- (void)setStoryFromScroll:(BOOL)force;
- (void)advanceToNextUnread;
- (void)updatePageWithActiveStory:(NSInteger)location;
- (void)animateIntoPlace:(BOOL)animated;
- (void)changePage:(NSInteger)pageIndex;
- (void)changePage:(NSInteger)pageIndex animated:(BOOL)animated;

- (void)setNextPreviousButtons;
- (void)setTextButton;
- (void)setTextButton:(StoryDetailViewController *)storyViewController;
- (void)subscribeToBlurblog;

- (IBAction)toggleFontSize:(id)sender;
- (void)setFontStyle:(NSString *)fontStyle;
- (void)changeFontSize:(NSString *)fontSize;
- (void)changeLineSpacing:(NSString *)lineSpacing;
- (void)changedFullscreen;
- (void)changedAutoscroll;
- (void)changedScrollOrientation;
- (void)updateStoriesTheme;
- (void)showShareHUD:(NSString *)msg;
- (void)showFetchingTextNotifier;
- (void)hideNotifier;

- (IBAction)showOriginalSubview:(id)sender;

- (void)flashCheckmarkHud:(NSString *)messageType;

- (void)tappedStory;
- (void)showAutoscrollBriefly:(BOOL)briefly;
- (void)hideAutoscrollAfterDelay;
- (void)hideAutoscrollImmediately;

- (IBAction)autoscrollDisable:(UIButton *)sender;
- (IBAction)autoscrollPauseResume:(UIButton *)sender;
- (IBAction)autoscrollSlower:(UIButton *)sender;
- (IBAction)autoscrollFaster:(UIButton *)sender;

- (IBAction)openSendToDialog:(id)sender;
- (IBAction)doNextUnreadStory:(id)sender;
- (IBAction)doPreviousStory:(id)sender;
- (IBAction)tapProgressBar:(id)sender;
- (IBAction)toggleTextView:(id)sender;

- (void)finishMarkAsSaved:(NSDictionary *)params;
- (BOOL)failedMarkAsSaved:(NSDictionary *)params;
- (void)finishMarkAsUnsaved:(NSDictionary *)params;
- (BOOL)failedMarkAsUnsaved:(NSDictionary *)params;
- (BOOL)failedMarkAsUnread:(NSDictionary *)params;

@end


text:
<!DOCTYPE frameset SYSTEM "frameset.dtd">
<frameset>
    <predicate lemma="marry">
        <note>
            Frames file for 'marry' based on survey of sentences in the WSJ
            corpus.
        </note>

        <roleset id="marry.01" name="to take as a spouse, to join spouses,  combine
  agreeably" vncls="22.2 36.2">
            <roles>
                <role descr="causer" n="0">

                    <vnrole vncls="22.2" vntheta="Agent"/>
                </role>

                <role descr="one half" n="1">

                    <vnrole vncls="22.2" vntheta="Patient1"/>
                    <vnrole vncls="36.2" vntheta="Actor1"/>
                </role>

                <role descr="second half" n="2">

                    <vnrole vncls="22.2" vntheta="Patient2"/>
                    <vnrole vncls="36.2" vntheta="Actor2"/>
                </role>

            </roles>

            <example name="no causer">
                <inflection aspect="ns" form="gerund" person="ns" tense="present" voice="active"/>
                <text>
                    `` [My husband]-1 was instantly impoverished [*-2] by the very act of [*]-1 marrying me , '' she says [*T*-1] .
                </text>
                <arg n="1">[*]</arg>
                <rel>marrying</rel>
                <arg n="2">me</arg>
            </example>

            <example name="with a causer">
                <inflection aspect="ns" form="gerund" person="ns" tense="present" voice="active"/>
                <text>
                    [GM officials]-1 also see a lot of potential in [*]-1 marrying Jaguar 's cars to the technological know-how of Group Lotus PLC , a British engineering and specialty car maker [0] GM bought [*T*-1] in 1986 .
                </text>
                <arg n="0">[*]</arg>
                <rel>marrying</rel>
                <arg n="1">Jaguar 's cars</arg>
                <arg n="2">to the technological know-how of Group Lotus PLC , a British engineering and specialty car maker [0] GM bought [*T*-1] in 1986</arg>
            </example>

            <example name="marry into">
                <inflection aspect="ns" form="infinitive" person="ns" tense="ns" voice="ns"/>
                <text>
                    While the company has always been family-run , Mr. Brawer is n't the first person [0] [*T*-1] to marry into the family and subsequently head Maidenform .
                </text>
                <arg n="1">[*T*-1]</arg>
                <arg n="M" f="RCL">[0] ->  the first person</arg>
                <rel>marry</rel>
                <arg n="2">into the family</arg>
                <arg f="TMP" n="M">subsequently</arg>
            </example>

        </roleset>
    </predicate>

    <note>
        frames created by Olga
    </note>

</frameset>