/**
 *
 * WARNING! This file was autogenerated by:
 *  _   _ _   _ __   __
 * | | | | | | |\ \ / /
 * | | | | |_| | \ V /
 * | | | |  _  | /   \
 * | |_| | | | |/ /^\ \
 *  \___/\_| |_/\/   \/
 *
 * This file was autogenerated by UnrealHxGenerator using UHT definitions.
 * It only includes UPROPERTYs and UFUNCTIONs. Do not modify it!
 * In order to add more definitions, create or edit a type with the same name/package, but with an `_Extra` suffix
**/
package unreal;

/**
  like EPassInputId but can expose more e.g. GBuffer
**/
@:glueCppIncludes("Classes/Materials/MaterialExpressionSceneTexture.h")
@:uname("ESceneTextureId")
@:uextern @:uenum extern enum ESceneTextureId {

  /**
    Scene color, normal post process passes should use PostProcessInput0
    @DisplayName SceneColor
  **/
  @DisplayName("SceneColor")
  PPI_SceneColor;

  /**
    Scene depth, single channel, contains the linear depth of the opaque objects
    @DisplayName SceneDepth
  **/
  @DisplayName("SceneDepth")
  PPI_SceneDepth;

  /**
    Material diffuse, RGB color (computed from GBuffer)
    @DisplayName DiffuseColor
  **/
  @DisplayName("DiffuseColor")
  PPI_DiffuseColor;

  /**
    Material specular, RGB color (computed from GBuffer)
    @DisplayName SpecularColor
  **/
  @DisplayName("SpecularColor")
  PPI_SpecularColor;

  /**
    Material subsurface, RGB color (GBuffer, only for some ShadingModels)
    @DisplayName SubsurfaceColor
  **/
  @DisplayName("SubsurfaceColor")
  PPI_SubsurfaceColor;

  /**
    Material base, RGB color (GBuffer), can be modified on read by the ShadingModel, consider StoredBasedColor
    @DisplayName BaseColor (for lighting)
  **/
  @DisplayName("BaseColor (for lighting)")
  PPI_BaseColor;

  /**
    Material specular, single channel (GBuffer), can be modified on read by the ShadingModel, consider StoredSpecular
    @DisplayName Specular (for lighting)
  **/
  @DisplayName("Specular (for lighting)")
  PPI_Specular;

  /**
    Material metallic, single channel (GBuffer)
    @DisplayName Metallic
  **/
  @DisplayName("Metallic")
  PPI_Metallic;

  /**
    Normal, RGB in -1..1 range, not normalized (GBuffer)
    @DisplayName WorldNormal
  **/
  @DisplayName("WorldNormal")
  PPI_WorldNormal;

  /**
    Not yet supported
    @DisplayName SeparateTranslucency
  **/
  @DisplayName("SeparateTranslucency")
  PPI_SeparateTranslucency;

  /**
    Material opacity, single channel (GBuffer)
    @DisplayName Opacity
  **/
  @DisplayName("Opacity")
  PPI_Opacity;

  /**
    Material roughness, single channel (GBuffer)
    @DisplayName Roughness
  **/
  @DisplayName("Roughness")
  PPI_Roughness;

  /**
    Material ambient occlusion, single channel (GBuffer)
    @DisplayName MaterialAO
  **/
  @DisplayName("MaterialAO")
  PPI_MaterialAO;

  /**
    Scene depth, single channel, contains the linear depth of the opaque objects rendered with CustomDepth (mesh property)
    @DisplayName CustomDepth
  **/
  @DisplayName("CustomDepth")
  PPI_CustomDepth;

  /**
    Input #0 of this postprocess pass, usually the only one hooked up
    @DisplayName PostProcessInput0
  **/
  @DisplayName("PostProcessInput0")
  PPI_PostProcessInput0;

  /**
    Input #1 of this postprocess pass, usually not used
    @DisplayName PostProcessInput1
  **/
  @DisplayName("PostProcessInput1")
  PPI_PostProcessInput1;

  /**
    Input #2 of this postprocess pass, usually not used
    @DisplayName PostProcessInput2
  **/
  @DisplayName("PostProcessInput2")
  PPI_PostProcessInput2;

  /**
    Input #3 of this postprocess pass, usually not used
    @DisplayName PostProcessInput3
  **/
  @DisplayName("PostProcessInput3")
  PPI_PostProcessInput3;

  /**
    Input #4 of this postprocess pass, usually not used
    @DisplayName PostProcessInput4
  **/
  @DisplayName("PostProcessInput4")
  PPI_PostProcessInput4;

  /**
    Input #5 of this postprocess pass, usually not used
    @DisplayName PostProcessInput5
  **/
  @DisplayName("PostProcessInput5")
  PPI_PostProcessInput5;

  /**
    Input #6 of this postprocess pass, usually not used
    @DisplayName PostProcessInput6
  **/
  @DisplayName("PostProcessInput6")
  PPI_PostProcessInput6;

  /**
    Decal Mask, single bit (was moved to stencil for better performance, not accessible at the moment)
    @DisplayName Decal Mask
  **/
  @DisplayName("Decal Mask")
  PPI_DecalMask;

  /**
    Shading model
    @DisplayName Shading Model
  **/
  @DisplayName("Shading Model")
  PPI_ShadingModel;

  /**
    Ambient Occlusion, single channel
    @DisplayName Ambient Occlusion
  **/
  @DisplayName("Ambient Occlusion")
  PPI_AmbientOcclusion;

  /**
    Scene stencil, contains CustomStencil mesh property of the opaque objects rendered with CustomDepth
    @DisplayName CustomStencil
  **/
  @DisplayName("CustomStencil")
  PPI_CustomStencil;

  /**
    Material base, RGB color (GBuffer)
    @DisplayName BaseColor (as stored in GBuffer)
  **/
  @DisplayName("BaseColor (as stored in GBuffer)")
  PPI_StoredBaseColor;

  /**
    Material specular, single channel (GBuffer)
    @DisplayName Specular (as stored in GBuffer)
  **/
  @DisplayName("Specular (as stored in GBuffer)")
  PPI_StoredSpecular;

}

{'repo_name': 'proletariatgames/unreal.hx', 'stars': '332', 'repo_language': 'Haxe', 'file_name': 'EngineLatentCommands.hx', 'mime_type': 'text/x-c++', 'hash': -2484267646086778057, 'source_dataset': 'data'}


