text
stringlengths 1
22.8M
|
|---|
```objective-c
This program is free software; you can redistribute it and/or modify
the Free Software Foundation
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
// Animation names
#define HANDWITHAMMO_ANIM_DEFAULT_ANIMATION 0
// Color names
// Patch names
// Names of collision boxes
#define HANDWITHAMMO_COLLISION_BOX_PART_NAME 0
// Attaching position names
// Sound names
```
|
Lilian Sukis (born 29 June 1939, Kaunas) is a Canadian operatic soprano of Lithuanian birth. Her family moved first to Germany during World War II, and then to Canada in 1950. She earned a BA from McMaster University and a diploma from the University of Toronto, and made her professional opera debut in 1964 as Kate Pinkerton in Giacomo Puccini's Madama Butterfly with the Canadian Opera Company. In 1965 she sang the role of Countess Almaviva in Wolfgang Amadeus Mozart's The Marriage of Figaro at the Stratford Festival. That same year she became a pupil at the Metropolitan Opera Studio and School. She made her debut at the Met in 1967 as Helen Niles in the world premiere of Marvin David Levy's Mourning Becomes Electra. In 1969 she became a member of the Bavarian State Opera where she remained for more than 20 years. She has also appeared as a guest artist with several major opera houses and opera festivals internationally, including the Bayreuth Festival, the Frankfurt Opera, Graz, the Hamburg State Opera, the Salzburg Festival, and the Vienna State Opera among others.
References
1939 births
Living people
Canadian operatic sopranos
University of Toronto alumni
McMaster University alumni
20th-century Canadian women opera singers
Lithuanian emigrants to Canada
|
Vishvas Sarang is an Indian politician from Madhya Pradesh associated with Bharatiya Janata Party. He is a member of Madhya Pradesh Legislative Assembly from Narela in Bhopal district. He first served as a corporator of the then Bhopal South Vidhansabha constituency from the same Bhartiya Janta Party. He belongs to Kayastha
Hindu community. Sarang served as the minister for Gas Tragedy Relief and Rehabilitation (Independent Charge) and Panchayat and Rural Development in Madhya Pradesh under chief minister Shivraj Singh Chauhan from 2013 to 2018.
He is an engineering graduate. He started his political career as the corporator of one of the wards of the then Bhopal South Vidhansabha. New constituencies were made in Bhopal in the year 2008, namely Narela, Bhopal Madhya, and Huzur. He got the benefit of being the corporator of Narela, as well as being the son of ex-Rajyasabha MP, Kailash Sarang. Sarang won the seat at the age of 37.
He again contested election against Congress candidate Sunil Sood in 2013, won the seat with increased margin, and became minister in the Shivraj singh chouhan government. Later in 2018, he won the seat against Congress heavyweight, Dr. Mahendra Singh Chouhan.
References
Living people
Madhya Pradesh MLAs 2008–2013
Madhya Pradesh MLAs 2013–2018
Madhya Pradesh MLAs 2018–2023
People from Bhopal
Bharatiya Janata Party politicians from Madhya Pradesh
1971 births
|
Dr. Béla Merkely (born 28 June 1966) is a Hungarian interventional cardiologist and sports cardiologist, a university professor, director of Semmelweis University's Heart and Vascular Centre and the current rector of Semmelweis University since 1 July 2018.
Career
Béla Merkely obtained his medical degree with summa cum laude honours in 1991 at Semmelweis University's Faculty of Medicine in Budapest, Hungary. After graduation, he continued his studies at the third Department of Internal Medicine at Ruprecht-Karls University of Heidelberg, Germany as a DAAD Fellow.
He became board certified in cardiology in 1998 and obtained his PhD in ventricular arrhythmias in 1999. He also holds a Transthoracic Echocardiography (TTE) Certification and was the first Hungarian clinical cardiac electrophysiologist to earn the Cardiac Pacing and Implantable Cardioverter Defibrillators Certification issued by the European Heart Rhythm Association (EHRA). In 2006, he became a Doctor of the Hungarian Academy of Sciences (DSc).
Since 2007, he has been chairman and director of Semmelweis University's heart and vascular centre. The following year, he was promoted to Professor at Semmelweis University. In 2015, Merkely became president of Semmelweis University's Hospital and vice-rector for Clinical Affairs. In 2018, he was appointed Rector of Semmelweis University.
Merkely is the Honorary President of the Hungarian Society of Cardiology, Honorary President and former President of the Hungarian Heart Rhythm Association, former President of the Hungarian Association of Percutaneous Cardiovascular Intervention, and President of the Cardiology Section of the Professional College.
Merkely has held functions in the different bodies and associations of the European Society of Cardiology (ESC) for more than 20 years. Between 2014 and 2016 he was Councillor, between 2016 and 2018 he was vice-president of the ESC. He is also a Fellow of the American College of Cardiology (ACC).
Since 2020, following the outbreak of the COVID-19 pandemic, Merkely has been the Chair of the Clinical Epidemiology Working Group of the four Hungarian Medical Universities and also the chair of the Epidemiology Committee of Semmelweis University.
Research and scientific work
His major research interests are the non-pharmacological treatment of heart failure; new techniques in interventional cardiology; invasive and non-invasive imaging in heart failure; arrhythmias and acute coronary syndromes; sport cardiology, cardiac remodelling of elite athletes. Since 1994, he has been principal investigator of 15 research projects funded by research grants. His papers are published in a range of Hungarian and international scientific journals. He is the editor-in-chief of the Hungarian journal Orvosképzés, vice editor-in-chief of Interventional Medicine & Applied Science and is the member of the editorial boards of Cor et Vasa, the Journal of Cardiovascular Emergencies, Journal of Hungarian Interdisciplinary Medicine, Frontiers in Cardiovascular Medicine, Advances in Interventional Cardiology, World Journal of Cardiology and Clinical Research in Cardiology.
He has authored and co-authored five books, 44 book chapters, has contributed to 14 university coursebook chapters and two university textbooks, and has signed over 650 articles in international and Hungarian medical journals. His cumulative impact factor is 2194,01, the number of his independent citations is 20.333. (As of 20 May 2019.)
He is a regular speaker at Hungarian and international scientific conferences, such as the World Congress of Cardiology, EUROPACE-Cardiostim, EUROPCR and others organised by the American Heart Association, the World Heart Federation, and the American College of Cardiology.
Scientific degrees
2011 Fellow of the American College of Cardiology (FACC)
2006 Doctor of the Hungarian Academy of Sciences (DSc) ”Pathomechanisms of tachyarrhythmias and novel non-pharmacological treatment strategies”
2006 Med. Habil Semmelweis University (Cardiology)
2001 Fellow of the European Society of Cardiology (FESC)
1999 Ph.D. ”Experimental and clinical investigations of ventricular arrhythmias.”
Awards
2021 Lions Fair Play Award, for his decade-long participation in goodwill services
2021 Széchenyi Prize, for the outstanding contribution to the academic life in Hungary
2021 Man of the Year 2020, award of the “Figyelő” business weekly
2018 ESC Silver Medal
2017 Honorary President of the Hungarian Society of Cardiology
2016 Order of Merit of the Hungarian Republic, Commander Cross
2015 Dénes Gábor Award
2014 Astellas Certificate of Merit for the outstanding professional knowledge and magnificent human attitude, Physician of the Year Competition
2014 Gold Medal of Hungarian Society of Cardiology
2013 Honorary Citizen of Budapest
2012 Elite Reviewer in Europace
2011 “FIFA Medical Centre of Excellence” title to the Heart and Vascular Center of Semmelweis University
2011 Order of Merit of the Hungarian Republic, Officer's Cross
2009 Nivou Prize of the Hungarian Academy of Sciences
2006 Pro Civitate Sana Award
2002 Tutor Award of Semmelweis University's Students’ Scientific Association
1999 International Virchow Award for the first place at the 10th World Congress of Electrophysiology
References
External links
List of Dr. Béla Merkely's publications in the Hungarian Database of Scientific Works
1966 births
Living people
Hungarian cardiologists
Semmelweis University alumni
Academic staff of Semmelweis University
|
```java
//your_sha256_hash--------------------------------//
// //
// A b s t r a c t B e a m I n t e r //
// //
//your_sha256_hash--------------------------------//
// <editor-fold defaultstate="collapsed" desc="hdr">
//
//
// This program is free software: you can redistribute it and/or modify it under the terms of the
//
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// program. If not, see <path_to_url
//your_sha256_hash--------------------------------//
// </editor-fold>
package org.audiveris.omr.sig.inter;
import org.audiveris.omr.constant.ConstantSet;
import org.audiveris.omr.glyph.Grades;
import org.audiveris.omr.glyph.Shape;
import org.audiveris.omr.math.GeoOrder;
import org.audiveris.omr.math.LineUtil;
import org.audiveris.omr.math.PointUtil;
import org.audiveris.omr.sheet.Scale;
import org.audiveris.omr.sheet.Scale.Fraction;
import org.audiveris.omr.sheet.Sheet;
import org.audiveris.omr.sheet.SystemInfo;
import org.audiveris.omr.sheet.Versions;
import org.audiveris.omr.sheet.rhythm.Voice;
import org.audiveris.omr.sheet.stem.BeamLinker;
import org.audiveris.omr.sheet.ui.ObjectUIModel;
import org.audiveris.omr.sig.GradeImpacts;
import org.audiveris.omr.sig.SIGraph;
import org.audiveris.omr.sig.relation.BeamPortion;
import org.audiveris.omr.sig.relation.BeamRestRelation;
import org.audiveris.omr.sig.relation.BeamStemRelation;
import org.audiveris.omr.sig.relation.Containment;
import org.audiveris.omr.sig.relation.Link;
import org.audiveris.omr.sig.relation.Relation;
import org.audiveris.omr.sig.ui.AdditionTask;
import org.audiveris.omr.sig.ui.InterEditor;
import org.audiveris.omr.sig.ui.LinkTask;
import org.audiveris.omr.sig.ui.RemovalTask;
import org.audiveris.omr.sig.ui.UITask;
import org.audiveris.omr.sig.ui.UnlinkTask;
import org.audiveris.omr.ui.symbol.BeamSymbol;
import org.audiveris.omr.ui.symbol.MusicFont;
import org.audiveris.omr.ui.symbol.ShapeSymbol;
import org.audiveris.omr.util.HorizontalSide;
import static org.audiveris.omr.util.HorizontalSide.LEFT;
import static org.audiveris.omr.util.HorizontalSide.RIGHT;
import org.audiveris.omr.util.Version;
import org.audiveris.omr.util.VerticalSide;
import static org.audiveris.omr.util.VerticalSide.BOTTOM;
import static org.audiveris.omr.util.VerticalSide.TOP;
import org.audiveris.omr.util.WrappedBoolean;
import org.audiveris.omr.util.Wrapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.geom.Area;
import java.awt.geom.Line2D;
import java.awt.geom.Path2D;
import java.awt.geom.Point2D;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
/**
* Abstract class <code>AbstractBeamInter</code> is the basis for {@link BeamInter},
* {@link BeamHookInter} and {@link SmallBeamInter} classes.
* <p>
* The following image shows two beams - a (full) beam and a beam hook,
* gathered in the same beam group:
* <p>
* <img alt="Beam image"
* src=
* "path_to_url">
* <p>
* NOTA: A beam (and thus a beam group) may span several measures as shown below:
* <p>
* <img src="doc-files/BeamAcrossMeasureBreak.png" alt="Beam across measure break">
*
* @author Herv Bitteur
*/
@XmlAccessorType(XmlAccessType.NONE)
public abstract class AbstractBeamInter
extends AbstractHorizontalInter
{
//~ Static fields/initializers your_sha256_hash-
private static final Constants constants = new Constants();
private static final Logger logger = LoggerFactory.getLogger(AbstractBeamInter.class);
//~ Instance fields your_sha256_hash------------
// Transient data
//---------------
/** Beam-Stem linker. */
private BeamLinker linker;
//~ Constructors your_sha256_hash---------------
/**
* Creates a new AbstractBeamInter <b>ghost</b> object.
* Median and height must be assigned later
*
* @param shape BEAM or BEAM_HOOK or BEAM_SMALL
* @param grade the grade
*/
protected AbstractBeamInter (Shape shape,
Double grade)
{
super(shape, grade);
}
/**
* Creates a new AbstractBeamInter object.
* Note there is no underlying glyph, cleaning will be based on beam area.
*
* @param shape BEAM or BEAM_HOOK or BEAM_SMALL or MULTIPLE_REST
* @param grade evaluated grade
* @param median median beam line
* @param height beam height
*/
protected AbstractBeamInter (Shape shape,
Double grade,
Line2D median,
double height)
{
super(shape, grade, median, height);
}
/**
* Creates a new AbstractBeamInter object.
* Note there is no underlying glyph, cleaning will be based on beam area.
*
* @param shape BEAM or BEAM_HOOK or BEAM_SMALL
* @param impacts the grade details
* @param median median beam line
* @param height beam height
*/
protected AbstractBeamInter (Shape shape,
GradeImpacts impacts,
Line2D median,
double height)
{
super(shape, impacts, median, height);
}
//~ Methods your_sha256_hash--------------------
//--------//
// accept //
//--------//
@Override
public void accept (InterVisitor visitor)
{
visitor.visit(this);
}
//-------//
// added //
//-------//
@Override
public void added ()
{
super.added();
setAbnormal(true); // No stem linked yet
}
//---------------//
// checkAbnormal //
//---------------//
/**
* Check if this beam is connected to a stem or a rest on each end.
*
* @return true if abnormal
*/
@Override
public boolean checkAbnormal ()
{
boolean left = false;
boolean right = false;
for (Relation rel : sig.getRelations(
this,
BeamStemRelation.class,
BeamRestRelation.class)) {
final BeamPortion portion;
if (rel instanceof BeamStemRelation) {
final BeamStemRelation bsRel = (BeamStemRelation) rel;
portion = bsRel.getBeamPortion();
} else {
final BeamRestRelation brRel = (BeamRestRelation) rel;
portion = brRel.getBeamPortion();
}
if (portion == BeamPortion.LEFT) {
left = true;
} else if (portion == BeamPortion.RIGHT) {
right = true;
}
}
setAbnormal(!left || !right);
return isAbnormal();
}
//------------//
// deriveFrom //
//------------//
@Override
public boolean deriveFrom (ShapeSymbol symbol,
Sheet sheet,
MusicFont font,
Point dropLocation)
{
/*
* A beam (or a beam hook) can have its left and/or right sides snapped to existing stems,
* which results in beam width which can increase/decrease according to the stems nearby.
* <p>
* Short beams (like beam hooks) can have their width decrease so much, that both their
* left side and their right side may get snapped to the SAME stem, resulting in a width
* equal to zero.
* Such a zero-wide beam gets invisible, and if the end-user releases the mouse at this
* moment, a very weird beam gets created.
* To cope with this possibility, we have to make sure that the beam width never gets
* lower than a minimum.
*/
final BeamSymbol beamSymbol = (BeamSymbol) symbol;
final Model model = beamSymbol.getModel(font, dropLocation);
median = new Line2D.Double(model.p1, model.p2);
height = model.thickness;
computeArea();
if (staff != null) {
final List<Inter> systemStems = staff.getSystem().getSig().inters(StemInter.class);
Collections.sort(systemStems, Inters.byAbscissa);
// Snap sides?
Double left = getSnapAbscissa(LEFT, systemStems);
Double right = getSnapAbscissa(RIGHT, systemStems);
if (left != null && right != null) {
// Both sides get snapped, let's avoid beam collapse
final double width = right - left;
final int minWidth = sheet.getScale().toPixels(constants.minBeamWidth);
if (width < minWidth) {
// Choose stem side
if (dropLocation.x > 0.5 * (left + right)) {
right = left + minWidth;
} else {
left = right - minWidth;
}
}
}
if (left != null) {
model.p1.setLocation(left, model.p1.getY());
}
if (right != null) {
model.p2.setLocation(right, model.p2.getY());
}
if (left != null || right != null) {
median.setLine(model.p1, model.p2);
computeArea();
dropLocation.setLocation(PointUtil.middle(median));
}
}
return true;
}
//-----------//
// getChords //
//-----------//
/**
* Report the chords that are linked by this beam.
*
* @return the linked chords (head-chords and interleaved rest-chords)
*/
public List<AbstractChordInter> getChords ()
{
final Set<AbstractChordInter> chords = new LinkedHashSet<>();
// Linked head-chords
for (StemInter stem : getStems()) {
chords.addAll(stem.getChords());
}
// Linked rest-chords
for (Relation rel : sig.getRelations(this, BeamRestRelation.class)) {
final Inter rest = sig.getOppositeInter(this, rel);
chords.add((AbstractChordInter) rest.getEnsemble());
}
final List<AbstractChordInter> chordList = new ArrayList<>(chords);
Collections.sort(chordList, Inters.byCenterAbscissa);
return chordList;
}
//------------------//
// getCompetingHook //
//------------------//
/**
* Report the competing beam hook, if any, which shares the same glyph as this beam.
*
* @return the competing hook, or null if none
*/
public BeamHookInter getCompetingHook ()
{
for (Inter opposite : sig.getCompetingInters(this)) {
if ((opposite.getShape() == Shape.BEAM_HOOK) && (opposite.getGlyph() == getGlyph())) {
return (BeamHookInter) opposite;
}
}
return null;
}
//-----------//
// getEditor //
//-----------//
@Override
public InterEditor getEditor ()
{
return new Editor(this);
}
//----------//
// getGroup //
//----------//
/**
* Report the containing group.
*
* @return the containing group, if already set, or null
*/
public BeamGroupInter getGroup ()
{
return (BeamGroupInter) getEnsemble();
}
//----------//
// getHeads //
//----------//
/**
* Report all heads connected to this beam via some stem.
* <p>
* This does not include embedded rests if any.
*
* @return the set of connected heads
*/
public Set<HeadInter> getHeads ()
{
final Set<HeadInter> beamHeads = new LinkedHashSet<>();
for (StemInter stem : getStems()) {
beamHeads.addAll(stem.getHeads());
}
return beamHeads;
}
//-----------//
// getLinker //
//-----------//
/**
* Report the dedicated beam-stem linker.
*
* @return the linker
*/
public BeamLinker getLinker ()
{
return linker;
}
/**
* Define lookup area around the beam for potential stems
*
* @return the look up area
*/
private Area getLookupArea (Scale scale)
{
final Line2D top = getBorder(TOP);
final Line2D bottom = getBorder(BOTTOM);
final int xOut = scale.toPixels(BeamStemRelation.getXOutGapMaximum(getProfile()));
final int yGap = scale.toPixels(BeamStemRelation.getYGapMaximum(getProfile()));
final Path2D lu = new Path2D.Double();
double xMin = top.getX1() - xOut;
double xMax = top.getX2() + xOut;
Point2D topLeft = LineUtil.intersectionAtX(top, xMin);
lu.moveTo(topLeft.getX(), topLeft.getY() - yGap);
Point2D topRight = LineUtil.intersectionAtX(top, xMax);
lu.lineTo(topRight.getX(), topRight.getY() - yGap);
Point2D bottomRight = LineUtil.intersectionAtX(bottom, xMax);
lu.lineTo(bottomRight.getX(), bottomRight.getY() + yGap);
Point2D bottomLeft = LineUtil.intersectionAtX(bottom, xMin);
lu.lineTo(bottomLeft.getX(), bottomLeft.getY() + yGap);
lu.closePath();
return new Area(lu);
}
//-----------------//
// getSnapAbscissa //
//-----------------//
/**
* Report the theoretical abscissa of the provided beam side when correctly aligned
* with a suitable stem.
* <p>
* Required properties: staff or sig, median, height
*
* @param side the desired horizontal side
* @param systemStems all stems in containing system
* @return the proper abscissa if any, null otherwise
*/
private Double getSnapAbscissa (HorizontalSide side,
List<Inter> systemStems)
{
final SystemInfo system;
if (sig != null) {
system = sig.getSystem();
} else if (staff != null) {
system = staff.getSystem();
} else {
logger.warn("No system nor staff for {}", this);
return null;
}
final int profile = Math.max(getProfile(), system.getProfile());
final Link link = lookupSideLink(systemStems, system, side, profile);
if (link != null) {
final StemInter stem = (StemInter) link.partner;
final Point2D beamEnd = (side == LEFT) ? median.getP1() : median.getP2();
return LineUtil.xAtY(stem.getMedian(), beamEnd.getY());
}
return null;
}
//-----------//
// getStemOn //
//-----------//
/**
* Report the stem, if any, connected on desired beam portion (LEFT,CENTER or RIGHT).
* <ul>
* <li>For LEFT and for RIGHT, there can be at most one stem.
* <li>For CENTER, there can be from 0 to N stems, so only the first one found is returned.
* </ul>
*
* @param portion provided portion
* @return the connected stem or null
*/
public StemInter getStemOn (BeamPortion portion)
{
if (isVip()) {
logger.info("VIP getStemOn for {} on {}", this, portion);
}
for (Relation rel : sig.getRelations(this, BeamStemRelation.class)) {
BeamStemRelation bsRel = (BeamStemRelation) rel;
BeamPortion p = bsRel.getBeamPortion();
if (p == portion) {
return (StemInter) sig.getOppositeInter(this, rel);
}
}
return null;
}
//----------//
// getStems //
//----------//
/**
* Report the stems connected to this beam.
*
* @return the set of connected stems, perhaps empty
*/
public Set<StemInter> getStems ()
{
Set<StemInter> stems = new LinkedHashSet<>();
for (Relation bs : sig.getRelations(this, BeamStemRelation.class)) {
StemInter stem = (StemInter) sig.getOppositeInter(this, bs);
stems.add(stem);
}
return stems;
}
//----------//
// getVoice //
//----------//
@Override
public Voice getVoice ()
{
final BeamGroupInter group = getGroup();
if (group != null) {
return group.getVoice();
}
return null;
}
//-------------------//
// hasCommonStemWith //
//-------------------//
/**
* Report whether this beam shares at least one stem with the provided other beam.
* <p>
* This allows the building of beam groups.
*
* @param that the other beam
* @return true if so
*/
public boolean hasCommonStemWith (AbstractBeamInter that)
{
final Set<StemInter> thisStems = this.getStems();
final Set<StemInter> thatStems = that.getStems();
thatStems.retainAll(thisStems);
return !thatStems.isEmpty();
}
//--------//
// isGood //
//--------//
@Override
public boolean isGood ()
{
return getGrade() >= Grades.goodBeamGrade;
}
//--------//
// isHook //
//--------//
/**
* Report whether this beam is a beam hook.
*
* @return true if so
*/
public boolean isHook ()
{
return false;
}
//---------//
// isSmall //
//---------//
/**
* Report whether this beam is a small beam.
*
* @return true if so
*/
public boolean isSmall ()
{
return false;
}
//-------------//
// lookupLinks //
//-------------//
/**
* Look up for potential Beam-Stem links around this Beam instance.
*
* @param systemStems all stems in system, sorted by abscissa
* @param system containing system
* @param profile desired profile level
* @return the potential links
*/
public Collection<Link> lookupLinks (List<Inter> systemStems,
SystemInfo system,
int profile)
{
if (systemStems.isEmpty()) {
return Collections.emptySet();
}
if (isVip()) {
logger.info("VIP lookupLinks for {}", this);
}
final List<Link> links = new ArrayList<>();
final Scale scale = system.getSheet().getScale();
final Area luArea = getLookupArea(scale);
List<Inter> stems = Inters.intersectedInters(systemStems, GeoOrder.NONE, luArea);
for (Inter inter : stems) {
StemInter stem = (StemInter) inter;
Point2D stemMiddle = PointUtil.middle(stem.getMedian());
VerticalSide vSide = (median.relativeCCW(stemMiddle) > 0) ? TOP : BOTTOM;
int prof = Math.max(profile, stem.getProfile());
Link link = BeamStemRelation.checkLink(this, stem, vSide, scale, prof);
if (link != null) {
links.add(link);
}
}
return links;
}
//----------------//
// lookupSideLink //
//----------------//
/**
* Lookup for a potential Beam-Stem link on the desired horizontal side of this beam
*
* @param systemStems all stems in system, sorted by abscissa
* @param system containing system
* @param side the desired horizontal side
* @param profile desired profile level
* @return the best potential link if any, null otherwise
*/
private Link lookupSideLink (List<Inter> systemStems,
SystemInfo system,
HorizontalSide side,
int profile)
{
if (systemStems.isEmpty()) {
return null;
}
if (isVip()) {
logger.info("VIP lookupSideLink for {} on {}", this, side);
}
final Line2D top = getBorder(VerticalSide.TOP);
final Line2D bottom = getBorder(VerticalSide.BOTTOM);
final Scale scale = system.getSheet().getScale();
final int xOut = scale.toPixels(BeamStemRelation.getXOutGapMaximum(profile));
final int xIn = scale.toPixels(BeamStemRelation.getXInGapMaximum(profile));
final int yGap = scale.toPixels(BeamStemRelation.getYGapMaximum(profile));
Link bestLink = null;
double bestGrade = Double.MAX_VALUE;
final Rectangle luBox = new Rectangle(-1, -1); // "Non-existent" rectangle
if (side == HorizontalSide.LEFT) {
Point iTop = PointUtil.rounded(top.getP1());
luBox.add(iTop.x - xOut, iTop.y - yGap);
luBox.add(iTop.x + xIn, iTop.y - yGap);
Point iBottom = PointUtil.rounded(bottom.getP1());
luBox.add(iBottom.x - xOut, iBottom.y + yGap);
luBox.add(iBottom.x + xIn, iBottom.y + yGap);
} else {
Point iTop = PointUtil.rounded(top.getP2());
luBox.add(iTop.x - xIn, iTop.y - yGap);
luBox.add(iTop.x + xOut, iTop.y - yGap);
Point iBottom = PointUtil.rounded(bottom.getP2());
luBox.add(iBottom.x - xIn, iBottom.y + yGap);
luBox.add(iBottom.x + xOut, iBottom.y + yGap);
}
List<Inter> stems = Inters.intersectedInters(systemStems, GeoOrder.NONE, luBox);
for (Inter inter : stems) {
final StemInter stem = (StemInter) inter;
final int prof = Math.max(profile, stem.getProfile());
for (VerticalSide vSide : VerticalSide.values()) {
Link link = BeamStemRelation.checkLink(this, stem, vSide, scale, prof);
if (link != null) {
BeamStemRelation rel = (BeamStemRelation) link.relation;
if ((bestLink == null) || (rel.getGrade() > bestGrade)) {
bestLink = link;
bestGrade = rel.getGrade();
}
}
}
}
return bestLink;
}
//--------//
// preAdd //
//--------//
@Override
public List<? extends UITask> preAdd (WrappedBoolean cancel,
Wrapper<Inter> toPublish)
{
final List<UITask> tasks = new ArrayList<>(super.preAdd(cancel, toPublish));
// Include the created beam into suitable beam group
BeamGroupInter group = BeamGroupInter.findBeamGroup(this, staff.getSystem(), null);
if (group != null) {
tasks.add(new LinkTask(staff.getSystem().getSig(), group, this, new Containment()));
} else {
group = new BeamGroupInter();
group.setManual(true);
group.setStaff(staff);
tasks.add(
new AdditionTask(
staff.getSystem().getSig(),
group,
getBounds(),
Arrays.asList(new Link(this, new Containment(), true))));
}
return tasks;
}
//---------//
// preEdit //
//---------//
@Override
public List<? extends UITask> preEdit (InterEditor editor)
{
final List<UITask> tasks = new ArrayList<>(super.preEdit(editor));
// Keep same beam group?
final BeamGroupInter oldGroup = getGroup();
boolean oldStillOk = false;
if (oldGroup != null) {
// Check if this (edited) beam can still be part of the oldGroup
final List<Inter> members = oldGroup.getMembers();
if (members.size() == 1) {
oldStillOk = true;
} else {
members.remove(this);
final Scale scale = sig.getSystem().getSheet().getScale();
for (Inter member : members) {
if (BeamGroupInter.canBeNeighbors(this, (AbstractBeamInter) member, scale)) {
oldStillOk = true;
}
}
}
if (!oldStillOk) {
// Unlink this beam from oldGroup
final Relation rel = sig.getRelation(oldGroup, this, Containment.class);
tasks.add(new UnlinkTask(sig, rel));
}
}
// Check for another compatible beam group
final BeamGroupInter otherGroup = BeamGroupInter.findBeamGroup(
this,
sig.getSystem(),
oldGroup);
if (otherGroup != null) {
if ((oldGroup != null) && oldStillOk) {
// Migrate all beams from oldGroup to otherGroup
for (Relation r : sig.outgoingEdgesOf(oldGroup)) {
if (r instanceof Containment) {
Inter b = sig.getEdgeTarget(r);
tasks.add(new UnlinkTask(sig, r));
tasks.add(new LinkTask(sig, otherGroup, b, new Containment()));
}
}
// Then remove oldGroup
tasks.add(new RemovalTask(oldGroup));
} else {
// Link this beam to otherGroup
tasks.add(new LinkTask(sig, otherGroup, this, new Containment()));
}
} else {
// Create a brand new group with just this beam
final BeamGroupInter newGroup = new BeamGroupInter();
newGroup.setManual(true);
newGroup.setStaff(staff);
tasks.add(
new AdditionTask(
sig,
newGroup,
getBounds(),
Arrays.asList(new Link(this, new Containment(), true))));
}
return tasks;
}
//--------//
// remove //
//--------//
@Override
public void remove (boolean extensive)
{
if (isRemoved()) {
return;
}
for (AbstractChordInter chord : getChords()) {
chord.invalidateCache();
}
super.remove(extensive);
}
//-------------//
// searchLinks //
//-------------//
@Override
public Collection<Link> searchLinks (SystemInfo system)
{
final int profile = Math.max(getProfile(), system.getProfile());
final List<Inter> systemStems = system.getSig().inters(StemInter.class);
Collections.sort(systemStems, Inters.byAbscissa);
return lookupLinks(systemStems, system, profile);
}
//---------------//
// searchUnlinks //
//---------------//
@Override
public Collection<Link> searchUnlinks (SystemInfo system,
Collection<Link> links)
{
return searchObsoletelinks(links, BeamStemRelation.class);
}
//----------//
// setGroup //
//----------//
/**
* Assign the containing BeamGroupInter.
*
* @param group containing group
*/
public void setGroup (BeamGroupInter group)
{
if (group != null) {
group.addMember(this);
}
}
//-----------//
// setLinker //
//-----------//
/**
* Set the dedicated beam-stem linker.
*
* @param linker the beam-stem linker
*/
public void setLinker (BeamLinker linker)
{
this.linker = linker;
}
//---------------//
// switchToGroup //
//---------------//
/**
* Move this beam to a new BeamGroupInter.
*
* @param group the (new) containing beam group
*/
public void switchToGroup (BeamGroupInter group)
{
final BeamGroupInter oldGroup = getGroup();
logger.debug("Switching {} from {} to {}", this, oldGroup, group);
// Trivial noop case
if (oldGroup == group) {
return;
}
// Remove from current group if any
if (oldGroup != null) {
oldGroup.removeMember(this);
}
// Assign to new group
if (group != null) {
group.addMember(this);
}
}
//-----------------//
// upgradeOldStuff //
//-----------------//
@Override
public boolean upgradeOldStuff (List<Version> upgrades)
{
boolean upgraded = false;
if (upgrades.contains(Versions.INTER_GEOMETRY)) {
if (median != null) {
median.setLine(
median.getX1(),
median.getY1() + 0.5,
median.getX2() + 1,
median.getY2() + 0.5);
computeArea();
upgraded = true;
}
}
return upgraded;
}
//~ Inner Classes your_sha256_hash--------------
//-----------//
// Constants //
//-----------//
private static class Constants
extends ConstantSet
{
private final Fraction minBeamWidth = new Fraction(
0.5,
"Minimum width for a beam or beam hook");
}
//--------//
// Editor //
//--------//
/**
* User editor for a beam.
* <p>
* For a beam, there are 3 handles:
* <ul>
* <li>left handle, moving in any direction
* <li>middle handle, moving the whole beam in any direction
* <li>right handle, moving in any direction
* </ul>
* Left and right end points can snap their abscissa on stems nearby
*/
private static class Editor
extends InterEditor
{
// Data
private final Model originalModel;
private final Model model;
// To improve speed of stem search
private SIGraph sig;
private List<Inter> systemStems;
public Editor (final AbstractBeamInter beam)
{
super(beam);
originalModel = new Model();
originalModel.p1 = beam.median.getP1();
originalModel.p2 = beam.median.getP2();
model = new Model();
model.p1 = beam.median.getP1();
model.p2 = beam.median.getP2();
// Handles
final Point2D p1 = beam.median.getP1();
final Point2D p2 = beam.median.getP2();
final Point2D middle = PointUtil.middle(p1, p2);
// Move left
handles.add(new Handle(p1)
{
@Override
public boolean move (int dx,
int dy)
{
// Handles
PointUtil.add(p1, dx, dy);
PointUtil.add(middle, dx / 2.0, dy / 2.0);
// Data
beam.median.setLine(p1, p2);
Double x1 = beam.getSnapAbscissa(LEFT, getSystemStems());
if (x1 != null) {
// Avoid beam collapse
final Scale scale = sig.getSystem().getSheet().getScale();
final int minWidth = scale.toPixels(constants.minBeamWidth);
final double width = p2.getX() - x1;
if (width < minWidth) {
x1 = null; // No snap
}
}
model.p1.setLocation((x1 != null) ? x1 : p1.getX(), p1.getY());
beam.median.setLine(p1, p2);
return true;
}
});
// Global move
handles.add(selectedHandle = new Handle(middle)
{
@Override
public boolean move (int dx,
int dy)
{
// Handles
for (Handle handle : handles) {
PointUtil.add(handle.getPoint(), dx, dy);
}
// Data
beam.median.setLine(p1, p2);
Double left = beam.getSnapAbscissa(LEFT, getSystemStems());
Double right = beam.getSnapAbscissa(RIGHT, getSystemStems());
if (left != null && right != null) {
// Both sides get snapped, let's avoid beam collapse
final double width = right - left;
final Scale scale = sig.getSystem().getSheet().getScale();
final int minWidth = scale.toPixels(constants.minBeamWidth);
if (width < minWidth) {
// Choose stem side
if (middle.getX() > 0.5 * (left + right)) {
right = left + minWidth;
} else {
left = right - minWidth;
}
}
}
model.p1.setLocation((left != null) ? left : p1.getX(), p1.getY());
model.p2.setLocation((right != null) ? right : p2.getX(), p2.getY());
beam.median.setLine(p1, p2);
return true;
}
});
// Move right
handles.add(new Handle(p2)
{
@Override
public boolean move (int dx,
int dy)
{
// Handles
PointUtil.add(middle, dx / 2.0, dy / 2.0);
PointUtil.add(p2, dx, dy);
// Data
beam.median.setLine(p1, p2);
Double x2 = beam.getSnapAbscissa(RIGHT, getSystemStems());
if (x2 != null) {
// Avoid beam collapse
final Scale scale = sig.getSystem().getSheet().getScale();
final int minWidth = scale.toPixels(constants.minBeamWidth);
final double width = x2 - p1.getX();
if (width < minWidth) {
x2 = null; // No snap
}
}
model.p2.setLocation((x2 != null) ? x2 : p2.getX(), p2.getY());
beam.median.setLine(p1, p2);
return true;
}
});
}
@Override
protected void doit ()
{
final AbstractBeamInter beam = (AbstractBeamInter) object;
beam.median.setLine(model.p1, model.p2);
beam.computeArea(); // Set bounds also
super.doit(); // No more glyph
}
private List<Inter> getSystemStems ()
{
final AbstractBeamInter beam = (AbstractBeamInter) object;
if (sig != beam.getSig()) {
sig = beam.getSig();
systemStems = sig.inters(StemInter.class);
Collections.sort(systemStems, Inters.byAbscissa);
}
return systemStems;
}
@Override
public void undo ()
{
final AbstractBeamInter beam = (AbstractBeamInter) object;
beam.median.setLine(originalModel.p1, originalModel.p2);
beam.computeArea(); // Set bounds also
super.undo();
}
}
//---------//
// Impacts //
//---------//
/**
* Impacts definition for a beam.
*/
public static class Impacts
extends GradeImpacts
{
private static final String[] NAMES = new String[]
{ "wdth", "minH", "maxH", "core", "belt", "jit" };
private static final int DIST_INDEX = 5;
private static final double[] WEIGHTS = new double[]
{ 0.5, 1, 1, 2, 2, 2 };
public Impacts (double width,
double minHeight,
double maxHeight,
double core,
double belt,
double dist)
{
super(NAMES, WEIGHTS);
setImpact(0, width);
setImpact(1, minHeight);
setImpact(2, maxHeight);
setImpact(3, core);
setImpact(4, belt);
setImpact(5, dist);
}
public double getDistImpact ()
{
return getImpact(DIST_INDEX);
}
}
//-------//
// Model //
//-------//
public static class Model
implements ObjectUIModel
{
// Left point of median line
public Point2D p1;
// Right point of median line
public Point2D p2;
// Beam thickness
public double thickness;
@Override
public void translate (double dx,
double dy)
{
PointUtil.add(p1, dx, dy);
PointUtil.add(p2, dx, dy);
}
}
}
```
|
```java
package swati4star.createpdf.util;
import static swati4star.createpdf.util.Constants.THEME_BLACK;
import static swati4star.createpdf.util.Constants.THEME_DARK;
import static swati4star.createpdf.util.Constants.THEME_SYSTEM;
import static swati4star.createpdf.util.Constants.THEME_WHITE;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.preference.PreferenceManager;
import swati4star.createpdf.R;
public class ThemeUtils {
public static ThemeUtils getInstance() {
return ThemeUtils.SingletonHolder.INSTANCE;
}
/**
* Set selected theme to current context
*
* @param context - current context
*/
public void setThemeApp(Context context) {
SharedPreferences mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
String themeName = mSharedPreferences.getString(Constants.DEFAULT_THEME_TEXT,
Constants.DEFAULT_THEME);
if (themeName == null)
return;
switch (themeName) {
case THEME_WHITE:
context.setTheme(R.style.AppThemeWhite);
break;
case THEME_BLACK:
context.setTheme(R.style.AppThemeBlack);
break;
case THEME_DARK:
context.setTheme(R.style.ActivityThemeDark);
break;
case THEME_SYSTEM:
default:
if ((context.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES) {
context.setTheme(R.style.ActivityThemeDark);
} else {
context.setTheme(R.style.AppThemeWhite);
}
}
}
/**
* get position of selected theme
*
* @param context - current context
* @return - position
*/
public int getSelectedThemePosition(Context context) {
SharedPreferences mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
String themeName = mSharedPreferences.getString(Constants.DEFAULT_THEME_TEXT,
Constants.DEFAULT_THEME);
switch (themeName) {
case THEME_SYSTEM:
return 0;
case THEME_BLACK:
return 1;
case THEME_DARK:
return 2;
case THEME_WHITE:
return 3;
}
return 0;
}
/**
* Save given theme to shared prefs
*
* @param context - current context
* @param themeName - name of theme to save
*/
public void saveTheme(Context context, String themeName) {
SharedPreferences mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
SharedPreferences.Editor editor = mSharedPreferences.edit();
editor.putString(Constants.DEFAULT_THEME_TEXT, themeName);
editor.apply();
}
private static class SingletonHolder {
static final ThemeUtils INSTANCE = new ThemeUtils();
}
}
```
|
William Ross Knudsen (September 30, 1892 – 1977) was an American socialist political activist and trade union organizer. Knudsen was an organizer for the International Association of Machinists and the leader of two major strikes conducted by that organization. He was also the 1923 candidate for Mayor of San Francisco of the Socialist Labor Party of America.
Biography
Early years
Knudsen was born in Petaluma, California to ethnic German immigrant parents: his father was a chicken rancher. He attended school in San Jose, California, before enrolling in the University of California, from which he received a Bachelor of Arts degree in 1914.
Socialist
Knudsen recounted the story behind his radicalization in a magazine article published in the monthly magazine of the Trade Union Educational League in 1922. In the autobiographical article published there, Knudsen declared his political activity dated to his inadvertent embroilment in a free speech demonstration, when he was swept up and arrested although merely a passerby. Knudsen wrote:
"There was a free speech fight on, but of it I knew nothing. Suddenly a policeman’s hand shook my shoulder, and when, insulted, I resisted, I was slammed in the jaw; completely subdued, I was brought before the police sergeant, absolutely in the dark as to what was the cause.
'Here’s another Red, Sergeant.'"
Upon his discharge by the police Knudsen recalled, "Once outside I began to puzzle my mind. Socialism? Unionism? Red neckties? And while still trying to [connect] them together, I suddenly came upon a radical hall. In I went and was soon buying all the pamphlets and literature in sight." Knudsen concluded that it was "the brutal actions of the police, the confinement with these rebels and my mental reactions to all this" which caused him to investigate the radical movement further, reading extensively on the topic. "Reading and thinking produced the result a red," Knudsen recalled.
Knudsen would join the Socialist Labor Party of America in 1915.
Activism and career
Knudsen was a delegate of the San Francisco Iron trade council from 1913 to 1918 and from 1923 to 1925.
Knudsen became president of the San Jose Central Labor Council in 1918 through 1919. In 1918 Knudsen was active during a forty-four-hour protest with machinists from San Francisco when he was a delegate of the San Francisco Iron Trade Council. During 1919 Knudsen became an Organizer for the International Association of Machinists (IAM). The next year he would lead 3000 machinists in a strike and held another strike consisting of 10,000 Machinists in 7-month strike in Cincinnati in 1920.
During 1921–1922 Knudsen toured the Soviet Union. While there he became a delegate to the Red International of Labor Unions and participated in CI congresses. Knudsen was granted the honor of delivering an address to graduating officers of the red army during the 5th anniversary of the Russian Revolution on November 6, 1922.
Returning to America, Knudsen sought to be the international president of the IAM, although he was defeated in this effort. He did become an organizer for the IAM in San Francisco, however.
Knudsen was a candidate for the Socialist Labor Party in San Francisco running for Mayor during 1923. Despite his pro-Communist proclivities, Knudsen reaffirmed his allegiance to the Socialist Labor Party in this campaign, declaring it "the only bona fide party representing the workers' interests." With no realistic chance of winning, Knudsen made an appeal for the SLP's maximum demands to voters, calling for "the working class to back up their ballot by organizing into industrial unions" and to use these to "take and hold the means of production," to be governed through a "Congress of Labor."
In 1924 Knudsen became a presidential elector of California for the Socialist Labor Party. Another accolade for Knudsen during 1924 was becoming a lecturer for the San Francisco Labor College and also was a lecturer for classes specializing in Socialist Labor politics classes.
During the course of his political activities Knudsen authored articles on economics, the organized labor movement, psychology, science, and history.
References
1892 births
1977 deaths
American Marxists
American socialists
Socialist Labor Party of America politicians from California
American trade union leaders
People from Petaluma, California
California socialists
|
```objective-c
//
// BookPlayerKit.h
// BookPlayerKit
//
// Created by Gianni Carlo on 4/22/19.
//
#import <UIKit/UIKit.h>
//! Project version number for BookPlayerKit.
FOUNDATION_EXPORT double BookPlayerKitVersionNumber;
//! Project version string for BookPlayerKit.
FOUNDATION_EXPORT const unsigned char BookPlayerKitVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <BookPlayerKit/PublicHeader.h>
```
|
```smalltalk
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.DotNet.XHarness.iOS.Shared;
using Microsoft.DotNet.XHarness.iOS.Shared.Execution;
using Microsoft.DotNet.XHarness.iOS.Shared.Hardware;
using Microsoft.DotNet.XHarness.iOS.Shared.Listeners;
namespace Xharness.Jenkins.TestTasks {
class RunDeviceTask : RunXITask<IHardwareDevice>, IRunDeviceTask {
public ITunnelBore TunnelBore { get; private set; }
RunDevice runDevice;
public override string ProgressMessage {
get {
var log = runDevice.InstallLog;
if (log is null)
return base.ProgressMessage;
var percent_complete = log.CopyingApp ? log.AppPercentComplete : log.WatchAppPercentComplete;
var bytes = log.CopyingApp ? log.AppBytes : log.WatchAppBytes;
var total_bytes = log.CopyingApp ? log.AppTotalBytes : log.WatchAppTotalBytes;
var elapsed = log.CopyingApp ? log.AppCopyDuration : log.WatchAppCopyDuration;
var speed_bps = elapsed.Ticks == 0 ? -1 : bytes / elapsed.TotalSeconds;
var estimated_left = TimeSpan.FromSeconds ((total_bytes - bytes) / speed_bps);
var transfer_percent = 100 * (double) bytes / total_bytes;
var str = log.CopyingApp ? "App" : "Watch App";
var rv = $"{str} installation: {percent_complete}% done.\n" +
$"\tApp size: {total_bytes:N0} bytes ({total_bytes / 1024.0 / 1024.0:N2} MB)\n" +
$"\tTransferred: {bytes:N0} bytes ({bytes / 1024.0 / 1024.0:N2} MB)\n" +
$"\tTransferred in {elapsed.TotalSeconds:#.#}s ({elapsed})\n" +
$"\tTransfer speed: {speed_bps:N0} B/s ({speed_bps / 1024.0 / 1024.0:N} MB/s, {60 * speed_bps / 1024.0 / 1024.0:N2} MB/m)\n" +
$"\tEstimated time left: {estimated_left.TotalSeconds:#.#}s ({estimated_left})";
return rv;
}
}
public RunDeviceTask (Jenkins jenkins, IHardwareDeviceLoader devices, MSBuildTask buildTask, IMlaunchProcessManager processManager, ITunnelBore tunnelBore, IErrorKnowledgeBase errorKnowledgeBase, bool useTcpTunnel, IEnumerable<IHardwareDevice> candidates)
: base (jenkins, buildTask, processManager, candidates.OrderBy ((v) => v.DebugSpeed))
{
TunnelBore = tunnelBore;
runDevice = new RunDevice (
testTask: this,
devices: devices,
resourceManager: ResourceManager,
mainLog: Jenkins.MainLog,
deviceLoadLog: Jenkins.DeviceLoadLog,
errorKnowledgeBase: errorKnowledgeBase,
defaultLogDirectory: Jenkins.Harness.LogDirectory,
uninstallTestApp: Jenkins.UninstallTestApp,
cleanSuccessfulTestRuns: Jenkins.CleanSuccessfulTestRuns,
generateXmlFailures: Jenkins.Harness.InCI,
inCI: Jenkins.Harness.InCI,
useTcpTunnel: useTcpTunnel,
xmlResultJargon: Jenkins.Harness.XmlJargon
);
}
public override Task RunTestAsync () => runDevice.RunTestAsync ();
protected override string XIMode {
get {
return "device";
}
}
}
}
```
|
, also known as Two Flowers for the Dragon, is a Japanese shōjo manga authored by Nari Kusakawa. The manga series was serialized in Hakusensha's monthly shōjo manga magazine, LaLa and ended in the July issue of 2009. Seven collected volumes were published under the Hana to Yume Comics imprint. CMX published six volumes in North America before July 2010, when DC Comics dissolved the CMX Manga imprint.
The last volume of the manga sold 32,366 copies in the first week of release in Japan and was ranked 21st. The first two volumes of the manga has been named as Great Graphic Novels for Teens by the Young Adult Library Services Association.
Overview
Shakuya, princess of the Dragon Tribe, can turn into a dragon, and has two fiancé. One fiancé is Lucien, who was missing for a long time, now returns. The other is Kuwan, the captain of the guardians in the village, who she loves more. She has two tattoos on her arms; a rose for Lucien, and a Bellflower for Kuwan. These flowers grow as her affection for them grows. The story is about their three-way love.
Even though Shakuya is in love with Kuwan, Lucien is determined to change the mind of his beloved Shakuya.
Characters
Shakuya The daughter of the Queen of the Dragon Tribe. She has the ability to transform into a dragon. She is very energetic, which annoys her fiancé Kuwan to no end. She loves Kuwan more, but it is shown when she is young to have loved Lucien very deeply. She has a tendency to end up in some compromising scenes.
Kuwan The captain of the guardians, also Shakuya's fiancé. He tends to act cold and distant, which Shakuya has mentioned. He is the 'replacement' fiancé that was put in the place of the then-lost Lucien. He doesn't like Shakuya's ventures out of the castle, and often does not listen to her when she explains why she is out (which is usually to see him).
Lucien The missing fiancé of Shakuya. After many years, he returns and causes some problems for Shakuya and the rest of the Dragon Tribe. He likes to, when talking to Shakuya, end his dialogues in some sort of seductive act. According to author, his name comes from Chū Shin Chi, the Japanese name of actor Stephen Chow Sing-Chi.
Volume list
Reception
Jason Thompson praised Shakuya's self-assuredness, and appreciated the age-appropriate level of fanservice in the manga.
References
2005 manga
Shōjo manga
CMX (comics) titles
Hakusensha manga
|
```python
Following PEP 8 styling guideline.
Built-in `list` methods
`Module`s everywhere!
Enhance your `tuple`s
Get the most of `int`s
```
|
```javascript
import React from 'react';
import CalendarList from '../index';
import {CalendarListDriver} from '../driver';
//@ts-expect-error
import {getMonthTitle} from '../../testUtils';
const CURRENT = '2022-09-09';
const NEXT_MONTH = '2022-10-09';
const PREV_MONTH = '2022-08-09';
const nextMonthData = {dateString: '2022-10-09', day: 9, month: 10, timestamp: 1665273600000, year: 2022};
const prevMonthData = {dateString: '2022-08-09', day: 9, month: 8, timestamp: 1660003200000, year: 2022};
const testIdCalendarList = 'myCalendarList';
const onMonthChangeMock = jest.fn();
const onVisibleMonthsChangeMock = jest.fn();
const pastScrollRange = 10;
const futureScrollRange = 5;
// const initialVisibleItems = [
// {
// "index": 50,
// "isViewable": true,
// "item": "2022-09-09T00:00:00.000Z",
// "key": "50"
// }
// ];
// const changed = [
// {
// "index": 51,
// "isViewable": true,
// "item": "2022-10-09T00:00:00.000Z",
// "key": "51"
// },
// {
// "index": 50,
// "isViewable": false,
// "item": "2022-09-09T00:00:00.000Z",
// "key":"50"
// }
// ];
// const visibleItems = [
// {
// "index": 51,
// "isViewable": true,
// "item": "2022-10-09T00:00:00.000Z",
// "key": "51"
// }
// ];
const defaultProps = {
testID: testIdCalendarList,
current: CURRENT,
onMonthChange: onMonthChangeMock,
onVisibleMonthsChange: onVisibleMonthsChangeMock
};
const TestCase = props => {
return <CalendarList {...defaultProps} {...props} />;
};
describe('CalendarList', () => {
describe('Props', () => {
describe('past/futureScrollRange', () => {
const driver = new CalendarListDriver(
testIdCalendarList,
<TestCase pastScrollRange={pastScrollRange} futureScrollRange={futureScrollRange} />
);
beforeEach(() => {
jest.useFakeTimers();
driver.render();
});
it('should have correct number of list items', () => {
expect(driver.getListProps().data.length).toBe(pastScrollRange + futureScrollRange + 1);
});
});
});
describe('Horizontal Mode', () => {
const driver = new CalendarListDriver(testIdCalendarList, <TestCase horizontal={true} staticHeader={true} />);
beforeEach(() => {
jest.useFakeTimers();
driver.render();
onMonthChangeMock.mockClear();
onVisibleMonthsChangeMock.mockClear();
});
// afterEach(() => driver.clear());
describe('Init', () => {
it('should display current month', () => {
// static header
expect(driver.getStaticHeaderTitle()).toBe(getMonthTitle(CURRENT));
// list
expect(driver.getListProps().horizontal).toBe(true);
expect(driver.getListProps().data.length).toBe(101);
expect(driver.getListProps().initialScrollIndex).toBe(50);
expect(driver.getListProps().initialNumToRender).toBe(1);
// list items
expect(driver.getListItem(CURRENT)).toBeDefined();
expect(driver.getListItemTitle(CURRENT)).toBeDefined();
// events
expect(onMonthChangeMock).not.toHaveBeenCalled();
expect(onVisibleMonthsChangeMock).not.toHaveBeenCalled();
});
});
describe('Static Header Arrows', () => {
it('should change month on right arrow press', () => {
driver.pressRightArrow();
expect(onMonthChangeMock).toHaveBeenCalledWith(nextMonthData);
expect(onVisibleMonthsChangeMock).toHaveBeenCalledWith([nextMonthData]);
expect(driver.getStaticHeaderTitle()).toBe(getMonthTitle(NEXT_MONTH));
// NOTE: check visible list item - only first item is rendered and arrow press doesn't actually scrolls the list
// expect(driver.getListItemTitle(NEXT_MONTH)).toBeDefined();
});
it('should change month on left arrow press', () => {
driver.pressLeftArrow();
expect(onMonthChangeMock).toHaveBeenCalledWith(prevMonthData);
expect(onVisibleMonthsChangeMock).toHaveBeenCalledWith([prevMonthData]);
expect(driver.getStaticHeaderTitle()).toBe(getMonthTitle(PREV_MONTH));
});
});
// describe('List Scroll', () => {
// it('scroll to next month', () => {
// driver.fireOnViewableItemsChanged(changed, visibleItems);
// expect(onMonthChangeMock).toHaveBeenCalled();
// expect(onMonthChangeMock).toHaveBeenCalledWith(nextMonthData);
// expect(onVisibleMonthsChangeMock).toHaveBeenCalledWith([nextMonthData]);
// expect(driver.getStaticHeaderTitle()).toBe(getMonthTitle(NEXT_MONTH));
// });
// });
});
});
```
|
```c
/* BFD back-end for linux flavored i386 a.out binaries.
2004, 2006 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define TARGET_PAGE_SIZE 4096
#define ZMAGIC_DISK_BLOCK_SIZE 1024
#define SEGMENT_SIZE TARGET_PAGE_SIZE
#define TEXT_START_ADDR 0x0
#define N_SHARED_LIB(x) 0
#define MACHTYPE_OK(mtype) ((mtype) == M_386 || (mtype) == M_UNKNOWN)
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
#include "aout/aout64.h"
#include "aout/stab_gnu.h"
#include "aout/ar.h"
#include "libaout.h" /* BFD a.out internal data structures */
#define DEFAULT_ARCH bfd_arch_i386
/* Do not "beautify" the CONCAT* macro args. Traditional C will not
remove whitespace added here, and thus will fail to concatenate
the tokens. */
#define MY(OP) CONCAT2 (i386linux_,OP)
#define TARGETNAME "a.out-i386-linux"
extern const bfd_target MY(vec);
/* We always generate QMAGIC files in preference to ZMAGIC files. It
would be possible to make this a linker option, if that ever
becomes important. */
static void MY_final_link_callback
PARAMS ((bfd *, file_ptr *, file_ptr *, file_ptr *));
static bfd_boolean i386linux_bfd_final_link
PARAMS ((bfd *, struct bfd_link_info *));
static bfd_boolean i386linux_write_object_contents PARAMS ((bfd *));
static bfd_boolean
i386linux_bfd_final_link (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
{
obj_aout_subformat (abfd) = q_magic_format;
return NAME(aout,final_link) (abfd, info, MY_final_link_callback);
}
#define MY_bfd_final_link i386linux_bfd_final_link
/* Set the machine type correctly. */
static bfd_boolean
i386linux_write_object_contents (abfd)
bfd *abfd;
{
struct external_exec exec_bytes;
struct internal_exec *execp = exec_hdr (abfd);
N_SET_MACHTYPE (*execp, M_386);
obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
WRITE_HEADERS(abfd, execp);
return TRUE;
}
#define MY_write_object_contents i386linux_write_object_contents
/* Code to link against Linux a.out shared libraries. */
/* See if a symbol name is a reference to the global offset table. */
#ifndef GOT_REF_PREFIX
#define GOT_REF_PREFIX "__GOT_"
#endif
#define IS_GOT_SYM(name) \
(strncmp (name, GOT_REF_PREFIX, sizeof GOT_REF_PREFIX - 1) == 0)
/* See if a symbol name is a reference to the procedure linkage table. */
#ifndef PLT_REF_PREFIX
#define PLT_REF_PREFIX "__PLT_"
#endif
#define IS_PLT_SYM(name) \
(strncmp (name, PLT_REF_PREFIX, sizeof PLT_REF_PREFIX - 1) == 0)
/* This string is used to generate specialized error messages. */
#ifndef NEEDS_SHRLIB
#define NEEDS_SHRLIB "__NEEDS_SHRLIB_"
#endif
/* This special symbol is a set vector that contains a list of
pointers to fixup tables. It will be present in any dynamically
linked file. The linker generated fixup table should also be added
to the list, and it should always appear in the second slot (the
first one is a dummy with a magic number that is defined in
crt0.o). */
#ifndef SHARABLE_CONFLICTS
#define SHARABLE_CONFLICTS "__SHARABLE_CONFLICTS__"
#endif
/* We keep a list of fixups. The terminology is a bit strange, but
each fixup contains two 32 bit numbers. A regular fixup contains
an address and a pointer, and at runtime we should store the
address at the location pointed to by the pointer. A builtin fixup
contains two pointers, and we should read the address using one
pointer and store it at the location pointed to by the other
pointer. Builtin fixups come into play when we have duplicate
__GOT__ symbols for the same variable. The builtin fixup will copy
the GOT pointer from one over into the other. */
struct fixup
{
struct fixup *next;
struct linux_link_hash_entry *h;
bfd_vma value;
/* Nonzero if this is a jump instruction that needs to be fixed,
zero if this is just a pointer */
char jump;
char builtin;
};
/* We don't need a special hash table entry structure, but we do need
to keep some information between linker passes, so we use a special
hash table. */
struct linux_link_hash_entry
{
struct aout_link_hash_entry root;
};
struct linux_link_hash_table
{
struct aout_link_hash_table root;
/* First dynamic object found in link. */
bfd *dynobj;
/* Number of fixups. */
size_t fixup_count;
/* Number of builtin fixups. */
size_t local_builtins;
/* List of fixups. */
struct fixup *fixup_list;
};
static struct bfd_hash_entry *linux_link_hash_newfunc
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
static struct bfd_link_hash_table *linux_link_hash_table_create
PARAMS ((bfd *));
static struct fixup *new_fixup
PARAMS ((struct bfd_link_info *, struct linux_link_hash_entry *,
bfd_vma, int));
static bfd_boolean linux_link_create_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
static bfd_boolean linux_add_one_symbol
PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword, asection *,
bfd_vma, const char *, bfd_boolean, bfd_boolean,
struct bfd_link_hash_entry **));
static bfd_boolean linux_tally_symbols
PARAMS ((struct linux_link_hash_entry *, PTR));
static bfd_boolean linux_finish_dynamic_link
PARAMS ((bfd *, struct bfd_link_info *));
/* Routine to create an entry in an Linux link hash table. */
static struct bfd_hash_entry *
linux_link_hash_newfunc (entry, table, string)
struct bfd_hash_entry *entry;
struct bfd_hash_table *table;
const char *string;
{
struct linux_link_hash_entry *ret = (struct linux_link_hash_entry *) entry;
/* Allocate the structure if it has not already been allocated by a
subclass. */
if (ret == (struct linux_link_hash_entry *) NULL)
ret = ((struct linux_link_hash_entry *)
bfd_hash_allocate (table, sizeof (struct linux_link_hash_entry)));
if (ret == NULL)
return (struct bfd_hash_entry *) ret;
/* Call the allocation method of the superclass. */
ret = ((struct linux_link_hash_entry *)
NAME(aout,link_hash_newfunc) ((struct bfd_hash_entry *) ret,
table, string));
if (ret != NULL)
{
/* Set local fields; there aren't any. */
}
return (struct bfd_hash_entry *) ret;
}
/* Create a Linux link hash table. */
static struct bfd_link_hash_table *
linux_link_hash_table_create (abfd)
bfd *abfd;
{
struct linux_link_hash_table *ret;
bfd_size_type amt = sizeof (struct linux_link_hash_table);
ret = (struct linux_link_hash_table *) bfd_alloc (abfd, amt);
if (ret == (struct linux_link_hash_table *) NULL)
return (struct bfd_link_hash_table *) NULL;
if (!NAME(aout,link_hash_table_init) (&ret->root, abfd,
linux_link_hash_newfunc,
sizeof (struct linux_link_hash_entry)))
{
free (ret);
return (struct bfd_link_hash_table *) NULL;
}
ret->dynobj = NULL;
ret->fixup_count = 0;
ret->local_builtins = 0;
ret->fixup_list = NULL;
return &ret->root.root;
}
/* Look up an entry in a Linux link hash table. */
#define linux_link_hash_lookup(table, string, create, copy, follow) \
((struct linux_link_hash_entry *) \
aout_link_hash_lookup (&(table)->root, (string), (create), (copy),\
(follow)))
/* Traverse a Linux link hash table. */
#define linux_link_hash_traverse(table, func, info) \
(aout_link_hash_traverse \
(&(table)->root, \
(bfd_boolean (*) PARAMS ((struct aout_link_hash_entry *, PTR))) (func), \
(info)))
/* Get the Linux link hash table from the info structure. This is
just a cast. */
#define linux_hash_table(p) ((struct linux_link_hash_table *) ((p)->hash))
/* Store the information for a new fixup. */
static struct fixup *
new_fixup (info, h, value, builtin)
struct bfd_link_info *info;
struct linux_link_hash_entry *h;
bfd_vma value;
int builtin;
{
struct fixup *f;
f = (struct fixup *) bfd_hash_allocate (&info->hash->table,
sizeof (struct fixup));
if (f == NULL)
return f;
f->next = linux_hash_table (info)->fixup_list;
linux_hash_table (info)->fixup_list = f;
f->h = h;
f->value = value;
f->builtin = builtin;
f->jump = 0;
++linux_hash_table (info)->fixup_count;
return f;
}
/* We come here once we realize that we are going to link to a shared
library. We need to create a special section that contains the
fixup table, and we ultimately need to add a pointer to this into
the set vector for SHARABLE_CONFLICTS. At this point we do not
know the size of the section, but that's OK - we just need to
create it for now. */
static bfd_boolean
linux_link_create_dynamic_sections (abfd, info)
bfd *abfd;
struct bfd_link_info *info ATTRIBUTE_UNUSED;
{
flagword flags;
register asection *s;
/* Note that we set the SEC_IN_MEMORY flag. */
flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY;
/* We choose to use the name ".linux-dynamic" for the fixup table.
Why not? */
s = bfd_make_section (abfd, ".linux-dynamic");
if (s == NULL
|| ! bfd_set_section_flags (abfd, s, flags)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
s->size = 0;
s->contents = 0;
return TRUE;
}
/* Function to add a single symbol to the linker hash table. This is
a wrapper around _bfd_generic_link_add_one_symbol which handles the
tweaking needed for dynamic linking support. */
static bfd_boolean
linux_add_one_symbol (info, abfd, name, flags, section, value, string,
copy, collect, hashp)
struct bfd_link_info *info;
bfd *abfd;
const char *name;
flagword flags;
asection *section;
bfd_vma value;
const char *string;
bfd_boolean copy;
bfd_boolean collect;
struct bfd_link_hash_entry **hashp;
{
struct linux_link_hash_entry *h;
bfd_boolean insert;
/* Look up and see if we already have this symbol in the hash table.
If we do, and the defining entry is from a shared library, we
need to create the dynamic sections.
FIXME: What if abfd->xvec != info->hash->creator? We may want to
be able to link Linux a.out and ELF objects together, but serious
confusion is possible. */
insert = FALSE;
if (! info->relocatable
&& linux_hash_table (info)->dynobj == NULL
&& strcmp (name, SHARABLE_CONFLICTS) == 0
&& (flags & BSF_CONSTRUCTOR) != 0
&& abfd->xvec == info->hash->creator)
{
if (! linux_link_create_dynamic_sections (abfd, info))
return FALSE;
linux_hash_table (info)->dynobj = abfd;
insert = TRUE;
}
if (bfd_is_abs_section (section)
&& abfd->xvec == info->hash->creator)
{
h = linux_link_hash_lookup (linux_hash_table (info), name, FALSE,
FALSE, FALSE);
if (h != NULL
&& (h->root.root.type == bfd_link_hash_defined
|| h->root.root.type == bfd_link_hash_defweak))
{
struct fixup *f;
if (hashp != NULL)
*hashp = (struct bfd_link_hash_entry *) h;
f = new_fixup (info, h, value, ! IS_PLT_SYM (name));
if (f == NULL)
return FALSE;
f->jump = IS_PLT_SYM (name);
return TRUE;
}
}
/* Do the usual procedure for adding a symbol. */
if (! _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section,
value, string, copy, collect,
hashp))
return FALSE;
/* Insert a pointer to our table in the set vector. The dynamic
linker requires this information */
if (insert)
{
asection *s;
/* Here we do our special thing to add the pointer to the
dynamic section in the SHARABLE_CONFLICTS set vector. */
s = bfd_get_section_by_name (linux_hash_table (info)->dynobj,
".linux-dynamic");
BFD_ASSERT (s != NULL);
if (! (_bfd_generic_link_add_one_symbol
(info, linux_hash_table (info)->dynobj, SHARABLE_CONFLICTS,
BSF_GLOBAL | BSF_CONSTRUCTOR, s, (bfd_vma) 0, NULL,
FALSE, FALSE, NULL)))
return FALSE;
}
return TRUE;
}
/* We will crawl the hash table and come here for every global symbol.
We will examine each entry and see if there are indications that we
need to add a fixup. There are two possible cases - one is where
you have duplicate definitions of PLT or GOT symbols - these will
have already been caught and added as "builtin" fixups. If we find
that the corresponding non PLT/GOT symbol is also present, we
convert it to a regular fixup instead.
This function is called via linux_link_hash_traverse. */
static bfd_boolean
linux_tally_symbols (h, data)
struct linux_link_hash_entry *h;
PTR data;
{
struct bfd_link_info *info = (struct bfd_link_info *) data;
struct fixup *f, *f1;
int is_plt;
struct linux_link_hash_entry *h1, *h2;
bfd_boolean exists;
if (h->root.root.type == bfd_link_hash_warning)
h = (struct linux_link_hash_entry *) h->root.root.u.i.link;
if (h->root.root.type == bfd_link_hash_undefined
&& strncmp (h->root.root.root.string, NEEDS_SHRLIB,
sizeof NEEDS_SHRLIB - 1) == 0)
{
const char *name;
char *p;
char *alloc = NULL;
name = h->root.root.root.string + sizeof NEEDS_SHRLIB - 1;
p = strrchr (name, '_');
if (p != NULL)
alloc = (char *) bfd_malloc ((bfd_size_type) strlen (name) + 1);
if (p == NULL || alloc == NULL)
(*_bfd_error_handler) (_("Output file requires shared library `%s'\n"),
name);
else
{
strcpy (alloc, name);
p = strrchr (alloc, '_');
*p++ = '\0';
(*_bfd_error_handler)
(_("Output file requires shared library `%s.so.%s'\n"),
alloc, p);
free (alloc);
}
abort ();
}
/* If this symbol is not a PLT/GOT, we do not even need to look at it */
is_plt = IS_PLT_SYM (h->root.root.root.string);
if (is_plt || IS_GOT_SYM (h->root.root.root.string))
{
/* Look up this symbol twice. Once just as a regular lookup,
and then again following all of the indirect links until we
reach a real symbol. */
h1 = linux_link_hash_lookup (linux_hash_table (info),
(h->root.root.root.string
+ sizeof PLT_REF_PREFIX - 1),
FALSE, FALSE, TRUE);
/* h2 does not follow indirect symbols. */
h2 = linux_link_hash_lookup (linux_hash_table (info),
(h->root.root.root.string
+ sizeof PLT_REF_PREFIX - 1),
FALSE, FALSE, FALSE);
/* The real symbol must exist but if it is also an ABS symbol,
there is no need to have a fixup. This is because they both
came from the same library. If on the other hand, we had to
use an indirect symbol to get to the real symbol, we add the
fixup anyway, since there are cases where these symbols come
from different shared libraries */
if (h1 != NULL
&& (((h1->root.root.type == bfd_link_hash_defined
|| h1->root.root.type == bfd_link_hash_defweak)
&& ! bfd_is_abs_section (h1->root.root.u.def.section))
|| h2->root.root.type == bfd_link_hash_indirect))
{
/* See if there is a "builtin" fixup already present
involving this symbol. If so, convert it to a regular
fixup. In the end, this relaxes some of the requirements
about the order of performing fixups. */
exists = FALSE;
for (f1 = linux_hash_table (info)->fixup_list;
f1 != NULL;
f1 = f1->next)
{
if ((f1->h != h && f1->h != h1)
|| (! f1->builtin && ! f1->jump))
continue;
if (f1->h == h1)
exists = TRUE;
if (! exists
&& bfd_is_abs_section (h->root.root.u.def.section))
{
f = new_fixup (info, h1, f1->h->root.root.u.def.value, 0);
f->jump = is_plt;
}
f1->h = h1;
f1->jump = is_plt;
f1->builtin = 0;
exists = TRUE;
}
if (! exists
&& bfd_is_abs_section (h->root.root.u.def.section))
{
f = new_fixup (info, h1, h->root.root.u.def.value, 0);
if (f == NULL)
{
/* FIXME: No way to return error. */
abort ();
}
f->jump = is_plt;
}
}
/* Quick and dirty way of stripping these symbols from the
symtab. */
if (bfd_is_abs_section (h->root.root.u.def.section))
h->root.written = TRUE;
}
return TRUE;
}
/* This is called to set the size of the .linux-dynamic section is.
It is called by the Linux linker emulation before_allocation
routine. We have finished reading all of the input files, and now
we just scan the hash tables to find out how many additional fixups
are required. */
bfd_boolean
bfd_i386linux_size_dynamic_sections (output_bfd, info)
bfd *output_bfd;
struct bfd_link_info *info;
{
struct fixup *f;
asection *s;
if (output_bfd->xvec != &MY(vec))
return TRUE;
/* First find the fixups... */
linux_link_hash_traverse (linux_hash_table (info),
linux_tally_symbols,
(PTR) info);
/* If there are builtin fixups, leave room for a marker. This is
used by the dynamic linker so that it knows that all that follow
are builtin fixups instead of regular fixups. */
for (f = linux_hash_table (info)->fixup_list; f != NULL; f = f->next)
{
if (f->builtin)
{
++linux_hash_table (info)->fixup_count;
++linux_hash_table (info)->local_builtins;
break;
}
}
if (linux_hash_table (info)->dynobj == NULL)
{
if (linux_hash_table (info)->fixup_count > 0)
abort ();
return TRUE;
}
/* Allocate memory for our fixup table. We will fill it in later. */
s = bfd_get_section_by_name (linux_hash_table (info)->dynobj,
".linux-dynamic");
if (s != NULL)
{
s->size = linux_hash_table (info)->fixup_count + 1;
s->size *= 8;
s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->size);
if (s->contents == NULL)
return FALSE;
}
return TRUE;
}
/* We come here once we are ready to actually write the fixup table to
the output file. Scan the fixup tables and so forth and generate
the stuff we need. */
static bfd_boolean
linux_finish_dynamic_link (output_bfd, info)
bfd *output_bfd;
struct bfd_link_info *info;
{
asection *s, *os, *is;
bfd_byte *fixup_table;
struct linux_link_hash_entry *h;
struct fixup *f;
unsigned int new_addr;
int section_offset;
unsigned int fixups_written;
if (linux_hash_table (info)->dynobj == NULL)
return TRUE;
s = bfd_get_section_by_name (linux_hash_table (info)->dynobj,
".linux-dynamic");
BFD_ASSERT (s != NULL);
os = s->output_section;
fixups_written = 0;
#ifdef LINUX_LINK_DEBUG
printf ("Fixup table file offset: %x VMA: %x\n",
os->filepos + s->output_offset,
os->vma + s->output_offset);
#endif
fixup_table = s->contents;
bfd_put_32 (output_bfd,
(bfd_vma) linux_hash_table (info)->fixup_count, fixup_table);
fixup_table += 4;
/* Fill in fixup table. */
for (f = linux_hash_table (info)->fixup_list; f != NULL; f = f->next)
{
if (f->builtin)
continue;
if (f->h->root.root.type != bfd_link_hash_defined
&& f->h->root.root.type != bfd_link_hash_defweak)
{
(*_bfd_error_handler)
(_("Symbol %s not defined for fixups\n"),
f->h->root.root.root.string);
continue;
}
is = f->h->root.root.u.def.section;
section_offset = is->output_section->vma + is->output_offset;
new_addr = f->h->root.root.u.def.value + section_offset;
#ifdef LINUX_LINK_DEBUG
printf ("Fixup(%d) %s: %x %x\n",f->jump, f->h->root.root.string,
new_addr, f->value);
#endif
if (f->jump)
{
/* Relative address */
new_addr = new_addr - (f->value + 5);
bfd_put_32 (output_bfd, (bfd_vma) new_addr, fixup_table);
fixup_table += 4;
bfd_put_32 (output_bfd, f->value + 1, fixup_table);
fixup_table += 4;
}
else
{
bfd_put_32 (output_bfd, (bfd_vma) new_addr, fixup_table);
fixup_table += 4;
bfd_put_32 (output_bfd, f->value, fixup_table);
fixup_table += 4;
}
++fixups_written;
}
if (linux_hash_table (info)->local_builtins != 0)
{
/* Special marker so we know to switch to the other type of fixup */
bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
fixup_table += 4;
bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
fixup_table += 4;
++fixups_written;
for (f = linux_hash_table (info)->fixup_list; f != NULL; f = f->next)
{
if (! f->builtin)
continue;
if (f->h->root.root.type != bfd_link_hash_defined
&& f->h->root.root.type != bfd_link_hash_defweak)
{
(*_bfd_error_handler)
(_("Symbol %s not defined for fixups\n"),
f->h->root.root.root.string);
continue;
}
is = f->h->root.root.u.def.section;
section_offset = is->output_section->vma + is->output_offset;
new_addr = f->h->root.root.u.def.value + section_offset;
#ifdef LINUX_LINK_DEBUG
printf ("Fixup(B) %s: %x %x\n", f->h->root.root.string,
new_addr, f->value);
#endif
bfd_put_32 (output_bfd, (bfd_vma) new_addr, fixup_table);
fixup_table += 4;
bfd_put_32 (output_bfd, f->value, fixup_table);
fixup_table += 4;
++fixups_written;
}
}
if (linux_hash_table (info)->fixup_count != fixups_written)
{
(*_bfd_error_handler) (_("Warning: fixup count mismatch\n"));
while (linux_hash_table (info)->fixup_count > fixups_written)
{
bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
fixup_table += 4;
bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
fixup_table += 4;
++fixups_written;
}
}
h = linux_link_hash_lookup (linux_hash_table (info),
"__BUILTIN_FIXUPS__",
FALSE, FALSE, FALSE);
if (h != NULL
&& (h->root.root.type == bfd_link_hash_defined
|| h->root.root.type == bfd_link_hash_defweak))
{
is = h->root.root.u.def.section;
section_offset = is->output_section->vma + is->output_offset;
new_addr = h->root.root.u.def.value + section_offset;
#ifdef LINUX_LINK_DEBUG
printf ("Builtin fixup table at %x\n", new_addr);
#endif
bfd_put_32 (output_bfd, (bfd_vma) new_addr, fixup_table);
}
else
bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
if (bfd_seek (output_bfd, (file_ptr) (os->filepos + s->output_offset),
SEEK_SET) != 0)
return FALSE;
if (bfd_bwrite ((PTR) s->contents, s->size, output_bfd) != s->size)
return FALSE;
return TRUE;
}
#define MY_bfd_link_hash_table_create linux_link_hash_table_create
#define MY_add_one_symbol linux_add_one_symbol
#define MY_finish_dynamic_link linux_finish_dynamic_link
#define MY_zmagic_contiguous 1
#include "aout-target.h"
```
|
Adnetoscyllium is an extinct genus of bamboo shark from the Cretaceous period. It is currently monotypic, containing only the species A. angloparisensis. The genus is named for prominent paleoichthyologist, Dr. Sylvain Adnet. The specific epithet refers to the range which is thus far restricted to the Anglo-Paris Basin of France and the United Kingdom.
It has a range starting in the Santonian and ending in the Campanian though some fragmentary older teeth likely from this species are known. It can be told apart from most other related genera via its lack of lateral cusplets.
References
Cretaceous sharks
Hemiscylliidae
Prehistoric shark genera
|
Melanie Janine may refer to:
Mel B also known as Melanie Janine Brown (born 1975), English singer
Melanie Janine Kanaka, Sri Lankan accountant
|
```html
<html lang="en">
<head>
<title>Invoking G++ - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.8">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Invoking-GCC.html#Invoking-GCC" title="Invoking GCC">
<link rel="prev" href="Overall-Options.html#Overall-Options" title="Overall Options">
<link rel="next" href="C-Dialect-Options.html#C-Dialect-Options" title="C Dialect Options">
<link href="path_to_url" rel="generator-home" title="Texinfo Homepage">
<!--
Permission is granted to copy, distribute and/or modify this document
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Invoking-G++"></a>
<a name="Invoking-G_002b_002b"></a>
Next: <a rel="next" accesskey="n" href="C-Dialect-Options.html#C-Dialect-Options">C Dialect Options</a>,
Previous: <a rel="previous" accesskey="p" href="Overall-Options.html#Overall-Options">Overall Options</a>,
Up: <a rel="up" accesskey="u" href="Invoking-GCC.html#Invoking-GCC">Invoking GCC</a>
<hr>
</div>
<h3 class="section">3.3 Compiling C++ Programs</h3>
<p><a name="index-suffixes-for-C_002b_002b-source-97"></a><a name="index-C_002b_002b-source-file-suffixes-98"></a>C++ source files conventionally use one of the suffixes `<samp><span class="samp">.C</span></samp>',
`<samp><span class="samp">.cc</span></samp>', `<samp><span class="samp">.cpp</span></samp>', `<samp><span class="samp">.CPP</span></samp>', `<samp><span class="samp">.c++</span></samp>', `<samp><span class="samp">.cp</span></samp>', or
`<samp><span class="samp">.cxx</span></samp>'; C++ header files often use `<samp><span class="samp">.hh</span></samp>', `<samp><span class="samp">.hpp</span></samp>',
`<samp><span class="samp">.H</span></samp>', or (for shared template code) `<samp><span class="samp">.tcc</span></samp>'; and
preprocessed C++ files use the suffix `<samp><span class="samp">.ii</span></samp>'. GCC recognizes
files with these names and compiles them as C++ programs even if you
call the compiler the same way as for compiling C programs (usually
with the name <samp><span class="command">gcc</span></samp>).
<p><a name="index-g_002b_002b-99"></a><a name="index-c_002b_002b-100"></a>However, the use of <samp><span class="command">gcc</span></samp> does not add the C++ library.
<samp><span class="command">g++</span></samp> is a program that calls GCC and automatically specifies linking
against the C++ library. It treats `<samp><span class="samp">.c</span></samp>',
`<samp><span class="samp">.h</span></samp>' and `<samp><span class="samp">.i</span></samp>' files as C++ source files instead of C source
files unless <samp><span class="option">-x</span></samp> is used. This program is also useful when
precompiling a C header file with a `<samp><span class="samp">.h</span></samp>' extension for use in C++
compilations. On many systems, <samp><span class="command">g++</span></samp> is also installed with
the name <samp><span class="command">c++</span></samp>.
<p><a name="index-invoking-_0040command_007bg_002b_002b_007d-101"></a>When you compile C++ programs, you may specify many of the same
command-line options that you use for compiling programs in any
language; or command-line options meaningful for C and related
languages; or options that are meaningful only for C++ programs.
See <a href="C-Dialect-Options.html#C-Dialect-Options">Options Controlling C Dialect</a>, for
explanations of options for languages related to C.
See <a href="C_002b_002b-Dialect-Options.html#C_002b_002b-Dialect-Options">Options Controlling C++ Dialect</a>, for
explanations of options that are meaningful only for C++ programs.
</body></html>
```
|
```go
package simulation_test
import (
"context"
"math/rand"
"testing"
"gotest.tools/v3/assert"
"cosmossdk.io/x/gov/simulation"
codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil"
sdk "github.com/cosmos/cosmos-sdk/types"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
)
func TestProposalMsgs(t *testing.T) {
// initialize parameters
s := rand.NewSource(1)
r := rand.New(s)
accounts := simtypes.RandomAccounts(r, 3)
// execute ProposalMsgs function
weightedProposalMsgs := simulation.ProposalMsgs()
assert.Assert(t, len(weightedProposalMsgs) == 1)
w0 := weightedProposalMsgs[0]
// tests w0 interface:
assert.Equal(t, simulation.OpWeightSubmitTextProposal, w0.AppParamsKey())
assert.Equal(t, simulation.DefaultWeightTextProposal, w0.DefaultWeight())
msg, err := w0.MsgSimulatorFn()(context.Background(), r, accounts, codectestutil.CodecOptions{}.GetAddressCodec())
assert.NilError(t, err)
assert.Assert(t, msg == nil)
}
func TestProposalContents(t *testing.T) {
// initialize parameters
s := rand.NewSource(1)
r := rand.New(s)
ctx := sdk.NewContext(nil, true, nil)
accounts := simtypes.RandomAccounts(r, 3)
// execute ProposalContents function
weightedProposalContent := simulation.ProposalContents()
assert.Assert(t, len(weightedProposalContent) == 1)
w0 := weightedProposalContent[0]
// tests w0 interface:
assert.Equal(t, simulation.OpWeightMsgDeposit, w0.AppParamsKey())
assert.Equal(t, simulation.DefaultWeightTextProposal, w0.DefaultWeight())
content := w0.ContentSimulatorFn()(r, ctx, accounts)
assert.Equal(t, your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashgZsTxPjf", content.GetDescription())
assert.Equal(t, your_sha256_hashyour_sha256_hashqEGqiQWIXnku", content.GetTitle())
assert.Equal(t, "gov", content.ProposalRoute())
assert.Equal(t, "Text", content.ProposalType())
}
```
|
```scala
package com.wavesplatform.it.sync
import com.typesafe.config.{Config, ConfigFactory}
import com.wavesplatform.it.BaseFunSuite
import com.wavesplatform.it.api.SyncHttpApi._
import scala.concurrent.duration._
class FairPoSTestSuite extends BaseFunSuite {
import FairPoSTestSuite._
override protected def nodeConfigs: Seq[Config] = Configs
test("blockchain grows with FairPoS activated") {
nodes.waitForSameBlockHeadersAt(height = 10, conditionAwaitTime = 11.minutes)
val txId = nodes.head.transfer(nodes.head.keyPair, nodes.last.address, transferAmount, minFee).id
nodes.last.waitForTransaction(txId)
val heightAfterTransfer = nodes.head.height
nodes.waitForSameBlockHeadersAt(heightAfterTransfer + 10, conditionAwaitTime = 11.minutes)
}
}
object FairPoSTestSuite {
import com.wavesplatform.it.NodeConfigs._
private val microblockActivationHeight = 0
private val fairPoSActivationHeight = 10
private val vrfActivationHeight = 14
private val config =
ConfigFactory.parseString(s"""
|waves {
| blockchain.custom {
| functionality {
| pre-activated-features {1 = $microblockActivationHeight, 8 = $fairPoSActivationHeight, 17 = $vrfActivationHeight}
| generation-balance-depth-from-50-to-1000-after-height = 1000
| }
| }
| miner.quorum = 1
|}""".stripMargin)
val Configs: Seq[Config] = Default.map(config.withFallback(_)).take(3)
}
```
|
The Roman Catholic Diocese of Jamshedpur () is a diocese located in the city of Jamshedpur in the Ecclesiastical province of Ranchi in India.
History
2 July 1962: Established as Diocese of Jamshedpur from the Archdiocese of Calcutta
Leadership
Bishops of Jamshedpur (Latin Rite)
Bishop Telesphore Bilung, S.V.D. (1 November 2021 – present)
Bishop Felix Toppo, S.J. (14 June 1997 – 24 June 2018)
Bishop Joseph Robert Rodericks, S.J. (25 June 1970 – 9 January 1996)
Archbishop Lawrence Trevor Picachy, S.J. (later Cardinal) (Apostolic Administrator 29 May 1969 – 25 June 1970)
Bishop Lawrence Trevor Picachy, S.J. (later Cardinal) (12 July 1962 – 29 May 1969)
References
External links
GCatholic.org
Catholic Hierarchy
Diocese website
Roman Catholic dioceses in India
Christian organizations established in 1962
Roman Catholic dioceses and prelatures established in the 20th century
1962 establishments in Bihar
Christianity in Jharkhand
Jamshedpur
|
```objective-c
/*
*
* 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.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, 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 DAMAGE.
*/
#ifndef TaskSynchronizer_h
#define TaskSynchronizer_h
#include "platform/PlatformExport.h"
#include "wtf/Noncopyable.h"
#include "wtf/Threading.h"
#include "wtf/ThreadingPrimitives.h"
namespace blink {
// TaskSynchronizer can be used to wait for task completion.
class PLATFORM_EXPORT TaskSynchronizer {
WTF_MAKE_NONCOPYABLE(TaskSynchronizer);
public:
TaskSynchronizer();
// Called from a thread that waits for the task completion.
void waitForTaskCompletion();
// Called from a thread that executes the task.
void taskCompleted();
private:
void waitForTaskCompletionInternal();
bool m_taskCompleted;
Mutex m_synchronousMutex;
ThreadCondition m_synchronousCondition;
};
} // namespace blink
#endif // TaskSynchronizer_h
```
|
Johann Andreas Wagener was the forty-third mayor of Charleston, South Carolina, serving one term from 1871 to 1873.
He also served as an officer in the Confederate States Army during the American Civil War.
Biography
Wagener was born in Sievern / Bremerhaven on July 21, 1816, and baptized July 24 in Debstedt / Bremerhaven. He immigrated from Germany to New York in 1831 and worked as a store clerk. In 1833, he relocated to Charleston, South Carolina, where he began using the first name "John." He founded the first German-language newspaper of the South. Among the many social organizations founded by Wagener were the German Jägerkorps (1836); the Deutsche Feuerwehr-Compagnie of Charleston (1838, German Fire Company) whose president he was until 1850; and the Teutonenbund (1843), a literary and musical society from which the Freundschaftsbund emanated (1853). In April 1844 he became the editor of the German-language newspaper Der Teutone.
Wagener's most lasting work was the founding of the city of Walhalla, South Carolina. In October 1848, the same year in which he was accepted as member of the venerable German Friendly Society, he held the first meeting of the German Colonization Society. In December 1849, 17,859 acres were purchased in the Pickens District, and the town was carefully laid out with a public square.
At the commencement of the Civil War, Col. J.A. Wagener was in charge of the First Artillery regiment which consisted almost entirely of Germans. Ordered to defend Port Royal harbor. They built Fort Walker on Hilton Head island and defended it on November 7, 1861, until their gunpowder ran out. After the war John A. Wagener was commissioned Brigadier-General by Governor James L. Orr and Fort Wagener on Morris Island was named after him.
In 1871, Wagener was elected mayor of Charleston. The election was held on August 2, 1871, and Wagener won by more than 800 votes. Members of the opposition, however, claimed irregularities had occurred involving poll managers. State law at that time required election contests to be head by Charleston's city council, and a contest was filed. However, city council did not meet because of a lack of a quorum. Eventually, the opposition was granted a writ of mandamus by a state judge that ordered city council to meet on October 25, 1871, to hear the contest. A quorum was again lacking on October 25, 1871, so the case was heard by the judge in Columbia, South Carolina on October 28, 1871. The argument of city council turned mainly on procedural issues about the filing of the case in court. At the end of the proceeding, Judge Graham ruled against the election protesters and dismissed the action.
He lived at the corner of St. Philip Street and McBride's Lane.
Wagener died in Walhalla, South Carolina, on August 27, 1876.
References
1816 births
1876 deaths
Mayors of Charleston, South Carolina
Emigrants from the Kingdom of Hanover to the United States
19th-century American politicians
People from Walhalla, South Carolina
People from Bremerhaven
|
```xml
import { G2Spec } from '../../../src';
import { LEGEND_ITEMS_CLASS_NAME } from '../../../src/interaction/legendFilter';
import { step } from './utils';
export function changeSizePolarCrosshairsXYNoElements(): G2Spec {
const data = [
{ item: 'Design', type: 'a', score: 70 },
{ item: 'Design', type: 'b', score: 30 },
{ item: 'Development', type: 'a', score: 60 },
{ item: 'Development', type: 'b', score: 70 },
{ item: 'Marketing', type: 'a', score: 50 },
{ item: 'Marketing', type: 'b', score: 60 },
{ item: 'Users', type: 'a', score: 40 },
{ item: 'Users', type: 'b', score: 50 },
{ item: 'Test', type: 'a', score: 60 },
{ item: 'Test', type: 'b', score: 70 },
{ item: 'Language', type: 'a', score: 70 },
{ item: 'Language', type: 'b', score: 50 },
{ item: 'Technology', type: 'a', score: 50 },
{ item: 'Technology', type: 'b', score: 40 },
{ item: 'Support', type: 'a', score: 30 },
{ item: 'Support', type: 'b', score: 40 },
{ item: 'Sales', type: 'a', score: 60 },
{ item: 'Sales', type: 'b', score: 40 },
{ item: 'UX', type: 'a', score: 50 },
{ item: 'UX', type: 'b', score: 60 },
];
return {
type: 'view',
coordinate: {
type: 'polar',
},
scale: {
x: { padding: 0.5, align: 0 },
y: { tickCount: 5, domainMax: 80 },
},
autoFit: true,
data,
interaction: {
elementPointMove: true,
tooltip: {
crosshairs: true,
crosshairsStroke: 'red',
crosshairsLineDash: [4, 4],
},
},
axis: {
x: {
grid: true,
gridStrokeWidth: 1,
tick: false,
gridLineDash: [0, 0],
},
y: {
zIndex: 1,
title: false,
gridConnect: 'line',
gridStrokeWidth: 1,
gridLineDash: [0, 0],
},
},
children: [
{
type: 'area',
encode: {
x: 'item',
y: 'score',
color: 'type',
key: 'type',
},
style: {
fillOpacity: 0.5,
},
},
{
type: 'line',
encode: {
x: 'item',
y: 'score',
color: 'type',
key: 'type',
},
style: {
lineWidth: 2,
},
},
],
};
}
changeSizePolarCrosshairsXYNoElements.steps = ({ canvas }) => {
const { document } = canvas;
const elements = document.getElementsByClassName(LEGEND_ITEMS_CLASS_NAME);
const [e0, e1] = elements;
return [
step(e0, 'click'),
step(e0, 'click'),
step(e1, 'click'),
step(e0, 'click'),
];
};
```
|
Alexandra Boyd is a British actress, director, screenwriter and producer. Her acting credits include Clarissa Mason in Coronation Street and Sarah Olmsted in Mr Holland's Opus. In recent years she has turned to screenwriting and film directing. She wrote and directed her debut feature Widow's Walk which debuted on Amazon Prime in December 2019.
On British TV she has appeared in several episodes of Doctors and guest starred in New Tricks and "Holby City". She's been a guest on Loose Women and is the Head of the Delegation in the 2010 John Travolta/Luc Besson action film From Paris with Love. Other film credits include Mr. Holland's Opus and James Cameron's Titanic. She wrote and directed her second film Boxer on the Wilderness ~ a trailer for her feature screenplay (The Wilderness).
Early life
Alexandra Boyd was born to a Scottish father, David Boyd, and an English mother, Barbara Boyd (née Godbold) in Bangor, Wales. She grew up in Norwich, Norfolk, and was educated at Norwich High School for Girls. She left school at 16 to study full-time at Laine Theatre Arts in Epsom, Surrey. In 1986, she enrolled in the post graduate acting course at Drama Studio, London. She co-founded a theatre company that performed Shakespeare and adapted classics for the London and Edinburgh Fringe. The company also produced English plays for Italy. In the 1993 Italian tour, she played Eliza Doolittle in Pygmalion.
While living in Los Angeles, Boyd studied art history, architecture and design while training as an interior designer at UCLA. She studied with some of the foremost green architects in the United States and writes a blog about living a green and sustainable lifestyle called How Green Is Your Life.
Acting career
Boyd moved back to the UK in 2006 after living in the US for seventeen years. While living and working in Los Angeles she appeared in Mr. Holland's Opus and James Cameron's Titanic.
On American TV, Boyd made appearances on Party of Five, Sabrina, the Teenage Witch and The Bernie Mac Show. She has performed voices for radio commercials & animated features such as The Wild Thornberries. She is the voice of Elaine Marley in The Curse of Monkey Island, Tales of Monkey Island, Return to Monkey Island and the special editions of The Secret of Monkey Island and Monkey Island 2: LeChuck's Revenge.
On British TV, she played Clarissa Mason on Coronation Street (Granada TV) and Dennis Waterman's love interest in an episode of New Tricks (BBC). She has guest starred in several episodes of BBC1's Doctors and Holby City.
Her theatre credits range from Shakespeare to panto; many Alan Ayckbourn plays; Rita in Educating Rita and Eliza Doolittle in Pygmalion. In 2007 she produced and performed in a one-woman show at the Hackney Empire.
In November 2009 she co-starred with Danny Webb in Visiting Hours, a short film written for her and directed by Steve Hughes. The film played at the Milan International Film Festival 2010 and the Los Angeles Short Film Festival 2010 and ENCOUNTERS 2010 in Bristol.
Boyd plays the Chief of Delegation in the Luc Beeson (Europacorp) film From Paris with Love, with John Travolta and Jonathan Rhys Meyers. The film was directed by Pierre Morel and written and produced by Luc Besson.
Writer and director
Boyd created her production company New Thirty Pictures in 2013. She wrote, directed and produced her debut feature film, a supernatural thriller called Widow's Walk. It is set and shot in her native Suffolk. The film stars Miranda Raison, David Caves, Anthony Howell and Virginia McKenna. The film launched on Amazon Prime Video (UK/EU) in December 2019.
She has written, directed and crowdfunded a number of short films. [https://vimeo.com/88017642 Boxer on the Wilderness']' explores themes in her screenplay The Wilderness''. It screened at 15 international film festivals.
Film festivals
In October 2019 Widow's Walk world premiered at the Chelsea Film Festival in New York where it won the award for Best Cinematography (DP Alex Veitch).
In May 2014, Boxer on the Wilderness screened in the British Independent Film Festival at the Empire Leicester Square and was nominated for Best Short Film and Best Cinematography. The film screened at the East End Film Festival at Stratford East Playhouse and nine additional international film festivals during 2014/15 including the Underwire Film Festival in London, Hollyshorts in Los Angeles, Bornshorts in Denmark, The Portland Film Festival in Portland, OR and The Chelsea Film Festival in New York. It won the Mention d'Honnuer at the "Sport Movies & TV - Milano International FICTS Fest" in December 2014.
Filmography
Film
Television
Video games
References
External links
New Thirty Pictures
Personal Website
Widow's Walk website
English film actors
English people of Scottish descent
English soap opera actresses
English television actresses
English video game actresses
English voice actresses
People from Bangor, Gwynedd
Living people
Alumni of the Drama Studio London
20th-century English actresses
21st-century English actresses
Year of birth missing (living people)
|
```xml
import * as useSubscriptionModule from '@proton/account/subscription/hooks';
import type { SubscriptionModel } from '@proton/shared/lib/interfaces';
import { buildSubscription } from '../builders';
export const mockUseSubscription = (value: [Partial<SubscriptionModel>?, boolean?] = []) => {
const [subscription, cached = false] = value;
const mockedUseSubscription = jest.spyOn(useSubscriptionModule, 'useSubscription');
mockedUseSubscription.mockReturnValue([buildSubscription(subscription), Boolean(cached)]);
return mockedUseSubscription;
};
```
|
```xml
import type { IconName } from '@fortawesome/fontawesome-svg-core';
import * as Sentry from '@sentry/electron/renderer';
import React, { type FC, Fragment, useEffect, useMemo, useRef, useState } from 'react';
import {
Button,
Dialog,
GridList,
GridListItem,
Heading,
Input,
Label,
Link,
ListBox,
ListBoxItem,
Menu,
MenuItem,
MenuTrigger,
Modal,
ModalOverlay,
Popover,
Radio,
RadioGroup,
SearchField,
Select,
SelectValue,
TextField,
Tooltip,
TooltipTrigger,
} from 'react-aria-components';
import { Panel, PanelGroup, PanelResizeHandle } from 'react-resizable-panels';
import {
type ActionFunction,
defer,
type LoaderFunction,
redirect,
useFetcher,
useFetchers,
useLoaderData,
useNavigate,
useParams,
useRouteLoaderData,
} from 'react-router-dom';
import { useLocalStorage } from 'react-use';
import { logout } from '../../account/session';
import { parseApiSpec, type ParsedApiSpec } from '../../common/api-specs';
import {
DASHBOARD_SORT_ORDERS,
type DashboardSortOrder,
dashboardSortOrderName,
DEFAULT_SIDEBAR_SIZE,
getAppWebsiteBaseURL,
} from '../../common/constants';
import { database } from '../../common/database';
import { fuzzyMatchAll, isNotNullOrUndefined } from '../../common/misc';
import { LandingPage, SentryMetrics } from '../../common/sentry';
import { descendingNumberSort, sortMethodMap } from '../../common/sorting';
import * as models from '../../models';
import { userSession } from '../../models';
import type { ApiSpec } from '../../models/api-spec';
import { sortProjects } from '../../models/helpers/project';
import type { MockServer } from '../../models/mock-server';
import type { Organization } from '../../models/organization';
import { isOwnerOfOrganization, isPersonalOrganization, isScratchpadOrganizationId } from '../../models/organization';
import {
isRemoteProject,
type Project,
SCRATCHPAD_PROJECT_ID,
} from '../../models/project';
import { isDesign, scopeToActivity, type Workspace, type WorkspaceScope } from '../../models/workspace';
import type { WorkspaceMeta } from '../../models/workspace-meta';
import { VCSInstance } from '../../sync/vcs/insomnia-sync';
import { showModal } from '../../ui/components/modals';
import { AskModal } from '../../ui/components/modals/ask-modal';
import { insomniaFetch } from '../../ui/insomniaFetch';
import { invariant } from '../../utils/invariant';
import { getInitialRouteForOrganization } from '../../utils/router';
import { AvatarGroup } from '../components/avatar';
import { ProjectDropdown } from '../components/dropdowns/project-dropdown';
import { WorkspaceCardDropdown } from '../components/dropdowns/workspace-card-dropdown';
import { ErrorBoundary } from '../components/error-boundary';
import { Icon } from '../components/icon';
import { showAlert, showPrompt } from '../components/modals';
import { AlertModal } from '../components/modals/alert-modal';
import { GitRepositoryCloneModal } from '../components/modals/git-repository-settings-modal/git-repo-clone-modal';
import { ImportModal } from '../components/modals/import-modal';
import { MockServerSettingsModal } from '../components/modals/mock-server-settings-modal';
import { EmptyStatePane } from '../components/panes/project-empty-state-pane';
import { TimeFromNow } from '../components/time-from-now';
import { useInsomniaEventStreamContext } from '../context/app/insomnia-event-stream-context';
import { useLoaderDeferData } from '../hooks/use-loader-defer-data';
import { DefaultStorage, type OrganizationFeatureLoaderData, type OrganizationLoaderData, type OrganizationStorageLoaderData, useOrganizationLoaderData } from './organization';
import { useRootLoaderData } from './root';
interface TeamProject {
id: string;
name: string;
}
async function getAllTeamProjects(organizationId: string) {
const { id: sessionId } = await userSession.getOrCreate();
if (!sessionId) {
return [];
}
console.log('[project] Fetching', organizationId);
const response = await insomniaFetch<{
data: {
id: string;
name: string;
}[];
}>({
path: `/v1/organizations/${organizationId}/team-projects`,
method: 'GET',
sessionId,
});
return response.data as TeamProject[];
}
export const scopeToLabelMap: Record<WorkspaceScope | 'unsynced', 'Document' | 'Collection' | 'Mock Server' | 'Unsynced' | 'Environment'> = {
design: 'Document',
collection: 'Collection',
'mock-server': 'Mock Server',
unsynced: 'Unsynced',
environment: 'Environment',
};
export const scopeToIconMap: Record<string, IconName> = {
design: 'file',
collection: 'bars',
'mock-server': 'server',
unsynced: 'cloud-download',
environment: 'code',
};
export const scopeToBgColorMap: Record<string, string> = {
design: 'bg-[--color-info]',
collection: 'bg-[--color-surprise]',
'mock-server': 'bg-[--color-warning]',
unsynced: 'bg-[--hl-md]',
environment: 'bg-[--color-font]',
};
export const scopeToTextColorMap: Record<string, string> = {
design: 'text-[--color-font-info]',
collection: 'text-[--color-font-surprise]',
'mock-server': 'text-[--color-font-warning]',
unsynced: 'text-[--color-font]',
environment: 'text-[--color-bg]',
};
async function syncTeamProjects({
organizationId,
teamProjects,
}: {
teamProjects: TeamProject[];
organizationId: string;
}) {
// assumption: api teamProjects is the source of truth for migrated projects
// once migrated orgs become the source of truth for projects
// its important that migration be completed before this code is run
const existingRemoteProjects = await database.find<Project>(models.project.type, {
remoteId: { $in: teamProjects.map(p => p.id) },
});
const existingRemoteProjectsRemoteIds = existingRemoteProjects.map(p => p.remoteId);
const remoteProjectsThatNeedToBeCreated = teamProjects.filter(p => !existingRemoteProjectsRemoteIds.includes(p.id));
// this will create a new project for any remote projects that don't exist in the current organization
await Promise.all(remoteProjectsThatNeedToBeCreated.map(async prj => {
await models.project.create(
{
remoteId: prj.id,
name: prj.name,
parentId: organizationId,
}
);
}));
const remoteProjectsThatNeedToBeUpdated = await database.find<Project>(models.project.type, {
// Name is not in the list of remote projects
name: { $nin: teamProjects.map(p => p.name) },
// Remote ID is in the list of remote projects
remoteId: { $in: teamProjects.map(p => p.id) },
});
await Promise.all(remoteProjectsThatNeedToBeUpdated.map(async prj => {
const remoteProject = teamProjects.find(p => p.id === prj.remoteId);
if (remoteProject) {
await models.project.update(prj, {
name: remoteProject.name,
});
}
}));
// Turn remote projects from the current organization that are not in the list of remote projects into local projects.
const removedRemoteProjects = await database.find<Project>(models.project.type, {
// filter by this organization so no legacy data can be accidentally removed, because legacy had null parentId
parentId: organizationId,
// Remote ID is not in the list of remote projects.
// add `$ne: null` condition because if remoteId is already null, we dont need to remove it again.
// nedb use append-only format, all updates and deletes actually result in lines added
remoteId: {
$nin: teamProjects.map(p => p.id),
$ne: null,
},
});
await Promise.all(removedRemoteProjects.map(async prj => {
await models.project.update(prj, {
remoteId: null,
});
}));
}
export const syncProjects = async (organizationId: string) => {
const user = await models.userSession.getOrCreate();
const teamProjects = await getAllTeamProjects(organizationId);
// ensure we don't sync projects in the wrong place
if (teamProjects.length > 0 && user.id && !isScratchpadOrganizationId(organizationId)) {
await syncTeamProjects({
organizationId,
teamProjects,
});
}
};
export const syncProjectsAction: ActionFunction = async ({ params }) => {
const { organizationId } = params;
invariant(organizationId, 'Organization ID is required');
await syncProjects(organizationId);
return null;
};
export const indexLoader: LoaderFunction = async ({ params }) => {
const { organizationId } = params;
invariant(organizationId, 'Organization ID is required');
try {
await syncProjects(organizationId);
} catch (err) {
console.log('[project] Could not fetch remote projects.');
}
const initialOrganizationRoute = await getInitialRouteForOrganization({ organizationId });
return redirect(initialOrganizationRoute);
};
export interface InsomniaFile {
id: string;
name: string;
remoteId?: string;
scope: WorkspaceScope | 'unsynced';
label: 'Document' | 'Collection' | 'Mock Server' | 'Unsynced' | 'Environment';
created: number;
lastModifiedTimestamp: number;
branch?: string;
lastCommit?: string;
version?: string;
oasFormat?: string;
mockServer?: MockServer;
workspace?: Workspace;
apiSpec?: ApiSpec;
hasUncommittedChanges?: boolean;
hasUnpushedChanges?: boolean;
}
export interface ProjectIdLoaderData {
activeProject?: Project;
}
export interface ProjectLoaderData {
localFiles: InsomniaFile[];
allFilesCount: number;
documentsCount: number;
environmentsCount: number;
collectionsCount: number;
mockServersCount: number;
projectsCount: number;
activeProject?: Project;
projects: Project[];
learningFeaturePromise?: Promise<LearningFeature>;
remoteFilesPromise?: Promise<InsomniaFile[]>;
projectsSyncStatusPromise?: Promise<Record<string, boolean>>;
}
async function getAllLocalFiles({
projectId,
}: {
projectId: string;
}) {
const projectWorkspaces = await models.workspace.findByParentId(projectId);
const [workspaceMetas, apiSpecs, mockServers] = await Promise.all([
database.find<WorkspaceMeta>(models.workspaceMeta.type, {
parentId: {
$in: projectWorkspaces.map(w => w._id),
},
}),
database.find<ApiSpec>(models.apiSpec.type, {
parentId: {
$in: projectWorkspaces.map(w => w._id),
},
}),
database.find<MockServer>(models.mockServer.type, {
parentId: {
$in: projectWorkspaces.map(w => w._id),
},
}),
]);
const files: InsomniaFile[] = projectWorkspaces.map(workspace => {
const apiSpec = apiSpecs.find(spec => spec.parentId === workspace._id);
const mockServer = mockServers.find(mock => mock.parentId === workspace._id);
let spec: ParsedApiSpec['contents'] = null;
let specFormat: ParsedApiSpec['format'] = null;
let specFormatVersion: ParsedApiSpec['formatVersion'] = null;
if (apiSpec) {
try {
const result = parseApiSpec(apiSpec.contents);
spec = result.contents;
specFormat = result.format;
specFormatVersion = result.formatVersion;
} catch (err) {
// Assume there is no spec
// TODO: Check for parse errors if it's an invalid spec
}
}
const workspaceMeta = workspaceMetas.find(wm => wm.parentId === workspace._id);
const lastActiveBranch = workspaceMeta?.cachedGitRepositoryBranch;
const lastCommitAuthor = workspaceMeta?.cachedGitLastAuthor;
// WorkspaceMeta is a good proxy for last modified time
const workspaceModified = workspaceMeta?.modified || workspace.modified;
const modifiedLocally = isDesign(workspace)
? apiSpec?.modified || 0
: workspaceModified;
// Span spec, workspace and sync related timestamps for card last modified label and sort order
const lastModifiedFrom = [
workspace?.modified,
workspaceMeta?.modified,
modifiedLocally,
workspaceMeta?.cachedGitLastCommitTime,
];
const lastModifiedTimestamp = lastModifiedFrom
.filter(isNotNullOrUndefined)
.sort(descendingNumberSort)[0];
const hasUnsavedChanges = Boolean(
isDesign(workspace) &&
workspaceMeta?.cachedGitLastCommitTime &&
modifiedLocally > workspaceMeta?.cachedGitLastCommitTime
);
const specVersion = spec?.info?.version ? String(spec?.info?.version) : '';
return {
id: workspace._id,
name: workspace.name,
scope: workspace.scope,
label: scopeToLabelMap[workspace.scope],
created: workspace.created,
lastModifiedTimestamp: (hasUnsavedChanges && modifiedLocally) || workspaceMeta?.cachedGitLastCommitTime || lastModifiedTimestamp,
branch: lastActiveBranch || '',
lastCommit: hasUnsavedChanges && workspaceMeta?.cachedGitLastCommitTime && lastCommitAuthor ? `by ${lastCommitAuthor}` : '',
version: specVersion ? `${specVersion?.startsWith('v') ? '' : 'v'}${specVersion}` : '',
oasFormat: specFormat ? `${specFormat === 'openapi' ? 'OpenAPI' : 'Swagger'} ${specFormatVersion || ''}` : '',
mockServer,
apiSpec,
workspace,
hasUncommittedChanges: workspaceMeta?.hasUncommittedChanges,
hasUnpushedChanges: workspaceMeta?.hasUnpushedChanges,
};
});
return files;
}
async function getAllRemoteFiles({
projectId,
organizationId,
}: {
projectId: string;
organizationId: string;
}) {
try {
const project = await models.project.getById(projectId);
invariant(project, 'Project not found');
const remoteId = project.remoteId;
invariant(remoteId, 'Project is not a remote project');
const vcs = VCSInstance();
const [allPulledBackendProjectsForRemoteId, allFetchedRemoteBackendProjectsForRemoteId] = await Promise.all([
vcs.localBackendProjects().then(projects => projects.filter(p => p.id === remoteId)),
// Remote backend projects are fetched from the backend since they are not stored locally
vcs.remoteBackendProjects({ teamId: organizationId, teamProjectId: remoteId }),
]);
// Get all workspaces that are connected to backend projects and under the current project
const workspacesWithBackendProjects = await database.find<Workspace>(models.workspace.type, {
_id: {
$in: [...allPulledBackendProjectsForRemoteId, ...allFetchedRemoteBackendProjectsForRemoteId].map(p => p.rootDocumentId),
},
parentId: project._id,
});
// Get the list of remote backend projects that we need to pull
const backendProjectsToPull = allFetchedRemoteBackendProjectsForRemoteId
.filter(p => !workspacesWithBackendProjects.find(w => w._id === p.rootDocumentId));
return backendProjectsToPull.map(backendProject => {
const file: InsomniaFile = {
id: backendProject.rootDocumentId,
name: backendProject.name,
scope: 'unsynced',
label: 'Unsynced',
remoteId: backendProject.id,
created: 0,
lastModifiedTimestamp: 0,
};
return file;
});
} catch (e) {
console.warn('Failed to load backend projects', e);
}
return [];
}
export interface ListWorkspacesLoaderData {
files: InsomniaFile[];
activeProject?: Project;
projects: Project[];
}
export const listWorkspacesLoader: LoaderFunction = async ({ params }): Promise<ListWorkspacesLoaderData> => {
const { organizationId, projectId } = params;
invariant(organizationId, 'Organization ID is required');
invariant(projectId, 'Project ID is required');
const project = await models.project.getById(projectId);
invariant(project, `Project was not found ${projectId}`);
const organizationProjects = await database.find<Project>(models.project.type, {
parentId: organizationId,
}) || [];
const projects = sortProjects(organizationProjects);
const files = await getAllLocalFiles({ projectId });
return {
files,
activeProject: project,
projects,
};
};
export const projectIdLoader: LoaderFunction = async ({ params }): Promise<ProjectIdLoaderData> => {
const { projectId } = params;
invariant(projectId, 'Project ID is required');
const project = await models.project.getById(projectId);
invariant(project, `Project was not found ${projectId}`);
return {
activeProject: project,
};
};
interface LearningFeature {
active: boolean;
title: string;
message: string;
cta: string;
url: string;
}
const getLearningFeature = async (fallbackLearningFeature: LearningFeature) => {
let learningFeature = fallbackLearningFeature;
const lastFetchedString = window.localStorage.getItem('learning-feature-last-fetch');
const lastFetched = lastFetchedString ? parseInt(lastFetchedString, 10) : 0;
const oneDay = 86400000;
const hasOneDayPassedSinceLastFetch = (Date.now() - lastFetched) > oneDay;
const wasDismissed = window.localStorage.getItem('learning-feature-dismissed');
const wasNotDismissedAndOneDayHasPassed = !wasDismissed && hasOneDayPassedSinceLastFetch;
if (wasNotDismissedAndOneDayHasPassed) {
try {
learningFeature = await insomniaFetch<LearningFeature>({
method: 'GET',
path: '/insomnia-production-public-assets/inapp-learning.json',
origin: 'path_to_url
sessionId: '',
});
window.localStorage.setItem('learning-feature-last-fetch', Date.now().toString());
} catch (err) {
console.log('[project] Could not fetch learning feature data.');
}
}
return learningFeature;
};
const checkSingleProjectSyncStatus = async (projectId: string) => {
const projectWorkspaces = await models.workspace.findByParentId(projectId);
const workspaceMetas = await database.find<WorkspaceMeta>(models.workspaceMeta.type, {
parentId: {
$in: projectWorkspaces.map(w => w._id),
},
});
return workspaceMetas.some(item => item.hasUncommittedChanges || item.hasUnpushedChanges);
};
const CheckAllProjectSyncStatus = async (projects: Project[]) => {
const taskList = projects.map(project => checkSingleProjectSyncStatus(project._id));
const res = await Promise.all(taskList);
const obj: Record<string, boolean> = {};
projects.forEach((project, index) => {
obj[project._id] = res[index];
});
return obj;
};
export const loader: LoaderFunction = async ({
params,
}) => {
const { organizationId, projectId } = params;
invariant(organizationId, 'Organization ID is required');
const { id: sessionId } = await userSession.getOrCreate();
const fallbackLearningFeature = {
active: false,
title: '',
message: '',
cta: '',
url: '',
};
if (!projectId) {
return {
localFiles: [],
allFilesCount: 0,
documentsCount: 0,
environmentsCount: 0,
collectionsCount: 0,
mockServersCount: 0,
projectsCount: 0,
activeProject: undefined,
projects: [],
};
}
if (!sessionId) {
await logout();
throw redirect('/auth/login');
}
invariant(projectId, 'projectId parameter is required');
const project = await models.project.getById(projectId);
invariant(project, `Project was not found ${projectId}`);
const [localFiles, organizationProjects = []] = await Promise.all([
getAllLocalFiles({ projectId }),
database.find<Project>(models.project.type, {
parentId: organizationId,
}),
]);
const remoteFilesPromise = getAllRemoteFiles({ projectId, organizationId });
const learningFeaturePromise = getLearningFeature(fallbackLearningFeature);
const projects = sortProjects(organizationProjects);
const projectsSyncStatusPromise = CheckAllProjectSyncStatus(projects);
return defer({
localFiles,
learningFeaturePromise,
remoteFilesPromise,
projects,
projectsCount: organizationProjects.length,
activeProject: project,
allFilesCount: localFiles.length,
environmentsCount: localFiles.filter(
file => file.scope === 'environment'
).length,
documentsCount: localFiles.filter(
file => file.scope === 'design'
).length,
collectionsCount: localFiles.filter(
file => file.scope === 'collection'
).length,
mockServersCount: localFiles.filter(
file => file.scope === 'mock-server'
).length,
projectsSyncStatusPromise,
});
};
const ProjectRoute: FC = () => {
const {
localFiles,
activeProject,
projects,
allFilesCount,
environmentsCount,
collectionsCount,
mockServersCount,
documentsCount,
projectsCount,
learningFeaturePromise,
remoteFilesPromise,
projectsSyncStatusPromise,
} = useLoaderData() as ProjectLoaderData;
const [isLearningFeatureDismissed, setIsLearningFeatureDismissed] = useLocalStorage('learning-feature-dismissed', '');
const { organizationId, projectId } = useParams() as {
organizationId: string;
projectId: string;
};
const [learningFeature] = useLoaderDeferData<LearningFeature>(learningFeaturePromise);
const [remoteFiles] = useLoaderDeferData<InsomniaFile[]>(remoteFilesPromise, projectId);
const [checkAllProjectSyncStatus] = useLoaderDeferData<Record<string, boolean>>(projectsSyncStatusPromise);
const allFiles = useMemo(() => {
return remoteFiles ? [...localFiles, ...remoteFiles] : localFiles;
}, [localFiles, remoteFiles]);
const { userSession } = useRootLoaderData();
const pullFileFetcher = useFetcher();
const updateProjectFetcher = useFetcher();
const loadingBackendProjects = useFetchers().filter(fetcher => fetcher.formAction === `/organization/${organizationId}/project/${projectId}/remote-collections/pull`).map(f => f.formData?.get('backendProjectId'));
const { organizations } = useOrganizationLoaderData();
const { presence } = useInsomniaEventStreamContext();
const permissionsFetcher = useFetcher<OrganizationFeatureLoaderData>({ key: `permissions:${organizationId}` });
const storageRuleFetcher = useFetcher<OrganizationStorageLoaderData>({ key: `storage-rule:${organizationId}` });
useEffect(() => {
if (!isScratchpadOrganizationId(organizationId)) {
const load = permissionsFetcher.load;
load(`/organization/${organizationId}/permissions`);
}
}, [organizationId, permissionsFetcher.load]);
useEffect(() => {
if (!isScratchpadOrganizationId(organizationId)) {
const load = storageRuleFetcher.load;
load(`/organization/${organizationId}/storage-rule`);
}
}, [organizationId, storageRuleFetcher.load]);
const { currentPlan } = useRouteLoaderData('/organization') as OrganizationLoaderData;
const { featuresPromise, billingPromise } = permissionsFetcher.data || {};
const [features = {
gitSync: { enabled: false, reason: 'Insomnia API unreachable' },
orgBasicRbac: { enabled: false, reason: 'Insomnia API unreachable' },
}] = useLoaderDeferData(featuresPromise);
const [billing = {
isActive: true,
}] = useLoaderDeferData(billingPromise);
const { storagePromise } = storageRuleFetcher.data || {};
const [storage = DefaultStorage] = useLoaderDeferData(storagePromise);
const [projectListFilter, setProjectListFilter] = useLocalStorage(`${organizationId}:project-list-filter`, '');
const [workspaceListFilter, setWorkspaceListFilter] = useLocalStorage(`${projectId}:workspace-list-filter`, '');
const [workspaceListScope, setWorkspaceListScope] = useLocalStorage(`${projectId}:workspace-list-scope`, 'all');
const [workspaceListSortOrder, setWorkspaceListSortOrder] = useLocalStorage(`${projectId}:workspace-list-sort-order`, 'modified-desc');
const [importModalType, setImportModalType] = useState<'file' | 'clipboard' | 'uri' | null>(null);
const [isNewProjectModalOpen, setIsNewProjectModalOpen] = useState(false);
const [isUpdateProjectModalOpen, setIsUpdateProjectModalOpen] = useState(false);
const [projectType, setProjectType] = useState<'local' | 'remote' | ''>('');
const organization = organizations.find(o => o.id === organizationId);
const isUserOwner = organization && userSession.accountId && isOwnerOfOrganization({ organization, accountId: userSession.accountId });
const isPersonalOrg = organization && isPersonalOrganization(organization);
const filteredFiles = allFiles
.filter(w => (workspaceListScope !== 'all' ? w.scope === workspaceListScope : true))
.filter(workspace =>
workspaceListFilter
? Boolean(
fuzzyMatchAll(
workspaceListFilter,
// Use the filter string to match against these properties
[
workspace.name,
workspace.scope === 'design'
? 'document'
: 'collection',
workspace.branch || '',
workspace.oasFormat || '',
],
{ splitSpace: true, loose: true }
)?.indexes
)
: true
)
.sort((a, b) => sortMethodMap[workspaceListSortOrder as DashboardSortOrder](a, b));
const filesWithPresence = filteredFiles.map(file => {
const workspacePresence = presence
.filter(p => p.project === activeProject?.remoteId && p.file === file.id)
.filter(p => p.acct !== userSession.accountId)
.map(user => {
return {
key: user.acct,
alt: user.firstName || user.lastName ? `${user.firstName} ${user.lastName}` : user.acct,
src: user.avatar,
};
});
return {
...file,
loading: loadingBackendProjects.includes(file.remoteId) || pullFileFetcher.formData?.get('backendProjectId') && pullFileFetcher.formData?.get('backendProjectId') === file.remoteId,
presence: workspacePresence,
};
}).map(file => ({
...file,
action: () => {
// hack to workaround gridlist not have access to workspace scope
if (file.scope === 'unsynced') {
if (activeProject?.remoteId && file.remoteId) {
return pullFileFetcher.submit({ backendProjectId: file.remoteId, remoteId: activeProject.remoteId }, {
method: 'POST',
action: `/organization/${organizationId}/project/${projectId}/remote-collections/pull`,
});
}
return;
}
const activity = scopeToActivity(file.scope);
navigate(
`/organization/${organizationId}/project/${projectId}/workspace/${file.id}/${activity}`
);
},
}));
const projectsWithPresence = projects.filter(p =>
projectListFilter ? p.name?.toLowerCase().includes(projectListFilter.toLowerCase()) : true
).map(project => {
const projectPresence = presence
.filter(p => p.project === project.remoteId)
.filter(p => p.acct !== userSession.accountId)
.map(user => {
return {
key: user.acct,
alt: user.firstName || user.lastName ? `${user.firstName} ${user.lastName}` : user.acct,
src: user.avatar,
};
});
return {
...project,
presence: projectPresence,
hasUncommittedOrUnpushedChanges: checkAllProjectSyncStatus?.[project._id],
};
});
const [isGitRepositoryCloneModalOpen, setIsGitRepositoryCloneModalOpen] =
useState(false);
const [isMockServerSettingsModalOpen, setIsMockServerSettingsModalOpen] = useState(false);
const fetcher = useFetcher();
const navigate = useNavigate();
const createNewCollection = () => {
activeProject?._id &&
showPrompt({
title: 'Create New Request Collection',
submitName: 'Create',
placeholder: 'My Collection',
defaultValue: 'My Collection',
selectText: true,
onComplete: async (name: string) => {
fetcher.submit(
{
name,
scope: 'collection',
},
{
action: `/organization/${organizationId}/project/${activeProject._id}/workspace/new`,
method: 'post',
}
);
},
});
};
const createNewDocument = () => {
activeProject?._id &&
showPrompt({
title: 'Create New Design Document',
submitName: 'Create',
placeholder: 'my-spec.yaml',
defaultValue: 'my-spec.yaml',
selectText: true,
onComplete: async (name: string) => {
fetcher.submit(
{
name,
scope: 'design',
},
{
action: `/organization/${organizationId}/project/${activeProject._id}/workspace/new`,
method: 'post',
}
);
},
});
};
const isEnterprise = currentPlan?.type.includes('enterprise');
const isCloudProjectOrEnterprisePlan = activeProject?.remoteId || isEnterprise;
const canCreateMockServer = activeProject?._id && isCloudProjectOrEnterprisePlan;
const createNewMockServer = () => {
canCreateMockServer
? setIsMockServerSettingsModalOpen(true)
: showModal(AlertModal, {
title: 'Change Project',
message: 'Mock feature is only supported for Cloud projects and Enterprise local projects.',
});
};
const createNewGlobalEnvironment = () => {
activeProject?._id &&
showPrompt({
title: 'Create New Environment',
submitName: 'Create',
placeholder: 'New environment',
defaultValue: 'New environment',
selectText: true,
onComplete: async (name: string) => {
fetcher.submit(
{
name,
scope: 'environment',
},
{
action: `/organization/${organizationId}/project/${activeProject._id}/workspace/new`,
method: 'post',
}
);
},
});
};
const createNewProjectFetcher = useFetcher({
key: `${organizationId}-${projectId}-create-new-project`,
});
useEffect(() => {
if (createNewProjectFetcher.data && createNewProjectFetcher.data.error && createNewProjectFetcher.state === 'idle') {
if (createNewProjectFetcher.data.error === 'NEEDS_TO_UPGRADE') {
showModal(AskModal, {
title: 'Upgrade your plan',
message: 'You are currently on the Free plan where you can invite as many collaborators as you want as long as you don\'t have more than one project. Since you have more than one project, you need to upgrade to "Individual" or above to continue.',
yesText: 'Upgrade',
noText: 'Cancel',
onDone: async (isYes: boolean) => {
if (isYes) {
window.main.openInBrowser(`${getAppWebsiteBaseURL()}/app/subscription/update?plan=individual`);
}
},
});
} else if (createNewProjectFetcher.data.error === 'FORBIDDEN') {
showAlert({
title: 'Could not create project.',
message: 'You do not have permission to create a project in this organization.',
});
} else {
showAlert({
title: 'Could not create project.',
message: createNewProjectFetcher.data.error,
});
}
}
}, [createNewProjectFetcher.state, createNewProjectFetcher.data]);
const isGitSyncEnabled = features.gitSync.enabled;
const showUpgradePlanModal = () => {
if (!organization || !userSession.accountId) {
return;
}
const isOwner = isOwnerOfOrganization({
organization,
accountId: userSession.accountId,
});
isOwner ?
showModal(AskModal, {
title: 'Upgrade Plan',
message: 'Git Sync is only enabled for Team plan or above, please upgrade your plan.',
yesText: 'Upgrade',
noText: 'Cancel',
onDone: async (isYes: boolean) => {
if (isYes) {
window.main.openInBrowser(`${getAppWebsiteBaseURL()}/app/subscription/update?plan=team`);
}
},
}) : showModal(AlertModal, {
title: 'Upgrade Plan',
message: 'Git Sync is only enabled for Team plan or above, please ask the organization owner to upgrade.',
});
};
const importFromGit = () => {
isGitSyncEnabled ?
setIsGitRepositoryCloneModalOpen(true)
: showUpgradePlanModal();
};
const createInProjectActionList: {
id: string;
name: string;
icon: IconName;
action: () => void;
}[] = [
{
id: 'new-collection',
name: 'Request collection',
icon: 'bars',
action: createNewCollection,
},
{
id: 'new-document',
name: 'Design document',
icon: 'file',
action: createNewDocument,
},
{
id: 'new-mock-server',
name: 'Mock Server',
icon: 'server',
action: createNewMockServer,
},
{
id: 'new-environment',
name: 'Environment',
icon: 'code',
action: createNewGlobalEnvironment,
},
{
id: 'import',
name: 'Import',
icon: 'file-import',
action: () => {
setImportModalType('file');
},
},
{
id: 'git-clone',
name: 'Git Clone',
icon: 'code-fork',
action: importFromGit,
},
];
const scopeActionList: {
id: string;
label: string;
icon: IconName;
action?: {
icon: IconName;
label: string;
run: () => void;
};
}[] = [
{
id: 'all',
label: `All files (${allFilesCount})`,
icon: 'border-all',
},
{
id: 'design',
label: `Documents (${documentsCount})`,
icon: 'file',
action: {
icon: 'plus',
label: 'New design document',
run: createNewDocument,
},
},
{
id: 'collection',
label: `Collections (${collectionsCount})`,
icon: 'bars',
action: {
icon: 'plus',
label: 'New request collection',
run: createNewCollection,
},
},
{
id: 'mock-server',
label: `Mock (${mockServersCount})`,
icon: 'server',
action: {
icon: 'plus',
label: 'New Mock Server',
run: createNewMockServer,
},
},
{
id: 'environment',
label: `Environments (${environmentsCount})`,
icon: 'code',
action: {
icon: 'plus',
label: 'New Environment',
run: createNewGlobalEnvironment,
},
},
];
const defaultStorageSelection = storage === 'local_only' ? 'local' : 'remote';
const isRemoteProjectInconsistent = activeProject && isRemoteProject(activeProject) && storage === 'local_only';
const isLocalProjectInconsistent = activeProject && !isRemoteProject(activeProject) && storage === 'cloud_only';
const isProjectInconsistent = isRemoteProjectInconsistent || isLocalProjectInconsistent;
const showStorageRestrictionMessage = storage !== 'cloud_plus_local';
useEffect(() => {
window.main.landingPageRendered(LandingPage.ProjectDashboard);
}, []);
const nextProjectId = useRef<string>();
const startSwitchProjectTime = useRef<number>();
useEffect(() => {
if (nextProjectId.current && startSwitchProjectTime.current && nextProjectId.current === projectId) {
const duration = performance.now() - startSwitchProjectTime.current;
Sentry.metrics.distribution(SentryMetrics.PROJECT_SWITCH_DURATION, duration, {
unit: 'millisecond',
});
nextProjectId.current = undefined;
startSwitchProjectTime.current = undefined;
}
}, [projectId]);
return (
<ErrorBoundary>
<Fragment>
<PanelGroup autoSaveId="insomnia-sidebar" id="wrapper" className='new-sidebar w-full h-full text-[--color-font]' direction='horizontal'>
<Panel id="sidebar" className='sidebar theme--sidebar' defaultSize={DEFAULT_SIDEBAR_SIZE} maxSize={40} minSize={10} collapsible>
<div className="flex flex-1 flex-col overflow-hidden divide-solid divide-y divide-[--hl-md]">
<div className="p-[--padding-sm]">
<Select
aria-label="Organizations"
onSelectionChange={id => {
navigate(`/organization/${id}`);
}}
selectedKey={organizationId}
>
<Button className="px-4 py-1 font-bold flex flex-1 items-center justify-center gap-2 aria-pressed:bg-[--hl-sm] rounded-sm text-[--color-font] hover:bg-[--hl-xs] focus:ring-inset ring-1 ring-transparent focus:ring-[--hl-md] transition-all text-sm">
<SelectValue<Organization> className="flex truncate items-center justify-center gap-2">
{({ selectedItem }) => {
return selectedItem?.display_name || 'Select an organization';
}}
</SelectValue>
<Icon icon="caret-down" />
</Button>
<Popover className="min-w-max">
<ListBox
items={organizations}
className="border select-none text-sm min-w-max border-solid border-[--hl-sm] shadow-lg bg-[--color-bg] py-2 rounded-md overflow-y-auto max-h-[85vh] focus:outline-none"
>
{item => (
<ListBoxItem
id={item.id}
key={item.id}
className="flex gap-2 px-[--padding-md] aria-selected:font-bold items-center text-[--color-font] h-[--line-height-xs] w-full text-md whitespace-nowrap bg-transparent hover:bg-[--hl-sm] disabled:cursor-not-allowed focus:bg-[--hl-xs] focus:outline-none transition-colors"
aria-label={item.display_name}
textValue={item.display_name}
value={item}
>
{({ isSelected }) => (
<Fragment>
<span>{item.display_name}</span>
{isSelected && (
<Icon
icon="check"
className="text-[--color-success] justify-self-end"
/>
)}
</Fragment>
)}
</ListBoxItem>
)}
</ListBox>
</Popover>
</Select>
</div>
<div className="flex overflow-hidden flex-col flex-1">
<Heading className="p-[--padding-sm] uppercase text-xs">
Projects ({projectsCount})
</Heading>
<div className="flex justify-between gap-1 p-[--padding-sm]">
<SearchField
aria-label="Projects filter"
className="group relative flex-1"
value={projectListFilter}
onChange={setProjectListFilter}
>
<Input
placeholder="Filter"
className="py-1 placeholder:italic w-full pl-2 pr-7 rounded-sm border border-solid border-[--hl-sm] bg-[--color-bg] text-[--color-font] focus:outline-none focus:ring-1 focus:ring-[--hl-md] transition-colors"
/>
<div className="flex items-center px-2 absolute right-0 top-0 h-full">
<Button className="flex group-data-[empty]:hidden items-center justify-center aspect-square w-5 aria-pressed:bg-[--hl-sm] rounded-sm text-[--color-font] hover:bg-[--hl-xs] focus:ring-inset ring-1 ring-transparent focus:ring-[--hl-md] transition-all text-sm">
<Icon icon="close" />
</Button>
</div>
</SearchField>
<Button
aria-label="Create new Project"
onPress={() => setIsNewProjectModalOpen(true)}
className="flex items-center justify-center h-full aspect-square aria-pressed:bg-[--hl-sm] rounded-sm text-[--color-font] hover:bg-[--hl-xs] focus:ring-inset ring-1 ring-transparent focus:ring-[--hl-md] transition-all text-sm"
>
<Icon icon="plus-circle" />
</Button>
</div>
<GridList
aria-label="Projects"
items={projectsWithPresence}
className="overflow-y-auto flex-1 data-[empty]:py-0 py-[--padding-sm]"
disallowEmptySelection
selectedKeys={[activeProject?._id || '']}
selectionMode="single"
onSelectionChange={keys => {
if (keys !== 'all') {
const value = keys.values().next().value;
nextProjectId.current = value;
startSwitchProjectTime.current = performance.now();
navigate({
pathname: `/organization/${organizationId}/project/${value}`,
});
}
}}
>
{item => {
return (
<GridListItem
key={item._id}
id={item._id}
textValue={item.name}
className="group outline-none select-none"
>
<div className="flex select-none outline-none group-aria-selected:text-[--color-font] relative group-hover:bg-[--hl-xs] group-focus:bg-[--hl-sm] transition-colors gap-2 px-4 items-center h-[--line-height-xs] w-full overflow-hidden text-[--hl]">
<span className="group-aria-selected:bg-[--color-surprise] transition-colors top-0 left-0 absolute h-full w-[2px] bg-transparent" />
<Icon
icon={
isRemoteProject(item) ? 'globe-americas' : 'laptop'
}
className={item.hasUncommittedOrUnpushedChanges ? 'text-[--color-warning]' : ''}
/>
<span className="truncate">{item.name}</span>
<span className="flex-1" />
{item.presence.length > 0 && <AvatarGroup
size="small"
maxAvatars={3}
items={item.presence}
/>}
{item._id !== SCRATCHPAD_PROJECT_ID && <ProjectDropdown organizationId={organizationId} project={item} storage={storage} />}
</div>
</GridListItem>
);
}}
</GridList>
</div>
{activeProject && (
<GridList
aria-label="Scope filter"
items={scopeActionList}
className="overflow-y-auto flex-shrink-0 flex-1 data-[empty]:py-0 py-[--padding-sm]"
disallowEmptySelection
selectedKeys={[workspaceListScope || 'all']}
selectionMode="single"
onSelectionChange={keys => {
if (keys !== 'all') {
const value = keys.values().next().value;
setWorkspaceListScope(value);
}
}}
>
{item => {
return (
<GridListItem textValue={item.label} className="group outline-none select-none">
<div
className="flex select-none outline-none group-aria-selected:text-[--color-font] relative group-aria-selected:bg-[--hl-sm] group-hover:bg-[--hl-xs] group-focus:bg-[--hl-sm] transition-colors gap-2 px-4 items-center h-12 w-full overflow-hidden text-[--hl]"
>
<span className='w-6 h-6 flex items-center justify-center'>
<Icon icon={item.icon} className='w-6' />
</span>
<span className="truncate capitalize">
{item.label}
</span>
<span className="flex-1" />
{item.action && (
<Button
onPress={item.action.run}
aria-label={item.action.label}
className="opacity-80 items-center hover:opacity-100 focus:opacity-100 data-[pressed]:opacity-100 flex group-focus:opacity-100 group-hover:opacity-100 justify-center h-6 aspect-square aria-pressed:bg-[--hl-sm] rounded-sm text-[--color-font] hover:bg-[--hl-xs] focus:ring-inset ring-1 ring-transparent focus:ring-[--hl-md] transition-all text-sm"
>
<Icon icon={item.action.icon} />
</Button>
)}
</div>
</GridListItem>
);
}}
</GridList>
)}
{!isLearningFeatureDismissed && learningFeature?.active && (
<div className='flex flex-shrink-0 flex-col gap-2 p-[--padding-sm]'>
<div className='flex items-center justify-between gap-2'>
<Heading className='text-base'>
<Icon icon="graduation-cap" />
<span className="ml-2">{learningFeature.title}</span>
</Heading>
<Button
onPress={() => {
setIsLearningFeatureDismissed('true');
}}
>
<Icon icon="close" />
</Button>
</div>
<p className='text-[--hl] text-sm'>
{learningFeature.message}
</p>
<a href={learningFeature.url} className='flex items-center gap-2 underline text-sm'>
{learningFeature.cta}
<Icon icon="arrow-up-right-from-square" />
</a>
</div>
)}
</div>
</Panel>
<PanelResizeHandle className='h-full w-[1px] bg-[--hl-md]' />
<Panel id="pane-one" className='pane-one theme--pane'>
{activeProject ? (
<div className="w-full h-full flex flex-col overflow-hidden">
{billing.isActive ? null : <div className='p-[--padding-md] pb-0'>
<div className='flex flex-wrap justify-between items-center gap-2 p-[--padding-sm] border border-solid border-[--hl-md] bg-opacity-50 bg-[rgba(var(--color-warning-rgb),var(--tw-bg-opacity))] text-[--color-font-warning] rounded'>
<p className='text-base'>
<Icon icon="exclamation-triangle" className='mr-2' />
{isUserOwner ? `Your ${isPersonalOrg ? 'personal account' : 'organization'} has unpaid past invoices. Please enter a new payment method to continue using Insomnia.` : 'This organization has unpaid past invoices. Please ask the organization owner to enter a new payment method to continue using Insomnia.'}
</p>
{isUserOwner && (
<a
href={`${getAppWebsiteBaseURL()}/app/subscription/past-due`}
className="px-4 text-[--color-bg] bg-opacity-100 bg-[rgba(var(--color-font-rgb),var(--tw-bg-opacity))] py-1 font-semibold border border-solid border-[--hl-md] flex items-center justify-center gap-2 aria-pressed:opacity-80 rounded-sm hover:bg-opacity-80 focus:ring-inset ring-1 ring-transparent focus:ring-[--hl-md] transition-all text-sm"
>
Update payment method
</a>
)}
</div>
</div>}
{isProjectInconsistent && <div className='p-[--padding-md] pb-0'>
<div className='flex flex-wrap justify-between items-center gap-2 p-[--padding-sm] border border-solid border-[--hl-md] bg-opacity-50 bg-[rgba(var(--color-warning-rgb),var(--tw-bg-opacity))] text-[--color-font-warning] rounded'>
<p className='text-base'>
<Icon icon="exclamation-triangle" className='mr-2' />
The organization owner mandates that projects must be created and stored {storage.split('_').join(' ')}. However, you can optionally enable Git Sync.
</p>
<Button onPress={() => setIsUpdateProjectModalOpen(true)} className="flex items-center justify-center border border-solid border-white px-2 py-1 rounded-sm">Update</Button>
</div>
</div>}
<div className="flex max-w-xl justify-between w-full gap-2 p-[--padding-md]">
<SearchField
aria-label="Files filter"
className="group relative flex-1"
value={workspaceListFilter}
onChange={filter => setWorkspaceListFilter(filter)}
>
<Input
placeholder="Filter"
className="py-1 placeholder:italic w-full pl-2 pr-7 rounded-sm border border-solid border-[--hl-sm] bg-[--color-bg] text-[--color-font] focus:outline-none focus:ring-1 focus:ring-[--hl-md] transition-colors"
/>
<div className="flex items-center px-2 absolute right-0 top-0 h-full">
<Button className="flex group-data-[empty]:hidden items-center justify-center aspect-square w-5 aria-pressed:bg-[--hl-sm] rounded-sm text-[--color-font] hover:bg-[--hl-xs] focus:ring-inset ring-1 ring-transparent focus:ring-[--hl-md] transition-all text-sm">
<Icon icon="close" />
</Button>
</div>
</SearchField>
<Select
aria-label="Sort order"
className="h-full aspect-square"
selectedKey={workspaceListSortOrder}
onSelectionChange={order => setWorkspaceListSortOrder(order as DashboardSortOrder)}
>
<Button
aria-label="Select sort order"
className="flex flex-shrink-0 items-center justify-center aspect-square h-full bg-[--hl-xxs] aria-pressed:bg-[--hl-sm] rounded-sm text-[--color-font] hover:bg-[--hl-xs] focus:ring-inset ring-1 ring-transparent focus:ring-[--hl-md] transition-all text-sm"
>
<Icon icon="sort" />
</Button>
<Popover className="min-w-max">
<ListBox
items={DASHBOARD_SORT_ORDERS.map(order => {
return {
id: order,
name: dashboardSortOrderName[order],
};
})}
className="border select-none text-sm min-w-max border-solid border-[--hl-sm] shadow-lg bg-[--color-bg] py-2 rounded-md overflow-y-auto max-h-[85vh] focus:outline-none"
>
{item => (
<ListBoxItem
id={item.id}
key={item.id}
className="flex gap-2 px-[--padding-md] aria-selected:font-bold items-center text-[--color-font] h-[--line-height-xs] w-full text-md whitespace-nowrap bg-transparent hover:bg-[--hl-sm] disabled:cursor-not-allowed focus:bg-[--hl-xs] focus:outline-none transition-colors"
aria-label={item.name}
textValue={item.name}
value={item}
>
{({ isSelected }) => (
<Fragment>
<span>{item.name}</span>
{isSelected && (
<Icon
icon="check"
className="text-[--color-success] justify-self-end"
/>
)}
</Fragment>
)}
</ListBoxItem>
)}
</ListBox>
</Popover>
</Select>
<MenuTrigger>
<Button
aria-label="Create in project"
className="flex items-center justify-center px-4 gap-2 h-full bg-[--hl-xxs] aria-pressed:bg-[--hl-sm] rounded-sm text-[--color-font] hover:bg-[--hl-xs] focus:ring-inset ring-1 ring-transparent focus:ring-[--hl-md] transition-all text-sm"
>
<Icon icon="plus-circle" /> Create
</Button>
<Popover className="min-w-max">
<Menu
aria-label="Create in project actions"
selectionMode="single"
onAction={key => {
const item = createInProjectActionList.find(
item => item.id === key
);
if (item) {
item.action();
}
}}
items={createInProjectActionList}
className="border select-none text-sm min-w-max border-solid border-[--hl-sm] shadow-lg bg-[--color-bg] py-2 rounded-md overflow-y-auto max-h-[85vh] focus:outline-none"
>
{item => (
<MenuItem
key={item.id}
id={item.id}
className="flex gap-2 px-[--padding-md] aria-selected:font-bold items-center text-[--color-font] h-[--line-height-xs] w-full text-md whitespace-nowrap bg-transparent hover:bg-[--hl-sm] disabled:cursor-not-allowed focus:bg-[--hl-xs] focus:outline-none transition-colors"
aria-label={item.name}
>
<Icon icon={item.icon} />
<span>{item.name}</span>
</MenuItem>
)}
</Menu>
</Popover>
</MenuTrigger>
</div>
<div className='flex-1 overflow-y-auto'>
<GridList
aria-label="Files"
className="data-[empty]:flex data-[empty]:justify-center grid [grid-template-columns:repeat(auto-fit,200px)] [grid-template-rows:repeat(auto-fit,200px)] gap-4 p-[--padding-md]"
items={filesWithPresence}
renderEmptyState={() => {
if (workspaceListFilter) {
return (
<div className="w-full h-full flex items-center justify-center">
<p className="notice subtle">
No documents found for <strong>{workspaceListFilter}</strong>
</p>
</div>
);
}
return (
<EmptyStatePane
createRequestCollection={createNewCollection}
createDesignDocument={createNewDocument}
createMockServer={createNewMockServer}
createEnvironment={createNewGlobalEnvironment}
importFrom={() => setImportModalType('file')}
cloneFromGit={importFromGit}
isGitSyncEnabled={isGitSyncEnabled}
/>
);
}}
>
{item => {
return (
<GridListItem
key={item.id}
id={item.id}
textValue={item.name}
onAction={item.action}
className={`flex-1 overflow-hidden flex-col outline-none p-[--padding-md] flex select-none w-full rounded-md hover:shadow-md aspect-square ring-1 ring-[--hl-md] hover:ring-[--hl-sm] focus:ring-[--hl-lg] hover:bg-[--hl-xs] focus:bg-[--hl-sm] transition-all ${item.loading ? 'animate-pulse' : ''}`}
>
<div className="flex gap-2 h-[20px]">
<div className="flex pr-2 h-full flex-shrink-0 items-center rounded-sm gap-2 bg-[--hl-xs] text-[--color-font] text-sm">
<div className={`${scopeToBgColorMap[item.scope]} ${scopeToTextColorMap[item.scope]} px-2 flex justify-center items-center h-[20px] w-[20px] rounded-s-sm`}>
<Icon icon={item.loading ? 'spinner' : scopeToIconMap[item.scope]} className={item.loading ? 'animate-spin' : ''} />
</div>
<span>{item.label}</span>
</div>
<span className="flex-1" />
{item.presence.length > 0 && (
<AvatarGroup
size="small"
maxAvatars={3}
items={item.presence}
/>
)}
{activeProject && item.scope !== 'unsynced' && item.workspace && (
<WorkspaceCardDropdown
workspace={item.workspace}
apiSpec={item.apiSpec}
project={activeProject}
projects={projects}
/>
)}
</div>
<TooltipTrigger>
<Link
onPress={item.action}
className="pt-4 text-base font-bold line-clamp-4 outline-none"
>
{item.name}
</Link>
<Tooltip
offset={8}
className="border select-none text-sm max-w-xs border-solid border-[--hl-sm] shadow-lg bg-[--color-bg] text-[--color-font] px-4 py-2 rounded-md overflow-y-auto max-h-[85vh] focus:outline-none"
>
<span>{item.name}</span>
</Tooltip>
</TooltipTrigger>
<div className="flex-1 flex flex-col gap-2 justify-end text-sm text-[--hl]">
{item.version && (
<div className="flex-1 pt-2">
{item.version}
</div>
)}
{item.oasFormat && (
<div className="text-sm flex items-center gap-2">
<Icon icon="file-alt" />
<span>
{item.oasFormat}
</span>
</div>
)}
{item.branch && (
<div className="text-sm flex items-center gap-2">
<Icon icon="code-branch" />
<span className="truncate">
{item.branch}
</span>
</div>
)}
{Boolean(item.lastModifiedTimestamp) && (
<div className="text-sm flex items-center gap-2 truncate">
<Icon icon="clock" />
<TimeFromNow
title={text => `Last updated ${text}, and created on ${new Date(item.created).toLocaleDateString()}`}
timestamp={
item.lastModifiedTimestamp
}
/>
<span className="truncate">
{item.lastCommit}
</span>
</div>
)}
{(item.hasUncommittedChanges || item.hasUnpushedChanges) && (
<div className="text-sm text-[--color-warning] flex items-center gap-2">
<div className='rounded-full bg-[--color-warning] w-3 h-3 flex-shrink-0' />
<span>
{item.hasUncommittedChanges ? 'Uncommitted changes' : 'Unpushed changes'}
</span>
</div>
)}
</div>
</GridListItem>
);
}}
</GridList>
</div>
</div>
) : (
<div className="w-full h-full flex flex-col gap-2 items-center justify-center overflow-hidden">
<p className='text-lg'>
This is an empty Organization. To get started create your first project.
</p>
<Button
aria-label="Create new Project"
onPress={() => setIsNewProjectModalOpen(true)}
className="flex items-center justify-center px-4 gap-2 py-2 bg-[--hl-xxs] aria-pressed:bg-[--hl-sm] rounded-sm text-[--color-font] hover:bg-[--hl-xs] focus:ring-inset ring-1 ring-transparent focus:ring-[--hl-md] transition-all"
>
<Icon icon="plus-circle" /> Create a new Project
</Button>
</div>
)}
</Panel>
</PanelGroup>
{isGitRepositoryCloneModalOpen && (
<GitRepositoryCloneModal
onHide={() => setIsGitRepositoryCloneModalOpen(false)}
/>
)}
<ModalOverlay isOpen={isNewProjectModalOpen} onOpenChange={isOpen => setIsNewProjectModalOpen(isOpen)} isDismissable className="w-full h-[--visual-viewport-height] fixed z-10 top-0 left-0 flex items-center justify-center bg-black/30">
<Modal className="max-w-2xl w-full rounded-md border border-solid border-[--hl-sm] p-[--padding-lg] max-h-full bg-[--color-bg] text-[--color-font]">
<Dialog className="outline-none" aria-label='Create or update dialog'>
{({ close }) => (
<div className='flex flex-col gap-4'>
<div className='flex gap-2 items-center justify-between'>
<Heading slot="title" className='text-2xl'>Create a new project</Heading>
<Button
className="flex flex-shrink-0 items-center justify-center aspect-square h-6 aria-pressed:bg-[--hl-sm] rounded-sm text-[--color-font] hover:bg-[--hl-xs] focus:ring-inset ring-1 ring-transparent focus:ring-[--hl-md] transition-all text-sm"
onPress={close}
>
<Icon icon="x" />
</Button>
</div>
<form
className='flex flex-col gap-4'
onSubmit={e => {
e.preventDefault();
const formData = new FormData(e.currentTarget);
const type = formData.get('type');
if (!type) {
showAlert({
title: 'Project type not selected',
message: 'Please select a project type before continuing',
});
return;
}
createNewProjectFetcher.submit(e.currentTarget, {
action: `/organization/${organizationId}/project/new`,
method: 'post',
});
close();
}}
>
<TextField
autoFocus
name="name"
defaultValue="My project"
className="group relative flex-1 flex flex-col gap-2"
>
<Label className='text-sm text-[--hl]'>
Project name
</Label>
<Input
placeholder="My project"
className="py-1 placeholder:italic w-full pl-2 pr-7 rounded-sm border border-solid border-[--hl-sm] bg-[--color-bg] text-[--color-font] focus:outline-none focus:ring-1 focus:ring-[--hl-md] transition-colors"
/>
</TextField>
<RadioGroup name="type" defaultValue={defaultStorageSelection} className="flex flex-col gap-2">
<Label className="text-sm text-[--hl]">
Project type
</Label>
<div className="flex gap-2">
<Radio
isDisabled={storage === 'local_only'}
value="remote"
className="flex-1 data-[selected]:border-[--color-surprise] data-[selected]:ring-2 data-[selected]:ring-[--color-surprise] data-[disabled]:opacity-25 hover:bg-[--hl-xs] focus:bg-[--hl-sm] border border-solid border-[--hl-md] rounded p-4 focus:outline-none transition-colors"
>
<div className='flex items-center gap-2'>
<Icon icon="globe" />
<Heading className="text-lg font-bold">Cloud Sync</Heading>
</div>
<p className='pt-2'>
Encrypted and synced securely to the cloud, ideal for out of the box collaboration.
</p>
</Radio>
<Radio
isDisabled={storage === 'cloud_only'}
value="local"
className="flex-1 data-[selected]:border-[--color-surprise] data-[selected]:ring-2 data-[selected]:ring-[--color-surprise] data-[disabled]:opacity-25 hover:bg-[--hl-xs] focus:bg-[--hl-sm] border border-solid border-[--hl-md] rounded p-4 focus:outline-none transition-colors"
>
<div className="flex items-center gap-2">
<Icon icon="laptop" />
<Heading className="text-lg font-bold">Local Vault</Heading>
</div>
<p className="pt-2">
Stored locally only with no cloud. Ideal when collaboration is not needed.
</p>
</Radio>
</div>
</RadioGroup>
<div className="flex justify-between gap-2 items-center">
<div className="flex items-center gap-2 text-sm">
<Icon icon="info-circle" />
<span>
{showStorageRestrictionMessage && `The organization owner mandates that projects must be created and stored ${storage.split('_').join(' ')}.`} You can optionally enable Git Sync
</span>
</div>
<div className='flex items-center gap-2'>
<Button
onPress={close}
className="hover:no-underline hover:bg-opacity-90 border border-solid border-[--hl-md] py-2 px-3 text-[--color-font] transition-colors rounded-sm"
>
Cancel
</Button>
<Button
type="submit"
className="hover:no-underline bg-[--color-surprise] hover:bg-opacity-90 border border-solid border-[--hl-md] py-2 px-3 text-[--color-font-surprise] transition-colors rounded-sm"
>
Create
</Button>
</div>
</div>
</form>
</div>
)}
</Dialog>
</Modal>
</ModalOverlay>
<ModalOverlay
isOpen={isUpdateProjectModalOpen}
onOpenChange={isOpen => {
setProjectType('');
setIsUpdateProjectModalOpen(isOpen);
}}
isDismissable
className="w-full h-[--visual-viewport-height] fixed z-10 top-0 left-0 flex items-center justify-center bg-black/30"
>
<Modal
onOpenChange={isOpen => {
setProjectType('');
setIsUpdateProjectModalOpen(isOpen);
}}
className="max-w-2xl w-full rounded-md border border-solid border-[--hl-sm] p-[--padding-lg] max-h-full bg-[--color-bg] text-[--color-font]"
>
<Dialog
className="outline-none"
>
{({ close }) => (
<div className='flex flex-col gap-4'>
<div className='flex gap-2 items-center justify-between'>
<Heading className='text-2xl'>{projectType === 'local' ? 'Confirm conversion to local storage' : projectType === 'remote' ? 'Confirm cloud synchronization' : 'Project Settings'}</Heading>
<Button
className="flex flex-shrink-0 items-center justify-center aspect-square h-6 aria-pressed:bg-[--hl-sm] rounded-sm text-[--color-font] hover:bg-[--hl-xs] focus:ring-inset ring-1 ring-transparent focus:ring-[--hl-md] transition-all text-sm"
onPress={close}
>
<Icon icon="x" />
</Button>
</div>
<form
className='flex flex-col gap-4'
onSubmit={e => {
e.preventDefault();
const formData = new FormData(e.currentTarget);
const type = formData.get('type');
// If the project is local and the user is trying to change it to remote
if (type === 'remote' && !activeProject?.remoteId && !projectType) {
setProjectType('remote');
// If the project is remote and the user is trying to change it to local
} else if (type === 'local' && activeProject?.remoteId && !projectType) {
setProjectType('local');
} else {
if (!type) {
showAlert({
title: 'Project type not selected',
message: 'Please select a project type before continuing',
});
return;
}
updateProjectFetcher.submit(formData, {
action: `/organization/${organizationId}/project/${projectId}/update`,
method: 'post',
});
close();
}
}}
>
<div className={`flex flex-col gap-4 ${projectType ? 'hidden' : ''}`}>
<TextField
autoFocus
name="name"
defaultValue={activeProject?.name}
className="group relative flex-1 flex flex-col gap-2"
>
<Label className='text-sm text-[--hl]'>
Project name
</Label>
<Input
placeholder="My project"
className="py-1 placeholder:italic w-full pl-2 pr-7 rounded-sm border border-solid border-[--hl-sm] bg-[--color-bg] text-[--color-font] focus:outline-none focus:ring-1 focus:ring-[--hl-md] transition-colors"
/>
</TextField>
<RadioGroup name="type" defaultValue={storage === 'cloud_plus_local' ? activeProject?.remoteId ? 'remote' : 'local' : storage !== 'cloud_only' ? 'local' : 'remote'} className="flex flex-col gap-2">
<Label className="text-sm text-[--hl]">
Project type
</Label>
<div className="flex gap-2">
<Radio
isDisabled={storage === 'local_only'}
value="remote"
className="data-[selected]:border-[--color-surprise] flex-1 data-[disabled]:opacity-25 data-[selected]:ring-2 data-[selected]:ring-[--color-surprise] hover:bg-[--hl-xs] focus:bg-[--hl-sm] border border-solid border-[--hl-md] rounded p-4 focus:outline-none transition-colors"
>
<div className='flex items-center gap-2'>
<Icon icon="globe" />
<Heading className="text-lg font-bold">Cloud Sync</Heading>
</div>
<p className='pt-2'>
Encrypted and synced securely to the cloud, ideal for out of the box collaboration.
</p>
</Radio>
<Radio
isDisabled={storage === 'cloud_only'}
value="local"
className="data-[selected]:border-[--color-surprise] flex-1 data-[disabled]:opacity-25 data-[selected]:ring-2 data-[selected]:ring-[--color-surprise] hover:bg-[--hl-xs] focus:bg-[--hl-sm] border border-solid border-[--hl-md] rounded p-4 focus:outline-none transition-colors"
>
<div className='flex items-center gap-2'>
<Icon icon="laptop" />
<Heading className="text-lg font-bold">Local Vault</Heading>
</div>
<p className="pt-2">
Stored locally only with no cloud. Ideal when collaboration is not needed.
</p>
</Radio>
</div>
</RadioGroup>
</div>
{projectType === 'local' && (
<div className='text-[--color-font] flex flex-col gap-4'>
<div className='flex flex-col gap-4'>
<p>
We will be converting your Cloud Sync project into a local project, and permanently remove all cloud data for this project from the cloud.
</p>
<ul className='text-left flex flex-col gap-2'>
<li><i className="fa fa-check text-emerald-600" /> The project will be 100% stored locally.</li>
<li><i className="fa fa-check text-emerald-600" /> Your collaborators will not be able to push and pull files anymore.</li>
<li><i className="fa fa-check text-emerald-600" /> The project will become local also for every existing collaborator.</li>
</ul>
<p>
You can still use Git Sync for local projects without using the cloud, and you can synchronize a local project back to the cloud if you decide to do so.
</p>
<p className='flex gap-2 items-center'>
<Icon icon="triangle-exclamation" className='text-[--color-warning]' />
Remember to pull your latest project updates before this operation
</p>
</div>
</div>
)}
{projectType === 'remote' && (
<div className='text-[--color-font] flex flex-col gap-4'>
<div className='flex flex-col gap-4'>
<p>
We will be synchronizing your local project to Insomnia's Cloud in a secure encrypted format which will enable cloud collaboration.
</p>
<ul className='text-left flex flex-col gap-2'>
<li><i className="fa fa-check text-emerald-600" /> Your data in the cloud is encrypted and secure.</li>
<li><i className="fa fa-check text-emerald-600" /> You can now collaborate with any amount of users and use cloud features.</li>
<li><i className="fa fa-check text-emerald-600" /> Your project will be always available on any client after logging in.</li>
</ul>
<p>
You can still use Git Sync for cloud projects.
</p>
</div>
</div>
)}
<div className="flex justify-between gap-2 items-center">
<div className="flex items-center gap-2 text-sm">
<Icon icon="info-circle" />
<span>
{showStorageRestrictionMessage && `The organization owner mandates that projects must be created and stored ${storage.split('_').join(' ')}.`} You can optionally enable Git Sync
</span>
</div>
<div className='flex items-center gap-2'>
<Button
onPress={() => {
if (projectType) {
setProjectType('');
} else {
close();
}
}}
className="hover:no-underline hover:bg-opacity-90 border border-solid border-[--hl-md] py-2 px-3 text-[--color-font] transition-colors rounded-sm"
>
Cancel
</Button>
<Button
type="submit"
className="hover:no-underline bg-[--color-surprise] hover:bg-opacity-90 border border-solid border-[--hl-md] py-2 px-3 text-[--color-font-surprise] transition-colors rounded-sm"
>
{projectType ? 'Confirm' : 'Update'}
</Button>
</div>
</div>
</form>
</div>
)}
</Dialog>
</Modal>
</ModalOverlay>
{activeProject && importModalType && (
<ImportModal
onHide={() => setImportModalType(null)}
projectName={activeProject.name}
from={{ type: importModalType }}
organizationId={organizationId}
defaultProjectId={activeProject._id}
/>
)}
{isMockServerSettingsModalOpen && (
<MockServerSettingsModal
onClose={() => setIsMockServerSettingsModalOpen(false)}
/>
)}
</Fragment>
</ErrorBoundary>
);
};
export default ProjectRoute;
```
|
```java
/*
* code is released under a tri EPL/GPL/LGPL license. You can use it,
* redistribute it and/or modify it under the terms of the:
*
*/
package org.truffleruby.collections;
import java.util.Iterator;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
public final class BoundaryIterator<E> implements Iterator<E> {
private final Iterator<E> iterator;
public BoundaryIterator(Iterator<E> iterator) {
this.iterator = iterator;
}
@TruffleBoundary
@Override
public boolean hasNext() {
return iterator.hasNext();
}
@TruffleBoundary
@Override
public E next() {
return iterator.next();
}
@TruffleBoundary
@Override
public void remove() {
iterator.remove();
}
}
```
|
Daniel Brett Weiss (; born April 23, 1971) is an American television writer and producer. Along with his collaborator David Benioff, he is best-known for co-creating Game of Thrones (2011–2019), the HBO adaptation of George R. R. Martin's series of books A Song of Ice and Fire.
Early life
Weiss was born and raised in Chicago, Illinois. His family is Jewish, with ancestral roots in Germany. He graduated from Wesleyan University and earned a Master of Philosophy in Irish literature from Trinity College Dublin, where he wrote his thesis on James Joyce's Finnegans Wake, "Understanding the (Net) Wake." He later earned a Master of Fine Arts in creative writing from the Iowa Writers' Workshop.
Career
Weiss worked as personal assistant on films such as The Viking Sagas for New Line Cinema. For a brief period, he also worked as a personal assistant for musician Glenn Frey. Weiss went to Dublin in 1995 to study Anglo-Irish literature and met David Benioff, the screenwriter of Troy. Three years later, around 1998, they met again in Santa Monica, California.
Weiss and Benioff co-wrote a screenplay for a film titled The Headmaster, but it was never made. In 2003, they were hired to collaborate on a new script of Orson Scott Card's book Ender's Game, in consultation with the then-designated director Wolfgang Petersen. It was not used.
Weiss's 2003 debut novel, Lucky Wander Boy, is themed around video games. In 2006, he said he had written a second novel that "needs a second draft". The same year, Weiss completed a screenplay for a film adaptation of the video game series Halo, based on a script by Alex Garland, but director Neill Blomkamp declared the project dead in late 2007.
Weiss also worked on a script for a prequel to I Am Legend, but in May 2011, director Francis Lawrence said that he did not think the prequel would ever happen.
Weiss collaborated with Benioff on the HBO television series Game of Thrones, based on George R. R. Martin's book series A Song of Ice and Fire. Benioff and Weiss also directed three episodes together. For the first two, they flipped a coin to decide who would get the credit on the show. Weiss received directing credit for "Two Swords", Season 4 episode 1, while Benioff was credited for "Walk of Punishment", Season 3 episode 3. Benioff and Weiss were both credited for co-directing the series finale, "The Iron Throne".
On July 19, 2017, Weiss announced that he and Benioff were going to begin production on another HBO series, Confederate, after the final season of Game of Thrones. Weiss and Benioff said, "We have discussed Confederate for years, originally as a concept for a feature film, but our experience on Thrones has convinced us that no one provides a bigger, better storytelling canvas than HBO." In January 2020, HBO President Casey Bloys confirmed that the project had been officially canceled.
On February 6, 2018, Disney announced that Weiss and Benioff would write and produce a new series of Star Wars films after the last season of Game of Thrones ended in 2019. Toward the end of the last season, a petition to HBO was started on Change.org. It described showrunners Benioff and Weiss as "woefully incompetent writers" and demanded "competent writers" to remake the eighth season of Game of Thrones in a manner "that makes sense". The petition eventually amassed over 1.5 million signatures. In the Chicago Sun Times, Richard Roeper wrote that the backlash to the eighth season was so great that he doubted he had "ever seen the level of fan (and to a lesser degree, critical) vitriol leveled at" Game of Thrones.
In early 2019, Weiss and Benioff entered into an exclusive $200 million deal with Netflix to produce several films and television shows exclusively for it. In late October 2019, it was reported that Weiss and Benioff had exited their deal with Disney due to their commitments to Netflix.
Weiss and Benioff's first project on Netflix were as directors of Leslie Jones's stand-up comedy special Time Machine.
In September 2020, it was announced that Weiss, Benioff and Alexander Woo would write and executive produce the Netflix series 3 Body Problem based on the similarly named Chinese novel series.
Personal life
Weiss and his wife, Andrea Troyer, have two children.
Bibliography
Author
Filmography
Film
Television
Awards and nominations
See also
List of awards and nominations received by Game of Thrones
References
External links
1971 births
21st-century American Jews
21st-century American male writers
21st-century American novelists
21st-century American screenwriters
Alumni of Trinity College Dublin
American male novelists
American male screenwriters
American male television writers
American people of German-Jewish descent
American screenwriters
American television directors
American television writers
Highland Park High School (Illinois) alumni
Hugo Award-winning writers
Iowa Writers' Workshop alumni
Jewish American screenwriters
Living people
Novelists from Illinois
Primetime Emmy Award winners
Screenwriters from Illinois
Showrunners
Television producers from Illinois
Wesleyan University alumni
Writers from Chicago
|
```javascript
/**
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
/* eslint-disable no-underscore-dangle */
'use strict';
// MODULES //
var logger = require( 'debug' );
var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
var hasOwnProp = require( '@stdlib/assert/has-own-property' );
var format = require( '@stdlib/string/format' );
// VARIABLES //
var debug = logger( 'repl:command:assignfrom' );
// MAIN //
/**
* Returns a callback to be invoked upon calling the `assignfrom` command.
*
* @private
* @param {REPL} repl - REPL instance
* @returns {Function} callback
*/
function command( repl ) {
return onCommand;
/**
* Reads a value from a specified workspace.
*
* @private
* @param {string} workspace - workspace name
* @param {(string|symbol)} variable - variable name
* @returns {*} assigned value
*/
function onCommand( workspace, variable ) {
var list;
var desc;
var err;
var i;
if ( !isString( workspace ) ) {
err = new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', workspace ) );
debug( 'Error: %s', err.message );
repl._ostream.write( 'Error: '+err.message+'\n' );
return;
}
if ( workspace === repl._currentWorkspace ) {
return repl._context[ variable ];
}
if ( !hasOwnProp( repl._workspaces, workspace ) ) {
err = new Error( format( 'invalid argument. Unrecognized workspace name. Value: `%s`.', workspace ) );
debug( 'Error: %s', err.message );
repl._ostream.write( 'Error: '+err.message+'\n' );
return;
}
list = repl._workspaces[ workspace ];
for ( i = 0; i < list.length; i += 2 ) {
if ( list[ i ] === variable ) {
desc = list[ i+1 ];
// Check if descriptor is an accessor descriptor:
if ( hasOwnProp( desc, 'get' ) ) {
// WARNING: the `this` context is not defined, as the variable is not actually bound to a global instance!
return desc.get.call( null );
}
// Check if the descriptor is a data descriptor:
if ( hasOwnProp( desc, 'value' ) ) {
return desc.value;
}
// Variable must be write-only:
err = new Error( format( 'invalid operation. Cannot read from write-only variable `%s`.', variable ) );
debug( 'Error: %s', err.message );
repl._ostream.write( 'Error: '+err.message+'\n' );
return;
}
}
}
}
// EXPORTS //
module.exports = command;
```
|
Hood Abbey was an abbey on the grounds of today's Hood Grange, North Yorkshire, England. The abbey at Hood was known to be in existence as a hermitage since before 1138 when Roger de Mowbray granted it to a group of Austin canons, who stayed for five years before relocating to Byland Abbey. After this, it was inhabited by monks from the Bridlington area who came west to take over Roger de Mowbray's newest priory at Newburgh.
The site was dissolved in the 16th century, and all that remains are two windows incorporated into one of the barns which now occupy the site.
References
Monasteries in North Yorkshire
|
```markdown
# My First Interactive Python Game```
```markdown
## Word Raider```
```markdown
We start by importing the `random` library to use later on.```
```python
import random
```
```markdown
### Define initial variables```
```python
game_title = "Word Raider"
```
```python
# Set up the list of words to choose from
word_bank = []
```
```markdown
### Open file for loading in the word bank```
```python
with open("words.txt") as word_file:
for line in word_file:
word_bank.append(line.rstrip().lower())
```
```markdown
### Select the word to guess```
```python
# Pick a random word from the list
word_to_guess = random.choice(word_bank)
```
```markdown
### Define the remaining game variables```
```python
# Set up the game variables
misplaced_guesses = []
incorrect_guesses = []
max_turns = 5
turns_taken = 0
```
```markdown
### Print the current game state```
```python
# Display the initial game state
print("Welcome to", game_title)
print("The word has", len(word_to_guess), "letters.")
print("You have", max_turns - turns_taken, "turns left.")
```
```markdown
### Build the game loop```
```python
while turns_taken < max_turns:
# Get the player's guess
guess = input("Guess a word: ").lower()
# Check if the guess length equals 5 letters and is all alpha letters
if len(guess) != len(word_to_guess) or not guess.isalpha():
print("Please enter 5-letter word.")
continue
# Check each letter in the guess against the word's letters
index = 0
for c in guess:
if c == word_to_guess[index]:
print(c, end=" ")
if c in misplaced_guesses:
misplaced_guesses.remove(c)
elif c in word_to_guess:
if c not in misplaced_guesses:
misplaced_guesses.append(c)
print("_", end=" ")
else:
if c not in incorrect_guesses:
incorrect_guesses.append(c)
print("_", end=" ")
index += 1
print("
")
print("Misplaced letters: ", misplaced_guesses)
print("Incorrect letters: ", incorrect_guesses)
turns_taken += 1
# Check if the player has won
if guess == word_to_guess:
print("Congratulations, you win!")
break
# Check if the player has lost
if turns_taken == max_turns:
print("Sorry, you lost. The word was", word_to_guess)
break
# Display the number of turns left and ask for another guess
print("You have", max_turns - turns_taken, "turns left.")
```
```python
```
|
```python
Built-in `list` methods
`date` object
Get more with `collections`!
Get the most of `float`s
Operations with `bytes` and `bytearray`
```
|
WLYY (90.7 FM) is a radio station licensed to Louisville, Mississippi, United States. The station is currently owned by Joy Christian Ministries Church.
WLYY broadcasts a southern gospel format to the Louisville, Mississippi, area.
History
This station was assigned call sign KOUI on February 6, 2009. It changed its call sign to WLYY on July 20, 2023.
References
External links
LYY
Southern Gospel radio stations in the United States
Radio stations established in 2009
Christian radio stations in Mississippi
|
```java
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
package org.flowable.dmn.model;
/**
* @author Yvo Swillens
*/
public class DmnElementReference {
protected String href;
public String getHref() {
return href;
}
public void setHref(String href) {
this.href = href;
}
/**
* helper method returning the href with the starting '#'
* @return
*/
public String getParsedId() {
if (href != null && href.length() > 1) {
return href.substring(1);
}
return null;
}
}
```
|
Roman Tales () is a 1955 Italian comedy film directed by Gianni Franciolini. It is based on several short stories collected in Racconti romani by Alberto Moravia. The film won two David di Donatello Awards, for best director and best producer.
Plot
In Rome, during the Fifties, three boys attempt to commit a robbery. They're Mario, Alvaro and Otello, aided by a trickster, Professor Semprini, who claims to be a great intellectual. In reality the man is just the garbage boy of the upright lawyer Mazzoni Baralla, who goes on the trail of the three boys as soon as they attempt the shot. Indeed, Alvaro, Mario and Otello are arrested, after being deceived by Semprini, who demands from them a payment for the design of the plan. In fact the three first attempt to pass off counterfeit notes, then pretend to be guards from the vice squad in Villa Borghese. After the arrest and acquittal, the three decide to return to their old and simple jobs.
Cast
Totò: Professor Semprini
Vittorio De Sica: Lawyer Mazzoni Baralla
Silvana Pampanini: Maria
Franco Fabrizi: Alvaro
Antonio Cifariello: Otello
Giancarlo Costa: Spartaco
Maurizio Arena: Mario
Sergio Raimondi: Valerio Zerboni
Nando Bruno: Amilcare
Mario Riva: The Waiter
Mario Carotenuto: The "Commendatore"
Eloisa Cianni: Iris
Giovanna Ralli: Marcella
Maria Pia Casilio: Annita
Anita Durante: Alvaro's Mother
Turi Pandolfini: Client of the Barber
Aldo Giuffrè: Lawyer
References
External links
1955 films
Italian comedy films
1955 comedy films
Films based on works by Alberto Moravia
Films directed by Gianni Franciolini
Films with screenplays by Age & Scarpelli
Films scored by Mario Nascimbene
1950s Italian films
|
Polur (, also Romanized as Polūr; also known as Pūlūr) is a village on the Haraz River in Bala Larijan Rural District, Larijan District, Amol County, Mazandaran Province, Iran.
Geography
The village is located on Road 77 (Haraz Road), the main route from Amol to the Caspian Sea coast. At the 2006 census, its population was 316, in 86 families.
Mount Damavand—Alborz Mountains
It is well known for being a popular base to climb Mount Damavand in the Lar National Park, part of the Central Alborz mountain range. The 5,610 m (18,410 ft) volcano is the highest point in Iran and in the Middle East region.
Gallery
See also
References
External links
Populated places in Amol County
Alborz (mountain range)
Tourist attractions in Amol
Tourist attractions in Mazandaran Province
|
```ruby
# frozen_string_literal: true
module Decidim
module Comments
# This is a helper class in order to publish comment creation events
# so that components can react to these successes and perform whatever they are required to.
class CommentCreation
EVENT_NAME = "decidim.comments.comment_created"
# Publishes the event to ActiveSupport::Notifications.
#
# comment - The Decidim::Comments::Comment that has just been created.
# metadatas - The hash of metadatas returned by the ContentProcessor after parsing
# this `comment`.
def self.publish(comment, metadatas)
ActiveSupport::Notifications.publish(
EVENT_NAME,
comment_id: comment.id,
metadatas:
)
end
# Creates a subscription to events for created comments.
#
# block - The block to be executed when a comment is created.
def self.subscribe(&block)
ActiveSupport::Notifications.subscribe(EVENT_NAME) do |_event_name, data|
block.call(data)
end
end
end
end
end
```
|
```python
"""
Alexa Devices Alarm Control Panel using Guard Mode.
For more details about this platform, please refer to the documentation at
path_to_url
"""
from asyncio import sleep
import logging
from typing import Dict, List, Optional, Text # noqa pylint: disable=unused-import
from alexapy import hide_email, hide_serial
from homeassistant.const import (
CONF_EMAIL,
STATE_ALARM_ARMED_AWAY,
STATE_ALARM_DISARMED,
STATE_UNAVAILABLE,
)
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .alexa_entity import parse_guard_state_from_coordinator
from .alexa_media import AlexaMedia
from .const import (
CONF_EXCLUDE_DEVICES,
CONF_INCLUDE_DEVICES,
CONF_QUEUE_DELAY,
DATA_ALEXAMEDIA,
DEFAULT_QUEUE_DELAY,
DOMAIN as ALEXA_DOMAIN,
)
from .helpers import _catch_login_errors, add_devices
try:
from homeassistant.components.alarm_control_panel import (
AlarmControlPanelEntity as AlarmControlPanel,
)
except ImportError:
from homeassistant.components.alarm_control_panel import AlarmControlPanel
_LOGGER = logging.getLogger(__name__)
DEPENDENCIES = [ALEXA_DOMAIN]
async def async_setup_platform(
hass, config, add_devices_callback, discovery_info=None
) -> bool:
"""Set up the Alexa alarm control panel platform."""
devices = [] # type: List[AlexaAlarmControlPanel]
account = config[CONF_EMAIL] if config else discovery_info["config"][CONF_EMAIL]
include_filter = config.get(CONF_INCLUDE_DEVICES, [])
exclude_filter = config.get(CONF_EXCLUDE_DEVICES, [])
account_dict = hass.data[DATA_ALEXAMEDIA]["accounts"][account]
guard_media_players = {}
for key, device in account_dict["devices"]["media_player"].items():
if key not in account_dict["entities"]["media_player"]:
_LOGGER.debug(
"%s: Media player %s not loaded yet; delaying load",
hide_email(account),
hide_serial(key),
)
raise ConfigEntryNotReady
if "GUARD_EARCON" in device["capabilities"]:
guard_media_players[key] = account_dict["entities"]["media_player"][key]
if "alarm_control_panel" not in (account_dict["entities"]):
(
hass.data[DATA_ALEXAMEDIA]["accounts"][account]["entities"][
"alarm_control_panel"
]
) = {}
alexa_client: Optional[AlexaAlarmControlPanel] = None
guard_entities = account_dict.get("devices", {}).get("guard", [])
if guard_entities:
alexa_client = AlexaAlarmControlPanel(
account_dict["login_obj"],
account_dict["coordinator"],
guard_entities[0],
guard_media_players,
)
else:
_LOGGER.debug("%s: No Alexa Guard entity found", account)
if not (alexa_client and alexa_client.unique_id):
_LOGGER.debug(
"%s: Skipping creation of uninitialized device: %s",
hide_email(account),
alexa_client,
)
elif alexa_client.unique_id not in (
account_dict["entities"]["alarm_control_panel"]
):
devices.append(alexa_client)
(
hass.data[DATA_ALEXAMEDIA]["accounts"][account]["entities"][
"alarm_control_panel"
][alexa_client.unique_id]
) = alexa_client
else:
_LOGGER.debug(
"%s: Skipping already added device: %s", hide_email(account), alexa_client
)
return await add_devices(
hide_email(account),
devices,
add_devices_callback,
include_filter,
exclude_filter,
)
async def async_setup_entry(hass, config_entry, async_add_devices):
"""Set up the Alexa alarm control panel platform by config_entry."""
return await async_setup_platform(
hass, config_entry.data, async_add_devices, discovery_info=None
)
async def async_unload_entry(hass, entry) -> bool:
"""Unload a config entry."""
account = entry.data[CONF_EMAIL]
_LOGGER.debug("Attempting to unload alarm control panel")
account_dict = hass.data[DATA_ALEXAMEDIA]["accounts"][account]
for device in account_dict["entities"]["alarm_control_panel"].values():
_LOGGER.debug("Removing %s", device)
await device.async_remove()
return True
class AlexaAlarmControlPanel(AlarmControlPanel, AlexaMedia, CoordinatorEntity):
"""Implementation of Alexa Media Player alarm control panel."""
def __init__(self, login, coordinator, guard_entity, media_players=None) -> None:
# pylint: disable=unexpected-keyword-arg
"""Initialize the Alexa device."""
AlexaMedia.__init__(self, None, login)
CoordinatorEntity.__init__(self, coordinator)
_LOGGER.debug("%s: Initiating alarm control panel", hide_email(login.email))
# AlexaAPI requires a AlexaClient object, need to clean this up
# Guard info
self._appliance_id = guard_entity["appliance_id"]
self._guard_entity_id = guard_entity["id"]
self._friendly_name = "Alexa Guard " + self._appliance_id[-5:]
self._media_players = {} or media_players
self._attrs: Dict[Text, Text] = {}
_LOGGER.debug(
"%s: Guard Discovered %s: %s %s",
self.account,
self._friendly_name,
hide_serial(self._appliance_id),
hide_serial(self._guard_entity_id),
)
@_catch_login_errors
async def _async_alarm_set(self, command: Text = "", code=None) -> None:
# pylint: disable=unexpected-keyword-arg
"""Send command."""
try:
if not self.enabled:
return
except AttributeError:
pass
if command not in (STATE_ALARM_ARMED_AWAY, STATE_ALARM_DISARMED):
_LOGGER.error("Invalid command: %s", command)
return
command_map = {STATE_ALARM_ARMED_AWAY: "AWAY", STATE_ALARM_DISARMED: "HOME"}
available_media_players = list(
filter(lambda x: x.state != STATE_UNAVAILABLE, self._media_players.values())
)
if available_media_players:
_LOGGER.debug("Sending guard command to: %s", available_media_players[0])
available_media_players[0].check_login_changes()
await available_media_players[0].alexa_api.set_guard_state(
self._appliance_id.split("_")[2],
command_map[command],
queue_delay=self.hass.data[DATA_ALEXAMEDIA]["accounts"][self.email][
"options"
].get(CONF_QUEUE_DELAY, DEFAULT_QUEUE_DELAY),
)
await sleep(2) # delay
else:
_LOGGER.debug("Performing static guard command")
await self.alexa_api.static_set_guard_state(
self._login, self._guard_entity_id, command
)
await self.coordinator.async_request_refresh()
async def async_alarm_disarm(self, code=None) -> None:
# pylint: disable=unexpected-keyword-arg
"""Send disarm command."""
await self._async_alarm_set(STATE_ALARM_DISARMED)
async def async_alarm_arm_away(self, code=None) -> None:
"""Send arm away command."""
# pylint: disable=unexpected-keyword-arg
await self._async_alarm_set(STATE_ALARM_ARMED_AWAY)
@property
def unique_id(self):
"""Return the unique ID."""
return self._guard_entity_id
@property
def name(self):
"""Return the name of the device."""
return self._friendly_name
@property
def state(self):
"""Return the state of the device."""
_state = parse_guard_state_from_coordinator(
self.coordinator, self._guard_entity_id
)
if _state == "ARMED_AWAY":
return STATE_ALARM_ARMED_AWAY
elif _state == "ARMED_STAY":
return STATE_ALARM_DISARMED
else:
return STATE_ALARM_DISARMED
@property
def supported_features(self) -> int:
"""Return the list of supported features."""
try:
from homeassistant.components.alarm_control_panel import (
SUPPORT_ALARM_ARM_AWAY,
)
except ImportError:
return 0
return SUPPORT_ALARM_ARM_AWAY
@property
def assumed_state(self) -> bool:
last_refresh_success = (
self.coordinator.data and self._guard_entity_id in self.coordinator.data
)
return not last_refresh_success
@property
def extra_state_attributes(self):
"""Return the state attributes."""
return self._attrs
```
|
is a Japanese manga series written by Tatsukazu Konda and illustrated by Shimeji Yukiyama. It was serialized in Shogakukan's online platform Ura Sunday from April 2015 to November 2021.
Publication
Ginrō Blood Bone, written by Tatsukazu Konda and illustrated by Shimeji Yukiyama, was serialized on Shogakukan's online platform Ura Sunday from April 29, 2015, to November 6, 2021. Shogakukan collected its chapters in sixteen tankōbon volumes, released from August 12, 2015, to December 17, 2021.
The manga is licensed in France by Kurokawa.
Volume list
Notes
References
External links
Dark fantasy anime and manga
Shogakukan manga
Shōnen manga
|
```xml
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="path_to_url">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="debug|Win32">
<Configuration>debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="checked|Win32">
<Configuration>checked</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="profile|Win32">
<Configuration>profile</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release|Win32">
<Configuration>release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{2A1F82AF-85E5-26A0-BFE0-1F8D0006DA7A}</ProjectGuid>
<RootNamespace>LowLevel</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='checked|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='profile|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='checked|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='profile|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">
<OutDir>./../../../Lib/vc12win32\</OutDir>
<IntDir>./Win32/LowLevel/debug\</IntDir>
<TargetExt>.lib</TargetExt>
<TargetName>$(ProjectName)DEBUG</TargetName>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules />
<CodeAnalysisRuleAssemblies />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<StringPooling>true</StringPooling>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FloatingPointModel>Fast</FloatingPointModel>
<BasicRuntimeChecks>UninitializedLocalUsageCheck</BasicRuntimeChecks>
<AdditionalOptions>/MP /Wall /wd4514 /wd4820 /wd4127 /wd4710 /wd4711 /wd4435 /d2Zi+</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../../../Externals/nvToolsExt/1/include;./../../PhysXGpu/include;./../../Common/include;./../../../../PxShared/include;./../../../../PxShared/src/foundation/include;./../../../../PxShared/src/fastxml/include;./../../../../PxShared/src/pvd/include;./../../../Include/common;./../../../Include/geometry;./../../../Include;./../../../Include/GeomUtils;./../../Common/src;./../../Common/src/windows;./../../PhysXProfile/src;./../../PhysXProfile/include;./../../GeomUtils/headers;./../../GeomUtils/src/contact;./../../GeomUtils/src/common;./../../GeomUtils/src/convex;./../../GeomUtils/src/distance;./../../GeomUtils/src/gjk;./../../GeomUtils/src/intersection;./../../GeomUtils/src/mesh;./../../GeomUtils/src/hf;./../../GeomUtils/src/pcm;./../../GeomUtils/src/ccd;./../../GeomUtils/src;./../../LowLevel/API/include;./../../LowLevel/common/include;./../../LowLevel/common/include/collision;./../../LowLevel/common/include/pipeline;./../../LowLevel/common/include/pipeline/windows;./../../LowLevel/common/include/utils;./../../LowLevel/software/include;./../../LowLevel/software/include/windows;./../../LowLevelDynamics/include;./../../LowLevelDynamics/include/windows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;PX_PHYSX_STATIC_LIB;_DEBUG;PX_DEBUG=1;PX_CHECKED=1;PX_NVTX=1;PX_SUPPORT_PVD=1;PX_PHYSX_DLL_NAME_POSTFIX=DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
<WarningLevel>Level4</WarningLevel>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile></PrecompiledHeaderFile>
<ProgramDataBaseFileName>$(TargetDir)\$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Lib>
<AdditionalDependencies>./../../../../Externals/nvToolsExt/1/lib/Win32/nvToolsExt32_1.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)DEBUG.lib</OutputFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(TargetDir)\$(TargetName).pdb</ProgramDatabaseFile>
<TargetMachine>MachineX86</TargetMachine>
</Lib>
<ResourceCompile>
</ResourceCompile>
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='checked|Win32'">
<OutDir>./../../../Lib/vc12win32\</OutDir>
<IntDir>./Win32/LowLevel/checked\</IntDir>
<TargetExt>.lib</TargetExt>
<TargetName>$(ProjectName)CHECKED</TargetName>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules />
<CodeAnalysisRuleAssemblies />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='checked|Win32'">
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<StringPooling>true</StringPooling>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FloatingPointModel>Fast</FloatingPointModel>
<AdditionalOptions>/MP /Wall /wd4514 /wd4820 /wd4127 /wd4710 /wd4711 /wd4435 /d2Zi+</AdditionalOptions>
<Optimization>Full</Optimization>
<AdditionalIncludeDirectories>./../../../../Externals/nvToolsExt/1/include;./../../PhysXGpu/include;./../../Common/include;./../../../../PxShared/include;./../../../../PxShared/src/foundation/include;./../../../../PxShared/src/fastxml/include;./../../../../PxShared/src/pvd/include;./../../../Include/common;./../../../Include/geometry;./../../../Include;./../../../Include/GeomUtils;./../../Common/src;./../../Common/src/windows;./../../PhysXProfile/src;./../../PhysXProfile/include;./../../GeomUtils/headers;./../../GeomUtils/src/contact;./../../GeomUtils/src/common;./../../GeomUtils/src/convex;./../../GeomUtils/src/distance;./../../GeomUtils/src/gjk;./../../GeomUtils/src/intersection;./../../GeomUtils/src/mesh;./../../GeomUtils/src/hf;./../../GeomUtils/src/pcm;./../../GeomUtils/src/ccd;./../../GeomUtils/src;./../../LowLevel/API/include;./../../LowLevel/common/include;./../../LowLevel/common/include/collision;./../../LowLevel/common/include/pipeline;./../../LowLevel/common/include/pipeline/windows;./../../LowLevel/common/include/utils;./../../LowLevel/software/include;./../../LowLevel/software/include/windows;./../../LowLevelDynamics/include;./../../LowLevelDynamics/include/windows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;PX_PHYSX_STATIC_LIB;NDEBUG;PX_CHECKED=1;PX_NVTX=1;PX_SUPPORT_PVD=1;PX_PHYSX_DLL_NAME_POSTFIX=CHECKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
<WarningLevel>Level4</WarningLevel>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile></PrecompiledHeaderFile>
<ProgramDataBaseFileName>$(TargetDir)\$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Lib>
<AdditionalDependencies>./../../../../Externals/nvToolsExt/1/lib/Win32/nvToolsExt32_1.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)CHECKED.lib</OutputFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(TargetDir)\$(TargetName).pdb</ProgramDatabaseFile>
<TargetMachine>MachineX86</TargetMachine>
</Lib>
<ResourceCompile>
</ResourceCompile>
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='profile|Win32'">
<OutDir>./../../../Lib/vc12win32\</OutDir>
<IntDir>./Win32/LowLevel/profile\</IntDir>
<TargetExt>.lib</TargetExt>
<TargetName>$(ProjectName)PROFILE</TargetName>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules />
<CodeAnalysisRuleAssemblies />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='profile|Win32'">
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<StringPooling>true</StringPooling>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FloatingPointModel>Fast</FloatingPointModel>
<AdditionalOptions>/MP /Wall /wd4514 /wd4820 /wd4127 /wd4710 /wd4711 /wd4435 /d2Zi+</AdditionalOptions>
<Optimization>Full</Optimization>
<AdditionalIncludeDirectories>./../../../../Externals/nvToolsExt/1/include;./../../PhysXGpu/include;./../../Common/include;./../../../../PxShared/include;./../../../../PxShared/src/foundation/include;./../../../../PxShared/src/fastxml/include;./../../../../PxShared/src/pvd/include;./../../../Include/common;./../../../Include/geometry;./../../../Include;./../../../Include/GeomUtils;./../../Common/src;./../../Common/src/windows;./../../PhysXProfile/src;./../../PhysXProfile/include;./../../GeomUtils/headers;./../../GeomUtils/src/contact;./../../GeomUtils/src/common;./../../GeomUtils/src/convex;./../../GeomUtils/src/distance;./../../GeomUtils/src/gjk;./../../GeomUtils/src/intersection;./../../GeomUtils/src/mesh;./../../GeomUtils/src/hf;./../../GeomUtils/src/pcm;./../../GeomUtils/src/ccd;./../../GeomUtils/src;./../../LowLevel/API/include;./../../LowLevel/common/include;./../../LowLevel/common/include/collision;./../../LowLevel/common/include/pipeline;./../../LowLevel/common/include/pipeline/windows;./../../LowLevel/common/include/utils;./../../LowLevel/software/include;./../../LowLevel/software/include/windows;./../../LowLevelDynamics/include;./../../LowLevelDynamics/include/windows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;PX_PHYSX_STATIC_LIB;NDEBUG;PX_PROFILE=1;PX_NVTX=1;PX_SUPPORT_PVD=1;PX_PHYSX_DLL_NAME_POSTFIX=PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
<WarningLevel>Level4</WarningLevel>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile></PrecompiledHeaderFile>
<ProgramDataBaseFileName>$(TargetDir)\$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Lib>
<AdditionalOptions>/INCREMENTAL:NO</AdditionalOptions>
<AdditionalDependencies>./../../../../Externals/nvToolsExt/1/lib/Win32/nvToolsExt32_1.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)PROFILE.lib</OutputFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(TargetDir)\$(TargetName).pdb</ProgramDatabaseFile>
<TargetMachine>MachineX86</TargetMachine>
</Lib>
<ResourceCompile>
</ResourceCompile>
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release|Win32'">
<OutDir>./../../../Lib/vc12win32\</OutDir>
<IntDir>./Win32/LowLevel/release\</IntDir>
<TargetExt>.lib</TargetExt>
<TargetName>$(ProjectName)</TargetName>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules />
<CodeAnalysisRuleAssemblies />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release|Win32'">
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<StringPooling>true</StringPooling>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FloatingPointModel>Fast</FloatingPointModel>
<AdditionalOptions>/MP /Wall /wd4514 /wd4820 /wd4127 /wd4710 /wd4711 /wd4435 /d2Zi+</AdditionalOptions>
<Optimization>Full</Optimization>
<AdditionalIncludeDirectories>./../../../../Externals/nvToolsExt/1/include;./../../PhysXGpu/include;./../../Common/include;./../../../../PxShared/include;./../../../../PxShared/src/foundation/include;./../../../../PxShared/src/fastxml/include;./../../../../PxShared/src/pvd/include;./../../../Include/common;./../../../Include/geometry;./../../../Include;./../../../Include/GeomUtils;./../../Common/src;./../../Common/src/windows;./../../PhysXProfile/src;./../../PhysXProfile/include;./../../GeomUtils/headers;./../../GeomUtils/src/contact;./../../GeomUtils/src/common;./../../GeomUtils/src/convex;./../../GeomUtils/src/distance;./../../GeomUtils/src/gjk;./../../GeomUtils/src/intersection;./../../GeomUtils/src/mesh;./../../GeomUtils/src/hf;./../../GeomUtils/src/pcm;./../../GeomUtils/src/ccd;./../../GeomUtils/src;./../../LowLevel/API/include;./../../LowLevel/common/include;./../../LowLevel/common/include/collision;./../../LowLevel/common/include/pipeline;./../../LowLevel/common/include/pipeline/windows;./../../LowLevel/common/include/utils;./../../LowLevel/software/include;./../../LowLevel/software/include/windows;./../../LowLevelDynamics/include;./../../LowLevelDynamics/include/windows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;PX_PHYSX_STATIC_LIB;NDEBUG;PX_SUPPORT_PVD=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
<WarningLevel>Level4</WarningLevel>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile></PrecompiledHeaderFile>
<ProgramDataBaseFileName>$(TargetDir)\$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Lib>
<AdditionalOptions>/INCREMENTAL:NO</AdditionalOptions>
<AdditionalDependencies>./../../../../Externals/nvToolsExt/1/lib/Win32/nvToolsExt32_1.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName).lib</OutputFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(TargetDir)\$(TargetName).pdb</ProgramDatabaseFile>
<TargetMachine>MachineX86</TargetMachine>
</Lib>
<ResourceCompile>
</ResourceCompile>
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\LowLevel\API\src\px_globals.cpp">
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\LowLevel\API\include\PxsMaterialCore.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\API\include\PxsMaterialManager.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\API\include\PxvConfig.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\API\include\PxvContext.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\API\include\PxvDynamics.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\API\include\PxvGeometry.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\API\include\PxvGlobals.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\API\include\PxvManager.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\API\include\PxvSimStats.h">
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\LowLevel\software\src\PxsCCD.cpp">
</ClCompile>
<ClCompile Include="..\..\LowLevel\software\src\PxsContactManager.cpp">
</ClCompile>
<ClCompile Include="..\..\LowLevel\software\src\PxsContext.cpp">
</ClCompile>
<ClCompile Include="..\..\LowLevel\software\src\PxsDefaultMemoryManager.cpp">
</ClCompile>
<ClCompile Include="..\..\LowLevel\software\src\PxsIslandSim.cpp">
</ClCompile>
<ClCompile Include="..\..\LowLevel\software\src\PxsMaterialCombiner.cpp">
</ClCompile>
<ClCompile Include="..\..\LowLevel\software\src\PxsNphaseImplementationContext.cpp">
</ClCompile>
<ClCompile Include="..\..\LowLevel\software\src\PxsSimpleIslandManager.cpp">
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\LowLevel\software\include\PxsBodySim.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\software\include\PxsCCD.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\software\include\PxsContactManager.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\software\include\PxsContactManagerState.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\software\include\PxsContext.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\software\include\PxsDefaultMemoryManager.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\software\include\PxsHeapMemoryAllocator.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\software\include\PxsIncrementalConstraintPartitioning.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\software\include\PxsIslandManagerTypes.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\software\include\PxsIslandSim.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\software\include\PxsKernelWrangler.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\software\include\PxsMaterialCombiner.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\software\include\PxsMemoryManager.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\software\include\PxsNphaseImplementationContext.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\software\include\PxsRigidBody.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\software\include\PxsShapeSim.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\software\include\PxsSimpleIslandManager.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\software\include\PxsSimulationController.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\software\include\PxsTransformCache.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\software\include\PxvNphaseImplementationContext.h">
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\LowLevel\common\src\collision\PxcContact.cpp">
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\LowLevel\common\src\pipeline\PxcContactCache.cpp">
</ClCompile>
<ClCompile Include="..\..\LowLevel\common\src\pipeline\PxcContactMethodImpl.cpp">
</ClCompile>
<ClCompile Include="..\..\LowLevel\common\src\pipeline\PxcMaterialHeightField.cpp">
</ClCompile>
<ClCompile Include="..\..\LowLevel\common\src\pipeline\PxcMaterialMesh.cpp">
</ClCompile>
<ClCompile Include="..\..\LowLevel\common\src\pipeline\PxcMaterialMethodImpl.cpp">
</ClCompile>
<ClCompile Include="..\..\LowLevel\common\src\pipeline\PxcMaterialShape.cpp">
</ClCompile>
<ClCompile Include="..\..\LowLevel\common\src\pipeline\PxcNpBatch.cpp">
</ClCompile>
<ClCompile Include="..\..\LowLevel\common\src\pipeline\PxcNpCacheStreamPair.cpp">
</ClCompile>
<ClCompile Include="..\..\LowLevel\common\src\pipeline\PxcNpContactPrepShared.cpp">
</ClCompile>
<ClCompile Include="..\..\LowLevel\common\src\pipeline\PxcNpMemBlockPool.cpp">
</ClCompile>
<ClCompile Include="..\..\LowLevel\common\src\pipeline\PxcNpThreadContext.cpp">
</ClCompile>
</ItemGroup>
<ItemGroup>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\LowLevel\common\include\collision\PxcContactMethodImpl.h">
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\LowLevel\common\include\pipeline\PxcCCDStateStreamPair.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\common\include\pipeline\PxcConstraintBlockStream.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\common\include\pipeline\PxcContactCache.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\common\include\pipeline\PxcMaterialMethodImpl.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\common\include\pipeline\PxcNpBatch.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\common\include\pipeline\PxcNpCache.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\common\include\pipeline\PxcNpCacheStreamPair.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\common\include\pipeline\PxcNpContactPrepShared.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\common\include\pipeline\PxcNpMemBlockPool.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\common\include\pipeline\PxcNpThreadContext.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\common\include\pipeline\PxcNpWorkUnit.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\common\include\pipeline\PxcRigidBody.h">
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\LowLevel\common\include\utils\PxcScratchAllocator.h">
</ClInclude>
<ClInclude Include="..\..\LowLevel\common\include\utils\PxcThreadCoherentCache.h">
</ClInclude>
</ItemGroup>
<ItemGroup>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"></ImportGroup>
</Project>
```
|
```dart
import 'package:graphql_schema/graphql_schema.dart';
part 'episode.g.dart';
@GraphQLDocumentation(
description: 'The episodes of the Star Wars original trilogy.')
@graphQLClass
enum Episode {
NEWHOPE,
EMPIRE,
JEDI,
}
```
|
```sqlpl
-- +goose NO TRANSACTION
-- +goose Up
CREATE UNIQUE INDEX owners_owner_name_idx ON owners(owner_name);
-- +goose Down
DROP INDEX IF EXISTS owners_owner_name_idx ON owners;
```
|
The Spanish Requirement of 1513 (Requerimiento) was a declaration by the Spanish monarchy, written by the Council of Castile jurist Juan López de Palacios Rubios, of Castile's divinely ordained right to take possession of the territories of the New World and to subjugate, exploit and, when necessary, to fight the native inhabitants.
The Requerimiento (Spanish for "requirement" as in "demand") was read to Native Americans to inform them of Spain's rights to conquest. The Spaniards thus considered those who resisted as defying God's plan, and so used Catholic theology to justify their conquest.
Historical context
In 1452, Pope Nicholas V issued the papal bull Dum Diversas, which legitimized the slave trade, at least as a result of war. It granted Afonso V of Portugal the right to reduce war-conquered "Saracens, pagans and any other unbelievers" to hereditary slavery. As such, the Dominican friars who arrived at the Spanish settlement at Santo Domingo in 1510 strongly denounced the enslavement of the local Indigenous residents. Along with other priests, they opposed the native peoples' treatment as unjust and illegal in an audience with the Spanish king and in the subsequent royal commission.
In Spain itself in 1492, the Moorish population of Granada had been given the choice by the first Archbishop of Granada, Hernando de Talavera: become Christian, or leave the country. In a letter to his religious brothers, Cardinal Cisneros, Talavera's successor, would celebrate the “peaceful domination” of the Moors of the Albaicin, a neighborhood of Granada, praising converts, lauding killing and extolling plunder. This letter came, however, after centuries of struggle by Christians in Spain to recapture what they saw as their homeland, which had been under Muslim rule for generations. Thus the war in Iberia, between Christians trying to "reconquer" land they thought of as properly Christian and Muslims defending the land their forefathers claimed by right of conquest, heightened religious tensions and fervor on both sides.
Comparing the situation in the Old World and New World: in Spain's wars against the Moors, the clerics claimed that Muslims had knowledge of Christ and rejected Him, so that waging a Crusade against them was legitimate; in contrast, in Spain's wars against the Indigenous peoples of the Americas and Native Americans, wars against those who had never come into contact with Christianity were illegitimate. Responding to this impeding clerical position, the Requerimiento was issued, providing a religious justification for war against and conquest of the local populations of pre-existing residents, on the pretext of their refusing the legitimate authority of the Kings of Spain and Portugal as granted by the Pope.
So, the Requerimiento emerged in the context of moral debates within Spanish elites over the colonization of the Americas, and associated actions such as war, slavery, 'Indian reductions', conversions, relocations, and war crimes. Its use was criticized by many clerical missionaries, most prominently Bartolomé de las Casas.
To the King and Queen of Spain (Ferdinand II of Aragon, 1452–1516 and Isabella I of Castile, 1451–1504) the conquest of indigenous peoples was justified by natural law, embodied in the medieval doctrine of “just wars”, which had historically been a rationale for war against non-Christians, particularly the Moors, but which would now be applied to Native Americans. Coming shortly after the Reconquest, the realization of a centuries-long dream by Christians in Spain, the discovery, and colonization of the New World was directly affected by religious and political conditions in a now-unified Iberian Peninsula.
Legal justification
Concerned that Spain would ensure control of the natives in the newly conquered Americas, the “Reyes Católicos”, Ferdinand and Isabella, consulted theologians and jurists for religious and legal justification of Spain's conquests. The treatment of the Native Americans was at first rationalized on the grounds that they were cannibals; any means of subjugation were acceptable. However, some of Christopher Columbus’s tactics with Native Americans had resulted in uprisings. In 1500, the king and queen again sought advice; the Native Americans were declared to be "free vassals". Despite their elevated status, the Native Americans remained subject to conquest in "just wars".
The Laws of Burgos of 1512 marked the first in a series of ordinances (“Ordenanzas sobre el buen tratamiento de los indios”) with the ostensible goal of protecting the Indians from excessive exploitation; natives could celebrate holidays, be paid for their labor and receive "good treatment". Similar legislation was adopted by the Junta of Valladolid in 1513 and the Junta of Madrid in 1516.
Role of religion
The colonization of the New World by European adventurers was "justified" at the time on spiritual and religious grounds. In the conquest of the Americas, the Christian duty to evangelize nonbelievers took the form of conversion of Indians and other pagans at the hands of Roman Catholic priests.
To the European mind, the lands of the New World belonged to no one and could, therefore, be seized. The radical differences in thought and behavior of the Aztec and Mayan states, with their worship of entirely new, fierce gods, human sacrifice and complete unfamiliarity with European styles of diplomacy created a sense that conquest was not a war between states but the conquering, by a civilized, society against a ferocious, barbarous enemy. Moreover, since the native population was non-Christian, the Europeans' Christian religion conferred upon them the right and indeed the obligation to take possession of the lands and the people in the name of God and the throne.
More particularly, Catholic theology held that spiritual salvation took precedence over temporal and civil concerns. The conversion of pagan natives to Christianity was the rationale for and legitimized Spain's conquests. Thus "informed" by the Spanish, the Native people of the land had to accept the supremacy of the Catholic Church and the Spanish Crown. The state was authorized to enforce submission, by war if necessary.
Content
The 1513 Requerimiento, in relation to the Spanish invasion of the Americas and the subsequent Spanish colonization of the Americas, demanded the local populations to accept Spanish rule and allow preaching to them by Catholic missionaries on pain of war, slavery or death. The Requerimiento did not demand conversion, but the Indian Reductions through the Encomienda and Mission systems often did. This claim provided a legal loophole for enslavement of the population as rebellious vassals if they resisted, and the document stated: "We emphasise that any deaths that result from this [rejection of Christian rule] are your fault…."
The European view of the inherent right to conquest and domination in the New World was captured in a declaration addressed to Indian populations known as El Requerimiento (The Requirement). The document was prepared by the Spanish jurist Juan López de Palacios Rubios, a staunch advocate of the divine right of monarchs and territorial conquest. It was first used in 1514 by Pedrarias Dávila, a Spanish aristocrat who had fought the Moors in Granada and later became Governor of Nicaragua.
The Spanish Requirement, issued in the names of King Ferdinand and Queen Juana, his daughter, was a mixture of religious and legal justifications for the confiscation of New World territories and the subjugation of their inhabitants. At the time, it was believed that Native Americans resisted conquest and conversion for one of two reasons: malice or ignorance. The Requirement was putatively meant to eliminate ignorance.
A member of the conquistador's force would read El Requerimiento in Castilian before a group of Indians on the shore, who, with or without translation, remained uncomprehending. All the region's inhabitants were thus considered to have been advised of Spain's religious and legal rights to conquest and forewarned of the consequences of resisting. The true nature of the Spanish Requirement, however, was one of absolution; the symbolic act of reading the document relieved the crown and its agents from legal and moral responsibility for the conquest, enslavement and killing of Native Americans. Readings were often dispensed with prior to planned attacks.
As the Spanish Requirement matter-of-factly sets forth, so brazenly from five centuries' retrospect, God created heaven and earth, and the first man and woman from whom all are descended. God directed St Peter to establish the Roman Catholic Church. St Peter's descendant, the Pope, lives in Rome. The Pope has given the New World territories to the King of Castile and directed the conversion of the Indians. If they listen carefully, the Indians will understand and accept what is happening as just; if not, Spain will make war on them.
Here what the document does is to create an ontology into which these new lands and their peoples fit; it is creating a place for them in the existing Spanish and European political structure and Christian belief structure.
Evaluation
Many critics of the conquistadors' policies were appalled by the flippant nature of the Requerimiento, and Bartolomé de las Casas said in response to it that he did not know whether to laugh or to cry. While the conquistadors were encouraged to use an interpreter to read the Requerimiento, it was not absolutely necessary, and in many cases, it was read out to an uncomprehending populace.
In some instances, it was read to barren beaches and empty villages long after the indigenous people and communities had left, to prisoners after they were captured, and even from the decks of ships once they had just spotted the coast. Nevertheless, for the conquistadors, it provided a religious justification and rationalization for attacking and conquering the native population. Because of its potential to support the enrichment of the Spanish royal coffers, the Requerimiento was not generally questioned until the Spanish crown had abolished its use in 1556.
Text
See also
Black legend (Spain)
La Toma
Indian Reductions
Spanish colonization of the Americas
Valladolid debate
Notes
References
External links
Full Requerimiento text in Spanish - Todos en Español
Spanish colonization of the Americas
History of indigenous peoples of North America
1513 works
16th-century documents
Government statements
Causes of war
History of Catholicism in South America
Legal history of Spain
1513 in law
|
The Otway Coast comprises a popular beach and national park section of the Great Ocean Road on the south-eastern coast of Australia between the Victorian towns of Lorne and Apollo Bay. The townships on the Otway Coast are: Separation Creek, Wye River, Kennett River, Wongara and Sugarloaf.
History
The Otway Coast region became a popular holiday destination from the city of Melbourne in Victoria after the returned servicemen from World War 1 built a spectacular stretch of road along some of the state's most precipitous cliffs. The townships of the Otway Coast were all settled in the late 1800s but only became popular as beach resorts when the Great Ocean Road was opened in 1932. They differ from the other townships along the coast in that they are smaller and less developed.
On 25 December 2015 a bushfire destroyed 18 homes in Separation Creek and at Wye River 98 homes were destroyed. There were no deaths at either town.
Koala populations
The Otway Coast has one of the most successful wild koala populations in Australia with their numbers increasing every year due to the high percentage of available suitable vegetation like manna gum and blue gum.
National parks
A significant area of the Otway Coast belongs to the Great Otway National Park with many walking tracks and waterfalls. The Park features the magnificent trees of the ancient rainforests, the drier forests of the inland slopes and the very diverse heathlands and woodlands along with spectacularly rugged coastline. During winter it has some of Victoria's most striking waterfalls.
References
External links
Otway Coast Tourism information
Otway Ranges
Coastline of Victoria (state)
|
Rathafandhoo (Dhivehi: ރަތަފަންދޫ) is an inhabited island of the Gaafu Dhaalu Atoll, Maldives.
Geography
The island is south of the country's capital, Malé. The island is located on the southwest side of South Huvadhu Atoll.
Climate
The climate is warm and the weather is tropical year round. The temperature averages 25° to 32 °C. Monsoon runs from May to November. The islands are closely situated to the Indian coast, are strongly affected by mainland Asian weather patterns, though do not experience serious monsoons.
Demography
Governance
Police
In late 2008, the Maldives Police Service opened a station on the island, with three police personnel.
Education
Primary and secondary education on the island is provided by Rathafandhoo School, with 155 students and 21 teachers. Pre-schools are available.
Healthcare
The Health Centre provides basic health care to the islanders for minor injuries, cuts, common colds and flu. If a serious health issue arises, islanders must go to the regional hospital located in the atoll capital Thinadhoo. The journey takes about 45 minutes via speed boat.
Economy
The most common sources of paid work for residents include mat weaving, agriculture, reef fishing and carpentry and fishing for sea cucumbers, tuna and reef fish.
The islanders are famous for handicrafts and making nets (kunaa), made from a local plant called Hau. Some islanders weave mats, as souvenirs for visitors.
Sea cucumber fishery
One of the main economic activities on the island is the sea cucumber fishery. The island is the collection center and major base for sea cucumber fisherman who fish in the southern part of the Maldives (Huvadhoo, Fuvahmulah and Addu city.) More than 10 registered companies carry out collecting, cooking, and drying the sea cucumbers for export to China.
NGOs
Several non-governmental organizations are registered on the island, including some inactive ones, such as RASFARI and READY (Rathafandhoo Eminent Association of Dynamic Youth).
References
External links
World Travel Guide Article
Islands of the Maldives
Populated places in the Maldives
|
The Order of Saint Joseph was instituted on 9 March 1807 by Ferdinand III, Grand Duke of Tuscany during his reign as Grand Duke of Würzburg. It was transformed into a Tuscan Roman Catholic Dynastic Order in 1817.
The constitution of the Order was promulgated in March 1817, with amendments in August 1817. The order was divided into civil and military categories but these are now defunct. It is given to reward services towards Tuscan culture and civilisation and to the Grand Ducal House as a whole.
The Order is divided into three levels:
Knights Grand Cross, numbering thirty
Commander, numbering sixty
Knights, numbering one hundred and fifty
These numbers excluded Sovereigns, Heads of State, and Princes of the Grand Ducal House and other Royal Houses, Cardinals of the Holy Roman Church and Tuscan Metropolitan Archbishops. All had to be Catholics. The number of women members cannot exceed fifty, excluding Princesses of the Grand Ducal and other Royal Houses, wives of Heads of State and Dames of the Order of Saint Stephen.
It is permitted for non-nobles to be admitted into the Order of the level of Grand Cross in cases of exceptional merit.
Dames wear the same Cross as Knights but from a bow on the left breast. Dame Grand Crosses wear the Cross hanging from a Riband like the Knights but without the Star.
Recipients
Grand Masters
Ferdinand III, Grand Duke of Tuscany
Ferdinand IV, Grand Duke of Tuscany
Archduke Gottfried of Austria
Archduke Joseph Ferdinand of Austria
Archduke Leopold Franz of Austria
Leopold II, Grand Duke of Tuscany
Commanders
Vincenzo Antinori
Luigi Federico Menabrea
Knights
Giovanni Battista Amici
Felice Pasquale Baciocchi
Gino Capponi
Jean-François Champollion
Pavel Nikolaievich Demidov
Ibrahim Pasha
Anatoly Nikolaievich Demidov, 1st Prince of San Donato
Giovanni Dupré
Alphonse de Lamartine
Maximilian II of Bavaria
Philipp Albrecht, Duke of Württemberg
Bettino Ricasoli
Federico Sclopis
Federico Sclopis
References
Bibliography
Gregor Gatscher-Riedl, Mario Strigl, Die roten Ritter. Zwischen Medici, Habsburgern und Osmanen. Die Orden und Auszeichnungen des Großherzogtums Toskana. Vienna, Neue Welt Verlag, 2014. .
External links
Grand Dukedom of Tuscany Dynastic Orders
ORDER OF SAINT JOSEPH
Awards established in 1807
|
```objective-c
/*
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
/******************************************************************
iLBC Speech Coder ANSI-C Source Code
WebRtcIlbcfix_CompCorr.h
******************************************************************/
#ifndef MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_COMP_CORR_H_
#define MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_COMP_CORR_H_
#include <stddef.h>
#include <stdint.h>
/*your_sha256_hash*
* Compute cross correlation and pitch gain for pitch prediction
* of last subframe at given lag.
*---------------------------------------------------------------*/
void WebRtcIlbcfix_CompCorr(int32_t* corr, /* (o) cross correlation */
int32_t* ener, /* (o) energy */
int16_t* buffer, /* (i) signal buffer */
size_t lag, /* (i) pitch lag */
size_t bLen, /* (i) length of buffer */
size_t sRange, /* (i) correlation search length */
int16_t scale /* (i) number of rightshifts to use */
);
#endif
```
|
Events from the year 1730 in Russia
Incumbents
Monarch – Peter II (until ), Anna (after )
Events
Births
- Alexander Suvorov, Russian military leader, considered a national hero. (d. 1800)
Deaths
- Peter II of Russia, Emperor. (b. 1715)
Varvara Michajlovna Arsen'eva, royal mistress and courtier (b. 1676)
References
1730 in Russia
Years of the 18th century in the Russian Empire
1730 by country
1730 in Europe
1730 in Asia
1730s in the Russian Empire
|
```java
/*
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
package org.apache.carbondata.processing.loading.parser;
/**
* It parses data string as per complex data type.
*/
public interface ComplexParser<E> extends GenericParser<E> {
/**
* Children to this parser.
* @param parser
*/
void addChildren(GenericParser parser);
}
```
|
Gymnogeophagus mekinos is a species of geophagine cichlid. It inhabits parts of the Uruguay and Río Negro rivers. It is characterised by the absence of supraneural bones, the presence of a forward spine in its first dorsal fin pterygiophore, the absence of an oblique bar between the eye and nape, possessing a black marking near the dorsal fin origin that projects to its dorsum, as well as other features.
References
mekinos
Taxa named by Luiz Roberto Malabarba
Taxa named by Maria Claudia de Souza Lima Malabarba
Taxa named by Roberto Esser dos Reis
Fish described in 2015
|
Philomecyna is a genus of beetles in the family Cerambycidae, containing the following species:
Philomecyna camerunica (Aurivillius, 1907)
Philomecyna kivuensis Breuning, 1954
Philomecyna leleupi Breuning, 1975
Philomecyna persimilis Breuning, 1978
Philomecyna pilosella Kolbe, 1894
Philomecyna rufoantennalis Breuning, 1978
Philomecyna spinosa (Aurivillius, 1907)
References
Apomecynini
|
The 52nd Kentucky Mounted Infantry Regiment was a mounted infantry regiment that served in the Union Army during the American Civil War.
Service
The 52nd Kentucky Mounted Infantry Regiment was organized at Franklin and Scottsville, Kentucky. Companies A, B, C, and E mustered in at Scottsville on October 16, 1863. Company D mustered in on October 17, 1863. Company F mustered in on November 12, 1863. Company G mustered in on December 21, 1863. Companies H, I, and K mustered in at Franklin on March 3, 1864. All were mustered in for one year under the command of Colonel John H. Grider.
The regiment was attached to 3rd Brigade, 1st Division, District of Kentucky, Department of the Ohio, to July 1864. 2nd Brigade, 2nd Division, District of Kentucky, Department of the Ohio, to October 1864. 1st Brigade, 2nd Division, District of Kentucky, 5th Division, XXIII Corps, Department of the Ohio, to January 1865.
The 52nd Kentucky Mounted Infantry mustered out of service January 17, 1865.
Detailed service
Operations against guerrillas in southern and central Kentucky, guarding and protecting public property, and protecting lines of communication with the army operating at the front until March 1864. Operations against Forrest's Raid into Kentucky March 23-April 19, and against Morgan in eastern Kentucky May 31-June 20. Action at New Hope March 28. Mt. Sterling June 9. Cynthiana June 12. Operations in western Kentucky July–August. Action at Bells Mines July 13. Operations in Webster and Union Counties July 14–18. Morganfield July 14. Geiger's Lake July 15. Operations against Adam Johnson about Uniontown August. Grubb's Cross Roads August 21. Canton and Roaring Springs August 22. Moved to Lexington August 27, thence to Bowling Green August 30, and to Nashville, Tennessee. Scottsville December 8 (1 company).
Casualties
The regiment lost a total of 59 men during service; 1 officer and 10 enlisted men killed or mortally wounded, 48 enlisted men died of disease.
Commanders
Colonel John H. Grider
See also
List of Kentucky Civil War Units
Kentucky in the Civil War
References
Dyer, Frederick H. A Compendium of the War of the Rebellion (Des Moines, IA: Dyer Pub. Co.), 1908.
Attribution
External links
Alphabetical roster of the 52nd Kentucky Mounted Infantry
Military units and formations established in 1863
Military units and formations disestablished in 1865
Units and formations of the Union Army from Kentucky
1863 establishments in Kentucky
|
```python
import itertools
from collections import defaultdict
import numpy as np
import tensorflow as tf
import os
from basic_cnn.read_data import DataSet
from my.nltk_utils import span_f1
from my.tensorflow import padded_reshape
from my.utils import argmax
class Evaluation(object):
def __init__(self, data_type, global_step, idxs, yp, tensor_dict=None):
self.data_type = data_type
self.global_step = global_step
self.idxs = idxs
self.yp = yp
self.num_examples = len(yp)
self.tensor_dict = None
self.dict = {'data_type': data_type,
'global_step': global_step,
'yp': yp,
'idxs': idxs,
'num_examples': self.num_examples}
if tensor_dict is not None:
self.tensor_dict = {key: val.tolist() for key, val in tensor_dict.items()}
for key, val in self.tensor_dict.items():
self.dict[key] = val
self.summaries = None
def __repr__(self):
return "{} step {}".format(self.data_type, self.global_step)
def __add__(self, other):
if other == 0:
return self
assert self.data_type == other.data_type
assert self.global_step == other.global_step
new_yp = self.yp + other.yp
new_idxs = self.idxs + other.idxs
new_tensor_dict = None
if self.tensor_dict is not None:
new_tensor_dict = {key: val + other.tensor_dict[key] for key, val in self.tensor_dict.items()}
return Evaluation(self.data_type, self.global_step, new_idxs, new_yp, tensor_dict=new_tensor_dict)
def __radd__(self, other):
return self.__add__(other)
class LabeledEvaluation(Evaluation):
def __init__(self, data_type, global_step, idxs, yp, y, id2answer_dict, tensor_dict=None):
super(LabeledEvaluation, self).__init__(data_type, global_step, idxs, yp, tensor_dict=tensor_dict)
self.y = y
self.dict['y'] = y
self.id2answer_dict = id2answer_dict
def __add__(self, other):
if other == 0:
return self
assert self.data_type == other.data_type
assert self.global_step == other.global_step
new_yp = self.yp + other.yp
new_y = self.y + other.y
new_idxs = self.idxs + other.idxs
new_id2answer_dict = dict(list(self.id2answer_dict.items()) + list(other.id2answer_dict.items()))
new_id2score_dict = dict(list(self.id2answer_dict['scores'].items()) + list(other.id2answer_dict['scores'].items()))
new_id2answer_dict['scores'] = new_id2score_dict
if self.tensor_dict is not None:
new_tensor_dict = {key: np.concatenate((val, other.tensor_dict[key]), axis=0) for key, val in self.tensor_dict.items()}
return LabeledEvaluation(self.data_type, self.global_step, new_idxs, new_yp, new_y, new_id2answer_dict, tensor_dict=new_tensor_dict)
class AccuracyEvaluation(LabeledEvaluation):
def __init__(self, data_type, global_step, idxs, yp, y, id2answer_dict, correct, loss, tensor_dict=None):
super(AccuracyEvaluation, self).__init__(data_type, global_step, idxs, yp, y, id2answer_dict, tensor_dict=tensor_dict)
self.loss = loss
self.correct = correct
self.id2answer_dict = id2answer_dict
self.acc = sum(correct) / len(correct)
self.dict['loss'] = loss
self.dict['correct'] = correct
self.dict['acc'] = self.acc
loss_summary = tf.Summary(value=[tf.Summary.Value(tag='{}/loss'.format(data_type), simple_value=self.loss)])
acc_summary = tf.Summary(value=[tf.Summary.Value(tag='{}/acc'.format(data_type), simple_value=self.acc)])
self.summaries = [loss_summary, acc_summary]
def __repr__(self):
return "{} step {}: accuracy={}={}/{}, loss={}".format(self.data_type, self.global_step, self.acc,
sum(self.correct), self.num_examples, self.loss)
def __add__(self, other):
if other == 0:
return self
assert self.data_type == other.data_type
assert self.global_step == other.global_step
new_idxs = self.idxs + other.idxs
new_yp = self.yp + other.yp
new_y = self.y + other.y
new_correct = self.correct + other.correct
new_loss = (self.loss * self.num_examples + other.loss * other.num_examples) / len(new_correct)
new_id2answer_dict = dict(list(self.id2answer_dict.items()) + list(other.id2answer_dict.items()))
new_id2score_dict = dict(list(self.id2answer_dict['scores'].items()) + list(other.id2answer_dict['scores'].items()))
new_id2answer_dict['scores'] = new_id2score_dict
new_tensor_dict = None
if self.tensor_dict is not None:
new_tensor_dict = {key: np.concatenate((val, other.tensor_dict[key]), axis=0) for key, val in self.tensor_dict.items()}
return AccuracyEvaluation(self.data_type, self.global_step, new_idxs, new_yp, new_y, new_id2answer_dict, new_correct, new_loss, tensor_dict=new_tensor_dict)
class Evaluator(object):
def __init__(self, config, model, tensor_dict=None):
self.config = config
self.model = model
self.global_step = model.global_step
self.yp = model.yp
self.tensor_dict = {} if tensor_dict is None else tensor_dict
def get_evaluation(self, sess, batch):
idxs, data_set = batch
feed_dict = self.model.get_feed_dict(data_set, False, supervised=False)
global_step, yp, vals = sess.run([self.global_step, self.yp, list(self.tensor_dict.values())], feed_dict=feed_dict)
yp = yp[:data_set.num_examples]
tensor_dict = dict(zip(self.tensor_dict.keys(), vals))
e = Evaluation(data_set.data_type, int(global_step), idxs, yp.tolist(), tensor_dict=tensor_dict)
return e
def get_evaluation_from_batches(self, sess, batches):
e = sum(self.get_evaluation(sess, batch) for batch in batches)
return e
class LabeledEvaluator(Evaluator):
def __init__(self, config, model, tensor_dict=None):
super(LabeledEvaluator, self).__init__(config, model, tensor_dict=tensor_dict)
self.y = model.y
def get_evaluation(self, sess, batch):
idxs, data_set = batch
feed_dict = self.model.get_feed_dict(data_set, False, supervised=False)
global_step, yp, vals = sess.run([self.global_step, self.yp, list(self.tensor_dict.values())], feed_dict=feed_dict)
yp = yp[:data_set.num_examples]
y = feed_dict[self.y]
tensor_dict = dict(zip(self.tensor_dict.keys(), vals))
e = LabeledEvaluation(data_set.data_type, int(global_step), idxs, yp.tolist(), y.tolist(), tensor_dict=tensor_dict)
return e
class AccuracyEvaluator(LabeledEvaluator):
def __init__(self, config, model, tensor_dict=None):
super(AccuracyEvaluator, self).__init__(config, model, tensor_dict=tensor_dict)
self.loss = model.loss
def get_evaluation(self, sess, batch):
idxs, data_set = self._split_batch(batch)
assert isinstance(data_set, DataSet)
feed_dict = self._get_feed_dict(batch)
y = data_set.data['y']
global_step, yp, loss, vals = sess.run([self.global_step, self.yp, self.loss, list(self.tensor_dict.values())], feed_dict=feed_dict)
yp = yp[:data_set.num_examples]
correct, probs, preds = zip(*[self.__class__.compare(data_set.get_one(idx), ypi) for idx, ypi in zip(data_set.valid_idxs, yp)])
tensor_dict = dict(zip(self.tensor_dict.keys(), vals))
ids = data_set.data['ids']
id2score_dict = {id_: prob for id_, prob in zip(ids, probs)}
id2answer_dict = {id_: pred for id_, pred in zip(ids, preds)}
id2answer_dict['scores'] = id2score_dict
e = AccuracyEvaluation(data_set.data_type, int(global_step), idxs, yp.tolist(), y, id2answer_dict, correct, float(loss), tensor_dict=tensor_dict)
return e
@staticmethod
def compare(data, ypi):
prob = float(np.max(ypi))
yi = data['y']
for start, stop in yi:
if start == int(np.argmax(ypi)):
return True, prob, " "
return False, prob, " "
def _split_batch(self, batch):
return batch
def _get_feed_dict(self, batch):
return self.model.get_feed_dict(batch[1], False)
class CNNAccuracyEvaluator(AccuracyEvaluator):
@staticmethod
def compare(data, ypi):
# ypi: [N, M, JX] numbers
yi = data['y'][0] # entity
xi = data['x'][0] # [N, M, JX] words
dist = defaultdict(int)
for ypij, xij in zip(ypi, xi):
for ypijk, xijk in zip(ypij, xij):
if xijk.startswith("@"):
dist[xijk] += ypijk
pred, prob = max(dist.items(), key=lambda item: item[1])
assert pred.startswith("@")
assert yi.startswith("@")
return pred == yi, prob, pred
class AccuracyEvaluator2(AccuracyEvaluator):
@staticmethod
def compare(yi, ypi):
for start, stop in yi:
para_start = int(np.argmax(np.max(ypi, 1)))
sent_start = int(np.argmax(ypi[para_start]))
if tuple(start) == (para_start, sent_start):
return True
return False
class ForwardEvaluation(Evaluation):
def __init__(self, data_type, global_step, idxs, yp, yp2, loss, id2answer_dict, tensor_dict=None):
super(ForwardEvaluation, self).__init__(data_type, global_step, idxs, yp, tensor_dict=tensor_dict)
self.yp2 = yp2
self.loss = loss
self.dict['loss'] = loss
self.dict['yp2'] = yp2
self.id2answer_dict = id2answer_dict
def __add__(self, other):
if other == 0:
return self
assert self.data_type == other.data_type
assert self.global_step == other.global_step
new_idxs = self.idxs + other.idxs
new_yp = self.yp + other.yp
new_yp2 = self.yp2 + other.yp2
new_loss = (self.loss * self.num_examples + other.loss * other.num_examples) / len(new_yp)
new_id2answer_dict = dict(list(self.id2answer_dict.items()) + list(other.id2answer_dict.items()))
if self.tensor_dict is not None:
new_tensor_dict = {key: np.concatenate((val, other.tensor_dict[key]), axis=0) for key, val in self.tensor_dict.items()}
return ForwardEvaluation(self.data_type, self.global_step, new_idxs, new_yp, new_yp2, new_loss, new_id2answer_dict, tensor_dict=new_tensor_dict)
def __repr__(self):
return "{} step {}: loss={:.4f}".format(self.data_type, self.global_step, self.loss)
class F1Evaluation(AccuracyEvaluation):
def __init__(self, data_type, global_step, idxs, yp, yp2, y, correct, loss, f1s, id2answer_dict, tensor_dict=None):
super(F1Evaluation, self).__init__(data_type, global_step, idxs, yp, y, correct, loss, tensor_dict=tensor_dict)
self.yp2 = yp2
self.f1s = f1s
self.f1 = float(np.mean(f1s))
self.dict['yp2'] = yp2
self.dict['f1s'] = f1s
self.dict['f1'] = self.f1
self.id2answer_dict = id2answer_dict
f1_summary = tf.Summary(value=[tf.Summary.Value(tag='{}/f1'.format(data_type), simple_value=self.f1)])
self.summaries.append(f1_summary)
def __add__(self, other):
if other == 0:
return self
assert self.data_type == other.data_type
assert self.global_step == other.global_step
new_idxs = self.idxs + other.idxs
new_yp = self.yp + other.yp
new_yp2 = self.yp2 + other.yp2
new_y = self.y + other.y
new_correct = self.correct + other.correct
new_f1s = self.f1s + other.f1s
new_loss = (self.loss * self.num_examples + other.loss * other.num_examples) / len(new_correct)
new_id2answer_dict = dict(list(self.id2answer_dict.items()) + list(other.id2answer_dict.items()))
return F1Evaluation(self.data_type, self.global_step, new_idxs, new_yp, new_yp2, new_y, new_correct, new_loss, new_f1s, new_id2answer_dict)
def __repr__(self):
return "{} step {}: accuracy={:.4f}, f1={:.4f}, loss={:.4f}".format(self.data_type, self.global_step, self.acc, self.f1, self.loss)
class F1Evaluator(LabeledEvaluator):
def __init__(self, config, model, tensor_dict=None):
super(F1Evaluator, self).__init__(config, model, tensor_dict=tensor_dict)
self.yp2 = model.yp2
self.loss = model.loss
def get_evaluation(self, sess, batch):
idxs, data_set = self._split_batch(batch)
assert isinstance(data_set, DataSet)
feed_dict = self._get_feed_dict(batch)
global_step, yp, yp2, loss, vals = sess.run([self.global_step, self.yp, self.yp2, self.loss, list(self.tensor_dict.values())], feed_dict=feed_dict)
y = data_set.data['y']
if self.config.squash:
new_y = []
for xi, yi in zip(data_set.data['x'], y):
new_yi = []
for start, stop in yi:
start_offset = sum(map(len, xi[:start[0]]))
stop_offset = sum(map(len, xi[:stop[0]]))
new_start = 0, start_offset + start[1]
new_stop = 0, stop_offset + stop[1]
new_yi.append((new_start, new_stop))
new_y.append(new_yi)
y = new_y
if self.config.single:
new_y = []
for yi in y:
new_yi = []
for start, stop in yi:
new_start = 0, start[1]
new_stop = 0, stop[1]
new_yi.append((new_start, new_stop))
new_y.append(new_yi)
y = new_y
yp, yp2 = yp[:data_set.num_examples], yp2[:data_set.num_examples]
spans = [get_best_span(ypi, yp2i) for ypi, yp2i in zip(yp, yp2)]
def _get(xi, span):
if len(xi) <= span[0][0]:
return [""]
if len(xi[span[0][0]]) <= span[1][1]:
return [""]
return xi[span[0][0]][span[0][1]:span[1][1]]
id2answer_dict = {id_: " ".join(_get(xi, span))
for id_, xi, span in zip(data_set.data['ids'], data_set.data['x'], spans)}
correct = [self.__class__.compare2(yi, span) for yi, span in zip(y, spans)]
f1s = [self.__class__.span_f1(yi, span) for yi, span in zip(y, spans)]
tensor_dict = dict(zip(self.tensor_dict.keys(), vals))
e = F1Evaluation(data_set.data_type, int(global_step), idxs, yp.tolist(), yp2.tolist(), y,
correct, float(loss), f1s, id2answer_dict, tensor_dict=tensor_dict)
return e
def _split_batch(self, batch):
return batch
def _get_feed_dict(self, batch):
return self.model.get_feed_dict(batch[1], False)
@staticmethod
def compare(yi, ypi, yp2i):
for start, stop in yi:
aypi = argmax(ypi)
mask = np.zeros(yp2i.shape)
mask[aypi[0], aypi[1]:] = np.ones([yp2i.shape[1] - aypi[1]])
if tuple(start) == aypi and (stop[0], stop[1]-1) == argmax(yp2i * mask):
return True
return False
@staticmethod
def compare2(yi, span):
for start, stop in yi:
if tuple(start) == span[0] and tuple(stop) == span[1]:
return True
return False
@staticmethod
def span_f1(yi, span):
max_f1 = 0
for start, stop in yi:
if start[0] == span[0][0]:
true_span = start[1], stop[1]
pred_span = span[0][1], span[1][1]
f1 = span_f1(true_span, pred_span)
max_f1 = max(f1, max_f1)
return max_f1
class MultiGPUF1Evaluator(F1Evaluator):
def __init__(self, config, models, tensor_dict=None):
super(MultiGPUF1Evaluator, self).__init__(config, models[0], tensor_dict=tensor_dict)
self.models = models
with tf.name_scope("eval_concat"):
N, M, JX = config.batch_size, config.max_num_sents, config.max_sent_size
self.yp = tf.concat(0, [padded_reshape(model.yp, [N, M, JX]) for model in models])
self.yp2 = tf.concat(0, [padded_reshape(model.yp2, [N, M, JX]) for model in models])
self.loss = tf.add_n([model.loss for model in models])/len(models)
def _split_batch(self, batches):
idxs_list, data_sets = zip(*batches)
idxs = sum(idxs_list, ())
data_set = sum(data_sets, data_sets[0].get_empty())
return idxs, data_set
def _get_feed_dict(self, batches):
feed_dict = {}
for model, (_, data_set) in zip(self.models, batches):
feed_dict.update(model.get_feed_dict(data_set, False))
return feed_dict
class MultiGPUCNNAccuracyEvaluator(CNNAccuracyEvaluator):
def __init__(self, config, models, tensor_dict=None):
super(MultiGPUCNNAccuracyEvaluator, self).__init__(config, models[0], tensor_dict=tensor_dict)
self.models = models
with tf.name_scope("eval_concat"):
N, M, JX = config.batch_size, config.max_num_sents, config.max_sent_size
self.yp = tf.concat(0, [padded_reshape(model.yp, [N, M, JX]) for model in models])
self.loss = tf.add_n([model.loss for model in models])/len(models)
def _split_batch(self, batches):
idxs_list, data_sets = zip(*batches)
idxs = sum(idxs_list, ())
data_set = sum(data_sets, data_sets[0].get_empty())
return idxs, data_set
def _get_feed_dict(self, batches):
feed_dict = {}
for model, (_, data_set) in zip(self.models, batches):
feed_dict.update(model.get_feed_dict(data_set, False))
return feed_dict
class ForwardEvaluator(Evaluator):
def __init__(self, config, model, tensor_dict=None):
super(ForwardEvaluator, self).__init__(config, model, tensor_dict=tensor_dict)
self.yp2 = model.yp2
self.loss = model.loss
def get_evaluation(self, sess, batch):
idxs, data_set = batch
assert isinstance(data_set, DataSet)
feed_dict = self.model.get_feed_dict(data_set, False)
global_step, yp, yp2, loss, vals = sess.run([self.global_step, self.yp, self.yp2, self.loss, list(self.tensor_dict.values())], feed_dict=feed_dict)
yp, yp2 = yp[:data_set.num_examples], yp2[:data_set.num_examples]
spans = [get_best_span(ypi, yp2i) for ypi, yp2i in zip(yp, yp2)]
def _get(xi, span):
if len(xi) <= span[0][0]:
return [""]
if len(xi[span[0][0]]) <= span[1][1]:
return [""]
return xi[span[0][0]][span[0][1]:span[1][1]]
id2answer_dict = {id_: " ".join(_get(xi, span))
for id_, xi, span in zip(data_set.data['ids'], data_set.data['x'], spans)}
tensor_dict = dict(zip(self.tensor_dict.keys(), vals))
e = ForwardEvaluation(data_set.data_type, int(global_step), idxs, yp.tolist(), yp2.tolist(), float(loss), id2answer_dict, tensor_dict=tensor_dict)
return e
@staticmethod
def compare(yi, ypi, yp2i):
for start, stop in yi:
aypi = argmax(ypi)
mask = np.zeros(yp2i.shape)
mask[aypi[0], aypi[1]:] = np.ones([yp2i.shape[1] - aypi[1]])
if tuple(start) == aypi and (stop[0], stop[1]-1) == argmax(yp2i * mask):
return True
return False
@staticmethod
def compare2(yi, span):
for start, stop in yi:
if tuple(start) == span[0] and tuple(stop) == span[1]:
return True
return False
@staticmethod
def span_f1(yi, span):
max_f1 = 0
for start, stop in yi:
if start[0] == span[0][0]:
true_span = start[1], stop[1]
pred_span = span[0][1], span[1][1]
f1 = span_f1(true_span, pred_span)
max_f1 = max(f1, max_f1)
return max_f1
def get_best_span(ypi, yp2i):
max_val = 0
best_word_span = (0, 1)
best_sent_idx = 0
for f, (ypif, yp2if) in enumerate(zip(ypi, yp2i)):
argmax_j1 = 0
for j in range(len(ypif)):
val1 = ypif[argmax_j1]
if val1 < ypif[j]:
val1 = ypif[j]
argmax_j1 = j
val2 = yp2if[j]
if val1 * val2 > max_val:
best_word_span = (argmax_j1, j)
best_sent_idx = f
max_val = val1 * val2
return (best_sent_idx, best_word_span[0]), (best_sent_idx, best_word_span[1] + 1)
def get_span_score_pairs(ypi, yp2i):
span_score_pairs = []
for f, (ypif, yp2if) in enumerate(zip(ypi, yp2i)):
for j in range(len(ypif)):
for k in range(j, len(yp2if)):
span = ((f, j), (f, k+1))
score = ypif[j] * yp2if[k]
span_score_pairs.append((span, score))
return span_score_pairs
```
|
```xml
<?xml version="1.0" encoding="UTF-8"?>
<TabbedPage xmlns="path_to_url"
xmlns:x="path_to_url"
xmlns:local="clr-namespace:Xamarin.Forms.Xaml.UnitTests"
x:Class="Xamarin.Forms.Xaml.UnitTests.Unreported001">
<NavigationPage Title="Test" x:Name="navpage">
<x:Arguments>
<local:U001Page />
</x:Arguments>
</NavigationPage>
</TabbedPage>
```
|
The Journal of Physics A: Mathematical and Theoretical is a peer-reviewed scientific journal published by IOP Publishing, the publishing branch of the Institute of Physics. It is part of the Journal of Physics series and covers theoretical physics focusing on sophisticated mathematical and computational techniques.
The journal is divided into six sections covering: statistical physics; chaotic and complex systems; mathematical physics; quantum mechanics and quantum information theory; classical and quantum field theory; fluid and plasma theory.
The editor in chief is Joseph A Minahan (Uppsala Universitet, Sweden). According to the Journal Citation Reports, the journal has a 2020 impact factor of 2.132.
History
Journal of Physics A was established in 1968 as one of the subdivisions of the earlier title, Proceedings of the Physical Society, established in 1874, the flagship journal of the Physical Society of London. The Physical Society later became the Institute of Physics, the current publisher of the journal. Its papers began being made available electronically in 1991; by 2002, its entire back archive had been digitised, as the first step in a larger project to digitise all of the Institute's publishing archives.
Indexing
The journal is indexed in:
Scopus
Inspec
Chemical Abstracts
GeoRef
INIS Atomindex
Astrophysics Data System
PASCAL
Referativny Zhurnal
Zentralblatt MATH
Science Citation Index and SciSearch
Current Contents/Physical, Chemical and Earth Sciences
See also
Journal of Physics: Condensed Matter
References
External links
Physics journals
Fluid dynamics journals
Academic journals established in 1968
IOP Publishing academic journals
English-language journals
Hybrid open access journals
|
```cmake
set(SUPPORTED_EMU_PLATFORMS renode)
set(RENODE_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/support/it8xxx2_evb.resc)
board_set_flasher_ifnset(misc-flasher)
board_finalize_runner_args(misc-flasher)
```
|
```shell
#!/bin/bash
PACKAGE=$1
VERSION=$2
PKGDIR=${PKGDIR:-.}
if [[ -z "$PACKAGE" || -z "$VERSION" ]]; then
echo "usage: $0 <package> <version>" >&2
exit 1
fi
if ! test -d $PACKAGE-$VERSION; then
echo "ERROR: not found: $PACKAGE-$VERSION"
fi
# source packages
tar cz $PACKAGE-$VERSION > $PKGDIR/$PACKAGE-$VERSION.tgz
# binary packages
for triple in darwin_x86_64 linux_x86_64; do
tar cz -C build/target/$PACKAGE-$VERSION-$triple/dist . \
> $PKGDIR/$PACKAGE-$VERSION-$triple.tgz
done
```
|
Elizabeth Washington may refer to:
Betty Washington Lewis (1733–1797), younger sister of George Washington
Elizabeth F. Washington (1871–1953), American portrait and landscape painter
|
```objective-c
/*
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkRRect_DEFINED
#define SkRRect_DEFINED
#include "SkRect.h"
#include "SkPoint.h"
class SkPath;
class SkMatrix;
// Path forward:
// core work
// add validate method (all radii positive, all radii sums < rect size, etc.)
// add contains(SkRect&) - for clip stack
// add contains(SkRRect&) - for clip stack
// add heart rect computation (max rect inside RR)
// add 9patch rect computation
// add growToInclude(SkPath&)
// analysis
// use growToInclude to fit skp round rects & generate stats (RRs vs. real paths)
// check on # of rectorus's the RRs could handle
// rendering work
// update SkPath.addRRect() to only use quads
// add GM and bench
// further out
// detect and triangulate RRectorii rather than falling back to SW in Ganesh
//
/** \class SkRRect
The SkRRect class represents a rounded rect with a potentially different
radii for each corner. It does not have a constructor so must be
initialized with one of the initialization functions (e.g., setEmpty,
setRectRadii, etc.)
This class is intended to roughly match CSS' border-*-*-radius capabilities.
This means:
If either of a corner's radii are 0 the corner will be square.
Negative radii are not allowed (they are clamped to zero).
If the corner curves overlap they will be proportionally reduced to fit.
*/
class SK_API SkRRect {
public:
/**
* Enum to capture the various possible subtypes of RR. Accessed
* by type(). The subtypes become progressively less restrictive.
*/
enum Type {
// !< The RR is empty
kEmpty_Type,
//!< The RR is actually a (non-empty) rect (i.e., at least one radius
//!< at each corner is zero)
kRect_Type,
//!< The RR is actually a (non-empty) oval (i.e., all x radii are equal
//!< and >= width/2 and all the y radii are equal and >= height/2
kOval_Type,
//!< The RR is non-empty and all the x radii are equal & all y radii
//!< are equal but it is not an oval (i.e., there are lines between
//!< the curves) nor a rect (i.e., both radii are non-zero)
kSimple_Type,
//!< The RR is non-empty and the two left x radii are equal, the two top
//!< y radii are equal, and the same for the right and bottom but it is
//!< neither an rect, oval, nor a simple RR. It is called "nine patch"
//!< because the centers of the corner ellipses form an axis aligned
//!< rect with edges that divide the RR into an 9 rectangular patches:
//!< an interior patch, four edge patches, and four corner patches.
kNinePatch_Type,
//!< A fully general (non-empty) RR. Some of the x and/or y radii are
//!< different from the others and there must be one corner where
//!< both radii are non-zero.
kComplex_Type,
};
/**
* Returns the RR's sub type.
*/
Type getType() const {
SkDEBUGCODE(this->validate();)
return static_cast<Type>(fType);
}
Type type() const { return this->getType(); }
inline bool isEmpty() const { return kEmpty_Type == this->getType(); }
inline bool isRect() const { return kRect_Type == this->getType(); }
inline bool isOval() const { return kOval_Type == this->getType(); }
inline bool isSimple() const { return kSimple_Type == this->getType(); }
inline bool isSimpleCircular() const {
return this->isSimple() && fRadii[0].fX == fRadii[0].fY;
}
inline bool isNinePatch() const { return kNinePatch_Type == this->getType(); }
inline bool isComplex() const { return kComplex_Type == this->getType(); }
bool allCornersCircular() const;
SkScalar width() const { return fRect.width(); }
SkScalar height() const { return fRect.height(); }
/**
* Set this RR to the empty rectangle (0,0,0,0) with 0 x & y radii.
*/
void setEmpty() {
fRect.setEmpty();
memset(fRadii, 0, sizeof(fRadii));
fType = kEmpty_Type;
SkDEBUGCODE(this->validate();)
}
/**
* Set this RR to match the supplied rect. All radii will be 0.
*/
void setRect(const SkRect& rect) {
if (rect.isEmpty()) {
this->setEmpty();
return;
}
fRect = rect;
memset(fRadii, 0, sizeof(fRadii));
fType = kRect_Type;
SkDEBUGCODE(this->validate();)
}
/**
* Set this RR to match the supplied oval. All x radii will equal half the
* width and all y radii will equal half the height.
*/
void setOval(const SkRect& oval) {
if (oval.isEmpty()) {
this->setEmpty();
return;
}
SkScalar xRad = SkScalarHalf(oval.width());
SkScalar yRad = SkScalarHalf(oval.height());
fRect = oval;
for (int i = 0; i < 4; ++i) {
fRadii[i].set(xRad, yRad);
}
fType = kOval_Type;
SkDEBUGCODE(this->validate();)
}
/**
* Initialize the RR with the same radii for all four corners.
*/
void setRectXY(const SkRect& rect, SkScalar xRad, SkScalar yRad);
/**
* Initialize the rr with one radius per-side.
*/
void setNinePatch(const SkRect& rect, SkScalar leftRad, SkScalar topRad,
SkScalar rightRad, SkScalar bottomRad);
/**
* Initialize the RR with potentially different radii for all four corners.
*/
void setRectRadii(const SkRect& rect, const SkVector radii[4]);
// The radii are stored in UL, UR, LR, LL order.
enum Corner {
kUpperLeft_Corner,
kUpperRight_Corner,
kLowerRight_Corner,
kLowerLeft_Corner
};
const SkRect& rect() const { return fRect; }
const SkVector& radii(Corner corner) const { return fRadii[corner]; }
const SkRect& getBounds() const { return fRect; }
/**
* When a rrect is simple, all of its radii are equal. This returns one
* of those radii. This call requires the rrect to be non-complex.
*/
const SkVector& getSimpleRadii() const {
SkASSERT(!this->isComplex());
return fRadii[0];
}
friend bool operator==(const SkRRect& a, const SkRRect& b) {
return a.fRect == b.fRect &&
SkScalarsEqual(a.fRadii[0].asScalars(),
b.fRadii[0].asScalars(), 8);
}
friend bool operator!=(const SkRRect& a, const SkRRect& b) {
return a.fRect != b.fRect ||
!SkScalarsEqual(a.fRadii[0].asScalars(),
b.fRadii[0].asScalars(), 8);
}
/**
* Call inset on the bounds, and adjust the radii to reflect what happens
* in stroking: If the corner is sharp (no curvature), leave it alone,
* otherwise we grow/shrink the radii by the amount of the inset. If a
* given radius becomes negative, it is pinned to 0.
*
* It is valid for dst == this.
*/
void inset(SkScalar dx, SkScalar dy, SkRRect* dst) const;
void inset(SkScalar dx, SkScalar dy) {
this->inset(dx, dy, this);
}
/**
* Call outset on the bounds, and adjust the radii to reflect what happens
* in stroking: If the corner is sharp (no curvature), leave it alone,
* otherwise we grow/shrink the radii by the amount of the inset. If a
* given radius becomes negative, it is pinned to 0.
*
* It is valid for dst == this.
*/
void outset(SkScalar dx, SkScalar dy, SkRRect* dst) const {
this->inset(-dx, -dy, dst);
}
void outset(SkScalar dx, SkScalar dy) {
this->inset(-dx, -dy, this);
}
/**
* Translate the rrect by (dx, dy).
*/
void offset(SkScalar dx, SkScalar dy) {
fRect.offset(dx, dy);
}
/**
* Returns true if 'rect' is wholy inside the RR, and both
* are not empty.
*/
bool contains(const SkRect& rect) const;
SkDEBUGCODE(void validate() const;)
enum {
kSizeInMemory = 12 * sizeof(SkScalar)
};
/**
* Write the rrect into the specified buffer. This is guaranteed to always
* write kSizeInMemory bytes, and that value is guaranteed to always be
* a multiple of 4. Return kSizeInMemory.
*/
size_t writeToMemory(void* buffer) const;
/**
* Reads the rrect from the specified buffer
*
* If the specified buffer is large enough, this will read kSizeInMemory bytes,
* and that value is guaranteed to always be a multiple of 4.
*
* @param buffer Memory to read from
* @param length Amount of memory available in the buffer
* @return number of bytes read (must be a multiple of 4) or
* 0 if there was not enough memory available
*/
size_t readFromMemory(const void* buffer, size_t length);
/**
* Transform by the specified matrix, and put the result in dst.
*
* @param matrix SkMatrix specifying the transform. Must only contain
* scale and/or translate, or this call will fail.
* @param dst SkRRect to store the result. It is an error to use this,
* which would make this function no longer const.
* @return true on success, false on failure. If false, dst is unmodified.
*/
bool transform(const SkMatrix& matrix, SkRRect* dst) const;
void dump(bool asHex) const;
void dump() const { this->dump(false); }
void dumpHex() const { this->dump(true); }
private:
SkRect fRect;
// Radii order is UL, UR, LR, LL. Use Corner enum to index into fRadii[]
SkVector fRadii[4];
// use an explicitly sized type so we're sure the class is dense (no uninitialized bytes)
int32_t fType;
// TODO: add padding so we can use memcpy for flattening and not copy
// uninitialized data
void computeType();
bool checkCornerContainment(SkScalar x, SkScalar y) const;
// to access fRadii directly
friend class SkPath;
};
#endif
```
|
```smalltalk
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Threading;
using osu.Framework.Platform.Windows.Native;
namespace osu.Framework.Timing
{
/// <summary>
/// A FrameClock which will limit the number of frames processed by adding Thread.Sleep calls on each ProcessFrame.
/// </summary>
public class ThrottledFrameClock : FramedClock, IDisposable
{
/// <summary>
/// The target number of updates per second. Only used when <see cref="Throttling"/> is <c>true</c>.
/// </summary>
/// <remarks>
/// A value of 0 is treated the same as "unlimited" or <see cref="double.MaxValue"/>.
/// </remarks>
public double MaximumUpdateHz = 1000.0;
/// <summary>
/// Whether throttling should be enabled. Defaults to <c>true</c>.
/// </summary>
public bool Throttling = true;
/// <summary>
/// The time spent in a Thread.Sleep state during the last frame.
/// </summary>
public double TimeSlept { get; private set; }
private IntPtr waitableTimer;
internal ThrottledFrameClock()
{
if (RuntimeInfo.OS == RuntimeInfo.Platform.Windows) createWaitableTimer();
}
public override void ProcessFrame()
{
Debug.Assert(MaximumUpdateHz >= 0);
base.ProcessFrame();
if (Throttling)
{
if (MaximumUpdateHz > 0 && MaximumUpdateHz < double.MaxValue)
{
throttle();
}
else
{
// Even when running at unlimited frame-rate, we should call the scheduler
// to give lower-priority background processes a chance to do work.
TimeSlept = sleepAndUpdateCurrent(0);
}
}
else
{
TimeSlept = 0;
}
Debug.Assert(TimeSlept <= ElapsedFrameTime);
}
private double accumulatedSleepError;
private void throttle()
{
double excessFrameTime = 1000d / MaximumUpdateHz - ElapsedFrameTime;
TimeSlept = sleepAndUpdateCurrent(Math.Max(0, excessFrameTime + accumulatedSleepError));
accumulatedSleepError += excessFrameTime - TimeSlept;
// Never allow the sleep error to become too negative and induce too many catch-up frames
accumulatedSleepError = Math.Max(-1000 / 30.0, accumulatedSleepError);
}
private double sleepAndUpdateCurrent(double milliseconds)
{
// By returning here, in cases where the game is not keeping up, we don't yield.
// Not 100% sure if we want to do this, but let's give it a try.
if (milliseconds <= 0)
return 0;
double before = CurrentTime;
TimeSpan timeSpan = TimeSpan.FromMilliseconds(milliseconds);
if (!waitWaitableTimer(timeSpan))
Thread.Sleep(timeSpan);
return (CurrentTime = SourceTime) - before;
}
public void Dispose()
{
if (waitableTimer != IntPtr.Zero)
Execution.CloseHandle(waitableTimer);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private bool waitWaitableTimer(TimeSpan timeSpan)
{
if (waitableTimer == IntPtr.Zero) return false;
// Not sure if we want to fall back to Thread.Sleep on failure here, needs further investigation.
if (Execution.SetWaitableTimerEx(waitableTimer, Execution.CreateFileTime(timeSpan), 0, null, default, IntPtr.Zero, 0))
{
Execution.WaitForSingleObject(waitableTimer, Execution.INFINITE);
return true;
}
return false;
}
private void createWaitableTimer()
{
try
{
// Attempt to use CREATE_WAITABLE_TIMER_HIGH_RESOLUTION, only available since Windows 10, version 1803.
waitableTimer = Execution.CreateWaitableTimerEx(IntPtr.Zero, null,
Execution.CreateWaitableTimerFlags.CREATE_WAITABLE_TIMER_MANUAL_RESET | Execution.CreateWaitableTimerFlags.CREATE_WAITABLE_TIMER_HIGH_RESOLUTION, Execution.TIMER_ALL_ACCESS);
if (waitableTimer == IntPtr.Zero)
{
// Fall back to a more supported version. This is still far more accurate than Thread.Sleep.
waitableTimer = Execution.CreateWaitableTimerEx(IntPtr.Zero, null, Execution.CreateWaitableTimerFlags.CREATE_WAITABLE_TIMER_MANUAL_RESET, Execution.TIMER_ALL_ACCESS);
}
}
catch
{
// Any kind of unexpected exception should fall back to Thread.Sleep.
}
}
}
}
```
|
The last event of the women's alpine skiing, the giant slalom, took place on Friday, 24 February. Kostelić was a favourite once again, as she was defending Olympic champion, but Swede Anja Pärson led the World Cup and was defending World Champion of the event. Kostelić was second in the World Cup standing, however, while Austrian Kathrin Zettel was third.
Results
Complete results from the women's Giant slalom event at the 2006 Winter Olympics.
References
External links
Official Olympic Report
Giant slalom
|
"Hello Afrika" is a 1990 song recorded by Sweden-based musician and producer Dr Alban. It was released as the debut single from his first album with the same name (1990). It features Swedish Eurodance singer Leila K. The song is similar to Eddy Grant's "Hello Africa", but in the style of hip hop. It peaked at number one in Austria and achieved a great success in most of the other European countries, including Sweden, Germany and Switzerland.
Dr. Alban has stated that "Hello Afrika" took about two months to record. In the 2017 book Stars of 90's Dance Pop: 29 Hitmakers Discuss Their Careers by James Arena, he told about meeting Denniz PoP and of the making of the song, "We met through the DJ channels, as he was working as one at the same time I was. We just started working together on "Hello Afrika", and it all came together. We had a good chemistry, and we just thought, "Come on, let's go in the studio and see what we can do." It was hard to get the song initially released, but the thing is that other DJs (who we gave it to before we had a record deal) played the track and liked it. That built demand for it in the clubs, and then it started to hit radio. That later paved the way for our deal with [Logic and Ariola Records]."
It has been covered by South African group Dr Victor and the Rasta Rebels. It was covered by Grup Raptiye as "Hello Malatya" at the 1991 album, Doping, and by Grup Vitamin as "Hamiyet" at "Bol Vitamin" one in 1990 and "Deli Dolu Best Of 1" in 1996.
Critical reception
In his review of the Hello Afrika album, Larry Flick from Billboard commented, "Equally strong are the title track, a prideful tribal ode that features a nifty guest appearance by Leila K." A reviewer from Music & Media wrote, "Pounding, tribal drums dominate this poppy rap for African unity." The magazine also called it "an great African house track, hailing from Sweden." They added, "This mixture of African tribal rhythms, Jamaican toasting and western house technology is already very big in Scandinavian and German clubs. The rest of Europe will doubtlessly follow." British magazine Music Week described it as a "Prince Buster influenced tuggingly rolling ragga rap".
Music video
The accompanying music video for "Hello Afrika" was directed by Scottish director Paul Boyd. It received heavy rotation on MTV Europe. Boyd would also go on directing the video for Alban's next single, "No Coke".
Track listings
7" single
"Hello Afrika" (Marc Spoon's radio edit) — 3:46
"Hello Afrika" (single mix) — 3:13
CD single
"Hello Afrika" (Marc Spoon's radio edit) — 3:46
"Hello Afrika" (single mix) — 3:13
CD maxi
"Hello Afrika" (fast blast club mix) — 5:40
"Hello Afrika" (aaahfrika mix) — 6:25
"Jungle Beats" (gurana mix) — 4:28
"Hello Afrika" (single mix) — 3:13
CD maxi/12" maxi single - Remix
"Hello Afrika" (tech-makossa-mix) — 7:42
"Hello Afrika" (freedom for bleeb & bass mix) — 6:30
"No Coke" (hip hop reggae in a dance hall style) — 4:40
Charts and certifications
Weekly charts
Year-end charts
Certifications
See also
List of number-one hits of 1991 (Austria)
References
1990 debut singles
1990 songs
Dr. Alban songs
English-language Swedish songs
Leila K songs
Music videos directed by Paul Boyd
Number-one singles in Austria
Reggae fusion songs
Song recordings produced by Denniz Pop
Songs written by Denniz Pop
Songs written by Dr. Alban
Songs written by Leila K
|
```c++
//===-- OptionValueFormat.cpp ---------------------------------------------===//
//
// See path_to_url for license information.
//
//===your_sha256_hash------===//
#include "lldb/Interpreter/OptionValueFormat.h"
#include "lldb/DataFormatters/FormatManager.h"
#include "lldb/Interpreter/OptionArgParser.h"
#include "lldb/Utility/Stream.h"
using namespace lldb;
using namespace lldb_private;
void OptionValueFormat::DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
uint32_t dump_mask) {
if (dump_mask & eDumpOptionType)
strm.Printf("(%s)", GetTypeAsCString());
if (dump_mask & eDumpOptionValue) {
if (dump_mask & eDumpOptionType)
strm.PutCString(" = ");
strm.PutCString(FormatManager::GetFormatAsCString(m_current_value));
}
}
llvm::json::Value OptionValueFormat::ToJSON(const ExecutionContext *exe_ctx) {
return FormatManager::GetFormatAsCString(m_current_value);
}
Status OptionValueFormat::SetValueFromString(llvm::StringRef value,
VarSetOperationType op) {
Status error;
switch (op) {
case eVarSetOperationClear:
Clear();
NotifyValueChanged();
break;
case eVarSetOperationReplace:
case eVarSetOperationAssign: {
Format new_format;
error = OptionArgParser::ToFormat(value.str().c_str(), new_format, nullptr);
if (error.Success()) {
m_value_was_set = true;
m_current_value = new_format;
NotifyValueChanged();
}
} break;
case eVarSetOperationInsertBefore:
case eVarSetOperationInsertAfter:
case eVarSetOperationRemove:
case eVarSetOperationAppend:
case eVarSetOperationInvalid:
error = OptionValue::SetValueFromString(value, op);
break;
}
return error;
}
```
|
```c++
// accompanying file LICENSE_1_0.txt or copy at
// path_to_url
#ifndef RETURN_INTERNAL_REFERENCE_DWA2002131_HPP
# define RETURN_INTERNAL_REFERENCE_DWA2002131_HPP
# include <boost/python/detail/prefix.hpp>
# include <boost/python/default_call_policies.hpp>
# include <boost/python/reference_existing_object.hpp>
# include <boost/python/with_custodian_and_ward.hpp>
# include <boost/mpl/if.hpp>
namespace boost { namespace python {
namespace detail
{
template <std::size_t>
struct return_internal_reference_owner_arg_must_be_greater_than_zero
# if defined(__GNUC__) || defined(__EDG__)
{}
# endif
;
}
template <std::size_t owner_arg = 1, class BasePolicy_ = default_call_policies>
struct return_internal_reference
: with_custodian_and_ward_postcall<0, owner_arg, BasePolicy_>
{
private:
BOOST_STATIC_CONSTANT(bool, legal = owner_arg > 0);
public:
typedef typename mpl::if_c<
legal
, reference_existing_object
, detail::return_internal_reference_owner_arg_must_be_greater_than_zero<owner_arg>
>::type result_converter;
};
}} // namespace boost::python
#endif // RETURN_INTERNAL_REFERENCE_DWA2002131_HPP
```
|
TERA-10 is a supercomputer built by Bull SA for the French Commissariat à l'Énergie Atomique, (Atomic Energy Commission).
TERA-10 was ranked 142nd on the TOP500 list in 2010. By 2015 it had dropped off the bottom of the list. It runs at 52.84 teraFLOPs (52.84 trillion floating-point calculations per second) using nearly 10,000 processor cores (in about 4800 dual-core processors). It runs the Linux operating system, with an SMP kernel specially modified to handle very large symmetric clusters currently cadenced by an 8-processors central system.
Its main application is the simulation of atomic experiences and the maintenance of the French nuclear defence force, using the results of true nuclear tests (between 1956 and 1995, most of them in the French Nuclear Test Plant in the Pacific) and the new results obtained from the LMJ (Laser Mega-Joule) built in continental France.
Evolution
This is the end of a second generation of evolutions, the next generation Tera-100 reached about 1 petaFLOPS using processors with more internal cores and a new central scheduling system allowing asymmetric operation on a variable number of processors, for easier upgrades, lower maintenance cost, and more experiences requiring different computing scales, without having to rebuild the whole cluster.
Supercomputing in Europe
Supercomputers
|
```javascript
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
$provide.value("$locale", {
"DATETIME_FORMATS": {
"AMPMS": [
"\u4e0a\u5348",
"\u4e0b\u5348"
],
"DAY": [
"\u661f\u671f\u65e5",
"\u661f\u671f\u4e00",
"\u661f\u671f\u4e8c",
"\u661f\u671f\u4e09",
"\u661f\u671f\u56db",
"\u661f\u671f\u4e94",
"\u661f\u671f\u516d"
],
"MONTH": [
"\u4e00\u6708",
"\u4e8c\u6708",
"\u4e09\u6708",
"\u56db\u6708",
"\u4e94\u6708",
"\u516d\u6708",
"\u4e03\u6708",
"\u516b\u6708",
"\u4e5d\u6708",
"\u5341\u6708",
"\u5341\u4e00\u6708",
"\u5341\u4e8c\u6708"
],
"SHORTDAY": [
"\u5468\u65e5",
"\u5468\u4e00",
"\u5468\u4e8c",
"\u5468\u4e09",
"\u5468\u56db",
"\u5468\u4e94",
"\u5468\u516d"
],
"SHORTMONTH": [
"1\u6708",
"2\u6708",
"3\u6708",
"4\u6708",
"5\u6708",
"6\u6708",
"7\u6708",
"8\u6708",
"9\u6708",
"10\u6708",
"11\u6708",
"12\u6708"
],
"fullDate": "y\u5e74M\u6708d\u65e5EEEE",
"longDate": "y\u5e74M\u6708d\u65e5",
"medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss",
"mediumDate": "y\u5e74M\u6708d\u65e5",
"mediumTime": "ah:mm:ss",
"short": "yy/M/d ah:mm",
"shortDate": "yy/M/d",
"shortTime": "ah:mm"
},
"NUMBER_FORMATS": {
"CURRENCY_SYM": "\u00a5",
"DECIMAL_SEP": ".",
"GROUP_SEP": ",",
"PATTERNS": [
{
"gSize": 3,
"lgSize": 3,
"macFrac": 0,
"maxFrac": 3,
"minFrac": 0,
"minInt": 1,
"negPre": "-",
"negSuf": "",
"posPre": "",
"posSuf": ""
},
{
"gSize": 3,
"lgSize": 3,
"macFrac": 0,
"maxFrac": 2,
"minFrac": 2,
"minInt": 1,
"negPre": "\u00a4\u00a0-",
"negSuf": "",
"posPre": "\u00a4\u00a0",
"posSuf": ""
}
]
},
"id": "zh-hans-cn",
"pluralCat": function (n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
});
}]);
```
|
Shoe is an American comic strip about a motley crew of newspapermen, all of whom are birds. It was written and drawn by its creator, cartoonist Jeff MacNelly, from September 13, 1977, until his death in 2000. MacNelly's last strip was dated July 9, 2000; it has since been continued by Chris Cassatt, Gary Brookins, Ben Lansing, and Susie MacNelly (Jeff's widow).
While not politically oriented in the style of strips such as Doonesbury, Shoe often pokes fun at various social and political issues of the day (especially when Senator Batson D. Belfry makes an appearance). Although not particularly well known outside the U.S., Shoe was in fact granted its own monthly comic book in Norway for a brief time in 1987 under the name "Sjur," which consisted of reprints from newspapers. The magazine reached a total of six publications. Later on, in 1989, Shoe did a brief comeback to Norwegian readers, this time under the name "Krax," appearing as an extra-feature in the then brand-new Calvin & Hobbes magazine.
The strip won MacNelly the National Cartoonists Society's Reuben Award for the year 1979.
Characters and setting
Shoe deals with the day-to-day foibles of a group of newspaper employees and their families, all of whom are portrayed as anthropomorphized birds, in the fictional locale of Treetops, East Virginia. During hunting season, "hunting dogs" (hounds with rifles, a visual pun on the sharp-sniffing canines that hunters use to track game) are occasionally featured.
Collections and reprints
(All titles by Jeff MacNelly)
The Very First Shoe Book (1978) Avon
The Other Shoe (1980) Avon
Shoe Extra (1980) Yaffa Publishing (Australia)
The New Shoe (1981) Avon
On with the Shoe! (1982) Holt, Rinehart & Winston
A Shoe for All Seasons (1983) HRW
The Shoe Must Go On (1984) HRW
The Greatest Shoe on Earth (1985) HRW
One Shoe Fits All (1986) HRW
How Many Next Years Do You Get in Baseball?: Shoe Goes to Wrigley Field (1988) Bonus Books
Too Old for Summer Camp and Too Young to Retire (1988) St. Martin's Press
A Cigar Means Never Having to Say You're Sorry (1989) St. Martin's Press
Shake the Hand, Bite the Taco (1990) St. Martin's Press
Apply a Little Hardware to the Software (1991) Quark Prods.
The Athletic Shoe (1991) St. Martin's Press
Out to Lunch: A Brand New Shoe (1993) Tribune Publishing
New Shoes (1994) Contemporary Books
Play Ball! All I Ever Learned I Forgot by the Third Inning (1999) Triumph
From Couch Potato to Mouse Potato: Success Tips for the Technically Impaired (1978) Triumph
27 Years of Shoe: World Ends at Ten, Details at Eleven (2004) Andrews McMeel
References
External links
Shoe at Don Markstein's Toonopedia. Archived from the original on June 3, 2017.
American comic strips
Gag-a-day comics
Satirical comics
1977 comics debuts
Comics about birds
Comic strips formerly syndicated by Tribune Content Agency
|
```python
# path_to_url
"""
Circular convolution, also known as cyclic convolution,
is a special case of periodic convolution, which is the convolution of two
periodic functions that have the same period. Periodic convolution arises,
for example, in the context of the discrete-time Fourier transform (DTFT).
In particular, the DTFT of the product of two discrete sequences is the periodic
convolution of the DTFTs of the individual sequences. And each DTFT is a periodic
summation of a continuous Fourier transform function.
Source: path_to_url
"""
import doctest
from collections import deque
import numpy as np
class CircularConvolution:
"""
This class stores the first and second signal and performs the circular convolution
"""
def __init__(self) -> None:
"""
First signal and second signal are stored as 1-D array
"""
self.first_signal = [2, 1, 2, -1]
self.second_signal = [1, 2, 3, 4]
def circular_convolution(self) -> list[float]:
"""
This function performs the circular convolution of the first and second signal
using matrix method
Usage:
>>> convolution = CircularConvolution()
>>> convolution.circular_convolution()
[10, 10, 6, 14]
>>> convolution.first_signal = [0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6]
>>> convolution.second_signal = [0.1, 0.3, 0.5, 0.7, 0.9, 1.1, 1.3, 1.5]
>>> convolution.circular_convolution()
[5.2, 6.0, 6.48, 6.64, 6.48, 6.0, 5.2, 4.08]
>>> convolution.first_signal = [-1, 1, 2, -2]
>>> convolution.second_signal = [0.5, 1, -1, 2, 0.75]
>>> convolution.circular_convolution()
[6.25, -3.0, 1.5, -2.0, -2.75]
>>> convolution.first_signal = [1, -1, 2, 3, -1]
>>> convolution.second_signal = [1, 2, 3]
>>> convolution.circular_convolution()
[8, -2, 3, 4, 11]
"""
length_first_signal = len(self.first_signal)
length_second_signal = len(self.second_signal)
max_length = max(length_first_signal, length_second_signal)
# create a zero matrix of max_length x max_length
matrix = [[0] * max_length for i in range(max_length)]
# fills the smaller signal with zeros to make both signals of same length
if length_first_signal < length_second_signal:
self.first_signal += [0] * (max_length - length_first_signal)
elif length_first_signal > length_second_signal:
self.second_signal += [0] * (max_length - length_second_signal)
"""
Fills the matrix in the following way assuming 'x' is the signal of length 4
[
[x[0], x[3], x[2], x[1]],
[x[1], x[0], x[3], x[2]],
[x[2], x[1], x[0], x[3]],
[x[3], x[2], x[1], x[0]]
]
"""
for i in range(max_length):
rotated_signal = deque(self.second_signal)
rotated_signal.rotate(i)
for j, item in enumerate(rotated_signal):
matrix[i][j] += item
# multiply the matrix with the first signal
final_signal = np.matmul(np.transpose(matrix), np.transpose(self.first_signal))
# rounding-off to two decimal places
return [round(i, 2) for i in final_signal]
if __name__ == "__main__":
doctest.testmod()
```
|
Route 63 is a state highway in Massachusetts, United States, running from Route 116 in Amherst north to the New Hampshire state line in Northfield, where it continues as New Hampshire Route 63. Along the way it intersects several major highways including Route 2 in Erving and Route 10 in Northfield.
Route description
Route 63 begins at Route 116 at the north end of the UMass Amherst campus. It heads eastward for a third of a mile before turning onto Sunderland Road (the old alignment of Route 116) for fifty yards, before turning onto Montague Road. Montague Road passes through the western side of the town of Leverett, crossing the New England Central Railroad tracks before entering Sunderland for a short distance, crossing the tracks again before entering Montague. It meets the northern end of Route 47 south of Montague Center before passing Lake Pleasant and crossing the tracks twice more before crossing the Millers River at Millers Falls, entering the town of Erving.
In Erving, Route 63 passes under Route 2 (the Mohawk Trail) without direct access between the two. Signage on both roads directs traffic along Prospect Street (signed as "To 2 East" and "To 63 South") and along Forest Street (signed as "To 2 East" and "To 63 North"). Route 63 then heads north into Northfield, passing Northfield Mountain. It joins Route 10 (just east of Bennett's Meadow Bridge over the Connecticut River) for just under , before splitting just south of the New Hampshire state line. It shortly turns northwestward before entering the town of Hinsdale and becoming New Hampshire Route 63.
History
Route 63 was defined by 1929, running from Route 116 in Sunderland north along current Route 47 into Montague, and then along Sunderland Road, Turners Falls Road and Montague Road towards Turners Falls. South of Turners Falls, it turned east and merged with Route 2 (later Route 2A), which it took to Millers Falls. There it turned north onto its present alignment, ending at Route 10 in Northfield.
Ca. 1939, Route 63 was extended south from Sunderland along present Route 47, ending at Route 116 in South Hadley. Around the same time, it was shifted to its current alignment from south of Montague center (where Route 47 now cuts over to Route 63) north to Millers Falls. Finally, also around 1939, New Hampshire Route 10 was shifted onto a shorter route near the state line, resulting in a different crossing of the state line. The former Route 10 became New Hampshire Route 63, and Route 63 was extended north concurrent with Route 10, splitting near the state line along old Route 10.
In the late 1940s, Route 63 was shifted east from south of Montague center south to a new terminus at Route 116 in Amherst; the old route became Route 47. Finally, a new alignment of Route 116 west of Amherst center was built in 1958, and Route 63 was extended slightly west at its south end to the bypass.
Major intersections
References
063
|
```python
#
#
# path_to_url
#
# Unless required by applicable law or agreed to in writing, software
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
import os
import tempfile
import unittest
import numpy as np
from get_gpt_model import FakeDataset, create_data_holder, generate_model
import paddle
from paddle.distributed.fleet import auto
paddle.enable_static()
def apply_pass():
dist_strategy = auto.Strategy()
dist_strategy.auto_mode = "semi"
amp = dist_strategy.amp
amp.enable = True
amp.dtype = "float16"
amp.level = "o2"
amp.custom_white_list = ["lookup_table", "lookup_table_v2"]
amp.custom_black_list = [
"reduce_sum",
"c_softmax_with_cross_entropy",
"elementwise_div",
]
amp.init_loss_scaling = 32768
qat = dist_strategy.qat
qat.enable = True
qat.channel_wise_abs_max = True
qat.weight_bits = 8
qat.activation_bits = 8
qat.not_quant_pattern = ['skip_quant']
qat.onnx_format = True
return dist_strategy
class TestQuantizationPassTrain(unittest.TestCase):
def test_qat_pass_training(self):
batch_size = 1
batch_num = 10
strategy = apply_pass()
model, loss = generate_model("mp")
opt = paddle.optimizer.AdamW(learning_rate=0.00001)
engine = auto.Engine(model, loss, opt, strategy=strategy)
dataset = FakeDataset(batch_size * batch_num)
engine.fit(dataset, 3, batch_size=batch_size)
self.check_program(engine.main_program)
def check_program(self, program):
quantizable_op_and_inputs = {'matmul_v2': ['X', 'Y']}
quantizable_grad_op_inputs = {'matmul_v2_grad': ['X', 'Y']}
quantized_ops = set()
for block in program.blocks:
for idx, op in enumerate(block.ops):
is_quantized = False
if op.type in quantizable_op_and_inputs:
for arg_name in op.input_arg_names:
if ".quantized" in arg_name:
is_quantized = True
if not is_quantized:
continue
# check forward
if op.type in quantizable_op_and_inputs:
for arg_name in op.input_arg_names:
if "c_identity" in arg_name:
arg_name = block.ops[idx - 1].input_arg_names[0]
assert arg_name.endswith('.quantized.dequantized')
quantized_ops.add(arg_name)
for op in block.ops:
is_quantized = False
if op.type in quantizable_grad_op_inputs:
for pname in quantizable_grad_op_inputs[op.type]:
arg_name = op.input(pname)[0]
if ".quantized" in arg_name:
is_quantized = True
if not is_quantized:
continue
# check backward
if op.type in quantizable_grad_op_inputs:
for pname in quantizable_grad_op_inputs[op.type]:
arg_name = op.input(pname)[0]
assert arg_name.endswith('.quantized.dequantized')
assert arg_name in quantized_ops
class TestQuantizationPassExport(unittest.TestCase):
def setUp(self):
self.temp_dir = tempfile.TemporaryDirectory()
def tearDown(self):
self.temp_dir.cleanup()
def test_qat_pass_2(self):
strategy = apply_pass()
model, loss = generate_model("mp")
engine = auto.Engine(model, loss, strategy=strategy)
inputs_spec, labels_spec = create_data_holder(batch_size=1)
engine.prepare(inputs_spec, labels_spec, mode="predict")
path = os.path.join(self.temp_dir.name, 'inf')
engine.save(path, training=False)
self.check_export(engine._executor)
def check_export(self, exe):
sequence_len = 512
vocab_size = 1000
tokens = [np.random.randint(vocab_size, size=sequence_len)]
position_ids = [np.arange(sequence_len)]
attention_mask = [np.tril(np.ones(sequence_len))]
path_prefix = os.path.join(
self.temp_dir.name,
f'inf_dist{paddle.distributed.get_rank()}',
)
[
inference_program,
feed_target_names,
fetch_targets,
] = paddle.static.load_inference_model(
path_prefix=path_prefix, executor=exe
)
out = exe.run(
inference_program,
feed={
"tokens": tokens,
"position_ids": position_ids,
"attention_mask": attention_mask,
},
fetch_list=fetch_targets,
)
if __name__ == "__main__":
unittest.main()
```
|
```javascript
Async and defer scripts
Modify a website's URL
Navigation Timing API
Blobs
Network Information API
```
|
```xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="path_to_url">
<solid android:color="#70000000"/>
<corners android:radius="4dp"/>
</shape>
```
|
The 1978 World Rally Championship was the sixth season of the Fédération Internationale de l'Automobile (FIA) World Rally Championship (WRC). The schedule remained largely similar to the previous year, with the exception of the removal of the Rally New Zealand from the schedule.
1978 was the last season with an official world championship only for manufacturers. Scoring was modified in 1977 to a more complex system including points both for overall and group placement. A car would still have to place in the overall top 10 to score points. In addition to the Championship for Manufacturers, the FIA awarded the FIA Cup for Rally Drivers. All rallies of the WRC, in addition to another ten events, were counted towards the drivers' totals. In 1979, the Cup for Drivers was incorporated into the WRC as the World Rally Championship for Drivers.
Events
Map
Schedule and results
Standings
Manufacturers' championship
FIA Cup for Drivers
Pointscoring systems
Manufacturers' championship
See also
1978 in sports
External links
FIA World Rally Championship 1978 at ewrc-results.com
World Rally Championship
World Rally Championship seasons
|
```php
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* (at your option) any later version.
*
* @author PocketMine Team
* @link path_to_url
*
*
*/
declare(strict_types=1);
namespace pocketmine\data\bedrock\block\upgrade;
use pocketmine\data\bedrock\block\upgrade\model\BlockStateUpgradeSchemaModel;
use pocketmine\data\bedrock\block\upgrade\model\BlockStateUpgradeSchemaModelBlockRemap;
use pocketmine\data\bedrock\block\upgrade\model\BlockStateUpgradeSchemaModelFlattenedName;
use pocketmine\data\bedrock\block\upgrade\model\BlockStateUpgradeSchemaModelTag;
use pocketmine\data\bedrock\block\upgrade\model\BlockStateUpgradeSchemaModelValueRemap;
use pocketmine\nbt\tag\ByteTag;
use pocketmine\nbt\tag\IntTag;
use pocketmine\nbt\tag\StringTag;
use pocketmine\nbt\tag\Tag;
use pocketmine\utils\Filesystem;
use pocketmine\utils\Utils;
use Symfony\Component\Filesystem\Path;
use function array_key_last;
use function array_map;
use function array_values;
use function assert;
use function count;
use function get_debug_type;
use function gettype;
use function implode;
use function is_object;
use function is_string;
use function json_decode;
use function json_encode;
use function ksort;
use function sort;
use function str_pad;
use function strval;
use function usort;
use const JSON_THROW_ON_ERROR;
use const SORT_NUMERIC;
use const STR_PAD_LEFT;
final class BlockStateUpgradeSchemaUtils{
public static function describe(BlockStateUpgradeSchema $schema) : string{
$lines = [];
$lines[] = "Renames:";
foreach($schema->renamedIds as $rename){
$lines[] = "- $rename";
}
$lines[] = "Added properties:";
foreach(Utils::stringifyKeys($schema->addedProperties) as $blockName => $tags){
foreach(Utils::stringifyKeys($tags) as $k => $v){
$lines[] = "- $blockName has $k added: $v";
}
}
$lines[] = "Removed properties:";
foreach(Utils::stringifyKeys($schema->removedProperties) as $blockName => $tagNames){
foreach($tagNames as $tagName){
$lines[] = "- $blockName has $tagName removed";
}
}
$lines[] = "Renamed properties:";
foreach(Utils::stringifyKeys($schema->renamedProperties) as $blockName => $tagNames){
foreach(Utils::stringifyKeys($tagNames) as $oldTagName => $newTagName){
$lines[] = "- $blockName has $oldTagName renamed to $newTagName";
}
}
$lines[] = "Remapped property values:";
foreach(Utils::stringifyKeys($schema->remappedPropertyValues) as $blockName => $remaps){
foreach(Utils::stringifyKeys($remaps) as $tagName => $oldNewList){
foreach($oldNewList as $oldNew){
$lines[] = "- $blockName has $tagName value changed from $oldNew->old to $oldNew->new";
}
}
}
return implode("\n", $lines);
}
public static function tagToJsonModel(Tag $tag) : BlockStateUpgradeSchemaModelTag{
$model = new BlockStateUpgradeSchemaModelTag();
if($tag instanceof IntTag){
$model->int = $tag->getValue();
}elseif($tag instanceof StringTag){
$model->string = $tag->getValue();
}elseif($tag instanceof ByteTag){
$model->byte = $tag->getValue();
}else{
throw new \UnexpectedValueException("Unexpected value type " . get_debug_type($tag));
}
return $model;
}
private static function jsonModelToTag(BlockStateUpgradeSchemaModelTag $model) : Tag{
return match(true){
isset($model->byte) && !isset($model->int) && !isset($model->string) => new ByteTag($model->byte),
!isset($model->byte) && isset($model->int) && !isset($model->string) => new IntTag($model->int),
!isset($model->byte) && !isset($model->int) && isset($model->string) => new StringTag($model->string),
default => throw new \UnexpectedValueException("Malformed JSON model tag, expected exactly one of 'byte', 'int' or 'string' properties")
};
}
public static function fromJsonModel(BlockStateUpgradeSchemaModel $model, int $schemaId) : BlockStateUpgradeSchema{
$result = new BlockStateUpgradeSchema(
$model->maxVersionMajor,
$model->maxVersionMinor,
$model->maxVersionPatch,
$model->maxVersionRevision,
$schemaId
);
$result->renamedIds = $model->renamedIds ?? [];
$result->renamedProperties = $model->renamedProperties ?? [];
$result->removedProperties = $model->removedProperties ?? [];
foreach(Utils::stringifyKeys($model->addedProperties ?? []) as $blockName => $properties){
foreach(Utils::stringifyKeys($properties) as $propertyName => $propertyValue){
$result->addedProperties[$blockName][$propertyName] = self::jsonModelToTag($propertyValue);
}
}
$convertedRemappedValuesIndex = [];
foreach(Utils::stringifyKeys($model->remappedPropertyValuesIndex ?? []) as $mappingKey => $mappingValues){
foreach($mappingValues as $k => $oldNew){
$convertedRemappedValuesIndex[$mappingKey][$k] = new BlockStateUpgradeSchemaValueRemap(
self::jsonModelToTag($oldNew->old),
self::jsonModelToTag($oldNew->new)
);
}
}
foreach(Utils::stringifyKeys($model->remappedPropertyValues ?? []) as $blockName => $properties){
foreach(Utils::stringifyKeys($properties) as $property => $mappedValuesKey){
if(!isset($convertedRemappedValuesIndex[$mappedValuesKey])){
throw new \UnexpectedValueException("Missing key from schema values index $mappedValuesKey");
}
$result->remappedPropertyValues[$blockName][$property] = $convertedRemappedValuesIndex[$mappedValuesKey];
}
}
foreach(Utils::stringifyKeys($model->remappedStates ?? []) as $oldBlockName => $remaps){
foreach($remaps as $remap){
if(isset($remap->newName) === isset($remap->newFlattenedName)){
throw new \UnexpectedValueException("Expected exactly one of 'newName' or 'newFlattenedName' properties to be set");
}
$result->remappedStates[$oldBlockName][] = new BlockStateUpgradeSchemaBlockRemap(
array_map(fn(BlockStateUpgradeSchemaModelTag $tag) => self::jsonModelToTag($tag), $remap->oldState ?? []),
$remap->newName ?? new BlockStateUpgradeSchemaFlattenedName(
$remap->newFlattenedName->prefix,
$remap->newFlattenedName->flattenedProperty,
$remap->newFlattenedName->suffix,
$remap->newFlattenedName->flattenedValueRemaps ?? [],
),
array_map(fn(BlockStateUpgradeSchemaModelTag $tag) => self::jsonModelToTag($tag), $remap->newState ?? []),
$remap->copiedState ?? []
);
}
}
return $result;
}
private static function buildRemappedValuesIndex(BlockStateUpgradeSchema $schema, BlockStateUpgradeSchemaModel $model) : void{
if(count($schema->remappedPropertyValues) === 0){
return;
}
$dedupMapping = [];
$dedupTableMap = [];
$orderedRemappedValues = $schema->remappedPropertyValues;
ksort($orderedRemappedValues);
foreach(Utils::stringifyKeys($orderedRemappedValues) as $blockName => $remaps){
ksort($remaps);
foreach(Utils::stringifyKeys($remaps) as $propertyName => $remappedValues){
$remappedValuesMap = [];
foreach($remappedValues as $oldNew){
$remappedValuesMap[$oldNew->old->toString()] = $oldNew;
}
ksort($remappedValuesMap);
if(isset($dedupTableMap[$propertyName])){
foreach($dedupTableMap[$propertyName] as $k => $dedupValuesMap){
if(count($remappedValuesMap) !== count($dedupValuesMap)){
continue;
}
foreach(Utils::stringifyKeys($remappedValuesMap) as $oldHash => $remappedOldNew){
if(
!isset($dedupValuesMap[$oldHash]) ||
!$remappedOldNew->old->equals($dedupValuesMap[$oldHash]->old) ||
!$remappedOldNew->new->equals($dedupValuesMap[$oldHash]->new)
){
continue 2;
}
}
//we found a match
$dedupMapping[$blockName][$propertyName] = $k;
continue 2;
}
}
//no match, add the values to the table
$dedupTableMap[$propertyName][] = $remappedValuesMap;
$dedupMapping[$blockName][$propertyName] = array_key_last($dedupTableMap[$propertyName]);
}
}
$modelTable = [];
foreach(Utils::stringifyKeys($dedupTableMap) as $propertyName => $mappingSet){
foreach($mappingSet as $setId => $valuePairs){
$newDedupName = $propertyName . "_" . str_pad(strval($setId), 2, "0", STR_PAD_LEFT);
foreach($valuePairs as $pair){
$modelTable[$newDedupName][] = new BlockStateUpgradeSchemaModelValueRemap(
BlockStateUpgradeSchemaUtils::tagToJsonModel($pair->old),
BlockStateUpgradeSchemaUtils::tagToJsonModel($pair->new),
);
}
}
}
$modelDedupMapping = [];
foreach(Utils::stringifyKeys($dedupMapping) as $blockName => $properties){
foreach(Utils::stringifyKeys($properties) as $propertyName => $dedupTableIndex){
$modelDedupMapping[$blockName][$propertyName] = $propertyName . "_" . str_pad(strval($dedupTableIndex), 2, "0", STR_PAD_LEFT);
}
}
ksort($modelTable);
ksort($modelDedupMapping);
foreach(Utils::stringifyKeys($dedupMapping) as $blockName => $properties){
ksort($properties);
$dedupMapping[$blockName] = $properties;
}
$model->remappedPropertyValuesIndex = $modelTable;
$model->remappedPropertyValues = $modelDedupMapping;
}
public static function toJsonModel(BlockStateUpgradeSchema $schema) : BlockStateUpgradeSchemaModel{
$result = new BlockStateUpgradeSchemaModel();
$result->maxVersionMajor = $schema->maxVersionMajor;
$result->maxVersionMinor = $schema->maxVersionMinor;
$result->maxVersionPatch = $schema->maxVersionPatch;
$result->maxVersionRevision = $schema->maxVersionRevision;
$result->renamedIds = $schema->renamedIds;
ksort($result->renamedIds);
$result->renamedProperties = $schema->renamedProperties;
ksort($result->renamedProperties);
foreach(Utils::stringifyKeys($result->renamedProperties) as $blockName => $properties){
ksort($properties);
$result->renamedProperties[$blockName] = $properties;
}
$result->removedProperties = $schema->removedProperties;
ksort($result->removedProperties);
foreach(Utils::stringifyKeys($result->removedProperties) as $blockName => $properties){
sort($properties); //yes, this is intended to sort(), not ksort()
$result->removedProperties[$blockName] = $properties;
}
foreach(Utils::stringifyKeys($schema->addedProperties) as $blockName => $properties){
$addedProperties = [];
foreach(Utils::stringifyKeys($properties) as $propertyName => $propertyValue){
$addedProperties[$propertyName] = self::tagToJsonModel($propertyValue);
}
ksort($addedProperties);
$result->addedProperties[$blockName] = $addedProperties;
}
if(isset($result->addedProperties)){
ksort($result->addedProperties);
}
self::buildRemappedValuesIndex($schema, $result);
foreach(Utils::stringifyKeys($schema->remappedStates) as $oldBlockName => $remaps){
$keyedRemaps = [];
foreach($remaps as $remap){
$modelRemap = new BlockStateUpgradeSchemaModelBlockRemap(
array_map(fn(Tag $tag) => self::tagToJsonModel($tag), $remap->oldState),
is_string($remap->newName) ?
$remap->newName :
new BlockStateUpgradeSchemaModelFlattenedName(
$remap->newName->prefix,
$remap->newName->flattenedProperty,
$remap->newName->suffix,
$remap->newName->flattenedValueRemaps
),
array_map(fn(Tag $tag) => self::tagToJsonModel($tag), $remap->newState),
$remap->copiedState
);
if(count($modelRemap->copiedState) === 0){
unset($modelRemap->copiedState); //avoid polluting the JSON
}
$key = json_encode($modelRemap);
assert(!isset($keyedRemaps[$key]));
if(isset($keyedRemaps[$key])){
continue;
}
$keyedRemaps[$key] = $modelRemap;
}
usort($keyedRemaps, function(BlockStateUpgradeSchemaModelBlockRemap $a, BlockStateUpgradeSchemaModelBlockRemap $b) : int{
//remaps with more specific criteria must come first
$filterSizeCompare = count($b->oldState ?? []) <=> count($a->oldState ?? []);
if($filterSizeCompare !== 0){
return $filterSizeCompare;
}
//remaps with the same number of criteria should be sorted alphabetically, but this is not strictly necessary
return json_encode($a->oldState ?? []) <=> json_encode($b->oldState ?? []);
});
$result->remappedStates[$oldBlockName] = array_values($keyedRemaps);
}
if(isset($result->remappedStates)){
ksort($result->remappedStates);
}
return $result;
}
/**
* Returns a list of schemas ordered by schema ID. Oldest schemas appear first.
*
* @return BlockStateUpgradeSchema[]
*/
public static function loadSchemas(string $path, int $maxSchemaId) : array{
$iterator = new \RegexIterator(
new \FilesystemIterator(
$path,
\FilesystemIterator::KEY_AS_FILENAME | \FilesystemIterator::SKIP_DOTS
),
'/^(\d{4}).*\.json$/',
\RegexIterator::GET_MATCH,
\RegexIterator::USE_KEY
);
$result = [];
/** @var string[] $matches */
foreach($iterator as $matches){
$filename = $matches[0];
$schemaId = (int) $matches[1];
if($schemaId > $maxSchemaId){
continue;
}
$fullPath = Path::join($path, $filename);
$raw = Filesystem::fileGetContents($fullPath);
try{
$schema = self::loadSchemaFromString($raw, $schemaId);
}catch(\RuntimeException $e){
throw new \RuntimeException("Loading schema file $fullPath: " . $e->getMessage(), 0, $e);
}
$result[$schemaId] = $schema;
}
ksort($result, SORT_NUMERIC);
return $result;
}
public static function loadSchemaFromString(string $raw, int $schemaId) : BlockStateUpgradeSchema{
try{
$json = json_decode($raw, false, flags: JSON_THROW_ON_ERROR);
}catch(\JsonException $e){
throw new \RuntimeException($e->getMessage(), 0, $e);
}
if(!is_object($json)){
throw new \RuntimeException("Unexpected root type of schema file " . gettype($json) . ", expected object");
}
$jsonMapper = new \JsonMapper();
$jsonMapper->bExceptionOnMissingData = true;
$jsonMapper->bExceptionOnUndefinedProperty = true;
$jsonMapper->bStrictObjectTypeChecking = true;
try{
$model = $jsonMapper->map($json, new BlockStateUpgradeSchemaModel());
}catch(\JsonMapper_Exception $e){
throw new \RuntimeException($e->getMessage(), 0, $e);
}
return self::fromJsonModel($model, $schemaId);
}
}
```
|
```php
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* (at your option) any later version.
*
* @author PocketMine Team
* @link path_to_url
*
*
*/
declare(strict_types=1);
namespace pocketmine\event\player;
use pocketmine\entity\Human;
use pocketmine\event\Cancellable;
use pocketmine\event\CancellableTrait;
use pocketmine\event\entity\EntityEvent;
/**
* Called when a player gains or loses XP levels and/or progress.
* @phpstan-extends EntityEvent<Human>
*/
class PlayerExperienceChangeEvent extends EntityEvent implements Cancellable{
use CancellableTrait;
public function __construct(
Human $player,
private int $oldLevel,
private float $oldProgress,
private ?int $newLevel,
private ?float $newProgress
){
$this->entity = $player;
}
public function getOldLevel() : int{
return $this->oldLevel;
}
public function getOldProgress() : float{
return $this->oldProgress;
}
/**
* @return int|null null indicates no change
*/
public function getNewLevel() : ?int{
return $this->newLevel;
}
/**
* @return float|null null indicates no change
*/
public function getNewProgress() : ?float{
return $this->newProgress;
}
public function setNewLevel(?int $newLevel) : void{
$this->newLevel = $newLevel;
}
public function setNewProgress(?float $newProgress) : void{
if($newProgress < 0.0 || $newProgress > 1.0){
throw new \InvalidArgumentException("XP progress must be in range 0-1");
}
$this->newProgress = $newProgress;
}
}
```
|
Walter Reginald Strickland (1841-1915) was a Canadian architect known for buildings such as the Dixon and Griffiths Buildings (Toronto). He was a partner in the firm Strickland & Symonds.
References
Canadian architects
1841 births
1915 deaths
|
Rick Geenen (born August 13, 1988) is a Dutch footballer who currently plays for EVV in the Dutch Topklasse. He formerly played for Fortuna Sittard, Hansa Rostock and MVV Maastricht.
External links
1988 births
Living people
Dutch men's footballers
Dutch expatriate men's footballers
Eerste Divisie players
Derde Divisie players
Fortuna Sittard players
FC Hansa Rostock players
MVV Maastricht players
Expatriate men's footballers in Germany
People from Geleen
3. Liga players
RKVV EVV players
Men's association football central defenders
Footballers from Limburg (Netherlands)
Dutch expatriate sportspeople in Germany
|
```xml
/*
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
// TypeScript Version: 4.1
/// <reference types="@stdlib/types"/>
import { Iterator as Iter, IterableIterator } from '@stdlib/types/iter';
// Define a union type representing both iterable and non-iterable iterators:
type Iterator = Iter | IterableIterator;
/**
* Returns an iterator which rounds each iterated value to the nearest power of 10 toward zero.
*
* ## Notes
*
* - If an environment supports `Symbol.iterator` **and** a provided iterator is iterable, the returned iterator is iterable.
*
* @param iterator - input iterator
* @returns iterator
*
* @example
* var uniform = require( '@stdlib/random/iter/uniform' );
*
* var iter = iterTrunc10( uniform( -100.0, 100.0 ) );
*
* var r = iter.next().value;
* // returns <number>
*
* r = iter.next().value;
* // returns <number>
*
* r = iter.next().value;
* // returns <number>
*
* // ...
*/
declare function iterTrunc10( iterator: Iterator ): Iterator;
// EXPORTS //
export = iterTrunc10;
```
|
```c++
// The following file exercises all semantic tokens supported by the C/C++ Extension.
//
// To test, toggle the setting "C_Cpp.enhancedColorization" between "Enabled" and "Disabled".
// All tokens referred to as being "colored semantically" below, should be colored differently if enabled.
//
// Some language features (ref classes, value classes, etc.) require C++/CLI support to be enabled.
// Enable C++/CLI by configuring the C/C++ Extension to use "cl.exe" as the compiler (so, on WIndows),
// and set "compilerArgs" to: ["/clr"]
//
// Use the Dark+ theme to test.
// Since not all semantic tokens are colored by the Dark+ theme, add the following settings:
//
// "editor.tokenColorCustomizations": {
// "textMateRules": [
// {
// "scope": "variable.other.event",
// "settings": {
// "foreground": "#FF0000"
// }
// },
// {
// "scope": "entity.name.type.class.generic",
// "settings": {
// "foreground": "#FF0000"
// }
// },
// {
// "scope": "variable.other.global",
// "settings": {
// "foreground": "#FF0000"
// }
// },
// {
// "scope": "entity.name.label",
// "settings": {
// "foreground": "#FF0000"
// }
// },
// {
// "scope": "entity.name.function.preprocessor",
// "settings": {
// "foreground": "#FF0000"
// }
// },
// {
// "scope": "variable.other.property",
// "settings": {
// "foreground": "#FF0000"
// }
// },
// {
// "scope": "entity.name.namespace",
// "settings": {
// "foreground": "#FF0000"
// }
// },
// {
// "scope": "keyword.operator.new",
// "settings": {
// "foreground": "#FF0000"
// }
// },
// {
// "scope": "entity.name.function.operator",
// "settings": {
// "foreground": "#FF0000"
// }
// },
// {
// "scope": "entity.name.function.operator.member",
// "settings": {
// "foreground": "#FFFF00"
// }
// },
// {
// "scope": "variable.parameter",
// "settings": {
// "foreground": "#FF0000"
// }
// },
// {
// "scope": "entity.name.type.class.reference",
// "settings": {
// "foreground": "#FF0000"
// }
// },
// {
// "scope": "variable.other.property.static",
// "settings": {
// "foreground": "#FFFF00"
// }
// },
// {
// "scope": "entity.name.function.member.static",
// "settings": {
// "foreground": "#FFFF00"
// }
// },
// {
// "scope": "entity.name.type",
// "settings": {
// "foreground": "#00FF00"
// }
// },
// {
// "scope": "entity.name.operator.custom-literal.number",
// "settings": {
// "foreground": "#FF0000"
// }
// },
// {
// "scope": "entity.name.operator.custom-literal.string",
// "settings": {
// "foreground": "#00FF00"
// }
// },
// {
// "scope": "entity.name.operator.custom-literal",
// "settings": {
// "foreground": "#FFFF00"
// }
// },
// {
// "scope": "entity.name.type.class.value",
// "settings": {
// "foreground": "#FFFF00"
// }
// },
// {
// "scope": "variable.other.property.cli",
// "settings": {
// "foreground": "#FFFF00"
// }
// }
// ]
// }
// Class Template - entity.name.type.class.templated
template <typename T>
class template_class // "template_class" colored syntactically
{
};
template_class<int> instance; // "template_class" colored semantically
// Enumerator - variable.other.enummember
enum enum_type {
enum_member = 0 // "enum_member" colored syntactically
};
enum_type enum_instance = enum_type::enum_member; // "enum_member" colored semantically
// Event (C++/CLI) - variable.other.event
// This requiress CLR support. i.e. Use cl.exe and: "compilerArgs": ["/clr"]
delegate void event_delegate();
ref class A
{
event event_delegate^ event_instance; // "event_instance" colored semantically
};
// Function - entity.name.function
void function() { } // "function" colored synatically
void function2()
{
function(); // "function" colored synatically
void(*function_pointer)() = &function; // "function" color semantically
}
// Function Template - entity.name.function.templated
template <typename T>
void template_function()
{
template_function<int>();
void(*function_pointer)() = &function<int>; // "function" color semantically
}
// Generic Type (C++/CLI) - entity.name.type.class.generic
// This requiress CLR support. i.e. Use cl.exe and: "compilerArgs": ["/clr"]
// KNOWN BUG: path_to_url
generic <class T>
ref class generic_class
{
};
void generic_class_test()
{
generic_class<int> generic_class_instance; // "generic_class_instance" colored semantically
}
// Global Variable - variable.other.global
int global_instance; // "global_instance" colored semantically
// Label - entity.name.label
void label_test()
{
goto Label1; // "Label1" colored semantically
Label1: // "Label1" colored syntactically
}
// Local Variable - variable.other.local
void local_variable_test()
{
int local_instance; // "local_instance" colored semantically
}
// Macro - entity.name.function.preprocessor
#define MACRO(a, b) // "local_instance" colored syntactically
MACRO(a, b) // "local_instance" colored semantically
// Member Field - variable.other.property
class member_field_test
{
int member_instance; // "member_instance" colored semantically
};
// Member Function - entity.name.function.member
class C
{
public:
void member_function() { } // "member_function" colored syntactically
};
void member_function_test()
{
void(C::*member_function_ptr)() = &C::member_function; // "member_function" colored semantically
};
// Namespace - entity.name.namespace
namespace my_namespace {
class A
{
};
}
my_namespace::A a; // "my_namesapce" color semantically
// "my_namespace" will also be colored synatically as a "entity.name.scope-resolution.cpp".
// Use a distinct color for entity.name.namespace to see the difference
// New / Delete - keyword.operator.new
struct operator_new_test_class
{
void* operator new(size_t sz); // "operator new" is colored semantically
};
// Operator Overload Function - entity.name.function.operator
class OOF { };
OOF& operator+=(OOF& b1, OOF& b2) // "operator+=" is colored semantically
{
b1 += b2; // "+=" is colored semantically
return b1;
};
// Operator Overload Member - entity.name.function.operator.member
class OOM {
OOM& operator+=(OOM& b) // "operator+=" is colored semantically
{
*this += b; // "+=" is colored semantically
return *this;
};
};
// Parameter - variable.parameter
void param_test(int param1)
{
int i = param1; // "param1" is colored semantically here, where used.
}
// Property (C++/CLI) - variable.other.property.cli
ref class ref_class_with_property {
public:
property int prop; // "prop" is colored semantically
};
void property_test(ref_class_with_property^ obj)
{
obj->prop = 111; // "prop" is colored semantically
}
// Reference Type (C++/CLI) - entity.name.type.class.reference
ref class ref_class // "ref_class" is colored semantically
{
};
void ref_test()
{
ref_class a; // "ref_class" is colored semantically
}
// Static Member Field - variable.other.property.static
struct static_member_test
{
static int static_member_instance; // "static_member_instance" is colored semantically
void foo()
{
static_member_instance = 2; // "static_member_instance" is colored semantically
}
};
// Static Member Function - entity.name.function.member.static
struct static_member_test
{
static void foo() // "static_member_instance" is colored semantically
{
foo(); // "static_member_instance" is colored semantically
}
};
// Type - entity.name.type
class my_class
{
};
void my_class_test()
{
my_class c; // "my_class" is colored semantically here
}
// User-Defined Literal - Number - entity.name.operator.custom-literal.number
unsigned long long operator""_numeric(unsigned long long i) // "operator""_numeric" is colored semantically
{
return 12345_numeric; // "12345_numeric" is colored semantically
}
// User-Defined Literal - String - entity.name.operator.custom-literal.string
const char* operator""_str(const char* arr, size_t size) // "operator""_str" is colored semantically
{
"ABC"_str; // ""ABC"_str" is colored semantically
}
// User-Defined Literal - Raw - entity.name.operator.custom-literal
void operator"" _custom(const char* i) // "operator"" _custom" is colored semantically
{
0xABC_custom; // "0xABC_custom" is colored semantically
}
// Value Type (C++/CLI) - entity.name.type.class.value
value class value_class // "value_class" is colored semantically
{
};
void value_test()
{
value_class a; // "value_class" is colored semantically
}
```
|
```ruby
# frozen_string_literal: true
require 'test/unit'
class TestVMDump < Test::Unit::TestCase
def assert_darwin_vm_dump_works(args)
omit if RUBY_PLATFORM !~ /darwin/
assert_in_out_err(args, "", [], /^\[IMPORTANT\]/)
end
def test_darwin_invalid_call
assert_darwin_vm_dump_works(['-rfiddle', '-eFiddle::Function.new(Fiddle::Pointer.new(1), [], Fiddle::TYPE_VOID).call'])
end
def test_darwin_segv_in_syscall
assert_darwin_vm_dump_works('-e1.times{Process.kill :SEGV,$$}')
end
def test_darwin_invalid_access
assert_darwin_vm_dump_works(['-rfiddle', '-eFiddle.dlunwrap(100).inspect'])
end
end
```
|
Lindström (also spelled Lindstrom) is a city in Chisago County, Minnesota, United States, located 35 miles northeast of the Twin Cities. The population was 4,888 at the 2020 census. Lindström's motto is America's Little [Sweden]. U.S. Highway 8 serves as a main route for the community.
Geography
According to the United States Census Bureau, the city has a total area of , of which is land and is water.
Lindström is located from the Wisconsin state line, and less than two hours from cities including Duluth, St. Cloud, and the Twin Cities area. When looking at the town from above, it looks like it could be an island due to the surrounding lakes. The landmass of Lindström consists mainly of lakes (including South Lindström Lake, North Lindström Lake, South Center Lake, North Center Lake and Kroon Lake). With so many lakes, Lindström is a destination for fishers from all over the world.
History
Lindström was settled predominantly by Swedish (and a few Norwegian) immigrants and their families. In 1853, Daniel Lindström left Sweden in search of a nice piece of land to settle in the United States. Lindström was platted in 1880. The town of Lindström was incorporated in 1894. Many other Swedish emigrants traveled with Daniel Lindström. Joris Per Anderson, half brother to Daniel Lindström, came in 1850 leading a party from Hassela, Sweden. In the party was Eric Norelius, whose personal journals in part formed the basis of Vilhelm Moberg's novels of the Swedish emigration to the United States, The Emigrants. Moberg's novels have two main characters, Karl Oskar and Kristina Nilsson. The novels depict the hardships Swedish emigrants endured en route to the United States and their first ten years in their new home country. A bronze statue of the author, holding his bicycle as if ready to ride away, stands on a stepped platform in Chisago City's town park. An image of Karl Oskar and Kristina remains Lindström's logo today. Since 1990, anyone who has taken U.S. Highway 8 from north of Forest Lake to Lindström has driven on the Moberg Trail.
Lindström celebrates Karl Oskar and Kristina annually with Karl Oskar Days. This event takes place mid-July and includes such activities as the coronation of a "Karl Oskar Princess", parades, a street dance, and fireworks. There are still statues of Karl Oskar and Kristina in Lindström, as a tribute to the early Swedish immigrants whose descendants continue to populate the area. These statues are the main attraction for tourists from all over the world who come to Lindström because of its Swedish heritage.
In April 2015, Minnesota Governor Mark Dayton signed an executive order to restore the umlaut (¨) over the "o" on the Lindström city limits sign.
(However, both the USGS and the US Census Bureau record the city's name as "Lindstrom".)
Education
Lindström is part of the Chisago Lakes School District #2144. There are five schools in the area, which accommodate around 3,600 students in grades K–12. The five schools in the district include Primary School (Grades Pre-K to 1), Lakeside School (Grades 2 to 5), Taylors Falls Elementary (Grades K to 5), Chisago Lakes Middle School (Grades 6 to 8), and Chisago Lakes High School (Grades 9 to 12). The school mascot is the Wally the Wildcat.
Demographics
2020 census
As of the census of 2020, there were 4,888 people and 1,699 households. 95.3% of residents had at least a high school education, and 30.1% had attained a Bachelor's degree or higher. 6.4% were veterans.
93.0% of residents were born in the United States, and 77.3% had been born in Minnesota. Among the foreign-born population, 37.6% had been born in Northern America, 32.0% in Latin America, and 30.4% in Asia. 94.6% of residents spoke only English at home, and 3.7% spoke Spanish.
The racial makeup of the city was 93.0% White alone (97.7% White alone or in combination), 0.9% Asian, 0.7% Black, 0.1% Native American, and 0.5% some other race. 4.8% were two or more races. 1.9% were Hispanic or Latino of any race. The most common ancestries in Lindström were German (42.8%), Norwegian (22.2%), Swedish (21.5%), Irish (9.4%), and Polish (4.8%).
Among workers 16 years and older, 76.8% commuted to work via car, 9.8% carpooled, 0.9% used public transit, and 7.8% worked from home. The median household income in Lindström was $103,102, above the state average. 5.7% of residents lived below the poverty line. 83.4% of housing in the city was owner-occupied.
The average family size in Lindström was 3.11 persons, and 59.6% of households were married-couple families.
2010 census
As of the census of 2010, there were 4,442 people, 1,774 households, and 1,265 families residing in the city. The population density was . There were 1,943 housing units at an average density of . The racial makeup of the city was 97.0% White, 0.4% African American, 0.2% Native American, 0.6% Asian, 0.3% from other races, and 1.4% from two or more races. Hispanic or Latino of any race were 1.2% of the population.
There were 1,774 households, of which 34.2% had children under the age of 18 living with them, 56.9% were married couples living together, 9.9% had a female householder with no husband present, 4.6% had a male householder with no wife present, and 28.7% were non-families. 23.5% of all households were made up of individuals, and 11.5% had someone living alone who was 65 years of age or older. The average household size was 2.50 and the average family size was 2.96.
The median age in the city was 39.1 years. 25.8% of residents were under the age of 18; 5.6% were between the ages of 18 and 24; 26.7% were from 25 to 44; 25.5% were from 45 to 64; and 16.2% were 65 years of age or older. The gender makeup of the city was 49.9% male and 50.1% female.
2000 census
As of the census of 2000, there were 3,015 people, 1,225 households, and 855 families residing in the city. The population density was . There were 1,322 housing units at an average density of . The racial makeup of the city was 97.61% White, 0.20% African American, 0.36% Native American, 0.50% Asian, 0.56% from other races, and 0.76% from two or more races. Hispanic or Latino of any race were 1.13% of the population. 25.1% were of German, 22.8% Swedish, 12.8% Norwegian, 7.9% French and 6.3% Irish ancestry according to Census 2000. 100.0% spoke English as their first language.
There were 1,225 households, out of which 31.1% had children under the age of 18 living with them, 58.4% were married couples living together, 8.2% had a female householder with no husband present, and 30.2% were non-families. 25.7% of all households were made up of individuals, and 13.6% had someone living alone who was 65 years of age or older. The average household size was 2.46 and the average family size was 2.95.
In the city, the population was spread out, with 26.0% under the age of 18, 6.8% from 18 to 24, 26.5% from 25 to 44, 22.5% from 45 to 64, and 18.1% who were 65 years of age or older. The median age was 39 years. For every 100 females, there were 95.8 males. For every 100 females age 18 and over, there were 90.7 males.
The median income for a household in the city was $44,980, and the median income for a family was $50,519. Males had a median income of $42,604 versus $28,163 for females. The per capita income for the city was $21,195. About 5.7% of families and 8.0% of the population were below the poverty line, including 8.6% of those under age 18 and 13.9% of those age 65 or over.
Sister cities
Tingsryd, Sweden
See also
Chisago Lakes School District
Swedish Americans
Norwegian Americans
Nordic Americans
Ö
References
External links
City of Lindstrom
Lindstrom Community Profile
Vilhelm Moberg
Lindstrom, Minnesota at the Minnesota Historical Society.
Karl Oskar Days 2012
Cities in Chisago County, Minnesota
Cities in Minnesota
Swedish-American culture in Minnesota
|
```php
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* (at your option) any later version.
*
* @author PocketMine Team
* @link path_to_url
*
*
*/
declare(strict_types=1);
namespace pocketmine\crafting;
use pocketmine\data\bedrock\ItemTagToIdMap;
use pocketmine\item\Item;
use pocketmine\world\format\io\GlobalItemDataHandlers;
/**
* Recipe ingredient that matches items whose ID falls within a specific set. This is used for magic meta value
* wildcards and also for ingredients which use item tags (since tags implicitly rely on ID only).
*
* @internal
*/
final class TagWildcardRecipeIngredient implements RecipeIngredient{
public function __construct(
private string $tagName
){}
public function getTagName() : string{ return $this->tagName; }
public function accepts(Item $item) : bool{
if($item->getCount() < 1){
return false;
}
return ItemTagToIdMap::getInstance()->tagContainsId($this->tagName, GlobalItemDataHandlers::getSerializer()->serializeType($item)->getName());
}
public function __toString() : string{
return "TagWildcardRecipeIngredient($this->tagName)";
}
}
```
|
```xml
import { createMemoryNavigation } from '../src'
import { fixtureMap } from './fixtures/switches'
describe("basename", () => {
test("works without final /", async () => {
let nav = createMemoryNavigation({
url: '/nested/examples',
basename: '/nested',
routes: fixtureMap,
})
let route = await nav.getRoute()
expect(route.title).toBe('Basic example')
})
test("works with final /", async () => {
let nav = createMemoryNavigation({
url: '/nested/examples',
basename: '/nested/',
routes: fixtureMap,
})
let route = await nav.getRoute()
expect(route.title).toBe('Basic example')
})
})
```
|
, also known as Wang Mao, was a politician and diplomat of Ryukyu Kingdom.
Ō Mō was of Ming Chinese ancestry and lived in Kumemura. His name first appeared in the year 1398. According to Chūzan Seifu, he went to Ming China to pay tribute in 1398, at that time his official position was "the Chief Clerk () of Chūzan". But according to Rekidai Hōan, we could know that he drafted diplomatic instrument for both Chūzan and Nanzan. His relationship between these two countries was still not clear.
He was appointed by King Shō Shishō in 1411.
References
"Ō Mō." Okinawa konpakuto jiten (沖縄コンパクト事典, "Okinawa Compact Encyclopedia").
People from the Ryukyu Kingdom
Ryukyuan people
15th-century Ryukyuan people
Sessei
Ryukyuan people of Chinese descent
|
```java
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
package org.flowable.cdi.annotation.event;
import jakarta.enterprise.util.AnnotationLiteral;
public class CreateTaskLiteral extends AnnotationLiteral<CreateTask> implements CreateTask {
protected final String activityId;
public CreateTaskLiteral(String activityId) {
this.activityId = activityId;
}
@Override
public String value() {
return activityId != null ? activityId : "";
}
}
```
|
"The Man Who Could Work Miracles" is a British fantasy-comedy short story by H. G. Wells first published in 1898 in The Illustrated London News. It carried the subtitle "A Pantoum in Prose".
The story is an early example of contemporary fantasy (not yet recognized, at the time, as a specific subgenre). In common with later works falling within this definition, the story places a major fantasy premise (a wizard with enormous, virtually unlimited magic power) not in an exotic semi-medieval setting but in the drab routine daily life of suburban London, very familiar to Wells himself.
Plot summary
In an English public house, George McWhirter Fotheringay vigorously asserts the impossibility of miracles during an argument. By way of demonstration, Fotheringay commands an oil lamp to flame upside down and it does so, to his own astonishment. His acquaintances think it a trick and quickly dismiss it.
Fotheringay explores his new power. After magically accomplishing his daily chores as an office clerk, Fotheringay quits early to a park to practice further. He encounters a local constable, who is accidentally injured. In the ensuing altercation, Fotheringay unintentionally sends the policeman to Hades; hours later, Fotheringay relocates him safely to San Francisco.
Unnerved by these miracles, Fotheringay attends local Sunday church services. The clergyman, Mr. Maydig, preaches about unnatural occurrences. Fotheringay is deeply moved, and meets Maydig in his manse for advice. After a few petty demonstrations, the minister becomes enthusiastic and suggests that Fotheringay should use these abilities to benefit others. That night they walk the town streets, healing illness and vice and improving public works.
Maydig plans to reform the whole world. He suggests that they could disregard their obligations for the next day if Fotheringay could stop the night altogether. Fotheringay agrees and stops the motion of the Earth. His clumsy wording of the wish causes all objects on Earth to be hurled from the surface with great force. Pandemonium ensues, but Fotheringay miraculously ensures his own safety back on the ground. In fact (though he is not aware of the enormity of what he had done) the whole of humanity except for himself had perished in a single instant.
Fotheringay is unable to return the Earth to its prior state. He repents, and wishes that the power be taken from him and the world restored to a time before he had the power. Fotheringay immediately finds himself back in the public house, discussing miracles with his friends as before, without any recollection of previous events.
The all-knowing narrator thus tells the reader that he or she had died "a year ago" (the story was published in 1897) and was then resurrected - but has no recollection of anything special having happened.
Adaptations
In 1936, the story was adapted to a film starring Roland Young as Fotheringay. Wells co-wrote the screenplay with Lajos Bíró.
It was first adapted for BBC Radio in 1934 by Laurence Gilliam and broadcast on 4 June that year. It continued to be adapted on several occasions for BBC Radio, including 1956 by Dennis Main Wilson and broadcast on New Year's Day. It starred Tony Hancock as Fotheringay.
The story idea was used as the basis for director Terry Jones's 2015 film Absolutely Anything.
The idea of the world stopping rotating was taken up in 1972 by Lester del Rey, who suggested to three SF writers to write stories based on the assumption that God does it in order to unequivocally prove His existence to all humanity. The three resulting stories were published together under the name "The Day the Sun Stood Still", comprising "A Chapter of Revelation" by Poul Anderson, "Things Which Are Caesar's" by Gordon R. Dickson and "Thomas the Proclaimer" by Robert Silverberg. The three stories share the assumption that – the miracle in this case issuing directly from God in person, rather than from Wells' fumbling human protagonist – care was taken to prevent the disastrous results evident in the original Wells story. The dramatic radio broadcast appearing in the beginning of Silverberg's version indicates that, when writing, he was familiar with the Wells story: "Latest observatory reports confirm that no appreciable momentum effects could be detected as Earth shifted to its present period of rotation. Scientists agree that the world's abrupt slowing on its axis should have produced a global catastrophe leading, perhaps, to the destruction of all life. However, nothing but minor tidal disturbances have been observed so far".
For his part, the Portuguese José Saramago apparently refers to the Wells story in his novel Cain, an irreverent retelling of the Bible, when retelling the episode of God "stopping the sun" in the Book of Joshua (to which the pastor in the Wells story also refers). The very flawed God depicted by Saramago was unable to stop the disastrous effects of stopping the movement of the Earth – so he did not do so, performing just a much simpler and limited miracle which still did the job.
References
External links
"The Man Who Could Work Miracles" at Project Gutenberg
1898 short stories
Comic short stories
Fantasy short stories
Short stories adapted into films
Short stories by H. G. Wells
Works originally published in The Illustrated London News
|
```ruby
require_relative '../../spec_helper'
describe "Float#rationalize" do
it "returns self as a simplified Rational with no argument" do
(3382729202.92822).rationalize.should == Rational(4806858197361, 1421)
end
# FIXME: These specs need reviewing by somebody familiar with the
# algorithm used by #rationalize
it "simplifies self to the degree specified by a Rational argument" do
f = 0.3
f.rationalize(Rational(1,10)).should == Rational(1,3)
f.rationalize(Rational(-1,10)).should == Rational(1,3)
f = -f
f.rationalize(Rational(1,10)).should == Rational(-1,3)
f.rationalize(Rational(-1,10)).should == Rational(-1,3)
end
it "simplifies self to the degree specified by a Float argument" do
f = 0.3
f.rationalize(0.05).should == Rational(1,3)
f.rationalize(0.001).should == Rational(3, 10)
f = -f
f.rationalize(0.05).should == Rational(-1,3)
f.rationalize(0.001).should == Rational(-3,10)
end
it "raises a FloatDomainError for Infinity" do
-> {infinity_value.rationalize}.should raise_error(FloatDomainError)
end
it "raises a FloatDomainError for NaN" do
-> { nan_value.rationalize }.should raise_error(FloatDomainError)
end
it "raises ArgumentError when passed more than one argument" do
-> { 0.3.rationalize(0.1, 0.1) }.should raise_error(ArgumentError)
-> { 0.3.rationalize(0.1, 0.1, 2) }.should raise_error(ArgumentError)
end
end
```
|
```batchfile
@echo off
set F=%TEMP%\q3a.reg
echo REGEDIT4 > %F%
rem echo [-HKEY_CLASSES_ROOT\q3a] >> %F%
echo [-HKEY_CURRENT_USER\Software\Classes\q3a] >> %F%
regedit -s %F%
del %F%
```
|
Brampton Township is a civil township in Sargent County, North Dakota, United States.
History
It is named after Brampton, which is the only organized community within the township's boundaries.
Brampton Cemetery is outside the city limits.
Of the Township's 66 residents, 61 are white, four are Native, and one is "two or more races".
References
External links
City Data: Brampton Township, Sargent County, North Dakota
Townships in Sargent County, North Dakota
Townships in North Dakota
|
```java
/*
*
* This program and the accompanying materials are made
* which is available at path_to_url
*
*/
package org.eclipse.milo.opcua.stack.core.types.structured;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import org.eclipse.milo.opcua.stack.core.serialization.SerializationContext;
import org.eclipse.milo.opcua.stack.core.serialization.UaDecoder;
import org.eclipse.milo.opcua.stack.core.serialization.UaEncoder;
import org.eclipse.milo.opcua.stack.core.serialization.UaStructure;
import org.eclipse.milo.opcua.stack.core.serialization.codecs.GenericDataTypeCodec;
import org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId;
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
@EqualsAndHashCode(
callSuper = false
)
@SuperBuilder(
toBuilder = true
)
@ToString
public class ReferenceNode extends Structure implements UaStructure {
public static final ExpandedNodeId TYPE_ID = ExpandedNodeId.parse("nsu=path_to_url");
public static final ExpandedNodeId BINARY_ENCODING_ID = ExpandedNodeId.parse("nsu=path_to_url");
public static final ExpandedNodeId XML_ENCODING_ID = ExpandedNodeId.parse("nsu=path_to_url");
private final NodeId referenceTypeId;
private final Boolean isInverse;
private final ExpandedNodeId targetId;
public ReferenceNode(NodeId referenceTypeId, Boolean isInverse, ExpandedNodeId targetId) {
this.referenceTypeId = referenceTypeId;
this.isInverse = isInverse;
this.targetId = targetId;
}
@Override
public ExpandedNodeId getTypeId() {
return TYPE_ID;
}
@Override
public ExpandedNodeId getBinaryEncodingId() {
return BINARY_ENCODING_ID;
}
@Override
public ExpandedNodeId getXmlEncodingId() {
return XML_ENCODING_ID;
}
public NodeId getReferenceTypeId() {
return referenceTypeId;
}
public Boolean getIsInverse() {
return isInverse;
}
public ExpandedNodeId getTargetId() {
return targetId;
}
public static final class Codec extends GenericDataTypeCodec<ReferenceNode> {
@Override
public Class<ReferenceNode> getType() {
return ReferenceNode.class;
}
@Override
public ReferenceNode decode(SerializationContext context, UaDecoder decoder) {
NodeId referenceTypeId = decoder.readNodeId("ReferenceTypeId");
Boolean isInverse = decoder.readBoolean("IsInverse");
ExpandedNodeId targetId = decoder.readExpandedNodeId("TargetId");
return new ReferenceNode(referenceTypeId, isInverse, targetId);
}
@Override
public void encode(SerializationContext context, UaEncoder encoder, ReferenceNode value) {
encoder.writeNodeId("ReferenceTypeId", value.getReferenceTypeId());
encoder.writeBoolean("IsInverse", value.getIsInverse());
encoder.writeExpandedNodeId("TargetId", value.getTargetId());
}
}
}
```
|
Yang Shili (楊師立) (d. June 29, 884?) was a general of the Chinese Tang Dynasty, who came to control Dongchuan Circuit (東川, headquartered in modern Mianyang, Sichuan) as its military governor (Jiedushi) due to his association with the powerful eunuch Tian Lingzi. He later had a fall out with Tian and Tian's brother Chen Jingxuan, however, and in a subsequent military confrontation, Chen's forces, under the command of Gao Renhou, defeated his. When his own army turned against him in light of its defeat, he committed suicide.
Background and commission as military governor of Dongchuan
It is not known when Yang Shili was born or where he was from. It is known that he was a general of the eunuch-commanded Left Shence Army as of 880. That year, the powerful eunuch Tian Lingzi, who was in command of the Shence Armies, faced with the prospects that the court of Emperor Xizong would face threats from the ever-growing agrarian rebellions, began to prepare a contingency flight plan from the capital Chang'an to the Shu (蜀, i.e., modern Sichuan and Chongqing) region. Tian thus recommended four close associates—Yang, Tian's brother Chen Jingxuan, Niu Xu (牛勗), and Luo Yuangao (羅元杲)—to be candidates to be military governors of the three circuits covering the region—Xichuan (西川, headquartered in modern Chengdu, Sichuan), Dongchuan, and Shannan West (山南西道, headquartered in modern Hanzhong, Shaanxi). Emperor Xizong held a polo game for the four of them, with the stakes being that the best player would receive Xichuan. Chen did the best during that game, and therefore was given the most important of the three circuits, Xichuan. Later in the year, Yang was made the military governor of Dongchuan and Niu the military governor of Shannan West.
Around the new year 881, the major agrarian rebel Huang Chao captured Chang'an, forcing Emperor Xizong to flee toward Xichuan's capital Chengdu. He issued orders to Chen, Yang, and Niu, to keep the way to Chengdu open for him. Subsequently, when Emperor Xizong went through Mian Prefecture (綿州, in modern Mianyang) toward Chengdu, Yang paid homage to him there. In spring 883, while Emperor Xizong was still at Chengdu, he bestowed on Yang the honorary chancellor title of Tong Zhongshu Menxia Pingzhangshi (同中書門下平章事). At some point, he was also created the Duke of Zhongshan.
Break with Tian Lingzi and Chen Jingxuan
However, although Yang Shili was a close associate of Tian Lingzi's earlier, he eventually became resentful of the tight control that Tian and Chen Jingxuan had of Emperor Xizong. In particular, he had heard rumors that when Chen sent the officer Gao Renhou against the agrarian rebel Han Xiusheng (韓秀升), Chen promised Dongchuan to Gao, and thus became angry that Chen promised his circuits to someone else without consulting with him. In spring 884, Tian, fearing that Yang would rise against him, decided to recall him to the imperial government to serve as You Pushe (右僕射), a highly honored position carrying little actual power. When Yang received the order, he was incensed and refused to follow the order; he executed the eunuch delivering the order as well as the eunuch monitor of Dongchuan, and rose, declaring that he was waging a campaign against Chen and declaring 10 crimes of Chen's. He advanced to Fucheng (涪城, in modern Mianyang) and sent his officer Hao Juan (郝蠲) to try to capture Mian Prefecture but was unable to do so. Emperor Xizong stripped him of his posts and commissioned Gao to be the acting military governor of Dongchuan to attack him.
Gao soon advanced to Deyang (德陽, in modern Deyang, Sichuan). Yang sent his officers Zheng Junxiong (鄭君雄) and Zhang Shi'an (張士安) to defend Lutou Pass (鹿頭關, in modern Deyang) to defend against Gao. Zheng and Zhang launched a night surprise attack against Gao's forces, initially having some successes and causing Gao's deputy, Yang Maoyan (楊茂言), to flee in panic. However, Gao launched his counterattack and crushed Dongchuan forces. He chased them to Lutou Pass and defeated them again there. They fled back to Dongchuan's capital Zi Prefecture (梓州, in modern Mianyang), which Gao put under siege.
Gao made initial attempts to capture the city but could not do so. He then made a declaration to the people in the city that he would stop attacking for 10 days, and that he would resume his attack in 10 days if Yang Shili's head were not delivered. Several days later, Zheng launched a mutiny against Yang and attacked his headquarters. Yang committed suicide; Zheng cut off his head, delivered it to Gao, and surrendered. Gao arrested Yang's family members and delivered them to Chengdu. Chen nailed Yang's son to the city wall. When Chen's sons came out to view him, he yelled, "This will soon happen to you. Be prepared to receive it!" Gao was given Dongchuan Circuit to succeed Yang.
Notes and references
Zizhi Tongjian, vols. 253, 254, 255, 256.
9th-century births
884 deaths
Tang dynasty jiedushi of Dongchuan Circuit
Suicides in the Tang dynasty
|
Title is the debut EP by American singer-songwriter Meghan Trainor. Kevin Kadish produced all of its songs and wrote them with Trainor. The two conceived the EP shortly after Trainor signed with Epic Records in 2014. The label released it on September 9, 2014, and replaced it with a pre-order for Trainor's 2015 debut major-label studio album of the same name the following month.
Musically, Title comprises songs inspired by 1950s doo wop that lie between modern R&B and melodic pop. The EP has a lyrical theme of commitment and staying true to oneself, which Trainor hoped would empower women. It includes Trainor's debut single, "All About That Bass", which was released on June 30, 2014, and reached No.1 in 58 countries with worldwide sales of 11 million units.
Title garnered mixed reviews from critics, who thought its tracks had potential for commercial success, but considered the lyrics too repetitive and questioned Trainor's musicality. The EP debuted at number 15 on the Billboard 200 and sold 171,000 copies in the United States. It also entered charts in Canada and Denmark. Trainor promoted Title by performing "All About That Bass" on various television shows and its title track at other venues. She included all tracks from the EP on the set lists of her 2015 concert tours That Bass Tour and MTrain Tour.
Background and development
Meghan Trainor developed an early interest in music and started singing at age six. After her father encouraged her to pursue her musical interests, she independently released three albums from material she had written, recorded, performed, and produced, between the ages 15 and 17. These included Trainor's eponymous 2009 release, and her 2010 albums I'll Sing with You and Only 17. She introduced herself to former NRBQ member Al Anderson at a music conference in Nashville. Impressed by Trainor's songwriting, he referred her to his publisher Carla Wallace of music publishing firm Big Yellow Dog Music. Though Trainor had been offered a full scholarship to the Berklee College of Music, she decided to pursue her songwriting career and signed with Big Yellow Dog in 2012.
American songwriter Kevin Kadish met Trainor in June 2013 at Wallace's request. He liked Trainor's voice and felt a strong songwriting affinity with her due to their mutual love of pop music from the 1950s and 1960s. Disenchanted with the electronic dance music that populated Top 40 radio, he had wished to create a "50s-sounding record of doo-wop-inspired pop" for three years, but could not find any artist that shared his interest. Trainor, who had been introduced to doo-wop by her father at a young age, found it to be "the catchiest stuff" and wanted to create something reminiscent of The Chordettes's 1958 single "Lollipop". Kadish shared his idea with Trainor after the two bonded over Jimmy Soul's 1963 song "If You Wanna Be Happy", and they decided to create an extended play (EP) with the same sound, "just for fun". They completed three songs before Kadish started producing a rock album for the rest of the year. Trainor moved to Nashville in November 2013 and they co-wrote the song "All About That Bass", pitching it to different record labels, all of which rejected it due to its doo-wop pop sound as synth-pop was more popular at the time.
L.A. Reid, the chairman of Epic Records, heard the song and encouraged Trainor to record it herself. She signed with the label in 2014 and immediately began working on more songs with Kadish as Epic wanted her to record an entire album. The label briefly suggested that Trainor work with other producers, such as Pharrell Williams or Timbaland, but she insisted on continuing with Kadish: "Kevin's my guy". Epic Records's artists and repertoire division called Kadish and said, "whatever you did on 'Bass,' do it 10 more times. Don't bring in any more writers. Don't bring in any other producers. Whoever you used on that song." Upon its release as Trainor's debut single on June 30, 2014, "All About That Bass" reached numberone in 58 countries and sold 11 million units worldwide. Some critics considered it a novelty song, and questioned if Trainor would be able to release a successful follow-up or end up a one-hit wonder.
Music and lyrics
Music
Title comprises songs inspired by 1950s doo-wop music that "straddle the line between modern R&B and melodic pop", according to AllMusic's Matt Collar. Jon Dolan of Rolling Stone stated that the EP combines "trickle-down Beyoncé empowerment themes" and "sugary doo-wop and girl-group melodies". Kadish produced, recorded, engineered, and mixed the entire EP at the Carriage House studio in Nolensville, Tennessee. He plays the drums, acoustic guitar, electric guitar, and bass; Trainor handled drum programming and clapping, and plays percussion and ukulele. David Baron plays the piano, baritone saxophone, and hammond organ; and Jim Hoke plays the baritone and tenor saxophone. Dave Kutch mastered Title at The Mastering Palace in New York City.
The opening track, "All About That Bass", is a bubblegum pop, doo-wop, hip hop, Italo-Latin soul, and retro-R&B pop song, influenced by 1960s genres—soul-pop, groove, Motown bounce, and girl-group pop. The song includes syncopated handclaps, bass instrumentation, and, according to Slates Chris Molanphy, "a scatting tempo and shimmying melody". The title track is a doo-wop song with Caribbean music influences and a ska-inflected bridge, which blends the horn and ukulele folk-pop with island percussion instrumentation and a programmed beat, and also incorporates handclaps and modern sound effects. Trainor projects an assertive and retro aural tone according to Knoxville News Sentinel, and delivers a rap verse. She felt it showcased "what [her] sound really is", and considered its Caribbean drum and rapping new territory for her. "Dear Future Husband" is a doo-wop, pop, and girl-group bounce song, with influences of jazz. It opens with a stylus sound on a damaged vinyl and transitions into retro ukulele instrumentation, further incorporating brisk piano, buoyant brass, and a drum track. The final track, "Close Your Eyes", is a contemporary ballad on which Trainor gives a soulful and "nuanced, fluttery vocal performance" over an acoustic guitar and pitch-shifted background vocals.
Lyrics
For Title, Trainor wrote lyrics about things she thought many people ignore, such as "commitment and staying true to one's self". She wanted to speak from the place of "an awkward 19-, 20-year-old, when you're pretty sure you're an adult but you're not, yet," and identified the EP's material as "too young for Kesha" and too mature for Disney. It comprises "very personal, girl power anthems" that Trainor wishes existed when she attended high school: "Like, love yourself more, respect yourself more[...] There are girl empowerment songs—like 'I love myself I'm beautiful'—but there are also 'I deserve a good man, I deserve a good boyfriend, man, you should take me out.'
Trainor and Kadish grew up as "chubby" kids, and wrote the lyrics of "All About That Bass" as a call to embrace inner beauty, and promote positive body image and self-acceptance. She calls out the fashion industry for creating unreachable beauty standards and criticizes the use of Photoshop in magazines. It includes the line "I'm bringing booty back", as a reference to Justin Timberlake's single "SexyBack" (2006). Trainor, who was ill-treated by unemployed men she dated in the past, wrote the title track and "Dear Future Husband" to correct issues with contemporary dating and hookup culture, like women basing their self worth on social media likes and whether their partner replied to their texts. On the title track, she refuses to be friends with benefits and pushes her partner to define their relationship more clearly. "Dear Future Husband" is about chivalry and dating, and lists the things a man needs to do to be Trainor's life partner, and win her adoration and dedication. These include "treat[ing her] like a lady" even when she behaves insanely, calling her pretty every night, and putting her family above his. "Close Your Eyes" encourages listeners to embrace what makes them different and show their authentic personality to the world.
Release and promotion
MTV News premiered the title track on September 5, 2014. Epic Records released the EP through compact disc (CD) and digital download formats four days later. The label released the CD in Australia on September 12. It debuted at number 15 on the Billboard 200 chart dated September 27, with first-week sales of 21,000 copies, and sold over 171,000 copies in the United States. Title peaked at number 17 on the Canadian Albums Chart and number 35 on the Danish Albums Chart. The digital release of "All About That Bass" in some European countries shared an identical track list. A pre-order of Trainor's 2015 debut major-label studio album of the same name, which included all tracks from the EP, replaced it later that month.
"All About That Bass" served as the lead single from Title. It spent eight consecutive weeks at number one on the US Billboard Hot 100, the longest run for any Epic Records artist in the chart's history, and was the best-selling song by a female artist in the 2010s, with 5.8 million digital downloads. The lyrics caused controversy; some critics called the song anti-feminist and accused Trainor of shaming thin women. It was nominated for Record of the Year and Song of the Year at the 57th Annual Grammy Awards. "Dear Future Husband" and the title track were both considered options for release as Trainor's second single. Reid scrapped them in favor of "Lips Are Movin" (2014), which he thought "will do better". "Dear Future Husband" was eventually chosen as the third single from the album in 2015, and peaked at number 14 on the Billboard Hot 100. The title track attained viral popularity on video-sharing service TikTok in 2021.
Trainor promoted Title by performing its songs on various television shows and her concert tours. She sang "All About That Bass" at an Emily West concert, Live! with Kelly and Michael, for Entertainment Tonight, The Tonight Show Starring Jimmy Fallon, The X Factor (Australia), and 2Day FM. She reprised the title track in sessions for MTV and the National Post, and as a mashup with "All About That Bass" at the 2014 iHeartRadio Music Festival. Trainor included all tracks from the EP on her set list for the Jingle Ball Tour 2014, and her 2015 concert tours That Bass Tour and MTrain Tour.
Critical reception
Title received mixed reviews from music critics. Collar rated the EP four stars out of five, and Knoxville News Sentinel and Dolan rated it three. Collar praised Trainor's vocals as "soulful, highly resonant," and catchy; he considered "Dear Future Husband" and "All About That Bass" irresistible. Others criticized the lyrical themes as repetitive on Title despite its short duration. Knoxville News Sentinel thought she showed crisp artistic vision on the EP but dubbed its tracks "sort-of sequels" of her debut single. The newspaper said it proved Trainor was a "one-trick pony" and left much to the imagination about what else she is capable of doing. Chris DeVille of Stereogum thought she could only outlast the success of "All About That Bass" if she found new topics to write about, and was disappointed that the lyrics of "Dear Future Husband" and the title track were interchangeable. He maintained that any tracks on Title could achieve chart success with ample promotion.
Track listing
Kadish produced all songs and wrote them with Trainor.
Credits and personnel
Credits are adapted from the EP's liner notes.
Locations
Recorded, engineered, and mixed at The Carriage House, Nolensville, Tennessee
Mastered at The Mastering Palace, New York City
Personnel
Meghan Trainor – songwriter, executive producer, clapping, percussion, ukulele, drum programming
Kevin Kadish – songwriter, producer, drum programming, acoustic guitar, electric guitar, hammond organ, vox organ, piano, bass, sound design, mixing, recording, engineering, synthesizer, background vocals, executive producer
David Baron – piano, baritone saxophone, hammond organ
Jim Hoke – baritone saxophone, tenor saxophone (track 3)
Jeremy Lister – background vocals (track 4)
Dave Kutch – mastering
Fatima Robinson – art direction, art design
JP Robinson – art direction, art design
Sarah McColgan – photography
Charts
Weekly charts
Year-end charts
Release history
Footnotes
References
2014 debut EPs
Epic Records EPs
Meghan Trainor albums
Albums produced by Kevin Kadish
|
St. Edmund's College, often abbreviated as SEC, is an educational institute of the Congregation of Christian Brothers located in Shillong, Meghalaya, India. It is the oldest college in Meghalaya and second oldest in Northeast India behind Cotton College, Guwahati (1901). It was established in 1924 and celebrated its Platinum Jubilee in 1999. An alumnus of St. Edmund's College, Shillong or St. Edmund's School, Shillong is often called an Edmundian.
History
The history of St. Edmund's College, Shillong is intermingled with the brave efforts of the Germans and the Irish. The Christian Brothers were invited to Shillong in 1915 and St. Edmund's College was founded by the Irish Christian Brothers in 1916 as a higher secondary school and was recognised by the Cambridge University for examination up to Higher School Certificate level. Bro. Luke Aherne was the first director and Bro. M. S. O'Brian, the first sub-director. The college finally opened on 6 October 1916 by the Chief Commissioner of Assam and an educationist, sir Archdale Earle, with 32 boarders and 8 day scholars. The institution grew rapidly and by 1918 it had 89 boarders and 23 days scholars. In 1919, the number increased to 100 boarders and 16 day scholars. Out of them, 8 boys were sent, for the first time, for Higher Cambridge Local Certificate Examinations and 3 passed which was considered a remarkable achievement at that time. When the Government of India Act 1919 was passed, the college got affiliated with Calcutta University for Intermediate Arts (I.A.) and Intermediate Science (I.Sc.) courses in 1923. The first classes of the University section of St. Edmund's College opened in 1924. Bro. J.E. McCann was the first principal of the College (he was also the Principal of the School at this time). Bro. I.O' Leary was the first Principal of the College (separate from the School). From 1924 to 1936, St. Edmund's College was a junior college for intermediate Arts and Science. Bro. J.C. Roe conceived the idea of opening up university classes up to B.A. and B.T. (Bachelor of Teaching) standards and extension of these affiliation was granted on 14 September 1935. This was the first time when a non-government college in the Assam Province got affiliation up to B.A. and B.T. standards.
With the genesis of Gauhati University on 26 January 1948, the college got affiliated with it. In 1953, with the request of The DPI of Assam and the government, the college opened up courses for B.Sc. The science stream was thus started in August 1959. Later on the college came under NEHU in 1973 for which till today its associated with.
The commerce stream was introduced in 1997 and the college celebrated its Platinum Jubilee in 1999. In 2007, the Bachelor for Social Work (BSW) course was introduced. In 2010, the Higher Secondary section was segregated into a separate section within the college. In July, 2011, postgraduate courses for master's degree in social work were introduced.
Administration
The 2019 administrative set up of the college are:
Dr Sylvanus Lamare, (Principal)
Br A. F. Pinto, cfc, (Rector)
Br Simon Coelho, cfc, (Secretary Governing Body)
Br Stelljes Julius, (Bursar)
Prof Gideon L. Kharkongor, (Co-ordinator of IQAC)
The team, along with all the members of the IQAC, Heads of Departments, teaching faculty, office staff and associate staff run the day-today affairs of the college.
Campus and buildings
Located in Laitumkhrah, Shillong, St. Edmund's College has a green, sprawling campus with many buildings and sports facilities. The main gate is on the south-east side of the campus, located on National Highway 40. The campus stretches up to near Laitumkhrah Bazar in the north-eastern side, traverses towards the north-west up to near the Cathedral of Mary Help of Christians. In between, the northern perimeter is dotted by important institutions and landmarks such as Bethany Society, NCC Office, Mary Rice School, Don Bosco Mini Stadium, etc. The south-western perimeter stretches up to Assam House. The main campus of SEC is shared by St. Edmund's School. The school occupies the south-west section of the campus and has two football fields, a cricket ground, basketball courts, volleyball court, squash court, Chapel and Grotto, living quarters for the Christian Brothers, etc.
Academic facilities
Laboratories
The Laboratories are well-equipped with all the modern amenities and calibrated instruments. The Computer Lab, besides holding routine class works also doubles up as the IT Hub of the college taking care of the networking (and maintenance) of different parts of the college.
Placement cell
The idea of a counseling cell was conceived by the principal Bro E. V. Miranda in 2002. The activities of career related information relating to fields like Chartered Accountants (CA), Master of Business Administration (MBA), Institute of Cost Accountants of India (ICWA), Company Secretary (CS) etc. were carried out. Collected information from various sources like Employment News, other news papers and journals, were shared with the students. The cell used to coordinate placement related activities conducted by organizations that used to voluntarily visit the campus for recruitment purpose.
In 2004 when Bro. L.D. Lobo was the principal, the college started a full-fledged counseling and placement cell. Since then, the placement cell has had its own office. Currently the Cell is coordinated by two members of the staff along with a professional counsellor, who joined in 2009.
Biotechnology Centre
The institutional Bioinformatics centre located at the premises of the Department of Biotechnology was sanctioned in 2008 and came into existence in 2009 under the BTIS NET programme of Department of Biotechnology, Govt. of India. Since its inception the centre is engaged in bioinformatics research and also initiating various training programmes catering to the needs of the undergraduate students in life science and also the faculty members. Beside these the centre is also engaged in high throughput biotechnology research with a young dedicated faculty and has substantially contributed to the basic science streams pertaining to the needs of students.
Library
The library of SEC has one of the widest collection of books in Shillong. The library is situated at the ground floor in the new campus building. It has a large reading space for both students and teachers. The library has a collection of well over 50,000 books including 800+ reference books. Apart from the Central Library, each department has its own departmental library in the respective departmental rooms with a reasonable collection of books, mainly for referencing by staff and students of that department. The library of SEC is also a member of the American libraries Kolkata and can loan up to 20 books for eight weeks. Any member can log on to the website and browse their collection and request the required books on social sciences, American literature, management, environment and information technology. Apart from providing book services the library also includes
Internet service - The library provides internet and audio visual section where students can use for their assignments and projects.
Clippings - News clipping only of The Economic Times newspaper are provided to help students be aware of the latest developments in the subject. The economics department has prepared the clippings from 2006 onwards.
Hostels
From 2013, St. Edmund's College maintains three hostels, namely Brother O' Leary Residence (also known as the B.T. Hostel); Bro. J. N. Foley Students' Residence (formerly known as the New Hostel) for about 100 boys and for about 50 girls (exact name may differ). The Bro. O'Leary Residence was founded in 1937 by Rev. Bro. J. I. O'Leary of the Congregation of Irish Christian Brothers as a post-graduate residence for students attending Bachelor of Teaching (B.T.) courses in the St. Edmund's College. After about 14 years to support the changed need of the students, there was qualitative change of the hostel. It was converted into an undergraduate residence for the students of St. Edmund's College in 1951.
Since the day of foundation the academic environment of the hostel was nurtured and strengthened by the hostel superintendents, especially Dr. B Dutta Ray, who was the Hostel superintendent for most of the years since the hostel was opened to undergraduate students.
The Bro. J. N. Foley Students' Residence was constructed in 1957 and the first batch of Hostel students was taken in 1958. It has accommodation for about 50 boarders. The hostel provides a conducive environment for studies. In 1998, the Hostel was dedicated, as a mark of respect and in fond memory of Bro. J. N Foley a former principal of the College, during whose tenure the hostel was opened. The hostel superintendent has been supported in their care for the students by the respective Principals: Rev. Brothers E. X. Leonard, J. N. Foley, R. B. Vieyra, M. G. Shannon, and W. D' Souza, A. F. Pinto, E. V. Miranda and L. D. Lobo.
A Girls Hostel was established in 2013.
Auditorium
The College has a multi-purpose auditorium with a seating capacity of approximately 1000 people. It is equipped with all the basic features of a modern auditorium, such as good sound system, large stage, proper lightings, etc.
Audio/Visual Room
SEC has a 100-seat audio-visual room complete with LCD projector, computers, PA system and overhead projector, seminars and workshops etc. are carried out in this room. It is also used as a class room whenever AV aids are required for teaching. Film related to the course of study are screened occasionally. Besides the main AV room, most of the departments have their own LCD projector (with computer) and overhead projectors to aid in their teaching.
Canteens
The College has one canteen and a coffeehouse. A new outdoor canteen is available next to the Higher Secondary's canteen.
Gym
The preparation for the gym site and facility began in 2009. The old library (above the students and staff canteen) was selected as the place where the new gym would come up, primarily because of its size (approx 3000 sq. ft. area) and its strategic location. The entire area has wall-to-wall carpeting and big-sized mirrors are fixed on the walls to give an even more spacious look. A 21-station multi-gym opened in April 2010 along with plates and dumbbells bars, stands, racks and benches. The gym was formally inaugurated in June 2010. The gym is open to all students, both boys and girls. A qualified gym instructor and a helper have been appointed to coach the students. Currently, more than a hundred students have enrolled themselves in the gym, along with a few teachers.
Academic profile
The college offers undergraduate courses in B.A., B. Com., B.Sc., BCA and B.SW degrees and postgraduate course in M.SW. The college has 19 teaching Departments covering in the fields of Arts, Science and Commerce and two other training programmes. The faculty or arts has 10 departments: Bengali, English, Economics, Geography, Hindi, History, Khasi, Nepali, Political Science and Sociology. The department of Science consists of Biochemistry, Botany, Chemistry, Computer Science, Electronics, Mathematics, Physics and Zoology and the faculty of Commerce, a fully self-financing faculty, has just one departmental unit of Commerce. The College also runs two self-financing Certificate and Diploma courses. The faculties have academic and administrative linkage with the administration through the office of three Deans, an unusual feature for undergraduate colleges.
The college has a high percentage requirement of student's attendance (80% required by the institution and 75% required by the NEHU) and students missing it are not sent for any University examination.
College Week
Started in 2001, the college week (sometimes called college month depending on how long it's celebrated) is an annual week/month long recreational celebration event held every September (in some years it is held in October). There are over 42 activities available for students to choose and participate in. The event usually commences with outdoor sport activities followed by competitions in various fields. College week is marked by the opening of folk dance performed by the different tribes of SEC students.
Notable alumni
Academically, SEC has a long-standing good record.
Hamlet Bareh, Historian and Padma Shri winner
Humayun Rashid Choudhury, Former MP, Minister of Foreign Affairs, Speaker of the Jatiya Sangsad and President of the United Nations General Assembly.
Chalie Kevichüsa, Naga Journalist
Nicholas Kharkongor, Film director
Vizol Koso, Chief Minister of Nagaland (1974–1975; 1977–1980)
James Michael Lyngdoh - IAS officer and former Chief Election Commissioner of India.
References
External links
St. Edmund's College, Shillong Official Website
NEHU - North Eastern Hill University
Meghalaya Board of School Education
High schools and secondary schools in Meghalaya
Universities and colleges in Meghalaya
Colleges affiliated to North-Eastern Hill University
Universities and colleges established in 1916
Congregation of Christian Brothers secondary schools
Universities and colleges established in 1924
1916 establishments in India
1924 establishments in India
|
```python
"""
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.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
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 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 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 DAMAGE.
"""
from itertools import count, takewhile
from typing import Iterator
import logging
import time
from asyncio import sleep
from bleak import BleakClient
from bleak.backends.characteristic import BleakGATTCharacteristic
logger = logging.getLogger(__name__)
class BleStream:
def __init__(self, client, service_uuid, tx_char_uuid, rx_char_uuid):
self.__receive_buffer = b''
self.__last_recv_time = None
self.client = client
self.service_uuid = service_uuid
self.tx_char_uuid = tx_char_uuid
self.rx_char_uuid = rx_char_uuid
async def __aenter__(self):
return self
async def __aexit__(self, exc_type, exc_value, traceback):
if self.client.is_connected:
await self.client.disconnect()
def __handle_rx(self, _: BleakGATTCharacteristic, data: bytearray):
logger.debug(f'received {len(data)} bytes')
self.__receive_buffer += data
self.__last_recv_time = time.time()
@staticmethod
def __sliced(data: bytes, n: int) -> Iterator[bytes]:
return takewhile(len, (data[i:i + n] for i in count(0, n)))
@classmethod
async def create(cls, address, service_uuid, tx_char_uuid, rx_char_uuid):
client = BleakClient(address)
await client.connect()
self = cls(client, service_uuid, tx_char_uuid, rx_char_uuid)
await client.start_notify(self.tx_char_uuid, self.__handle_rx)
return self
async def send(self, data):
logger.debug(f'sending {data}')
services = self.client.services.get_service(self.service_uuid)
rx_char = services.get_characteristic(self.rx_char_uuid)
for s in BleStream.__sliced(data, rx_char.max_write_without_response_size):
await self.client.write_gatt_char(rx_char, s)
return len(data)
async def recv(self, bufsize, recv_timeout=0.2):
if not self.__receive_buffer:
return b''
while time.time() - self.__last_recv_time <= recv_timeout:
await sleep(0.1)
message = self.__receive_buffer[:bufsize]
self.__receive_buffer = self.__receive_buffer[bufsize:]
logger.debug(f'retrieved {message}')
return message
```
|
```xml
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Configuration.props" />
<PropertyGroup>
<TargetFramework>$(DotNetTargetFramework)</TargetFramework>
<DefineConstants>ILLINK</DefineConstants>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>$(MicrosoftAndroidSdkOutDir)</OutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.ILLink" Version="$(MicrosoftNETILLinkTasksPackageVersion)" />
<ProjectReference Include="..\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.csproj" ReferenceOutputAssembly="False" />
<Compile Include="..\Xamarin.Android.Build.Tasks\obj\$(Configuration)\Profile.g.cs" Link="Profile.g.cs" />
<!--Include shared linker sources-->
<Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\AddKeepAlivesStep.cs" Link="MonoDroid.Tuner\AddKeepAlivesStep.cs" />
<Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\AndroidLinkConfiguration.cs" Link="MonoDroid.Tuner\AndroidLinkConfiguration.cs" />
<Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\Extensions.cs" Link="MonoDroid.Tuner\Extensions.cs" />
<Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\FixAbstractMethodsStep.cs" Link="MonoDroid.Tuner\FixAbstractMethodsStep.cs" />
<Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\FixLegacyResourceDesignerStep.cs" Link="MonoDroid.Tuner\FixLegacyResourceDesignerStep.cs" />
<Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\LinkDesignerBase.cs" Link="MonoDroid.Tuner\LinkDesignerBase.cs" />
<Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\RemoveResourceDesignerStep.cs" Link="MonoDroid.Tuner\RemoveResourceDesignerStep.cs" />
<Compile Include="..\Xamarin.Android.Build.Tasks\Linker\MonoDroid.Tuner\MonoDroidProfile.cs" Link="MonoDroid.Tuner\MonoDroidProfile.cs" />
<Compile Include="..\Xamarin.Android.Build.Tasks\Linker\Mobile.Tuner\MobileProfile.cs" Link="Mobile.Tuner\MobileProfile.cs" />
<!--Other .NET for Android / Java.Interop files-->
<Compile Include="..\..\external\Java.Interop\src\Java.Interop.Tools.Cecil\Java.Interop.Tools.Cecil\CustomAttributeProviderRocks.cs" Link="Java.Interop\CustomAttributeProviderRocks.cs" />
<Compile Include="..\..\external\Java.Interop\src\Java.Interop.Tools.Cecil\Java.Interop.Tools.Cecil\MethodDefinitionRocks.cs" Link="Java.Interop\MethodDefinitionRocks.cs" />
<Compile Include="..\..\external\Java.Interop\src\Java.Interop.Tools.Cecil\Java.Interop.Tools.Cecil\TypeDefinitionCache.cs" Link="Java.Interop\TypeDefinitionCache.cs" />
<Compile Include="..\..\external\Java.Interop\src\Java.Interop.Tools.Cecil\Java.Interop.Tools.Cecil\TypeDefinitionRocks.cs" Link="Java.Interop\TypeDefinitionRocks.cs" />
<Compile Include="..\Xamarin.Android.Build.Tasks\Utilities\MonoAndroidHelper.Linker.cs" Link="Utilities\MonoAndroidHelper.Linker.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Java.Interop\" />
<Folder Include="Utilities\" />
</ItemGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)PreserveLists\*.xml">
<Link>..\PreserveLists\%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>
```
|
```php
<?php
namespace Spatie\SchemaOrg;
use Spatie\SchemaOrg\Contracts\CreativeWorkContract;
use Spatie\SchemaOrg\Contracts\DrawingContract;
use Spatie\SchemaOrg\Contracts\ThingContract;
/**
* A picture or diagram made with a pencil, pen, or crayon rather than paint.
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*
*/
class Drawing extends BaseType implements DrawingContract, CreativeWorkContract, ThingContract
{
/**
* The subject matter of the content.
*
* @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $about
*
* @return static
*
* @see path_to_url
* @link path_to_url
*/
public function about($about)
{
return $this->setProperty('about', $about);
}
/**
* An abstract is a short description that summarizes a [[CreativeWork]].
*
* @param string|string[] $abstract
*
* @return static
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*/
public function abstract($abstract)
{
return $this->setProperty('abstract', $abstract);
}
/**
* The human sensory perceptual system or cognitive faculty through which a
* person may process or perceive information. Values should be drawn from
* the [approved
* vocabulary](path_to_url#accessMode-vocabulary).
*
* @param string|string[] $accessMode
*
* @return static
*
* @see path_to_url
* @link path_to_url
*/
public function accessMode($accessMode)
{
return $this->setProperty('accessMode', $accessMode);
}
/**
* A list of single or combined accessModes that are sufficient to
* understand all the intellectual content of a resource. Values should be
* drawn from the [approved
* vocabulary](path_to_url#accessModeSufficient-vocabulary).
*
* @param \Spatie\SchemaOrg\Contracts\ItemListContract|\Spatie\SchemaOrg\Contracts\ItemListContract[] $accessModeSufficient
*
* @return static
*
* @see path_to_url
* @link path_to_url
*/
public function accessModeSufficient($accessModeSufficient)
{
return $this->setProperty('accessModeSufficient', $accessModeSufficient);
}
/**
* Indicates that the resource is compatible with the referenced
* accessibility API. Values should be drawn from the [approved
* vocabulary](path_to_url#accessibilityAPI-vocabulary).
*
* @param string|string[] $accessibilityAPI
*
* @return static
*
* @see path_to_url
*/
public function accessibilityAPI($accessibilityAPI)
{
return $this->setProperty('accessibilityAPI', $accessibilityAPI);
}
/**
* Identifies input methods that are sufficient to fully control the
* described resource. Values should be drawn from the [approved
* vocabulary](path_to_url#accessibilityControl-vocabulary).
*
* @param string|string[] $accessibilityControl
*
* @return static
*
* @see path_to_url
*/
public function accessibilityControl($accessibilityControl)
{
return $this->setProperty('accessibilityControl', $accessibilityControl);
}
/**
* Content features of the resource, such as accessible media, alternatives
* and supported enhancements for accessibility. Values should be drawn from
* the [approved
* vocabulary](path_to_url#accessibilityFeature-vocabulary).
*
* @param string|string[] $accessibilityFeature
*
* @return static
*
* @see path_to_url
*/
public function accessibilityFeature($accessibilityFeature)
{
return $this->setProperty('accessibilityFeature', $accessibilityFeature);
}
/**
* A characteristic of the described resource that is physiologically
* dangerous to some users. Related to WCAG 2.0 guideline 2.3. Values should
* be drawn from the [approved
* vocabulary](path_to_url#accessibilityHazard-vocabulary).
*
* @param string|string[] $accessibilityHazard
*
* @return static
*
* @see path_to_url
*/
public function accessibilityHazard($accessibilityHazard)
{
return $this->setProperty('accessibilityHazard', $accessibilityHazard);
}
/**
* A human-readable summary of specific accessibility features or
* deficiencies, consistent with the other accessibility metadata but
* expressing subtleties such as "short descriptions are present but long
* descriptions will be needed for non-visual users" or "short descriptions
* are present and no long descriptions are needed".
*
* @param string|string[] $accessibilitySummary
*
* @return static
*
* @see path_to_url
* @link path_to_url
*/
public function accessibilitySummary($accessibilitySummary)
{
return $this->setProperty('accessibilitySummary', $accessibilitySummary);
}
/**
* Specifies the Person that is legally accountable for the CreativeWork.
*
* @param \Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $accountablePerson
*
* @return static
*
* @see path_to_url
*/
public function accountablePerson($accountablePerson)
{
return $this->setProperty('accountablePerson', $accountablePerson);
}
/**
* Indicates a page documenting how licenses can be purchased or otherwise
* acquired, for the current item.
*
*
* @return static
*
* @see path_to_url
* @link path_to_url
*/
{
}
/**
* An additional type for the item, typically used for adding more specific
* types from external vocabularies in microdata syntax. This is a
* relationship between something and a class that the thing is in.
* Typically the value is a URI-identified RDF class, and in this case
* corresponds to the
* use of rdf:type in RDF. Text values can be used sparingly, for cases
* where useful information can be added without their being an appropriate
* schema to reference. In the case of text values, the class label should
* follow the schema.org [style
* guide](path_to_url
*
* @param string|string[] $additionalType
*
* @return static
*
* @see path_to_url
*/
public function additionalType($additionalType)
{
return $this->setProperty('additionalType', $additionalType);
}
/**
* The overall rating, based on a collection of reviews or ratings, of the
* item.
*
* @param \Spatie\SchemaOrg\Contracts\AggregateRatingContract|\Spatie\SchemaOrg\Contracts\AggregateRatingContract[] $aggregateRating
*
* @return static
*
* @see path_to_url
*/
public function aggregateRating($aggregateRating)
{
return $this->setProperty('aggregateRating', $aggregateRating);
}
/**
* An alias for the item.
*
* @param string|string[] $alternateName
*
* @return static
*
* @see path_to_url
*/
public function alternateName($alternateName)
{
return $this->setProperty('alternateName', $alternateName);
}
/**
* A secondary title of the CreativeWork.
*
* @param string|string[] $alternativeHeadline
*
* @return static
*
* @see path_to_url
*/
public function alternativeHeadline($alternativeHeadline)
{
return $this->setProperty('alternativeHeadline', $alternativeHeadline);
}
/**
* Indicates a page or other link involved in archival of a
* [[CreativeWork]]. In the case of [[MediaReview]], the items in a
* [[MediaReviewItem]] may often become inaccessible, but be archived by
* archival, journalistic, activist, or law enforcement organizations. In
* such cases, the referenced page may not directly publish the content.
*
* @param \Spatie\SchemaOrg\Contracts\WebPageContract|\Spatie\SchemaOrg\Contracts\WebPageContract[]|string|string[] $archivedAt
*
* @return static
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*/
public function archivedAt($archivedAt)
{
return $this->setProperty('archivedAt', $archivedAt);
}
/**
* The item being described is intended to assess the competency or learning
* outcome defined by the referenced term.
*
* @param \Spatie\SchemaOrg\Contracts\DefinedTermContract|\Spatie\SchemaOrg\Contracts\DefinedTermContract[]|string|string[] $assesses
*
* @return static
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*/
public function assesses($assesses)
{
return $this->setProperty('assesses', $assesses);
}
/**
* A media object that encodes this CreativeWork. This property is a synonym
* for encoding.
*
* @param \Spatie\SchemaOrg\Contracts\MediaObjectContract|\Spatie\SchemaOrg\Contracts\MediaObjectContract[] $associatedMedia
*
* @return static
*
* @see path_to_url
*/
public function associatedMedia($associatedMedia)
{
return $this->setProperty('associatedMedia', $associatedMedia);
}
/**
* An intended audience, i.e. a group for whom something was created.
*
* @param \Spatie\SchemaOrg\Contracts\AudienceContract|\Spatie\SchemaOrg\Contracts\AudienceContract[] $audience
*
* @return static
*
* @see path_to_url
*/
public function audience($audience)
{
return $this->setProperty('audience', $audience);
}
/**
* An embedded audio object.
*
* @param \Spatie\SchemaOrg\Contracts\AudioObjectContract|\Spatie\SchemaOrg\Contracts\AudioObjectContract[]|\Spatie\SchemaOrg\Contracts\ClipContract|\Spatie\SchemaOrg\Contracts\ClipContract[]|\Spatie\SchemaOrg\Contracts\MusicRecordingContract|\Spatie\SchemaOrg\Contracts\MusicRecordingContract[] $audio
*
* @return static
*
* @see path_to_url
* @link path_to_url
*/
public function audio($audio)
{
return $this->setProperty('audio', $audio);
}
/**
* The author of this content or rating. Please note that author is special
* in that HTML 5 provides a special mechanism for indicating authorship via
* the rel tag. That is equivalent to this and may be used interchangeably.
*
* @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $author
*
* @return static
*
* @see path_to_url
*/
public function author($author)
{
return $this->setProperty('author', $author);
}
/**
* An award won by or for this item.
*
* @param string|string[] $award
*
* @return static
*
* @see path_to_url
*/
public function award($award)
{
return $this->setProperty('award', $award);
}
/**
* Awards won by or for this item.
*
* @param string|string[] $awards
*
* @return static
*
* @see path_to_url
*/
public function awards($awards)
{
return $this->setProperty('awards', $awards);
}
/**
* Fictional person connected with a creative work.
*
* @param \Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $character
*
* @return static
*
* @see path_to_url
*/
public function character($character)
{
return $this->setProperty('character', $character);
}
/**
* A citation or reference to another creative work, such as another
* publication, web page, scholarly article, etc.
*
* @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $citation
*
* @return static
*
* @see path_to_url
*/
public function citation($citation)
{
return $this->setProperty('citation', $citation);
}
/**
* Comments, typically from users.
*
* @param \Spatie\SchemaOrg\Contracts\CommentContract|\Spatie\SchemaOrg\Contracts\CommentContract[] $comment
*
* @return static
*
* @see path_to_url
*/
public function comment($comment)
{
return $this->setProperty('comment', $comment);
}
/**
* The number of comments this CreativeWork (e.g. Article, Question or
* Answer) has received. This is most applicable to works published in Web
* sites with commenting system; additional comments may exist elsewhere.
*
* @param int|int[] $commentCount
*
* @return static
*
* @see path_to_url
*/
public function commentCount($commentCount)
{
return $this->setProperty('commentCount', $commentCount);
}
/**
* Conditions that affect the availability of, or method(s) of access to, an
* item. Typically used for real world items such as an [[ArchiveComponent]]
* held by an [[ArchiveOrganization]]. This property is not suitable for use
* as a general Web access control mechanism. It is expressed only in
* natural language.
*
* For example "Available by appointment from the Reading Room" or
* "Accessible only from logged-in accounts ".
*
* @param string|string[] $conditionsOfAccess
*
* @return static
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*/
public function conditionsOfAccess($conditionsOfAccess)
{
return $this->setProperty('conditionsOfAccess', $conditionsOfAccess);
}
/**
* The location depicted or described in the content. For example, the
* location in a photograph or painting.
*
* @param \Spatie\SchemaOrg\Contracts\PlaceContract|\Spatie\SchemaOrg\Contracts\PlaceContract[] $contentLocation
*
* @return static
*
* @see path_to_url
*/
public function contentLocation($contentLocation)
{
return $this->setProperty('contentLocation', $contentLocation);
}
/**
* Official rating of a piece of content—for example, 'MPAA PG-13'.
*
* @param \Spatie\SchemaOrg\Contracts\RatingContract|\Spatie\SchemaOrg\Contracts\RatingContract[]|string|string[] $contentRating
*
* @return static
*
* @see path_to_url
*/
public function contentRating($contentRating)
{
return $this->setProperty('contentRating', $contentRating);
}
/**
* The specific time described by a creative work, for works (e.g. articles,
* video objects etc.) that emphasise a particular moment within an Event.
*
* @param \DateTimeInterface|\DateTimeInterface[] $contentReferenceTime
*
* @return static
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*/
public function contentReferenceTime($contentReferenceTime)
{
return $this->setProperty('contentReferenceTime', $contentReferenceTime);
}
/**
* A secondary contributor to the CreativeWork or Event.
*
* @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $contributor
*
* @return static
*
* @see path_to_url
*/
public function contributor($contributor)
{
return $this->setProperty('contributor', $contributor);
}
/**
* The party holding the legal copyright to the CreativeWork.
*
* @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $copyrightHolder
*
* @return static
*
* @see path_to_url
*/
public function copyrightHolder($copyrightHolder)
{
return $this->setProperty('copyrightHolder', $copyrightHolder);
}
/**
* Text of a notice appropriate for describing the copyright aspects of this
* Creative Work, ideally indicating the owner of the copyright for the
* Work.
*
* @param string|string[] $copyrightNotice
*
* @return static
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*/
public function copyrightNotice($copyrightNotice)
{
return $this->setProperty('copyrightNotice', $copyrightNotice);
}
/**
* The year during which the claimed copyright for the CreativeWork was
* first asserted.
*
* @param float|float[]|int|int[] $copyrightYear
*
* @return static
*
* @see path_to_url
*/
public function copyrightYear($copyrightYear)
{
return $this->setProperty('copyrightYear', $copyrightYear);
}
/**
* Indicates a correction to a [[CreativeWork]], either via a
* [[CorrectionComment]], textually or in another document.
*
* @param \Spatie\SchemaOrg\Contracts\CorrectionCommentContract|\Spatie\SchemaOrg\Contracts\CorrectionCommentContract[]|string|string[] $correction
*
* @return static
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*/
public function correction($correction)
{
return $this->setProperty('correction', $correction);
}
/**
* The country of origin of something, including products as well as
* creative works such as movie and TV content.
*
* In the case of TV and movie, this would be the country of the principle
* offices of the production company or individual responsible for the
* movie. For other kinds of [[CreativeWork]] it is difficult to provide
* fully general guidance, and properties such as [[contentLocation]] and
* [[locationCreated]] may be more applicable.
*
* In the case of products, the country of origin of the product. The exact
* interpretation of this may vary by context and product type, and cannot
* be fully enumerated here.
*
* @param \Spatie\SchemaOrg\Contracts\CountryContract|\Spatie\SchemaOrg\Contracts\CountryContract[] $countryOfOrigin
*
* @return static
*
* @see path_to_url
*/
public function countryOfOrigin($countryOfOrigin)
{
return $this->setProperty('countryOfOrigin', $countryOfOrigin);
}
/**
* The status of a creative work in terms of its stage in a lifecycle.
* Example terms include Incomplete, Draft, Published, Obsolete. Some
* organizations define a set of terms for the stages of their publication
* lifecycle.
*
* @param \Spatie\SchemaOrg\Contracts\DefinedTermContract|\Spatie\SchemaOrg\Contracts\DefinedTermContract[]|string|string[] $creativeWorkStatus
*
* @return static
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*/
public function creativeWorkStatus($creativeWorkStatus)
{
return $this->setProperty('creativeWorkStatus', $creativeWorkStatus);
}
/**
* The creator/author of this CreativeWork. This is the same as the Author
* property for CreativeWork.
*
* @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $creator
*
* @return static
*
* @see path_to_url
*/
public function creator($creator)
{
return $this->setProperty('creator', $creator);
}
/**
* Text that can be used to credit person(s) and/or organization(s)
* associated with a published Creative Work.
*
* @param string|string[] $creditText
*
* @return static
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*/
public function creditText($creditText)
{
return $this->setProperty('creditText', $creditText);
}
/**
* The date on which the CreativeWork was created or the item was added to a
* DataFeed.
*
* @param \DateTimeInterface|\DateTimeInterface[] $dateCreated
*
* @return static
*
* @see path_to_url
*/
public function dateCreated($dateCreated)
{
return $this->setProperty('dateCreated', $dateCreated);
}
/**
* The date on which the CreativeWork was most recently modified or when the
* item's entry was modified within a DataFeed.
*
* @param \DateTimeInterface|\DateTimeInterface[] $dateModified
*
* @return static
*
* @see path_to_url
*/
public function dateModified($dateModified)
{
return $this->setProperty('dateModified', $dateModified);
}
/**
* Date of first broadcast/publication.
*
* @param \DateTimeInterface|\DateTimeInterface[] $datePublished
*
* @return static
*
* @see path_to_url
*/
public function datePublished($datePublished)
{
return $this->setProperty('datePublished', $datePublished);
}
/**
* A description of the item.
*
* @param \Spatie\SchemaOrg\Contracts\TextObjectContract|\Spatie\SchemaOrg\Contracts\TextObjectContract[]|string|string[] $description
*
* @return static
*
* @see path_to_url
*/
public function description($description)
{
return $this->setProperty('description', $description);
}
/**
* Indicates an IPTCDigitalSourceEnumeration code indicating the nature of
* the digital source(s) for some [[CreativeWork]].
*
* @param \Spatie\SchemaOrg\Contracts\IPTCDigitalSourceEnumerationContract|\Spatie\SchemaOrg\Contracts\IPTCDigitalSourceEnumerationContract[] $digitalSourceType
*
* @return static
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*/
public function digitalSourceType($digitalSourceType)
{
return $this->setProperty('digitalSourceType', $digitalSourceType);
}
/**
* A sub property of description. A short description of the item used to
* disambiguate from other, similar items. Information from other properties
* (in particular, name) may be necessary for the description to be useful
* for disambiguation.
*
* @param string|string[] $disambiguatingDescription
*
* @return static
*
* @see path_to_url
*/
public function disambiguatingDescription($disambiguatingDescription)
{
return $this->setProperty('disambiguatingDescription', $disambiguatingDescription);
}
/**
* A link to the page containing the comments of the CreativeWork.
*
* @param string|string[] $discussionUrl
*
* @return static
*
* @see path_to_url
*/
public function discussionUrl($discussionUrl)
{
return $this->setProperty('discussionUrl', $discussionUrl);
}
/**
* An [EIDR](path_to_url (Entertainment Identifier Registry)
* [[identifier]] representing a specific edit / edition for a work of film
* or television.
*
* For example, the motion picture known as "Ghostbusters" whose
* [[titleEIDR]] is "10.5240/7EC7-228A-510A-053E-CBB8-J" has several edits,
* e.g. "10.5240/1F2A-E1C5-680A-14C6-E76B-I" and
* "10.5240/8A35-3BEE-6497-5D12-9E4F-3".
*
* Since schema.org types like [[Movie]] and [[TVEpisode]] can be used for
* both works and their multiple expressions, it is possible to use
* [[titleEIDR]] alone (for a general description), or alongside
* [[editEIDR]] for a more edit-specific description.
*
* @param string|string[] $editEIDR
*
* @return static
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*/
public function editEIDR($editEIDR)
{
return $this->setProperty('editEIDR', $editEIDR);
}
/**
* Specifies the Person who edited the CreativeWork.
*
* @param \Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $editor
*
* @return static
*
* @see path_to_url
*/
public function editor($editor)
{
return $this->setProperty('editor', $editor);
}
/**
* An alignment to an established educational framework.
*
* This property should not be used where the nature of the alignment can be
* described using a simple property, for example to express that a resource
* [[teaches]] or [[assesses]] a competency.
*
* @param \Spatie\SchemaOrg\Contracts\AlignmentObjectContract|\Spatie\SchemaOrg\Contracts\AlignmentObjectContract[] $educationalAlignment
*
* @return static
*
* @see path_to_url
*/
public function educationalAlignment($educationalAlignment)
{
return $this->setProperty('educationalAlignment', $educationalAlignment);
}
/**
* The level in terms of progression through an educational or training
* context. Examples of educational levels include 'beginner',
* 'intermediate' or 'advanced', and formal sets of level indicators.
*
* @param \Spatie\SchemaOrg\Contracts\DefinedTermContract|\Spatie\SchemaOrg\Contracts\DefinedTermContract[]|string|string[] $educationalLevel
*
* @return static
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*/
public function educationalLevel($educationalLevel)
{
return $this->setProperty('educationalLevel', $educationalLevel);
}
/**
* The purpose of a work in the context of education; for example,
* 'assignment', 'group work'.
*
* @param \Spatie\SchemaOrg\Contracts\DefinedTermContract|\Spatie\SchemaOrg\Contracts\DefinedTermContract[]|string|string[] $educationalUse
*
* @return static
*
* @see path_to_url
*/
public function educationalUse($educationalUse)
{
return $this->setProperty('educationalUse', $educationalUse);
}
/**
* A media object that encodes this CreativeWork. This property is a synonym
* for associatedMedia.
*
* @param \Spatie\SchemaOrg\Contracts\MediaObjectContract|\Spatie\SchemaOrg\Contracts\MediaObjectContract[] $encoding
*
* @return static
*
* @see path_to_url
*/
public function encoding($encoding)
{
return $this->setProperty('encoding', $encoding);
}
/**
* Media type typically expressed using a MIME format (see [IANA
* site](path_to_url and
* [MDN
* reference](path_to_url
* e.g. application/zip for a SoftwareApplication binary, audio/mpeg for
* .mp3 etc.
*
* In cases where a [[CreativeWork]] has several media type representations,
* [[encoding]] can be used to indicate each [[MediaObject]] alongside
* particular [[encodingFormat]] information.
*
* Unregistered or niche encoding and file formats can be indicated instead
* via the most appropriate URL, e.g. defining Web page or a
* Wikipedia/Wikidata entry.
*
* @param string|string[] $encodingFormat
*
* @return static
*
* @see path_to_url
*/
public function encodingFormat($encodingFormat)
{
return $this->setProperty('encodingFormat', $encodingFormat);
}
/**
* A media object that encodes this CreativeWork.
*
* @param \Spatie\SchemaOrg\Contracts\MediaObjectContract|\Spatie\SchemaOrg\Contracts\MediaObjectContract[] $encodings
*
* @return static
*
* @see path_to_url
*/
public function encodings($encodings)
{
return $this->setProperty('encodings', $encodings);
}
/**
* A creative work that this work is an
* example/instance/realization/derivation of.
*
* @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[] $exampleOfWork
*
* @return static
*
* @see path_to_url
*/
public function exampleOfWork($exampleOfWork)
{
return $this->setProperty('exampleOfWork', $exampleOfWork);
}
/**
* Date the content expires and is no longer useful or available. For
* example a [[VideoObject]] or [[NewsArticle]] whose availability or
* relevance is time-limited, or a [[ClaimReview]] fact check whose
* publisher wants to indicate that it may no longer be relevant (or helpful
* to highlight) after some date.
*
* @param \DateTimeInterface|\DateTimeInterface[] $expires
*
* @return static
*
* @see path_to_url
*/
public function expires($expires)
{
return $this->setProperty('expires', $expires);
}
/**
* Media type, typically MIME format (see [IANA
* site](path_to_url of
* the content, e.g. application/zip of a SoftwareApplication binary. In
* cases where a CreativeWork has several media type representations,
* 'encoding' can be used to indicate each MediaObject alongside particular
* fileFormat information. Unregistered or niche file formats can be
* indicated instead via the most appropriate URL, e.g. defining Web page or
* a Wikipedia entry.
*
* @param string|string[] $fileFormat
*
* @return static
*
* @see path_to_url
*/
public function fileFormat($fileFormat)
{
return $this->setProperty('fileFormat', $fileFormat);
}
/**
* A person or organization that supports (sponsors) something through some
* kind of financial contribution.
*
* @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $funder
*
* @return static
*
* @see path_to_url
*/
public function funder($funder)
{
return $this->setProperty('funder', $funder);
}
/**
* A [[Grant]] that directly or indirectly provide funding or sponsorship
* for this item. See also [[ownershipFundingInfo]].
*
* @param \Spatie\SchemaOrg\Contracts\GrantContract|\Spatie\SchemaOrg\Contracts\GrantContract[] $funding
*
* @return static
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*/
public function funding($funding)
{
return $this->setProperty('funding', $funding);
}
/**
* Genre of the creative work, broadcast channel or group.
*
* @param string|string[] $genre
*
* @return static
*
* @see path_to_url
*/
public function genre($genre)
{
return $this->setProperty('genre', $genre);
}
/**
* Indicates an item or CreativeWork that is part of this item, or
* CreativeWork (in some sense).
*
* @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[] $hasPart
*
* @return static
*
* @see path_to_url
*/
public function hasPart($hasPart)
{
return $this->setProperty('hasPart', $hasPart);
}
/**
* Headline of the article.
*
* @param string|string[] $headline
*
* @return static
*
* @see path_to_url
*/
public function headline($headline)
{
return $this->setProperty('headline', $headline);
}
/**
* The identifier property represents any kind of identifier for any kind of
* [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides
* dedicated properties for representing many of these, either as textual
* strings or as URL (URI) links. See [background
* notes](/docs/datamodel.html#identifierBg) for more details.
*
* @param \Spatie\SchemaOrg\Contracts\PropertyValueContract|\Spatie\SchemaOrg\Contracts\PropertyValueContract[]|string|string[] $identifier
*
* @return static
*
* @see path_to_url
*/
public function identifier($identifier)
{
return $this->setProperty('identifier', $identifier);
}
/**
* An image of the item. This can be a [[URL]] or a fully described
* [[ImageObject]].
*
* @param \Spatie\SchemaOrg\Contracts\ImageObjectContract|\Spatie\SchemaOrg\Contracts\ImageObjectContract[]|string|string[] $image
*
* @return static
*
* @see path_to_url
*/
public function image($image)
{
return $this->setProperty('image', $image);
}
/**
* The language of the content or performance or used in an action. Please
* use one of the language codes from the [IETF BCP 47
* standard](path_to_url See also
* [[availableLanguage]].
*
* @param \Spatie\SchemaOrg\Contracts\LanguageContract|\Spatie\SchemaOrg\Contracts\LanguageContract[]|string|string[] $inLanguage
*
* @return static
*
* @see path_to_url
* @link path_to_url
*/
public function inLanguage($inLanguage)
{
return $this->setProperty('inLanguage', $inLanguage);
}
/**
* The number of interactions for the CreativeWork using the WebSite or
* SoftwareApplication. The most specific child type of InteractionCounter
* should be used.
*
* @param \Spatie\SchemaOrg\Contracts\InteractionCounterContract|\Spatie\SchemaOrg\Contracts\InteractionCounterContract[] $interactionStatistic
*
* @return static
*
* @see path_to_url
* @link path_to_url
*/
public function interactionStatistic($interactionStatistic)
{
return $this->setProperty('interactionStatistic', $interactionStatistic);
}
/**
* The predominant mode of learning supported by the learning resource.
* Acceptable values are 'active', 'expositive', or 'mixed'.
*
* @param string|string[] $interactivityType
*
* @return static
*
* @see path_to_url
*/
public function interactivityType($interactivityType)
{
return $this->setProperty('interactivityType', $interactivityType);
}
/**
* Used to indicate a specific claim contained, implied, translated or
* refined from the content of a [[MediaObject]] or other [[CreativeWork]].
* The interpreting party can be indicated using [[claimInterpreter]].
*
* @param \Spatie\SchemaOrg\Contracts\ClaimContract|\Spatie\SchemaOrg\Contracts\ClaimContract[] $interpretedAsClaim
*
* @return static
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*/
public function interpretedAsClaim($interpretedAsClaim)
{
return $this->setProperty('interpretedAsClaim', $interpretedAsClaim);
}
/**
* A flag to signal that the item, event, or place is accessible for free.
*
* @param bool|bool[] $isAccessibleForFree
*
* @return static
*
* @see path_to_url
*/
public function isAccessibleForFree($isAccessibleForFree)
{
return $this->setProperty('isAccessibleForFree', $isAccessibleForFree);
}
/**
* A resource from which this work is derived or from which it is a
* modification or adaptation.
*
* @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\ProductContract|\Spatie\SchemaOrg\Contracts\ProductContract[]|string|string[] $isBasedOn
*
* @return static
*
* @see path_to_url
*/
public function isBasedOn($isBasedOn)
{
return $this->setProperty('isBasedOn', $isBasedOn);
}
/**
* A resource that was used in the creation of this resource. This term can
* be repeated for multiple sources. For example,
* path_to_url
*
* @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\ProductContract|\Spatie\SchemaOrg\Contracts\ProductContract[]|string|string[] $isBasedOnUrl
*
* @return static
*
* @see path_to_url
*/
public function isBasedOnUrl($isBasedOnUrl)
{
return $this->setProperty('isBasedOnUrl', $isBasedOnUrl);
}
/**
* Indicates whether this content is family friendly.
*
* @param bool|bool[] $isFamilyFriendly
*
* @return static
*
* @see path_to_url
*/
public function isFamilyFriendly($isFamilyFriendly)
{
return $this->setProperty('isFamilyFriendly', $isFamilyFriendly);
}
/**
* Indicates an item or CreativeWork that this item, or CreativeWork (in
* some sense), is part of.
*
* @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $isPartOf
*
* @return static
*
* @see path_to_url
*/
public function isPartOf($isPartOf)
{
return $this->setProperty('isPartOf', $isPartOf);
}
/**
* Keywords or tags used to describe some item. Multiple textual entries in
* a keywords list are typically delimited by commas, or by repeating the
* property.
*
* @param \Spatie\SchemaOrg\Contracts\DefinedTermContract|\Spatie\SchemaOrg\Contracts\DefinedTermContract[]|string|string[] $keywords
*
* @return static
*
* @see path_to_url
*/
public function keywords($keywords)
{
return $this->setProperty('keywords', $keywords);
}
/**
* The predominant type or kind characterizing the learning resource. For
* example, 'presentation', 'handout'.
*
* @param \Spatie\SchemaOrg\Contracts\DefinedTermContract|\Spatie\SchemaOrg\Contracts\DefinedTermContract[]|string|string[] $learningResourceType
*
* @return static
*
* @see path_to_url
*/
public function learningResourceType($learningResourceType)
{
return $this->setProperty('learningResourceType', $learningResourceType);
}
/**
* A license document that applies to this content, typically indicated by
* URL.
*
* @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $license
*
* @return static
*
* @see path_to_url
*/
public function license($license)
{
return $this->setProperty('license', $license);
}
/**
* The location where the CreativeWork was created, which may not be the
* same as the location depicted in the CreativeWork.
*
* @param \Spatie\SchemaOrg\Contracts\PlaceContract|\Spatie\SchemaOrg\Contracts\PlaceContract[] $locationCreated
*
* @return static
*
* @see path_to_url
*/
public function locationCreated($locationCreated)
{
return $this->setProperty('locationCreated', $locationCreated);
}
/**
* Indicates the primary entity described in some page or other
* CreativeWork.
*
* @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $mainEntity
*
* @return static
*
* @see path_to_url
*/
public function mainEntity($mainEntity)
{
return $this->setProperty('mainEntity', $mainEntity);
}
/**
* Indicates a page (or other CreativeWork) for which this thing is the main
* entity being described. See [background
* notes](/docs/datamodel.html#mainEntityBackground) for details.
*
* @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $mainEntityOfPage
*
* @return static
*
* @see path_to_url
*/
public function mainEntityOfPage($mainEntityOfPage)
{
return $this->setProperty('mainEntityOfPage', $mainEntityOfPage);
}
/**
* A maintainer of a [[Dataset]], software package
* ([[SoftwareApplication]]), or other [[Project]]. A maintainer is a
* [[Person]] or [[Organization]] that manages contributions to, and/or
* publication of, some (typically complex) artifact. It is common for
* distributions of software and data to be based on "upstream" sources.
* When [[maintainer]] is applied to a specific version of something e.g. a
* particular version or packaging of a [[Dataset]], it is always possible
* that the upstream source has a different maintainer. The [[isBasedOn]]
* property can be used to indicate such relationships between datasets to
* make the different maintenance roles clear. Similarly in the case of
* software, a package may have dedicated maintainers working on integration
* into software distributions such as Ubuntu, as well as upstream
* maintainers of the underlying work.
*
* @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $maintainer
*
* @return static
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*/
public function maintainer($maintainer)
{
return $this->setProperty('maintainer', $maintainer);
}
/**
* A material that something is made from, e.g. leather, wool, cotton,
* paper.
*
* @param \Spatie\SchemaOrg\Contracts\ProductContract|\Spatie\SchemaOrg\Contracts\ProductContract[]|string|string[] $material
*
* @return static
*
* @see path_to_url
*/
public function material($material)
{
return $this->setProperty('material', $material);
}
/**
* The quantity of the materials being described or an expression of the
* physical space they occupy.
*
* @param \Spatie\SchemaOrg\Contracts\QuantitativeValueContract|\Spatie\SchemaOrg\Contracts\QuantitativeValueContract[]|string|string[] $materialExtent
*
* @return static
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*/
public function materialExtent($materialExtent)
{
return $this->setProperty('materialExtent', $materialExtent);
}
/**
* Indicates that the CreativeWork contains a reference to, but is not
* necessarily about a concept.
*
* @param \Spatie\SchemaOrg\Contracts\ThingContract|\Spatie\SchemaOrg\Contracts\ThingContract[] $mentions
*
* @return static
*
* @see path_to_url
*/
public function mentions($mentions)
{
return $this->setProperty('mentions', $mentions);
}
/**
* The name of the item.
*
* @param string|string[] $name
*
* @return static
*
* @see path_to_url
*/
public function name($name)
{
return $this->setProperty('name', $name);
}
/**
* An offer to provide this item—for example, an offer to sell a
* product, rent the DVD of a movie, perform a service, or give away tickets
* to an event. Use [[businessFunction]] to indicate the kind of transaction
* offered, i.e. sell, lease, etc. This property can also be used to
* describe a [[Demand]]. While this property is listed as expected on a
* number of common types, it can be used in others. In that case, using a
* second type, such as Product or a subtype of Product, can clarify the
* nature of the offer.
*
* @param \Spatie\SchemaOrg\Contracts\DemandContract|\Spatie\SchemaOrg\Contracts\DemandContract[]|\Spatie\SchemaOrg\Contracts\OfferContract|\Spatie\SchemaOrg\Contracts\OfferContract[] $offers
*
* @return static
*
* @see path_to_url
* @link path_to_url
*/
public function offers($offers)
{
return $this->setProperty('offers', $offers);
}
/**
* A pattern that something has, for example 'polka dot', 'striped',
* 'Canadian flag'. Values are typically expressed as text, although links
* to controlled value schemes are also supported.
*
* @param \Spatie\SchemaOrg\Contracts\DefinedTermContract|\Spatie\SchemaOrg\Contracts\DefinedTermContract[]|string|string[] $pattern
*
* @return static
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*/
public function pattern($pattern)
{
return $this->setProperty('pattern', $pattern);
}
/**
* The position of an item in a series or sequence of items.
*
* @param int|int[]|string|string[] $position
*
* @return static
*
* @see path_to_url
*/
public function position($position)
{
return $this->setProperty('position', $position);
}
/**
* Indicates a potential Action, which describes an idealized action in
* which this thing would play an 'object' role.
*
* @param \Spatie\SchemaOrg\Contracts\ActionContract|\Spatie\SchemaOrg\Contracts\ActionContract[] $potentialAction
*
* @return static
*
* @see path_to_url
*/
public function potentialAction($potentialAction)
{
return $this->setProperty('potentialAction', $potentialAction);
}
/**
* The person or organization who produced the work (e.g. music album,
* movie, TV/radio series etc.).
*
* @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $producer
*
* @return static
*
* @see path_to_url
*/
public function producer($producer)
{
return $this->setProperty('producer', $producer);
}
/**
* The service provider, service operator, or service performer; the goods
* producer. Another party (a seller) may offer those services or goods on
* behalf of the provider. A provider may also serve as the seller.
*
* @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $provider
*
* @return static
*
* @see path_to_url
* @see path_to_url
*/
public function provider($provider)
{
return $this->setProperty('provider', $provider);
}
/**
* A publication event associated with the item.
*
* @param \Spatie\SchemaOrg\Contracts\PublicationEventContract|\Spatie\SchemaOrg\Contracts\PublicationEventContract[] $publication
*
* @return static
*
* @see path_to_url
*/
public function publication($publication)
{
return $this->setProperty('publication', $publication);
}
/**
* The publisher of the creative work.
*
* @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $publisher
*
* @return static
*
* @see path_to_url
*/
public function publisher($publisher)
{
return $this->setProperty('publisher', $publisher);
}
/**
* The publishing division which published the comic.
*
* @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[] $publisherImprint
*
* @return static
*
* @see path_to_url
* @see path_to_url
*/
public function publisherImprint($publisherImprint)
{
return $this->setProperty('publisherImprint', $publisherImprint);
}
/**
* The publishingPrinciples property indicates (typically via [[URL]]) a
* document describing the editorial principles of an [[Organization]] (or
* individual, e.g. a [[Person]] writing a blog) that relate to their
* activities as a publisher, e.g. ethics or diversity policies. When
* applied to a [[CreativeWork]] (e.g. [[NewsArticle]]) the principles are
* those of the party primarily responsible for the creation of the
* [[CreativeWork]].
*
* While such policies are most typically expressed in natural language,
* sometimes related information (e.g. indicating a [[funder]]) can be
* expressed using schema.org terminology.
*
* @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $publishingPrinciples
*
* @return static
*
* @see path_to_url
*/
public function publishingPrinciples($publishingPrinciples)
{
return $this->setProperty('publishingPrinciples', $publishingPrinciples);
}
/**
* The Event where the CreativeWork was recorded. The CreativeWork may
* capture all or part of the event.
*
* @param \Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $recordedAt
*
* @return static
*
* @see path_to_url
*/
public function recordedAt($recordedAt)
{
return $this->setProperty('recordedAt', $recordedAt);
}
/**
* The place and time the release was issued, expressed as a
* PublicationEvent.
*
* @param \Spatie\SchemaOrg\Contracts\PublicationEventContract|\Spatie\SchemaOrg\Contracts\PublicationEventContract[] $releasedEvent
*
* @return static
*
* @see path_to_url
*/
public function releasedEvent($releasedEvent)
{
return $this->setProperty('releasedEvent', $releasedEvent);
}
/**
* A review of the item.
*
* @param \Spatie\SchemaOrg\Contracts\ReviewContract|\Spatie\SchemaOrg\Contracts\ReviewContract[] $review
*
* @return static
*
* @see path_to_url
*/
public function review($review)
{
return $this->setProperty('review', $review);
}
/**
* Review of the item.
*
* @param \Spatie\SchemaOrg\Contracts\ReviewContract|\Spatie\SchemaOrg\Contracts\ReviewContract[] $reviews
*
* @return static
*
* @see path_to_url
*/
public function reviews($reviews)
{
return $this->setProperty('reviews', $reviews);
}
/**
* URL of a reference Web page that unambiguously indicates the item's
* identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or
* official website.
*
* @param string|string[] $sameAs
*
* @return static
*
* @see path_to_url
*/
public function sameAs($sameAs)
{
return $this->setProperty('sameAs', $sameAs);
}
/**
* Indicates (by URL or string) a particular version of a schema used in
* some CreativeWork. This property was created primarily to
* indicate the use of a specific schema.org release, e.g. ```10.0``` as
* a simple string, or more explicitly via URL,
* ```path_to_url#v10.0```. There may be
* situations in which other schemas might usefully be referenced this way,
* e.g.
* ```path_to_url```
* but this has not been carefully explored in the community.
*
* @param string|string[] $schemaVersion
*
* @return static
*
* @see path_to_url
*/
public function schemaVersion($schemaVersion)
{
return $this->setProperty('schemaVersion', $schemaVersion);
}
/**
* Indicates the date on which the current structured data was generated /
* published. Typically used alongside [[sdPublisher]].
*
* @param \DateTimeInterface|\DateTimeInterface[] $sdDatePublished
*
* @return static
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*/
public function sdDatePublished($sdDatePublished)
{
return $this->setProperty('sdDatePublished', $sdDatePublished);
}
/**
* A license document that applies to this structured data, typically
* indicated by URL.
*
*
* @return static
*
* @see path_to_url
* @link path_to_url
*/
{
}
/**
* Indicates the party responsible for generating and publishing the current
* structured data markup, typically in cases where the structured data is
* derived automatically from existing published content but published on a
* different site. For example, student projects and open data initiatives
* often re-publish existing content with more explicitly structured
* metadata. The
* [[sdPublisher]] property helps make such practices more explicit.
*
* @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $sdPublisher
*
* @return static
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*/
public function sdPublisher($sdPublisher)
{
return $this->setProperty('sdPublisher', $sdPublisher);
}
/**
* A standardized size of a product or creative work, specified either
* through a simple textual string (for example 'XL', '32Wx34L'), a
* QuantitativeValue with a unitCode, or a comprehensive and structured
* [[SizeSpecification]]; in other cases, the [[width]], [[height]],
* [[depth]] and [[weight]] properties may be more applicable.
*
* @param \Spatie\SchemaOrg\Contracts\DefinedTermContract|\Spatie\SchemaOrg\Contracts\DefinedTermContract[]|\Spatie\SchemaOrg\Contracts\QuantitativeValueContract|\Spatie\SchemaOrg\Contracts\QuantitativeValueContract[]|\Spatie\SchemaOrg\Contracts\SizeSpecificationContract|\Spatie\SchemaOrg\Contracts\SizeSpecificationContract[]|string|string[] $size
*
* @return static
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*/
public function size($size)
{
return $this->setProperty('size', $size);
}
/**
* The Organization on whose behalf the creator was working.
*
* @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[] $sourceOrganization
*
* @return static
*
* @see path_to_url
*/
public function sourceOrganization($sourceOrganization)
{
return $this->setProperty('sourceOrganization', $sourceOrganization);
}
/**
* The "spatial" property can be used in cases when more specific properties
* (e.g. [[locationCreated]], [[spatialCoverage]], [[contentLocation]]) are
* not known to be appropriate.
*
* @param \Spatie\SchemaOrg\Contracts\PlaceContract|\Spatie\SchemaOrg\Contracts\PlaceContract[] $spatial
*
* @return static
*
* @see path_to_url
*/
public function spatial($spatial)
{
return $this->setProperty('spatial', $spatial);
}
/**
* The spatialCoverage of a CreativeWork indicates the place(s) which are
* the focus of the content. It is a subproperty of
* contentLocation intended primarily for more technical and detailed
* materials. For example with a Dataset, it indicates
* areas that the dataset describes: a dataset of New York weather
* would have spatialCoverage which was the place: the state of New York.
*
* @param \Spatie\SchemaOrg\Contracts\PlaceContract|\Spatie\SchemaOrg\Contracts\PlaceContract[] $spatialCoverage
*
* @return static
*
* @see path_to_url
*/
public function spatialCoverage($spatialCoverage)
{
return $this->setProperty('spatialCoverage', $spatialCoverage);
}
/**
* A person or organization that supports a thing through a pledge, promise,
* or financial contribution. E.g. a sponsor of a Medical Study or a
* corporate sponsor of an event.
*
* @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $sponsor
*
* @return static
*
* @see path_to_url
*/
public function sponsor($sponsor)
{
return $this->setProperty('sponsor', $sponsor);
}
/**
* A CreativeWork or Event about this Thing.
*
* @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|\Spatie\SchemaOrg\Contracts\EventContract|\Spatie\SchemaOrg\Contracts\EventContract[] $subjectOf
*
* @return static
*
* @see path_to_url
* @link path_to_url
*/
public function subjectOf($subjectOf)
{
return $this->setProperty('subjectOf', $subjectOf);
}
/**
* The item being described is intended to help a person learn the
* competency or learning outcome defined by the referenced term.
*
* @param \Spatie\SchemaOrg\Contracts\DefinedTermContract|\Spatie\SchemaOrg\Contracts\DefinedTermContract[]|string|string[] $teaches
*
* @return static
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*/
public function teaches($teaches)
{
return $this->setProperty('teaches', $teaches);
}
/**
* The "temporal" property can be used in cases where more specific
* properties
* (e.g. [[temporalCoverage]], [[dateCreated]], [[dateModified]],
* [[datePublished]]) are not known to be appropriate.
*
* @param \DateTimeInterface|\DateTimeInterface[]|string|string[] $temporal
*
* @return static
*
* @see path_to_url
*/
public function temporal($temporal)
{
return $this->setProperty('temporal', $temporal);
}
/**
* The temporalCoverage of a CreativeWork indicates the period that the
* content applies to, i.e. that it describes, either as a DateTime or as a
* textual string indicating a time period in [ISO 8601 time interval
* format](path_to_url#Time_intervals). In
* the case of a Dataset it will typically indicate the relevant time
* period in a precise notation (e.g. for a 2011 census dataset, the year
* 2011 would be written "2011/2012"). Other forms of content, e.g.
* ScholarlyArticle, Book, TVSeries or TVEpisode, may indicate their
* temporalCoverage in broader terms - textually or via well-known URL.
* Written works such as books may sometimes have precise temporal
* coverage too, e.g. a work set in 1939 - 1945 can be indicated in ISO 8601
* interval format format via "1939/1945".
*
* Open-ended date ranges can be written with ".." in place of the end date.
* For example, "2015-11/.." indicates a range beginning in November 2015
* and with no specified final date. This is tentative and might be updated
* in future when ISO 8601 is officially updated.
*
* @param \DateTimeInterface|\DateTimeInterface[]|string|string[] $temporalCoverage
*
* @return static
*
* @see path_to_url
*/
public function temporalCoverage($temporalCoverage)
{
return $this->setProperty('temporalCoverage', $temporalCoverage);
}
/**
* The textual content of this CreativeWork.
*
* @param string|string[] $text
*
* @return static
*
* @see path_to_url
*/
public function text($text)
{
return $this->setProperty('text', $text);
}
/**
* Thumbnail image for an image or video.
*
* @param \Spatie\SchemaOrg\Contracts\ImageObjectContract|\Spatie\SchemaOrg\Contracts\ImageObjectContract[] $thumbnail
*
* @return static
*
* @see path_to_url
*/
public function thumbnail($thumbnail)
{
return $this->setProperty('thumbnail', $thumbnail);
}
/**
* A thumbnail image relevant to the Thing.
*
* @param string|string[] $thumbnailUrl
*
* @return static
*
* @see path_to_url
*/
public function thumbnailUrl($thumbnailUrl)
{
return $this->setProperty('thumbnailUrl', $thumbnailUrl);
}
/**
* Approximate or typical time it usually takes to work with or through the
* content of this work for the typical or target audience.
*
* @param \Spatie\SchemaOrg\Contracts\DurationContract|\Spatie\SchemaOrg\Contracts\DurationContract[] $timeRequired
*
* @return static
*
* @see path_to_url
*/
public function timeRequired($timeRequired)
{
return $this->setProperty('timeRequired', $timeRequired);
}
/**
* The work that this work has been translated from. E.g. is a
* translationOf On the Origin of Species.
*
* @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[] $translationOfWork
*
* @return static
*
* @see path_to_url
* @see path_to_url
*/
public function translationOfWork($translationOfWork)
{
return $this->setProperty('translationOfWork', $translationOfWork);
}
/**
* Organization or person who adapts a creative work to different languages,
* regional differences and technical requirements of a target market, or
* that translates during some event.
*
* @param \Spatie\SchemaOrg\Contracts\OrganizationContract|\Spatie\SchemaOrg\Contracts\OrganizationContract[]|\Spatie\SchemaOrg\Contracts\PersonContract|\Spatie\SchemaOrg\Contracts\PersonContract[] $translator
*
* @return static
*
* @see path_to_url
*/
public function translator($translator)
{
return $this->setProperty('translator', $translator);
}
/**
* The typical expected age range, e.g. '7-9', '11-'.
*
* @param string|string[] $typicalAgeRange
*
* @return static
*
* @see path_to_url
*/
public function typicalAgeRange($typicalAgeRange)
{
return $this->setProperty('typicalAgeRange', $typicalAgeRange);
}
/**
* URL of the item.
*
* @param string|string[] $url
*
* @return static
*
* @see path_to_url
*/
public function url($url)
{
return $this->setProperty('url', $url);
}
/**
* The schema.org [[usageInfo]] property indicates further information about
* a [[CreativeWork]]. This property is applicable both to works that are
* freely available and to those that require payment or other transactions.
* It can reference additional information, e.g. community expectations on
* preferred linking and citation conventions, as well as purchasing
* details. For something that can be commercially licensed, usageInfo can
* provide detailed, resource-specific information about licensing options.
*
* This property can be used alongside the license property which indicates
* license(s) applicable to some piece of content. The usageInfo property
* can provide information about other licensing options, e.g. acquiring
* commercial usage rights for an image that is also available under
* non-commercial creative commons licenses.
*
* @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[]|string|string[] $usageInfo
*
* @return static
*
* @see path_to_url
* @see path_to_url
* @link path_to_url
*/
public function usageInfo($usageInfo)
{
return $this->setProperty('usageInfo', $usageInfo);
}
/**
* The version of the CreativeWork embodied by a specified resource.
*
* @param float|float[]|int|int[]|string|string[] $version
*
* @return static
*
* @see path_to_url
*/
public function version($version)
{
return $this->setProperty('version', $version);
}
/**
* An embedded video object.
*
* @param \Spatie\SchemaOrg\Contracts\ClipContract|\Spatie\SchemaOrg\Contracts\ClipContract[]|\Spatie\SchemaOrg\Contracts\VideoObjectContract|\Spatie\SchemaOrg\Contracts\VideoObjectContract[] $video
*
* @return static
*
* @see path_to_url
*/
public function video($video)
{
return $this->setProperty('video', $video);
}
/**
* Example/instance/realization/derivation of the concept of this creative
* work. E.g. the paperback edition, first edition, or e-book.
*
* @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[] $workExample
*
* @return static
*
* @see path_to_url
*/
public function workExample($workExample)
{
return $this->setProperty('workExample', $workExample);
}
/**
* A work that is a translation of the content of this work. E.g.
* has an English workTranslation Journey to the West, a German
* workTranslation Monkeys Pilgerfahrt and a Vietnamese translation
* Ty du k bnh kho.
*
* @param \Spatie\SchemaOrg\Contracts\CreativeWorkContract|\Spatie\SchemaOrg\Contracts\CreativeWorkContract[] $workTranslation
*
* @return static
*
* @see path_to_url
* @see path_to_url
*/
public function workTranslation($workTranslation)
{
return $this->setProperty('workTranslation', $workTranslation);
}
}
```
|
```c++
/*
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkPathParts.h"
#include "SkAnimateMaker.h"
#include "SkDrawMatrix.h"
#include "SkDrawRectangle.h"
#include "SkDrawPath.h"
SkPathPart::SkPathPart() : fPath(NULL) {
}
void SkPathPart::dirty() {
fPath->dirty();
}
SkDisplayable* SkPathPart::getParent() const {
return fPath;
}
bool SkPathPart::setParent(SkDisplayable* parent) {
SkASSERT(parent != NULL);
if (parent->isPath() == false)
return true;
fPath = (SkDrawPath*) parent;
return false;
}
// MoveTo
#if SK_USE_CONDENSED_INFO == 0
const SkMemberInfo SkMoveTo::fInfo[] = {
SK_MEMBER(x, Float),
SK_MEMBER(y, Float)
};
#endif
DEFINE_GET_MEMBER(SkMoveTo);
SkMoveTo::SkMoveTo() : x(0), y(0) {
}
bool SkMoveTo::add() {
fPath->fPath.moveTo(x, y);
return false;
}
// RMoveTo
#if SK_USE_CONDENSED_INFO == 0
const SkMemberInfo SkRMoveTo::fInfo[] = {
SK_MEMBER_INHERITED
};
#endif
DEFINE_GET_MEMBER(SkRMoveTo);
bool SkRMoveTo::add() {
fPath->fPath.rMoveTo(x, y);
return false;
}
// LineTo
#if SK_USE_CONDENSED_INFO == 0
const SkMemberInfo SkLineTo::fInfo[] = {
SK_MEMBER(x, Float),
SK_MEMBER(y, Float)
};
#endif
DEFINE_GET_MEMBER(SkLineTo);
SkLineTo::SkLineTo() : x(0), y(0) {
}
bool SkLineTo::add() {
fPath->fPath.lineTo(x, y);
return false;
}
// RLineTo
#if SK_USE_CONDENSED_INFO == 0
const SkMemberInfo SkRLineTo::fInfo[] = {
SK_MEMBER_INHERITED
};
#endif
DEFINE_GET_MEMBER(SkRLineTo);
bool SkRLineTo::add() {
fPath->fPath.rLineTo(x, y);
return false;
}
// QuadTo
#if SK_USE_CONDENSED_INFO == 0
const SkMemberInfo SkQuadTo::fInfo[] = {
SK_MEMBER(x1, Float),
SK_MEMBER(x2, Float),
SK_MEMBER(y1, Float),
SK_MEMBER(y2, Float)
};
#endif
DEFINE_GET_MEMBER(SkQuadTo);
SkQuadTo::SkQuadTo() : x1(0), y1(0), x2(0), y2(0) {
}
bool SkQuadTo::add() {
fPath->fPath.quadTo(x1, y1, x2, y2);
return false;
}
// RQuadTo
#if SK_USE_CONDENSED_INFO == 0
const SkMemberInfo SkRQuadTo::fInfo[] = {
SK_MEMBER_INHERITED
};
#endif
DEFINE_GET_MEMBER(SkRQuadTo);
bool SkRQuadTo::add() {
fPath->fPath.rQuadTo(x1, y1, x2, y2);
return false;
}
// CubicTo
#if SK_USE_CONDENSED_INFO == 0
const SkMemberInfo SkCubicTo::fInfo[] = {
SK_MEMBER(x1, Float),
SK_MEMBER(x2, Float),
SK_MEMBER(x3, Float),
SK_MEMBER(y1, Float),
SK_MEMBER(y2, Float),
SK_MEMBER(y3, Float)
};
#endif
DEFINE_GET_MEMBER(SkCubicTo);
SkCubicTo::SkCubicTo() : x1(0), y1(0), x2(0), y2(0), x3(0), y3(0) {
}
bool SkCubicTo::add() {
fPath->fPath.cubicTo(x1, y1, x2, y2, x3, y3);
return false;
}
// RCubicTo
#if SK_USE_CONDENSED_INFO == 0
const SkMemberInfo SkRCubicTo::fInfo[] = {
SK_MEMBER_INHERITED
};
#endif
DEFINE_GET_MEMBER(SkRCubicTo);
bool SkRCubicTo::add() {
fPath->fPath.rCubicTo(x1, y1, x2, y2, x3, y3);
return false;
}
// SkClose
bool SkClose::add() {
fPath->fPath.close();
return false;
}
// SkAddGeom
#if SK_USE_CONDENSED_INFO == 0
const SkMemberInfo SkAddGeom::fInfo[] = {
SK_MEMBER(direction, PathDirection)
};
#endif
DEFINE_GET_MEMBER(SkAddGeom);
SkAddGeom::SkAddGeom() : direction(SkPath::kCCW_Direction) {
}
#if SK_USE_CONDENSED_INFO == 0
const SkMemberInfo SkAddRect::fInfo[] = {
SK_MEMBER_INHERITED,
SK_MEMBER_ALIAS(bottom, fRect.fBottom, Float),
SK_MEMBER_ALIAS(left, fRect.fLeft, Float),
SK_MEMBER_ALIAS(right, fRect.fRight, Float),
SK_MEMBER_ALIAS(top, fRect.fTop, Float)
};
#endif
DEFINE_GET_MEMBER(SkAddRect);
SkAddRect::SkAddRect() {
fRect.setEmpty();
}
bool SkAddRect::add() {
fPath->fPath.addRect(fRect, (SkPath::Direction) direction);
return false;
}
#if SK_USE_CONDENSED_INFO == 0
const SkMemberInfo SkAddOval::fInfo[] = {
SK_MEMBER_INHERITED
};
#endif
DEFINE_GET_MEMBER(SkAddOval);
bool SkAddOval::add() {
fPath->fPath.addOval(fRect, (SkPath::Direction) direction);
return false;
}
#if SK_USE_CONDENSED_INFO == 0
const SkMemberInfo SkAddCircle::fInfo[] = {
SK_MEMBER_INHERITED,
SK_MEMBER(radius, Float),
SK_MEMBER(x, Float),
SK_MEMBER(y, Float)
};
#endif
DEFINE_GET_MEMBER(SkAddCircle);
SkAddCircle::SkAddCircle() : radius(0), x(0), y(0) {
}
bool SkAddCircle::add() {
fPath->fPath.addCircle(x, y, radius, (SkPath::Direction) direction);
return false;
}
#if SK_USE_CONDENSED_INFO == 0
const SkMemberInfo SkAddRoundRect::fInfo[] = {
SK_MEMBER_INHERITED,
SK_MEMBER(rx, Float),
SK_MEMBER(ry, Float)
};
#endif
DEFINE_GET_MEMBER(SkAddRoundRect);
SkAddRoundRect::SkAddRoundRect() : rx(0), ry(0) {
}
bool SkAddRoundRect::add() {
fPath->fPath.addRoundRect(fRect, rx, ry, (SkPath::Direction) direction);
return false;
}
#if SK_USE_CONDENSED_INFO == 0
const SkMemberInfo SkAddPath::fInfo[] = {
SK_MEMBER(matrix, Matrix),
SK_MEMBER(path, Path)
};
#endif
DEFINE_GET_MEMBER(SkAddPath);
SkAddPath::SkAddPath() : matrix(NULL), path(NULL) {
}
bool SkAddPath::add() {
SkASSERT (path != NULL);
if (matrix)
fPath->fPath.addPath(path->fPath, matrix->getMatrix());
else
fPath->fPath.addPath(path->fPath);
return false;
}
```
|
```scala
package com.wavesplatform.state.diffs.smart.eth
import com.wavesplatform.account.Address
import com.wavesplatform.block.Block.ProtoBlockVersion
import com.wavesplatform.common.state.ByteStr
import com.wavesplatform.common.utils.EitherExt2
import com.wavesplatform.db.WithDomain
import com.wavesplatform.db.WithState.AddrWithBalance
import com.wavesplatform.lang.directives.DirectiveDictionary
import com.wavesplatform.lang.directives.values.{StdLibVersion, V3, V6}
import com.wavesplatform.lang.v1.compiler.TestCompiler
import com.wavesplatform.lang.v1.evaluator.ctx.impl.GlobalValNames
import com.wavesplatform.state.diffs.ENOUGH_AMT
import com.wavesplatform.state.diffs.smart.predef.{assertProvenPart, provenPart}
import com.wavesplatform.test.*
import com.wavesplatform.transaction.Asset.{IssuedAsset, Waves}
import com.wavesplatform.transaction.assets.IssueTransaction
import com.wavesplatform.transaction.smart.SetScriptTransaction
import com.wavesplatform.transaction.transfer.TransferTransaction
import com.wavesplatform.transaction.{Asset, ERC20Address, EthTxGenerator, EthereumTransaction, TxHelpers}
import com.wavesplatform.utils.EthHelpers
import scala.math.Ordering.Implicits.infixOrderingOps
class EthereumTransferSmartTest extends PropSpec with WithDomain with EthHelpers {
import DomainPresets.*
private val time = new TestTime
private def ts = time.getTimestamp()
private val transferAmount = 1234
private def accountScript(version: StdLibVersion, getTx: String, tx: EthereumTransaction, asset: Asset, recipient: Address) =
TestCompiler(version).compileExpression(
s"""
| let t = $getTx(base58'${tx.id()}').${if (version >= V3) "value" else "extract"}()
| ${if (version >= V3) checkEthTransfer(tx, Some(asset.fold(GlobalValNames.Unit)(id => s"base58'$id'")), recipient) else "t == t"}
""".stripMargin
)
private def assetScript(version: StdLibVersion, tx: EthereumTransaction, recipient: Address) =
TestCompiler(version).compileAsset(
s"""
| match tx {
| case t: TransferTransaction =>
| if (t.version == 0)
| then {
| ${checkEthTransfer(tx, if (version >= V3) Some("this.id") else None, recipient)}
| } else {
| t.amount == $ENOUGH_AMT
| }
|
| case _ => true
| }
""".stripMargin
)
private def checkEthTransfer(tx: EthereumTransaction, asset: Option[String], recipient: Address): String =
s"""
| ${provenPart(tx, emptyBodyBytes = true, checkProofs = false)}
| let amount = t.amount == $transferAmount
| let feeAssetId = t.feeAssetId == unit
| ${asset.fold("")(a => s"let assetId = t.assetId == $a")}
| let attachment = t.attachment == base58'${ByteStr.empty}'
| let recipient = match (t.recipient) {
| case a: Address => a.bytes == base58'$recipient'
| case a: Alias => throw("unexpected")
| }
| ${assertProvenPart("t", proofs = false)} && amount && feeAssetId && recipient && attachment
| ${if (asset.isEmpty) "" else " && assetId"}
""".stripMargin
property("access to Ethereum transfer from RIDE script") {
val recipient = RandomKeyPair()
val issue = IssueTransaction.selfSigned(2.toByte, recipient, "Asset", "", ENOUGH_AMT, 8, reissuable = true, None, 1.waves, ts).explicitGet()
for {
version <- DirectiveDictionary[StdLibVersion].all
asset <- Seq(Waves, IssuedAsset(issue.id()))
} {
val ethTransfer = EthTxGenerator.generateEthTransfer(TxHelpers.defaultEthSigner, recipient.toAddress, transferAmount, asset)
val ethSender = ethTransfer.senderAddress()
val transferIssuedAsset =
TransferTransaction.selfSigned(2.toByte, recipient, ethSender, asset, ENOUGH_AMT, Waves, 0.001.waves, ByteStr.empty, ts).explicitGet()
val function = if (version >= V3) "transferTransactionById" else "transactionById"
val verifier = Some(accountScript(version, function, ethTransfer, asset, recipient.toAddress))
val setVerifier = () => SetScriptTransaction.selfSigned(1.toByte, recipient, verifier, 0.01.waves, ts).explicitGet()
withDomain(settingsForRide(version.max(V6)), Seq(AddrWithBalance(ethSender), AddrWithBalance(recipient.toAddress))) { d =>
if (asset != Waves) d.appendBlock(issue, transferIssuedAsset)
d.appendBlock(setVerifier())
d.appendBlock(ProtoBlockVersion, ethTransfer)
d.liquidSnapshot.balances((recipient.toAddress, asset)) shouldBe d.rocksDBWriter.balance(recipient.toAddress, asset) + transferAmount
if (asset == Waves)
d.liquidSnapshot.balances((ethSender, Waves)) shouldBe
d.rocksDBWriter.balance(ethSender, Waves) - ethTransfer.underlying.getGasLimit.longValue() - transferAmount
else {
d.liquidSnapshot.balances((ethSender, Waves)) shouldBe
d.rocksDBWriter.balance(ethSender, Waves) - ethTransfer.underlying.getGasLimit.longValue()
d.liquidSnapshot.balances((ethSender, asset)) shouldBe d.rocksDBWriter.balance(ethSender, asset) - transferAmount
}
d.appendBlock()
if (version >= V6) {
d.appendBlock(setVerifier()) // just for account script execution
d.liquidSnapshot.scriptsComplexity should be > 0L
} else if (version >= V3) {
(the[Exception] thrownBy d.appendBlock(setVerifier())).getMessage should include(
"value() called on unit value on function 'transferTransactionById' call"
)
} else
(the[Exception] thrownBy d.appendBlock(setVerifier())).getMessage should include(
s"extract() called on unit value"
)
}
}
}
property("transfer scripted asset via Ethereum transaction") {
val recipient = RandomKeyPair()
val dummyTransfer = EthereumTransaction.Transfer(None, transferAmount, recipient.toAddress)
val dummyEthTransfer = EthereumTransaction(dummyTransfer, TestEthRawTransaction, TestEthSignature, 'T'.toByte) // needed to pass into asset script
val ethSender = dummyEthTransfer.senderAddress()
DirectiveDictionary[StdLibVersion].all
.foreach { version =>
val script = assetScript(version, dummyEthTransfer, recipient.toAddress)
val issue =
IssueTransaction.selfSigned(2.toByte, recipient, "Asset", "", ENOUGH_AMT, 8, reissuable = true, Some(script), 1.waves, ts).explicitGet()
val asset = IssuedAsset(issue.id())
val ethTransfer = dummyEthTransfer.copy(dummyTransfer.copy(Some(ERC20Address(asset.id.take(20)))))
val preTransfer =
TransferTransaction.selfSigned(2.toByte, recipient, ethSender, asset, ENOUGH_AMT, Waves, 0.005.waves, ByteStr.empty, ts).explicitGet()
withDomain(settingsForRide(version.max(V6)), Seq(AddrWithBalance(ethSender), AddrWithBalance(recipient.toAddress))) { d =>
d.appendBlock(issue, preTransfer)
d.appendBlock(ProtoBlockVersion, ethTransfer)
d.liquidSnapshot.errorMessage(ethTransfer.id()) shouldBe None
d.liquidSnapshot.scriptsComplexity should be > 0L
d.liquidSnapshot.balances((recipient.toAddress, asset)) shouldBe transferAmount
d.liquidSnapshot.balances((ethTransfer.senderAddress(), Waves)) shouldBe
d.rocksDBWriter.balance(ethTransfer.senderAddress(), Waves) - ethTransfer.underlying.getGasPrice.longValue()
d.liquidSnapshot.balances((ethTransfer.senderAddress(), asset)) shouldBe
d.rocksDBWriter.balance(ethTransfer.senderAddress(), asset) - transferAmount
}
}
}
}
```
|
Commissioner Catherine Bramwell-Booth OF, born Catherine Booth Booth (20 July 1883 – 3 October 1987), Salvation Army officer, was one of seven children born to General Bramwell Booth and Florence Eleanor Soper, and was the granddaughter of the Salvation Army's Founder, General William Booth and his wife Catherine Mumford, known as the 'Mother of the Salvation Army'. In her later years Bramwell-Booth became well-known through her books and various radio and television appearances. Bramwell-Booth lived to be 104.
Early years
At birth she was dedicated by her grandfather, General William Booth, and from her infancy she was involved in the demands which Salvation Army service made upon her parents, being taken with them to their various appointments whenever their busy schedules required it. More settled periods during her childhood were spent at Hadley Wood, which was 'so perfect that I have never written about it, as no-one would believe me'.
Her mother, Florence Eleanor Soper, disapproved of outside influences acting on the tender minds of her children and taught them all herself for two hours every morning. Her own involvement in Army service began in the Corps at High Barnet, playing in the band and singing trios with her sisters in the open-air meetings. She was sworn-in as a Salvation Army soldier on her 15th birthday and was later given responsibility for the newly formed 'Band of Love'.
The Salvation Army officer
In her late teens she became aware of the call to officership but her natural shyness made her reluctant to respond; however, eventually realising that God's power would help her, she added her father's Christian name to her surname and entered the Salvation Army Training College at Clapton in 1903, aged 19. She was a lively cadet with a great sense of fun but she also applied herself to training. Later, as a cadet-sergeant, she was remembered for her individual care of cadets.
Bramwell-Booth was given her first posting in 1904 as a Captain in Bath. She then held appointments in a number of important provincial centres, being placed in charge of the Salvation Army's evangelical work. In 1904 she joined her grandfather, General Booth, as he travelled in a motorcade around the country, preaching from his car in village and town centres. From 1907 to 1917 she was involved in the training of women officers at the Army's International Training College in Clapton in London.
In 1913 she preached in Russia and in 1917 made headlines when she led a rescue team into the area devastated by the Silvertown TNT explosion at the Brunner-Mond munitions factory in what has become known as the Silvertown explosion, when seventy-three people died and hundreds were injured. Later, she was to be involved with relief work in Europe after both World War I and World War II.
She left the International Training College in 1917 to become the Under Secretary for Europe for Salvation Army work in Europe, being attached to the International Headquarters in London. In 1926 she was promoted to colonel, and from then until 1946 she was in charge of the Army's social work among women in Great Britain. In 1927 she was promoted to Commissioner, and became closely involved in the Salvation Army's social welfare activities, dealing with everything from orphaned children to the elderly residents of the Salvation Army eventide homes. From 1946 she was international secretary for Europe until her retirement in 1948.
Bramwell-Booth was nominated three times for the Generalship of the Salvation Army, in 1934, 1939, and 1946. However, on each occasion she was unsuccessful, it possibly being felt that leadership of the Salvation Army should not appear to be exclusive to the Booth 'dynasty', as both her father and aunt Evangeline Booth had previously been Generals.
Later life and honours
Bramwell-Booth wrote several books, including biographies of her grandmother, Catherine Mumford, and of her father Bramwell Booth. This brought her a certain fame, and, because of her engaging personality, during the 1970s and 1980s she made frequent appearances on radio and television programmes, being interviewed by, among others, Malcolm Muggeridge, Russell Harty and Roy Plomley on Desert Island Discs in 1979.
She reached her greatest audience through her appearance on Parkinson, hosted by Michael Parkinson at Christmas 1979. In 1971 she was appointed CBE, and in 1977, at the age of 93, as a lifelong teetotaller, she was delighted to receive the Guild of Professional Toastmasters best speaker award. She was presented with the Humanitarian Award of 1981 by the Variety Clubs International, and in 1983 was awarded the Salvation Army's prestigious 'Order of the Founder' (OF).
Bramwell-Booth died at the age of 104 on 4 October 1987 at her home, North Court, in Finchampstead, Berkshire, where she lived with two of her sisters. She never married. She is buried in the churchyard of St James, Finchampstead.
Publications
Bramwell Booth Pub. by Rich and Cowan, 1933.
Catherine Booth: the Story of Her Loves Pub. by Hodder & Stoughton, London, 1970.
Fighting for the King Pub. by Hodder and Stoughton, London, 1983.
Letters: Catherine Bramwell-Booth Pub. by Lion, 1986.
With Ted Harrison: Commissioner Catherine Pub. by Darton, Longman and Todd, London, 1983.
Books about Bramwell-Booth
Batchelor, Mary: Catherine Bramwell-Booth Pub. by Lion, 1986.
Swift, Catherine M.: Catherine Bramwell-Booth Pub. by Marshall Pickering, 1989.
References
External links
Bramwell-Booth on the Salvation Army's 'International Heritage' site
Bramwell-Booth and the Salvation Army
Bramwell-Booth on SAWiki.net
Portraits of Bramwell-Booth at the National Portrait Gallery
1883 births
1987 deaths
Salvation Army officers
English Salvationists
Commissioners in The Salvation Army
Commanders of the Order of the British Empire
English centenarians
Catherine
Women centenarians
People from Finchampstead
|
Mia Khalifa (; ; born 1993) is a Lebanese-American media personality and former pornographic film actress and webcam model. Born and raised in Lebanon, she and her family relocated to the United States in 2001. She entered the sex industry in October 2014, becoming the most viewed performer on Pornhub in two months. Her career choice was met with controversy after the release of a video in which she is engaged in a threesome while wearing a hijab; the scene brought Khalifa instant popularity as well as criticism from writers and religious figures. In 2015, Khalifa was voted the "Number 1 Porn Star" on Pornhub. In January 2017, xHamster reported that she was the most-searched-for adult actress of 2016. In 2018, she became the most-searched-for actress on Pornhub.
After retiring from adult films, Khalifa pursued a new career as a social media personality, webcam model, and sports commentator.
Early life and education
Khalifa was born in Beirut, Lebanon and raised Catholic in what she describes as a "very conservative" home, Khalifa attended a French-language private school in Beirut, where she also learned to speak English. She moved with her family to the United States in 2001, leaving their home in the wake of the South Lebanon conflict.
After moving to the United States, her family lived in Montgomery County, Maryland, where she played lacrosse in high school. She has said she was bullied at school for being "the darkest and weirdest girl there", which intensified after the September 11 attacks.
She attended Massanutten Military Academy in Woodstock, Virginia, and later graduated from the University of Texas at El Paso with a Bachelor of Arts in history. She supported herself while there by working as a bartender, model, and "briefcase girl" on a local Deal or No Deal-esque Spanish game show.
Pornographic film career
Khalifa entered the professional pornographic film industry in October 2014. Her stage name was taken from the name of her dog, Mia, and American rapper Wiz Khalifa.
She came to widespread attention after the release of a scene from Bang Bros in which she wears a hijab during a threesome. The scene brought Khalifa instant popularity, as well as criticism from writers and religious figures, and led to her parents publicly disowning her. Alex Hawkins, vice president of marketing for xHamster, said, "The outrage it caused in the Arab world ended up being a bit of a 'Streisand effect'. Suddenly, everyone was searching for her. The effort to censor her only made her more ubiquitous." With more than 1.5 million views, the 22-year-old Khalifa became the most searched-for performer on the adult video sharing website Pornhub.
On December 28, 2018, Pornhub revealed that she was the No. 1 ranked performer on their website. After becoming the most searched-for actress on Pornhub, Khalifa received online death threats, including a manipulated image of Khalifa being held captive by an Islamic State executioner and a warning that she would be "the first person in Hellfire", to which she jokingly replied, "I've been meaning to get a little tan recently." Lebanese newspapers wrote articles critical of Khalifa, which she considered trivial due to other events in the region.
In an interview with The Washington Post, Khalifa said the controversial scene was satirical and should be taken as such, claiming that Hollywood films depicted Muslims in a far more negative light than any pornographer could. Among those who publicly spoke out to defend her decision to become an adult performer was British-Lebanese author Nasri Atallah, who stated, "The moral indignation ... is wrong for two reasons. First and foremost, as a woman, she is free to do as she pleases with her body. As a sentient human being with agency, who lives halfway across the world, she is in charge of her own life and owes absolutely nothing to the country where she happened to be born." Khalifa said, "Women's rights in Lebanon are a long way from being taken seriously if a Lebanese American porn star that no longer resides there can cause such an uproar. What I once boasted to people as being the most Westernized nation in the Middle East, I now see as devastatingly archaic and oppressed."
According to data from Pornhub, from January 3 to 6, 2015, searches for Khalifa increased five-fold. Around a quarter of those searches came from Lebanon, with substantial searches also from nearby countries Syria and Jordan. Almaza, a Lebanese brewery, ran an advertisement showing a bottle of their beer next to Khalifa's signature glasses, with the slogan: "We are both rated 18+." In January 2015, pop-rap duo Timeflies released a song titled "Mia Khalifa" in homage to her.
In January 2015, Khalifa signed a long-term contract with Bang Bros' parent company, WGCZ Holding, who also own the largest free porn site XVideos. The contract required her to perform in multiple films each month. However, two weeks later, Khalifa had a change of heart and resigned. The negative attention she received from her global attention prompted her to leave the industry: "It was an eye-opener for me. I don't want any of this, whether it's positive or negative—but all of it was negative. I didn't think too much into it about how my friends and family and relationships were suffering." WGCZ Holding own a web page with a domain name using her stage name. Khalifa said it does not pay her for rights, even though it is written in her first-person voice.
In a July 2016 interview with The Washington Post, Khalifa stated that she had only performed in pornography for three months and had left the industry over a year before, changing to a "more normal job." She said, "I guess it was my rebellious phase. It wasn't really for me. I kind of smartened up and tried to distance myself from that." She said she continued to perform as a webcam model for Bang Bros for eleven months after she stopped shooting scenes before Complex Networks offered her to host a sports show. Carter Cruise, a former performer who became a disc jockey, criticized Khalifa for reinforcing the social stigma against sex work in distancing herself from her previous career.
In January 2017, xHamster reported that Khalifa was the most-searched-for adult actress of 2016. In 2018, three years after leaving the industry, she was still the second-highest-ranked person on Pornhub. In August 2019, Khalifa stated that she made $12,000 working in porn by making an estimated $1,000 per scene – standard contractor compensation from production studios in the industry, according to Alec Helmy, president and publisher of adult entertainment industry news site XBIZ – and that she did not receive residuals from BangBros or from Pornhub and other free sites where BangBros uploaded the videos. While PornHub has not stated how much revenue Khalifa's videos had generated for the site, according to a 2019 estimate by Social Blade CEO Jason Urgo based on YouTube-like advertising revenue per view, she could have made over $500,000 had she been a PornHub partner.
In July 2020, more than 1.5 million people signed a Change.org petition campaigning for her videos to be removed from sites like Pornhub and BangBros and her Internet domains returned to her. BangBros sent her a cease and desist letter and set up a website to dispute statements she made about the company. BangBros says that Khalifa earned over $178,000 from them and their affiliates and was in the adult industry for more than two years.
Other work
After three months working as an adult-film actor, Khalifa worked in Miami as a paralegal and bookkeeper. She transitioned into a career as a social media personality, webcam model, and sports commentator. She runs a YouTube channel; live streams on Twitch, including performing as a non-pornographic webcam model; sells photoshoots, merchandise, and access to exclusive content on membership website Patreon; and sold explicit photoshoots and videos on the social media website Findrow. Dan Steinberg of The Washington Post wrote in 2016 that, despite Khalifa's change of career, her social media feed was "still a bit more risqué than that of, say, Ben Bernanke."
She has used her social media presence to support professional sports teams from the Washington, D.C., area. She and Gilbert Arenas hosted Out of Bounds, a daily sports show on Complex News's YouTube channel, from October 2017 to February 2018. Khalifa then co-hosted Sportsball with Tyler Coe on Rooster Teeth. Its final episode was released on October 30, 2018.
In May 2020, she had a guest appearance as herself in the Hulu show Ramy.
In June 2023, Khalifa launched a jewelry line called "Sheytan" alongside Sara Burn, a former Virgil Abloh collaborator.
Personal life
Khalifa married her high school boyfriend in February 2011. They separated in 2014 and divorced in 2016. In 2019, she married American professional chef Robert Sandberg; they separated in 2020. , she is in a relationship with Puerto Rican rapper and singer Jhayco.
Religious and political views
In 2015, Khalifa stated that she was no longer a practicing Catholic.
She has a tattoo of the opening line of the National Anthem of Lebanon and another tattoo of the Christian cross of the Lebanese Forces. Her decision to get the latter came about in the aftermath of the October 2012 Beirut bombing, stating it was to "show solidarity with [her] father's political views." Both tattoos have come under scrutiny by her detractors. She has revealed that her parents stopped speaking to her because of her involvement in pornographic films; they have released a statement disassociating themselves from her actions and blaming her decision to enter the sex industry on her residence in a foreign country (the United States) that has a different culture than theirs (Lebanon), and that her actions did not reflect her upbringing. They also said that they hoped that she would leave pornography, believing that her image dishonored her family and home country.
On multiple occasions, Khalifa has generated controversy with her views on the Israeli–Palestinian conflict. During the 2023 Gaza–Israel war, she made several social media posts supporting Palestinians, encouraging "freedom fighters" to 'flip their phones and film horizontal'. She later said that this comment was not an endorsement of violence, and that she intended to highlight the need for Palestinian freedom:
Following this, Playboy cut ties with Khalifa, calling her comments "reprehensible". Canada-based podcaster and radio host Todd Shapiro also fired her from their podcast deal. Khalifa later tweeted: "I’d say supporting Palestine has lost me business opportunities, but I’m more angry at myself for not checking whether or not I was entering into business with Zionists. My bad."
In popular culture
In November 2016, an online petition called for Khalifa to be appointed by President-elect Donald Trump as the next United States Ambassador to Saudi Arabia.
In 2018, the musical duo iLoveFriday released a diss track called "Mia Khalifa," in response to a fake tweet posted by a user impersonating Khalifa. The song became an internet meme after the "hit or miss" snippet gained popularity on the TikTok app. At the time, it was said to be one of the most well-known viral TikTok memes in the Western world, and had been used in over four million TikTok videos.
At the 2021 CPI on the COVID-19 pandemic in Brazil, Senator Luis Carlos Heinze mentioned that a study published in The Lancet on the effectiveness of chloroquine as a COVID treatment was carried out by a company whose sales manager was a pornographic film actress. In response, senator Randolfe Rodrigues jokingly proposed "summon[ing] Mia Khalifa". Khalifa then wrote on Twitter, "I'm not a doctor, so don't take medical advice from fake memes of me you found on WhatsApp."
See also
Women in the Arab world
Women in Lebanon
Pornography in the Middle East
Pornography in the United States
References
Further reading
External links
1993 births
Living people
21st-century American women
Actresses from Beirut
Actresses from Miami
American color commentators
American pornographic film actresses
American TikTokers
Lebanese emigrants to the United States
Lebanese pornographic film actresses
Lebanese TikTokers
OnlyFans creators
People from Montgomery County, Maryland
Pornographic film actors from Florida
Rooster Teeth people
Sports commentators
Twitch (service) streamers
University of Texas at El Paso alumni
Webcam models
Writers from Beirut
|
```xml
// Utilities
import { computed } from 'vue'
import { getCurrentInstanceName, propsFactory } from '@/util'
// Types
import type { PropType } from 'vue'
const positionValues = ['static', 'relative', 'fixed', 'absolute', 'sticky'] as const
type Position = typeof positionValues[number]
export interface PositionProps {
position: Position | undefined
}
// Composables
export const makePositionProps = propsFactory({
position: {
type: String as PropType<Position>,
validator: /* istanbul ignore next */ (v: any) => positionValues.includes(v),
},
}, 'position')
export function usePosition (
props: PositionProps,
name = getCurrentInstanceName(),
) {
const positionClasses = computed(() => {
return props.position ? `${name}--${props.position}` : undefined
})
return { positionClasses }
}
```
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.