using System.Web.UI;
using System.ComponentModel;
using System.Drawing;
using AjaxControlToolkit.Design;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace AjaxControlToolkit {

    /// <summary>
    /// The RoundedCorners extender applies rounded corners to existing elements.
    /// </summary>
    [Designer(typeof(RoundedCornersExtenderDesigner))]
    [ClientScriptResource("Sys.Extended.UI.RoundedCornersBehavior", Constants.RoundedCornersName)]
    [RequiredScript(typeof(CommonToolkitScripts))]
    [TargetControlType(typeof(WebControl))]
    [TargetControlType(typeof(HtmlControl))]
    [ToolboxBitmap(typeof(ToolboxIcons.Accessor), Constants.RoundedCornersName + Constants.IconPostfix)]
    public class RoundedCornersExtender : ExtenderControlBase {
        /// <summary>
        /// Radius of the corners (and height of the added area). The default is 5
        /// </summary>
        [DefaultValue(5)]
        [ExtenderControlProperty()]
        [ClientPropertyName("radius")]
        public int Radius {
            get { return GetPropertyValue("Radius", 5); }
            set { SetPropertyValue("Radius", value); }
        }

        /// <summary>
        /// The corners of the target panel that should be rounded
        /// </summary>
        /// <remarks>
        /// Possible values:
        /// * None
        /// * TopLeft
        /// * TopRight
        /// * BottomRight
        /// * BottomLeft
        /// * Top
        /// * Right
        /// * Bottom
        /// * Left
        /// * All
        /// </remarks>
        [DefaultValue(BoxCorners.All)]
        [ExtenderControlProperty]
        [ClientPropertyName("corners")]
        public BoxCorners Corners {
            get { return GetPropertyValue("Corners", BoxCorners.All); }
            set { SetPropertyValue("Corners", value); }
        }

        /// <summary>
        /// Background color of the rounded corner areas
        /// </summary>
        /// <remarks>
        /// By default, this property gets the background color of the panel that it is attached to
        /// </remarks>
        [DefaultValue(typeof(Color), "")]
        [ExtenderControlProperty]
        [ClientPropertyName("color")]
        public Color Color {
            get { return GetPropertyValue("Color", Color.Empty); }
            set { SetPropertyValue("Color", value); }
        }

        /// <summary>
        /// Color of the border
        /// </summary>
        [DefaultValue(typeof(Color), "")]
        [ExtenderControlProperty]
        [ClientPropertyName("borderColor")]
        public Color BorderColor {
            get { return GetPropertyValue("BorderColor", Color.Empty); }
            set { SetPropertyValue("BorderColor", value); }
        }
    }

}

{'repo_name': 'DevExpress/AjaxControlToolkit', 'stars': '257', 'repo_language': 'JavaScript', 'file_name': 'HtmlEditorExtender.aspx.cs', 'mime_type': 'text/plain', 'hash': 5808351279713435912, 'source_dataset': 'data'}


//
// Dropdown menus
// --------------------------------------------------

// Dropdown arrow/caret
.caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 2px;
  vertical-align: middle;
  border-top:   @caret-width-base dashed;
  border-top:   @caret-width-base solid ~"\9"; // IE8
  border-right: @caret-width-base solid transparent;
  border-left:  @caret-width-base solid transparent;
}

// The dropdown wrapper (div)
.dropup,
.dropdown {
  position: relative;
}

// Prevent the focus on the dropdown toggle when closing dropdowns
.dropdown-toggle:focus {
  outline: 0;
}

// The dropdown menu (ul)
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: @zindex-dropdown;
  display: none; // none by default, but block on "open" of the menu
  float: left;
  min-width: 160px;
  padding: 5px 0;
  margin: 2px 0 0; // override default ul
  list-style: none;
  font-size: @font-size-base;
  text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
  background-color: @dropdown-bg;
  border: 1px solid @dropdown-fallback-border; // IE8 fallback
  border: 1px solid @dropdown-border;
  border-radius: @border-radius-base;
  .box-shadow(0 6px 12px rgba(0,0,0,.175));
  background-clip: padding-box;

  // Aligns the dropdown menu to right
  //
  // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`
  &.pull-right {
    right: 0;
    left: auto;
  }

  // Dividers (basically an hr) within the dropdown
  .divider {
    .nav-divider(@dropdown-divider-bg);
  }

  // Links within the dropdown menu
  > li > a {
    display: block;
    padding: 3px 20px;
    clear: both;
    font-weight: normal;
    line-height: @line-height-base;
    color: @dropdown-link-color;
    white-space: nowrap; // prevent links from randomly breaking onto new lines
  }
}

// Hover/Focus state
.dropdown-menu > li > a {
  &:hover,
  &:focus {
    text-decoration: none;
    color: @dropdown-link-hover-color;
    background-color: @dropdown-link-hover-bg;
  }
}

// Active state
.dropdown-menu > .active > a {
  &,
  &:hover,
  &:focus {
    color: @dropdown-link-active-color;
    text-decoration: none;
    outline: 0;
    background-color: @dropdown-link-active-bg;
  }
}

// Disabled state
//
// Gray out text and ensure the hover/focus state remains gray

.dropdown-menu > .disabled > a {
  &,
  &:hover,
  &:focus {
    color: @dropdown-link-disabled-color;
  }

  // Nuke hover/focus effects
  &:hover,
  &:focus {
    text-decoration: none;
    background-color: transparent;
    background-image: none; // Remove CSS gradient
    .reset-filter();
    cursor: @cursor-disabled;
  }
}

// Open state for the dropdown
.open {
  // Show the menu
  > .dropdown-menu {
    display: block;
  }

  // Remove the outline when :focus is triggered
  > a {
    outline: 0;
  }
}

// Menu positioning
//
// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
// menu with the parent.
.dropdown-menu-right {
  left: auto; // Reset the default from `.dropdown-menu`
  right: 0;
}
// With v3, we enabled auto-flipping if you have a dropdown within a right
// aligned nav component. To enable the undoing of that, we provide an override
// to restore the default dropdown menu alignment.
//
// This is only for left-aligning a dropdown menu within a `.navbar-right` or
// `.pull-right` nav component.
.dropdown-menu-left {
  left: 0;
  right: auto;
}

// Dropdown section headers
.dropdown-header {
  display: block;
  padding: 3px 20px;
  font-size: @font-size-small;
  line-height: @line-height-base;
  color: @dropdown-header-color;
  white-space: nowrap; // as with > li > a
}

// Backdrop to catch body clicks on mobile, etc.
.dropdown-backdrop {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  z-index: (@zindex-dropdown - 10);
}

// Right aligned dropdowns
.pull-right > .dropdown-menu {
  right: 0;
  left: auto;
}

// Allow for dropdowns to go bottom up (aka, dropup-menu)
//
// Just add .dropup after the standard .dropdown class and you're set, bro.
// TODO: abstract this so that the navbar fixed styles are not placed here?

.dropup,
.navbar-fixed-bottom .dropdown {
  // Reverse the caret
  .caret {
    border-top: 0;
    border-bottom: @caret-width-base dashed;
    border-bottom: @caret-width-base solid ~"\9"; // IE8
    content: "";
  }
  // Different positioning for bottom up menu
  .dropdown-menu {
    top: auto;
    bottom: 100%;
    margin-bottom: 2px;
  }
}

// Component alignment
//
// Reiterate per navbar.less and the modified component alignment there.

@media (min-width: @grid-float-breakpoint) {
  .navbar-right {
    .dropdown-menu {
      .dropdown-menu-right();
    }
    // Necessary for overrides of the default right aligned menu.
    // Will remove come v4 in all likelihood.
    .dropdown-menu-left {
      .dropdown-menu-left();
    }
  }
}

{'repo_name': 'malwaredllc/byob', 'stars': '4803', 'repo_language': 'Python', 'file_name': 'Dockerfile-py3-win32', 'mime_type': 'text/plain', 'hash': 289007459635272639, 'source_dataset': 'data'}


// File Automatically generated by eLiSe
#include "StdAfx.h"

class cEqAppui_NoDist__GL__PProjInc_M2CFour7x2: public cElCompiledFonc
{
   public :

      cEqAppui_NoDist__GL__PProjInc_M2CFour7x2();
      void ComputeVal();
      void ComputeValDeriv();
      void ComputeValDerivHessian();
      double * AdrVarLocFromString(const std::string &);
      void SetGL_0_0(double);
      void SetGL_0_1(double);
      void SetGL_0_2(double);
      void SetGL_1_0(double);
      void SetGL_1_1(double);
      void SetGL_1_2(double);
      void SetGL_2_0(double);
      void SetGL_2_1(double);
      void SetGL_2_2(double);
      void SetNDP0_x(double);
      void SetNDP0_y(double);
      void SetNDdx_x(double);
      void SetNDdx_y(double);
      void SetNDdy_x(double);
      void SetNDdy_y(double);
      void SetProjI_x(double);
      void SetProjI_y(double);
      void SetProjI_z(double);
      void SetProjJ_x(double);
      void SetProjJ_y(double);
      void SetProjJ_z(double);
      void SetProjK_x(double);
      void SetProjK_y(double);
      void SetProjK_z(double);
      void SetProjP0_x(double);
      void SetProjP0_y(double);
      void SetProjP0_z(double);
      void SetScNorm(double);
      void SetXIm(double);
      void SetYIm(double);

      static cAutoAddEntry  mTheAuto;
      static cElCompiledFonc *  Alloc();
   private :

      double mLocGL_0_0;
      double mLocGL_0_1;
      double mLocGL_0_2;
      double mLocGL_1_0;
      double mLocGL_1_1;
      double mLocGL_1_2;
      double mLocGL_2_0;
      double mLocGL_2_1;
      double mLocGL_2_2;
      double mLocNDP0_x;
      double mLocNDP0_y;
      double mLocNDdx_x;
      double mLocNDdx_y;
      double mLocNDdy_x;
      double mLocNDdy_y;
      double mLocProjI_x;
      double mLocProjI_y;
      double mLocProjI_z;
      double mLocProjJ_x;
      double mLocProjJ_y;
      double mLocProjJ_z;
      double mLocProjK_x;
      double mLocProjK_y;
      double mLocProjK_z;
      double mLocProjP0_x;
      double mLocProjP0_y;
      double mLocProjP0_z;
      double mLocScNorm;
      double mLocXIm;
      double mLocYIm;
};

{'repo_name': 'micmacIGN/micmac', 'stars': '282', 'repo_language': 'C++', 'file_name': 'toto.tif', 'mime_type': 'text/plain', 'hash': 8936645191276536305, 'source_dataset': 'data'}


// Type definitions for luxon 1.25
// Project: https://github.com/moment/luxon#readme
// Definitions by: Colby DeHart <https://github.com/colbydehart>
//                 Hyeonseok Yang <https://github.com/FourwingsY>
//                 Jonathan Siebern <https://github.com/jsiebern>
//                 Matt R. Wilson <https://github.com/mastermatt>
//                 Pietro Vismara <https://github.com/pietrovismara>
//                 Janeene Beeforth <https://github.com/dawnmist>
//                 Jason Yu <https://github.com/ycmjason>
//                 Aitor Pérez Rodal <https://github.com/Aitor1995>
//                 Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

export type DateTimeFormatOptions = Intl.DateTimeFormatOptions;

export interface ZoneOptions {
    keepLocalTime?: boolean;
    /**
     * @deprecated since 0.2.12. Use keepLocalTime instead
     */
    keepCalendarTime?: boolean;
}

export type ToRelativeUnit =
    | 'years'
    | 'quarters'
    | 'months'
    | 'weeks'
    | 'days'
    | 'hours'
    | 'minutes'
    | 'seconds';

export interface ToRelativeOptions {
    /** The DateTime to use as the basis to which this time is compared. Defaults to now. */
    base?: DateTime;
    locale?: string;
    style?: StringUnitLength;
    /** If omitted, the method will pick the unit. */
    unit?: ToRelativeUnit;
    /** Defaults to `true`. */
    round?: boolean;
    /**
     * Padding in milliseconds. This allows you to round up the result if it fits inside the threshold.
     * Don't use in combination with {round: false} because the decimal output will include the padding.
     * Defaults to 0.
     */
    padding?: number;
    /** The Intl system may choose not to honor this */
    numberingSystem?: NumberingSystem;
}

export interface ToRelativeCalendarOptions {
    /** The DateTime to use as the basis to which this time is compared. Defaults to now. */
    base?: DateTime;
    locale?: string;
    /** If omitted, the method will pick the unit. */
    unit?: ToRelativeUnit;
    /** The Intl system may choose not to honor this. */
    numberingSystem?: NumberingSystem;
}

export interface ToSQLOptions {
    includeOffset?: boolean;
    includeZone?: boolean;
}

export type ToISOFormat = 'basic' | 'extended';

export interface ToISOTimeOptions {
    /**
     * @default false
     */
    suppressMilliseconds?: boolean;
    /**
     * @default false
     */
    suppressSeconds?: boolean;
    /**
     * @default true
     */
    includeOffset?: boolean;
    /**
     * choose between the basic and extended format
     * @default 'extended'
     */
    format?: ToISOFormat;
}

export interface ToISODateOptions {
    /**
     * choose between the basic and extended format
     * @default 'extended'
     */
    format?: ToISOFormat;
}

// alias for backwards compatibility
export type ISOTimeOptions = ToISOTimeOptions;

export interface LocaleOptions {
    locale?: string;
    outputCalendar?: CalendarSystem;
    numberingSystem?: NumberingSystem;
}

export interface DateTimeOptions extends LocaleOptions {
    zone?: string | Zone;
    setZone?: boolean;
}

export interface DateTimeJSOptions extends LocaleOptions {
    zone?: string | Zone;
}

export interface DateObjectUnits {
    year?: number;
    month?: number;
    day?: number;
    ordinal?: number;
    weekYear?: number;
    weekNumber?: number;
    weekday?: number;
    hour?: number;
    minute?: number;
    second?: number;
    millisecond?: number;
}

export interface DateObject extends DateObjectUnits, LocaleOptions {
    zone?: string | Zone;
}

export type ConversionAccuracy = 'casual' | 'longterm';

export interface DiffOptions {
    conversionAccuracy?: ConversionAccuracy;
}

export interface ExplainedFormat {
    input: string;
    tokens: Array<{ literal: boolean; val: string }>;
    regex?: RegExp;
    rawMatches?: RegExpMatchArray | null;
    matches?: { [k: string]: any };
    result?: { [k: string]: any } | null;
    zone?: Zone | null;
    invalidReason?: string;
}

export class DateTime {
    static readonly DATETIME_FULL: DateTimeFormatOptions;
    static readonly DATETIME_FULL_WITH_SECONDS: DateTimeFormatOptions;
    static readonly DATETIME_HUGE: DateTimeFormatOptions;
    static readonly DATETIME_HUGE_WITH_SECONDS: DateTimeFormatOptions;
    static readonly DATETIME_MED: DateTimeFormatOptions;
    static readonly DATETIME_MED_WITH_SECONDS: DateTimeFormatOptions;
    static readonly DATETIME_SHORT: DateTimeFormatOptions;
    static readonly DATETIME_SHORT_WITH_SECONDS: DateTimeFormatOptions;
    static readonly DATE_FULL: DateTimeFormatOptions;
    static readonly DATE_HUGE: DateTimeFormatOptions;
    static readonly DATE_MED: DateTimeFormatOptions;
    /** abbreviated date with weekday */
    static readonly DATE_MED_WITH_WEEKDAY: DateTimeFormatOptions;
    static readonly DATE_SHORT: DateTimeFormatOptions;
    static readonly TIME_24_SIMPLE: DateTimeFormatOptions;
    static readonly TIME_24_WITH_LONG_OFFSET: DateTimeFormatOptions;
    static readonly TIME_24_WITH_SECONDS: DateTimeFormatOptions;
    static readonly TIME_24_WITH_SHORT_OFFSET: DateTimeFormatOptions;
    static readonly TIME_SIMPLE: DateTimeFormatOptions;
    static readonly TIME_WITH_LONG_OFFSET: DateTimeFormatOptions;
    static readonly TIME_WITH_SECONDS: DateTimeFormatOptions;
    static readonly TIME_WITH_SHORT_OFFSET: DateTimeFormatOptions;
    static fromHTTP(text: string, options?: DateTimeOptions): DateTime;
    static fromISO(text: string, options?: DateTimeOptions): DateTime;
    static fromJSDate(date: Date, options?: DateTimeJSOptions): DateTime;
    static fromMillis(ms: number, options?: DateTimeOptions): DateTime;
    static fromObject(obj: DateObject): DateTime;
    static fromRFC2822(text: string, options?: DateTimeOptions): DateTime;
    static fromSeconds(seconds: number, options?: DateTimeOptions): DateTime;
    static fromSQL(text: string, options?: DateTimeOptions): DateTime;
    static fromFormat(text: string, format: string, opts?: DateTimeOptions): DateTime;
    static fromFormatExplain(text: string, format: string, opts?: DateTimeOptions): ExplainedFormat;
    /**
     * @deprecated since 0.3.0. Use fromFormat instead
     */
    static fromString(text: string, format: string, options?: DateTimeOptions): DateTime;
    /**
     * @deprecated 0.3.0. Use fromFormatExplain instead
     */
    static fromStringExplain(
        text: string,
        format: string,
        options?: DateTimeOptions,
    ): ExplainedFormat;
    /**
     * Create an invalid DateTime.
     * @param reason - simple string of why this DateTime is invalid.
     * Should not contain parameters or anything else data-dependent
     * @param [explanation=null] - longer explanation, may include parameters and other useful debugging information
     */
    static invalid(reason: string, explanation?: string): DateTime;
    static isDateTime(o: any): o is DateTime;
    static local(
        year?: number,
        month?: number,
        day?: number,
        hour?: number,
        minute?: number,
        second?: number,
        millisecond?: number,
    ): DateTime;
    static max(): undefined;
    static max(...dateTimes: DateTime[]): DateTime;
    static min(): undefined;
    static min(...dateTimes: DateTime[]): DateTime;
    static utc(
        year?: number,
        month?: number,
        day?: number,
        hour?: number,
        minute?: number,
        second?: number,
        millisecond?: number,
    ): DateTime;
    day: number;
    daysInMonth: number;
    daysInYear: number;
    hour: number;
    invalidReason: string | null;
    invalidExplanation: string | null;
    isInDST: boolean;
    isInLeapYear: boolean;
    isOffsetFixed: boolean;
    isValid: boolean;
    locale: string;
    millisecond: number;
    minute: number;
    month: number;
    monthLong: string;
    monthShort: string;
    numberingSystem: string;
    offset: number;
    offsetNameLong: string;
    offsetNameShort: string;
    ordinal: number;
    outputCalendar: string;
    quarter: number;
    second: number;
    weekNumber: number;
    weekYear: number;
    weekday: number;
    weekdayLong: string;
    weekdayShort: string;
    weeksInWeekYear: number;
    year: number;
    zoneName: string;
    zone: Zone;
    diff(other: DateTime, unit?: DurationUnit | DurationUnit[], options?: DiffOptions): Duration;
    diffNow(unit?: DurationUnit | DurationUnit[], options?: DiffOptions): Duration;
    endOf(unit: DurationUnit): DateTime;
    equals(other: DateTime): boolean;
    get(unit: keyof DateTime): number;
    hasSame(other: DateTime, unit: DurationUnit): boolean;
    minus(duration: Duration | number | DurationObject): DateTime;
    plus(duration: Duration | number | DurationObject): DateTime;
    reconfigure(properties: LocaleOptions): DateTime;
    resolvedLocaleOpts(options?: DateTimeFormatOptions): Intl.ResolvedDateTimeFormatOptions;
    set(values: DateObjectUnits): DateTime;
    setLocale(locale: string): DateTime;
    setZone(zone: string | Zone, options?: ZoneOptions): DateTime;
    startOf(unit: DurationUnit): DateTime;
    toBSON(): Date;
    toFormat(format: string, options?: DateTimeFormatOptions): string;
    toHTTP(): string;
    toISO(options?: ToISOTimeOptions): string;
    /** Returns an ISO 8601-compliant string representation of this DateTime's date component */
    toISODate(options?: ToISODateOptions): string;
    toISOTime(options?: ToISOTimeOptions): string;
    toISOWeekDate(): string;
    toJSDate(): Date;
    toJSON(): string;
    toLocal(): DateTime;
    toLocaleParts(options?: LocaleOptions & DateTimeFormatOptions): any[];
    toLocaleString(options?: LocaleOptions & DateTimeFormatOptions): string;
    toMillis(): number;
    toObject(options?: { includeConfig?: boolean }): DateObject;
    toRelative(options?: ToRelativeOptions): string | null;
    toRelativeCalendar(options?: ToRelativeCalendarOptions): string | null;
    toRFC2822(): string;
    toSeconds(): number;
    toSQL(options?: ToSQLOptions): string;
    toSQLDate(): string;
    toSQLTime(options?: ToSQLOptions): string;
    toString(): string;
    toUTC(offset?: number, options?: ZoneOptions): DateTime;
    until(other: DateTime): Interval;
    valueOf(): number;
}

export interface DurationOptions {
    locale?: string;
    numberingSystem?: NumberingSystem;
    conversionAccuracy?: ConversionAccuracy;
}

export interface DurationObjectUnits {
    year?: number;
    years?: number;
    quarter?: number;
    quarters?: number;
    month?: number;
    months?: number;
    week?: number;
    weeks?: number;
    day?: number;
    days?: number;
    hour?: number;
    hours?: number;
    minute?: number;
    minutes?: number;
    second?: number;
    seconds?: number;
    millisecond?: number;
    milliseconds?: number;
}

export interface DurationObject extends DurationObjectUnits, DurationOptions {}

export type DurationUnit = keyof DurationObjectUnits;

export interface DurationToFormatOptions extends DateTimeFormatOptions {
    floor?: boolean;
    round?: boolean;
}

export class Duration {
    static fromISO(text: string, options?: DurationOptions): Duration;
    static fromMillis(count: number, options?: DurationOptions): Duration;
    static fromObject(Object: DurationObject): Duration;
    static invalid(reason?: string): Duration;
    static isDuration(o: any): o is Duration;
    days: number;
    hours: number;
    invalidReason: string | null;
    invalidExplanation: string | null;
    isValid: boolean;
    locale: string;
    milliseconds: number;
    minutes: number;
    months: number;
    numberingSystem: string;
    quarters: number;
    seconds: number;
    weeks: number;
    years: number;
    as(unit: DurationUnit): number;
    equals(other: Duration): boolean;
    get(unit: DurationUnit): number;
    minus(duration: Duration | number | DurationObject): Duration;
    negate(): Duration;
    normalize(): Duration;
    plus(duration: Duration | number | DurationObject): Duration;
    reconfigure(objectPattern: DurationOptions): Duration;
    set(values: DurationObjectUnits): Duration;
    shiftTo(...units: DurationUnit[]): Duration;
    mapUnits(fn: (x: number, u: DurationUnit) => number): Duration;
    toFormat(format: string, options?: DurationToFormatOptions): string;
    toISO(): string;
    toJSON(): string;
    toObject(options?: { includeConfig?: boolean }): DurationObject;
    toString(): string;
    valueOf(): number;
}

// @deprecated
export type EraLength = StringUnitLength;

export type NumberingSystem =
    | 'arab'
    | 'arabext'
    | 'bali'
    | 'beng'
    | 'deva'
    | 'fullwide'
    | 'gujr'
    | 'guru'
    | 'hanidec'
    | 'khmr'
    | 'knda'
    | 'laoo'
    | 'latn'
    | 'limb'
    | 'mlym'
    | 'mong'
    | 'mymr'
    | 'orya'
    | 'tamldec'
    | 'telu'
    | 'thai'
    | 'tibt';

export type CalendarSystem =
    | 'buddhist'
    | 'chinese'
    | 'coptic'
    | 'ethioaa'
    | 'ethiopic'
    | 'gregory'
    | 'hebrew'
    | 'indian'
    | 'islamic'
    | 'islamicc'
    | 'iso8601'
    | 'japanese'
    | 'persian'
    | 'roc';

export type HourCycle = 'h11' | 'h12' | 'h23' | 'h24';

export type StringUnitLength = 'narrow' | 'short' | 'long';
export type NumberUnitLength = 'numeric' | '2-digit';
export type UnitLength = StringUnitLength | NumberUnitLength;

export interface InfoOptions {
    locale?: string;
}

export interface InfoUnitOptions extends InfoOptions {
    numberingSystem?: NumberingSystem;
}

// @deprecated
export type UnitOptions = InfoUnitOptions;

export interface InfoCalendarOptions extends InfoUnitOptions {
    outputCalendar?: CalendarSystem;
}

export interface Features {
    intl: boolean;
    intlTokens: boolean;
    zones: boolean;
    relative: boolean;
}

export namespace Info {
    function eras(length?: StringUnitLength, options?: InfoOptions): string[];
    function features(): Features;
    function hasDST(zone: string | Zone): boolean;
    function isValidIANAZone(zone: string): boolean;
    function normalizeZone(input?: number | string | Zone): Zone;
    function meridiems(options?: InfoOptions): string[];
    function months(length?: UnitLength, options?: InfoCalendarOptions): string[];
    function monthsFormat(length?: UnitLength, options?: InfoCalendarOptions): string[];
    function weekdays(length?: StringUnitLength, options?: InfoUnitOptions): string[];
    function weekdaysFormat(length?: StringUnitLength, options?: InfoUnitOptions): string[];
}

export interface IntervalObject {
    start?: DateTime;
    end?: DateTime;
}

export class Interval {
    static after(
        start: DateTime | DateObject | Date,
        duration: Duration | number | DurationObject,
    ): Interval;
    static before(
        end: DateTime | DateObject | Date,
        duration: Duration | number | DurationObject,
    ): Interval;
    static fromDateTimes(
        start: DateTime | DateObject | Date,
        end: DateTime | DateObject | Date,
    ): Interval;
    static fromISO(string: string, options?: DateTimeOptions): Interval;
    static invalid(reason?: string): Interval;
    static isInterval(o: any): o is Interval;
    static merge(intervals: Interval[]): Interval[];
    static xor(intervals: Interval[]): Interval[];
    end: DateTime;
    invalidReason: string | null;
    invalidExplanation: string | null;
    isValid: boolean;
    start: DateTime;
    abutsEnd(other: Interval): boolean;
    abutsStart(other: Interval): boolean;
    contains(dateTime: DateTime): boolean;
    count(unit?: DurationUnit): number;
    difference(...intervals: Interval[]): Interval[];
    divideEqually(numberOfParts?: number): Interval[];
    engulfs(other: Interval): boolean;
    equals(other: Interval): boolean;
    hasSame(unit: DurationUnit): boolean;
    intersection(other: Interval): Interval | null;
    isAfter(dateTime: DateTime): boolean;
    isBefore(dateTime: DateTime): boolean;
    isEmpty(): boolean;
    length(unit?: DurationUnit): number;
    overlaps(other: Interval): boolean;
    set(values: IntervalObject): Interval;
    splitAt(...dateTimes: DateTime[]): Interval[];
    splitBy(duration: Duration | DurationObject | number): Interval[];
    toDuration(unit?: DurationUnit | DurationUnit[], options?: DiffOptions): Duration;
    toFormat(
        dateFormat: string,
        options?: {
            separator?: string;
        },
    ): string;
    toISO(options?: ToISOTimeOptions): string;
    toISODate(): string;
    toISOTime(options?: ToISOTimeOptions): string;
    toString(): string;
    union(other: Interval): Interval;
    mapEndpoints(cb: (d: DateTime) => DateTime): Interval;
}

export namespace Settings {
    let defaultLocale: string;
    let defaultNumberingSystem: string;
    let defaultOutputCalendar: string;
    const defaultZone: Zone;
    let defaultZoneName: string;
    let throwOnInvalid: boolean;
    function now(): number;
    function resetCaches(): void;
}

export interface ZoneOffsetOptions {
    format?: 'short' | 'long';
    locale?: string;
}

export type ZoneOffsetFormat = 'narrow' | 'short' | 'techie';

export class Zone {
    offsetName(ts: number, options: ZoneOffsetOptions): string;
    formatOffset(ts: number, format: ZoneOffsetFormat): string;
    isValid: boolean;
    name: string;
    type: string;
    universal: boolean;
    equals(other: Zone): boolean;
    offset(ts: number): number;
}

export class IANAZone extends Zone {
    constructor(ianaString: string);
    static create(name: string): IANAZone;
    static isValidSpecifier(s: string): boolean;
    static isValidZone(zone: string): boolean;
    static resetCache(): void;
}

export class FixedOffsetZone extends Zone {
    static utcInstance: FixedOffsetZone;
    static instance(offset: number): FixedOffsetZone;
    static parseSpecifier(s: string): FixedOffsetZone;
}

export class InvalidZone extends Zone { }

export class LocalZone extends Zone { }

{'repo_name': 'DefinitelyTyped/DefinitelyTyped', 'stars': '28981', 'repo_language': 'TypeScript', 'file_name': 'react-flatpickr-tests.tsx', 'mime_type': 'text/x-java', 'hash': 6209381965228821738, 'source_dataset': 'data'}


---
title: "Overview"
section: "Generics"
layout: overview
menu:
  toc:
    identifier: "generics-overview"
    parent: "generics"
    weight: 1
---

Often when writing code you want to create similar classes or functions that differ only in the type that they operate on. The classic example of this is collection classes. You want to be able to create an `Array` that can hold objects of a particular type without creating an `IntArray`, `StringArray`, etc. This is where generics step in.

## Generic Classes

A generic class is a class that can have parameters, much like a method has parameters. The parameters for a generic class are types. Parameters are introduced to a class using square brackets.

Take the following example of a non-generic class:

```pony
class Foo
  var _c: U32

  new create(c: U32) =>
    _c = c

  fun get(): U32 => _c

  fun ref set(c: U32) => _c = c

actor Main
  new create(env:Env) =>
    let a = Foo(42)
    env.out.print(a.get().string())
    a.set(21)
    env.out.print(a.get().string())
```

This class only works for the type `U32`, a 32 bit unsigned integer. We can make this work over other types by making the type a parameter to the class. For this example it looks like:

```pony
class Foo[A: Any val]
  var _c: A

  new create(c: A) =>
    _c = c

  fun get(): A => _c

  fun ref set(c: A) => _c = c

actor Main
  new create(env:Env) =>
    let a = Foo[U32](42)
    env.out.print(a.get().string())
    a.set(21)

    env.out.print(a.get().string())
    let b = Foo[F32](1.5)
    env.out.print(b.get().string())

    let c = Foo[String]("Hello")
    env.out.print(c.get().string())
```

The first thing to note here is that the `Foo` class now takes a type parameter in square brackets, `[A: Any val]`. That syntax for the type parameter is:

    Name: Constraint ReferenceCapability

In this case, the name is `A`, the constraint is `Any` and the reference capability is `val`. `Any` is used to mean that the type can be any type - it is not constrained. The remainder of the class definition replaces `U32` with the type name `A`.

The user of the class must provide a type when referencing the class name. This is done when creating it:

```pony
let a = Foo[U32](42)
let b = Foo[F32](1.5)
let c = Foo[String]("Hello")
```

That tells the compiler what specific class to create, replacing `A` with the type provided. For example, a `Foo[String]` usage becomes equivalent to:

```pony
class FooString
  var _c: String val

  new create(c: String val) =>
    _c = c

  fun get(): String val => _c

  fun ref set(c: String val) => _c = c
```

## Generic Methods

Methods can be generic too. They are defined in the same way as normal methods but have type parameters inside square brackets after the method name:

```pony
primitive Foo
  fun bar[A: Stringable val](a: A): String =>
    a.string()

actor Main
  new create(env:Env) =>
    let a = Foo.bar[U32](10)
    env.out.print(a.string())

    let b = Foo.bar[String]("Hello")
    env.out.print(b.string())
```

This example shows a constraint other than `Any`. The `Stringable` type is any type with a `string()` method to convert to a `String`.

These examples show the basic idea behind generics and how to use them. Real world usage gets quite a bit more complex and the following sections will dive deeper into how to use them.

{'repo_name': 'ponylang/pony-tutorial', 'stars': '158', 'repo_language': 'Shell', 'file_name': 'default.md', 'mime_type': 'text/plain', 'hash': -6539937726331283517, 'source_dataset': 'data'}


/*
 * Copyright (c) 2018-2020 Atmosphère-NX
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU General Public License,
 * version 2, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#include <mesosphere.hpp>

namespace ams::kern::svc {

    /* =============================    Common    ============================= */

    namespace {

        Result SetHeapSize(uintptr_t *out_address, size_t size) {
            /* Validate size. */
            R_UNLESS(util::IsAligned(size, ams::svc::HeapSizeAlignment), svc::ResultInvalidSize());
            R_UNLESS(size < ams::kern::MainMemorySize,                   svc::ResultInvalidSize());

            /* Set the heap size. */
            KProcessAddress address;
            R_TRY(GetCurrentProcess().GetPageTable().SetHeapSize(std::addressof(address), size));

            /* Set the output. */
            *out_address = GetInteger(address);
            return ResultSuccess();
        }

        Result SetUnsafeLimit(size_t limit) {
            /* Ensure the size is aligned. */
            R_UNLESS(util::IsAligned(limit, PageSize), svc::ResultInvalidSize());

            /* Ensure that the size is not bigger than we can accommodate. */
            R_UNLESS(limit <= Kernel::GetMemoryManager().GetSize(KMemoryManager::Pool_Unsafe), svc::ResultOutOfRange());

            /* Set the size. */
            return Kernel::GetUnsafeMemory().SetLimitSize(limit);
        }

        Result MapPhysicalMemory(uintptr_t address, size_t size) {
            /* Validate address / size. */
            R_UNLESS(util::IsAligned(address, PageSize), svc::ResultInvalidAddress());
            R_UNLESS(util::IsAligned(size,    PageSize), svc::ResultInvalidSize());
            R_UNLESS(size > 0,                           svc::ResultInvalidSize());
            R_UNLESS((address < address + size),         svc::ResultInvalidMemoryRegion());

            /* Verify that the process has system resource. */
            auto &process = GetCurrentProcess();
            R_UNLESS(process.GetTotalSystemResourceSize() > 0, svc::ResultInvalidState());

            /* Verify that the region is in range. */
            auto &page_table = process.GetPageTable();
            R_UNLESS(page_table.IsInAliasRegion(address, size), svc::ResultInvalidMemoryRegion());

            /* Map the memory. */
            R_TRY(page_table.MapPhysicalMemory(address, size));

            return ResultSuccess();
        }

        Result UnmapPhysicalMemory(uintptr_t address, size_t size) {
            /* Validate address / size. */
            R_UNLESS(util::IsAligned(address, PageSize), svc::ResultInvalidAddress());
            R_UNLESS(util::IsAligned(size,    PageSize), svc::ResultInvalidSize());
            R_UNLESS(size > 0,                           svc::ResultInvalidSize());
            R_UNLESS((address < address + size),         svc::ResultInvalidMemoryRegion());

            /* Verify that the process has system resource. */
            auto &process = GetCurrentProcess();
            R_UNLESS(process.GetTotalSystemResourceSize() > 0, svc::ResultInvalidState());

            /* Verify that the region is in range. */
            auto &page_table = process.GetPageTable();
            R_UNLESS(page_table.IsInAliasRegion(address, size), svc::ResultInvalidMemoryRegion());

            /* Unmap the memory. */
            R_TRY(page_table.UnmapPhysicalMemory(address, size));

            return ResultSuccess();
        }

        Result MapPhysicalMemoryUnsafe(uintptr_t address, size_t size) {
            /* Validate address / size. */
            R_UNLESS(util::IsAligned(address, PageSize), svc::ResultInvalidAddress());
            R_UNLESS(util::IsAligned(size,    PageSize), svc::ResultInvalidSize());
            R_UNLESS(size > 0,                           svc::ResultInvalidSize());
            R_UNLESS((address < address + size),         svc::ResultInvalidCurrentMemory());

            /* Verify that the region is in range. */
            auto &process    = GetCurrentProcess();
            auto &page_table = process.GetPageTable();
            R_UNLESS(page_table.IsInUnsafeAliasRegion(address, size), svc::ResultInvalidMemoryRegion());

            /* Verify that the process isn't already using the unsafe pool. */
            R_UNLESS(process.GetMemoryPool() != KMemoryManager::Pool_Unsafe, svc::ResultInvalidMemoryPool());

            /* Map the memory. */
            R_TRY(page_table.MapPhysicalMemoryUnsafe(address, size));

            return ResultSuccess();
        }

        Result UnmapPhysicalMemoryUnsafe(uintptr_t address, size_t size) {
            /* Validate address / size. */
            R_UNLESS(util::IsAligned(address, PageSize), svc::ResultInvalidAddress());
            R_UNLESS(util::IsAligned(size,    PageSize), svc::ResultInvalidSize());
            R_UNLESS(size > 0,                           svc::ResultInvalidSize());
            R_UNLESS((address < address + size),         svc::ResultInvalidCurrentMemory());

            /* Verify that the region is in range. */
            auto &process    = GetCurrentProcess();
            auto &page_table = process.GetPageTable();
            R_UNLESS(page_table.IsInUnsafeAliasRegion(address, size), svc::ResultInvalidMemoryRegion());

            /* Unmap the memory. */
            R_TRY(page_table.UnmapPhysicalMemoryUnsafe(address, size));

            return ResultSuccess();
        }

    }

    /* =============================    64 ABI    ============================= */

    Result SetHeapSize64(ams::svc::Address *out_address, ams::svc::Size size) {
        static_assert(sizeof(*out_address) == sizeof(uintptr_t));
        return SetHeapSize(reinterpret_cast<uintptr_t *>(out_address), size);
    }

    Result MapPhysicalMemory64(ams::svc::Address address, ams::svc::Size size) {
        return MapPhysicalMemory(address, size);
    }

    Result UnmapPhysicalMemory64(ams::svc::Address address, ams::svc::Size size) {
        return UnmapPhysicalMemory(address, size);
    }

    Result MapPhysicalMemoryUnsafe64(ams::svc::Address address, ams::svc::Size size) {
        return MapPhysicalMemoryUnsafe(address, size);
    }

    Result UnmapPhysicalMemoryUnsafe64(ams::svc::Address address, ams::svc::Size size) {
        return UnmapPhysicalMemoryUnsafe(address, size);
    }

    Result SetUnsafeLimit64(ams::svc::Size limit) {
        return SetUnsafeLimit(limit);
    }

    /* ============================= 64From32 ABI ============================= */

    Result SetHeapSize64From32(ams::svc::Address *out_address, ams::svc::Size size) {
        static_assert(sizeof(*out_address) == sizeof(uintptr_t));
        return SetHeapSize(reinterpret_cast<uintptr_t *>(out_address), size);
    }

    Result MapPhysicalMemory64From32(ams::svc::Address address, ams::svc::Size size) {
        return MapPhysicalMemory(address, size);
    }

    Result UnmapPhysicalMemory64From32(ams::svc::Address address, ams::svc::Size size) {
        return UnmapPhysicalMemory(address, size);
    }

    Result MapPhysicalMemoryUnsafe64From32(ams::svc::Address address, ams::svc::Size size) {
        return MapPhysicalMemoryUnsafe(address, size);
    }

    Result UnmapPhysicalMemoryUnsafe64From32(ams::svc::Address address, ams::svc::Size size) {
        return UnmapPhysicalMemoryUnsafe(address, size);
    }

    Result SetUnsafeLimit64From32(ams::svc::Size limit) {
        return SetUnsafeLimit(limit);
    }

}

{'repo_name': 'Atmosphere-NX/Atmosphere', 'stars': '4637', 'repo_language': 'C', 'file_name': 'ini.c', 'mime_type': 'text/x-c', 'hash': -7994468714218424543, 'source_dataset': 'data'}


#import "GPUImageMotionDetector.h"

#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
NSString *const kGPUImageMotionComparisonFragmentShaderString = SHADER_STRING
(
 varying highp vec2 textureCoordinate;
 varying highp vec2 textureCoordinate2;

 uniform sampler2D inputImageTexture;
 uniform sampler2D inputImageTexture2;

 uniform highp float intensity;

 void main()
 {
     lowp vec3 currentImageColor = texture2D(inputImageTexture, textureCoordinate).rgb;
     lowp vec3 lowPassImageColor = texture2D(inputImageTexture2, textureCoordinate2).rgb;

     mediump float colorDistance = distance(currentImageColor, lowPassImageColor); // * 0.57735
     lowp float movementThreshold = step(0.2, colorDistance);

     gl_FragColor = movementThreshold * vec4(textureCoordinate2.x, textureCoordinate2.y, 1.0, 1.0);
 }
);
#else
NSString *const kGPUImageMotionComparisonFragmentShaderString = SHADER_STRING
(
 varying vec2 textureCoordinate;
 varying vec2 textureCoordinate2;

 uniform sampler2D inputImageTexture;
 uniform sampler2D inputImageTexture2;

 uniform float intensity;

 void main()
 {
     vec3 currentImageColor = texture2D(inputImageTexture, textureCoordinate).rgb;
     vec3 lowPassImageColor = texture2D(inputImageTexture2, textureCoordinate2).rgb;

     float colorDistance = distance(currentImageColor, lowPassImageColor); // * 0.57735
     float movementThreshold = step(0.2, colorDistance);

     gl_FragColor = movementThreshold * vec4(textureCoordinate2.x, textureCoordinate2.y, 1.0, 1.0);
 }
);
#endif

@implementation GPUImageMotionDetector

@synthesize lowPassFilterStrength, motionDetectionBlock;

#pragma mark -
#pragma mark Initialization and teardown

- (id)init;
{
    if (!(self = [super init]))
    {
		return nil;
    }

    // Start with a low pass filter to define the component to be removed
    lowPassFilter = [[GPUImageLowPassFilter alloc] init];
    [self addFilter:lowPassFilter];

    // Take the difference of the current frame from the low pass filtered result to get the high pass
    frameComparisonFilter = [[GPUImageTwoInputFilter alloc] initWithFragmentShaderFromString:kGPUImageMotionComparisonFragmentShaderString];
    [self addFilter:frameComparisonFilter];

    // Texture location 0 needs to be the original image for the difference blend
    [lowPassFilter addTarget:frameComparisonFilter atTextureLocation:1];

    // End with the average color for the scene to determine the centroid
    averageColor = [[GPUImageAverageColor alloc] init];

    __unsafe_unretained GPUImageMotionDetector *weakSelf = self;

    [averageColor setColorAverageProcessingFinishedBlock:^(CGFloat redComponent, CGFloat greenComponent, CGFloat blueComponent, CGFloat alphaComponent, CMTime frameTime) {
        if (weakSelf.motionDetectionBlock != NULL)
        {
            weakSelf.motionDetectionBlock(CGPointMake(redComponent / alphaComponent, greenComponent / alphaComponent), alphaComponent, frameTime);
        }
//        NSLog(@"Average X: %f, Y: %f total: %f", redComponent / alphaComponent, greenComponent / alphaComponent, alphaComponent);
    }];

    [frameComparisonFilter addTarget:averageColor];

    self.initialFilters = [NSArray arrayWithObjects:lowPassFilter, frameComparisonFilter, nil];
    self.terminalFilter = frameComparisonFilter;

    self.lowPassFilterStrength = 0.5;

    return self;
}

#pragma mark -
#pragma mark Accessors

- (void)setLowPassFilterStrength:(CGFloat)newValue;
{
    lowPassFilter.filterStrength = newValue;
}

- (CGFloat)lowPassFilterStrength;
{
    return lowPassFilter.filterStrength;
}

@end

{'repo_name': 'iOS-Swift-Developers/Swift', 'stars': '1213', 'repo_language': 'C', 'file_name': 'Info.plist', 'mime_type': 'text/xml', 'hash': 8423911690255445911, 'source_dataset': 'data'}


<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16C67" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
    <device id="retina4_7" orientation="portrait">
        <adaptation id="fullscreen"/>
    </device>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
        <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    </dependencies>
    <objects>
        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
        <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="67" id="sMr-TD-BSz" userLabel="Switch Cell" customClass="SwitchCell" customModule="Eureka">
            <rect key="frame" x="0.0" y="0.0" width="466" height="67"/>
            <autoresizingMask key="autoresizingMask"/>
            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="sMr-TD-BSz" id="5LI-gZ-vq3">
                <rect key="frame" x="0.0" y="0.0" width="466" height="66"/>
                <autoresizingMask key="autoresizingMask"/>
                <subviews>
                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Just a static title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VEC-iB-C8y">
                        <rect key="frame" x="332.5" y="23.5" width="125.5" height="20.5"/>
                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
                        <nil key="textColor"/>
                        <nil key="highlightedColor"/>
                    </label>
                    <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="lFs-g3-di0">
                        <rect key="frame" x="8" y="18" width="51" height="31"/>
                    </switch>
                </subviews>
                <constraints>
                    <constraint firstAttribute="leadingMargin" secondItem="lFs-g3-di0" secondAttribute="leading" id="7Xi-3i-w1i"/>
                    <constraint firstItem="lFs-g3-di0" firstAttribute="centerY" secondItem="5LI-gZ-vq3" secondAttribute="centerY" id="ZdS-5Y-5kO"/>
                    <constraint firstAttribute="trailingMargin" secondItem="VEC-iB-C8y" secondAttribute="trailing" id="bav-gE-XnN"/>
                    <constraint firstItem="VEC-iB-C8y" firstAttribute="centerY" secondItem="5LI-gZ-vq3" secondAttribute="centerY" id="iI2-26-DkZ"/>
                </constraints>
            </tableViewCellContentView>
            <connections>
                <outlet property="switchControl" destination="lFs-g3-di0" id="C1f-iM-VBo"/>
            </connections>
            <point key="canvasLocation" x="-273" y="-252"/>
        </tableViewCell>
    </objects>
</document>

{'repo_name': 'xmartlabs/Eureka', 'stars': '10777', 'repo_language': 'Swift', 'file_name': 'SetValuesTests.swift', 'mime_type': 'text/plain', 'hash': 3243201105018705886, 'source_dataset': 'data'}


import { CloudDirectory } from "../CloudDirectory";
import { CloudDirectoryClient } from "../CloudDirectoryClient";
import {
  ListObjectParentsCommand,
  ListObjectParentsCommandInput,
  ListObjectParentsCommandOutput,
} from "../commands/ListObjectParentsCommand";
import { CloudDirectoryPaginationConfiguration } from "./Interfaces";
import { Paginator } from "@aws-sdk/types";

const makePagedClientRequest = async (
  client: CloudDirectoryClient,
  input: ListObjectParentsCommandInput,
  ...args: any
): Promise<ListObjectParentsCommandOutput> => {
  // @ts-ignore
  return await client.send(new ListObjectParentsCommand(input, ...args));
};
const makePagedRequest = async (
  client: CloudDirectory,
  input: ListObjectParentsCommandInput,
  ...args: any
): Promise<ListObjectParentsCommandOutput> => {
  // @ts-ignore
  return await client.listObjectParents(input, ...args);
};
export async function* listObjectParentsPaginate(
  config: CloudDirectoryPaginationConfiguration,
  input: ListObjectParentsCommandInput,
  ...additionalArguments: any
): Paginator<ListObjectParentsCommandOutput> {
  let token: string | undefined = config.startingToken || "";
  let hasNext = true;
  let page: ListObjectParentsCommandOutput;
  while (hasNext) {
    input["NextToken"] = token;
    input["MaxResults"] = config.pageSize;
    if (config.client instanceof CloudDirectory) {
      page = await makePagedRequest(config.client, input, ...additionalArguments);
    } else if (config.client instanceof CloudDirectoryClient) {
      page = await makePagedClientRequest(config.client, input, ...additionalArguments);
    } else {
      throw new Error("Invalid client, expected CloudDirectory | CloudDirectoryClient");
    }
    yield page;
    token = page["NextToken"];
    hasNext = !!token;
  }
  // @ts-ignore
  return undefined;
}

{'repo_name': 'aws/aws-sdk-js-v3', 'stars': '355', 'repo_language': 'TypeScript', 'file_name': 'config.yml', 'mime_type': 'text/plain', 'hash': -3516829454284751062, 'source_dataset': 'data'}