text:
// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Linq;
using Microsoft.CodeAnalysis.CSharp.Symbols.Metadata.PE;
using Microsoft.CodeAnalysis.CSharp.Symbols;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Text;
using Roslyn.Utilities;

namespace Microsoft.CodeAnalysis.CSharp.Symbols
{
    /// <summary>
    /// An ArrayTypeSymbol represents an array type, such as int[] or object[,].
    /// </summary>
    internal abstract partial class ArrayTypeSymbol : TypeSymbol, IArrayTypeSymbol
    {
        private readonly TypeSymbol _elementType;
        private readonly NamedTypeSymbol _baseType;
        private readonly ImmutableArray<CustomModifier> _customModifiers;

        private ArrayTypeSymbol(
            TypeSymbol elementType,
            NamedTypeSymbol array,
            ImmutableArray<CustomModifier> customModifiers)
        {
            Debug.Assert((object)elementType != null);
            Debug.Assert((object)array != null);

            _elementType = elementType;
            _baseType = array;
            _customModifiers = customModifiers.NullToEmpty();
        }

        internal static ArrayTypeSymbol CreateCSharpArray(
            AssemblySymbol declaringAssembly,
            TypeSymbol elementType,
            ImmutableArray<CustomModifier> customModifiers = default(ImmutableArray<CustomModifier>),
            int rank = 1)
        {
            if (rank == 1)
            {
                return CreateSZArray(declaringAssembly, elementType, customModifiers);
            }

            return CreateMDArray(declaringAssembly, elementType, rank, default(ImmutableArray<int>), default(ImmutableArray<int>), customModifiers);
        }

        internal static ArrayTypeSymbol CreateMDArray(
            TypeSymbol elementType,
            int rank,
            ImmutableArray<int> sizes,
            ImmutableArray<int> lowerBounds,
            NamedTypeSymbol array,
            ImmutableArray<CustomModifier> customModifiers)
        {
            // Optimize for most common case - no sizes and all dimensions are zero lower bound.
            if (sizes.IsDefaultOrEmpty && lowerBounds.IsDefault)
            {
                return new MDArray(elementType, rank, array, customModifiers);
            }

            return new MDArrayWithSizesAndBounds(elementType, rank, sizes, lowerBounds, array, customModifiers);
        }

        internal static ArrayTypeSymbol CreateMDArray(
            AssemblySymbol declaringAssembly,
            TypeSymbol elementType,
            int rank,
            ImmutableArray<int> sizes,
            ImmutableArray<int> lowerBounds,
            ImmutableArray<CustomModifier> customModifiers = default(ImmutableArray<CustomModifier>))
        {
            return CreateMDArray(elementType, rank, sizes, lowerBounds, declaringAssembly.GetSpecialType(SpecialType.System_Array), customModifiers);
        }

        internal static ArrayTypeSymbol CreateSZArray(
            TypeSymbol elementType,
            NamedTypeSymbol array,
            ImmutableArray<NamedTypeSymbol> constructedInterfaces,
            ImmutableArray<CustomModifier> customModifiers)
        {
            return new SZArray(elementType, array, constructedInterfaces, customModifiers);
        }

        internal static ArrayTypeSymbol CreateSZArray(
            AssemblySymbol declaringAssembly,
            TypeSymbol elementType,
            ImmutableArray<CustomModifier> customModifiers = default(ImmutableArray<CustomModifier>))
        {
            return CreateSZArray(elementType, declaringAssembly.GetSpecialType(SpecialType.System_Array), GetSZArrayInterfaces(elementType, declaringAssembly), customModifiers);
        }

        private static ImmutableArray<NamedTypeSymbol> GetSZArrayInterfaces(
            TypeSymbol elementType,
            AssemblySymbol declaringAssembly)
        {
            var constructedInterfaces = ArrayBuilder<NamedTypeSymbol>.GetInstance();

            //There are cases where the platform does contain the interfaces.
            //So it is fine not to have them listed under the type
            var iListOfT = declaringAssembly.GetSpecialType(SpecialType.System_Collections_Generic_IList_T);
            if (!iListOfT.IsErrorType())
            {
                constructedInterfaces.Add(new ConstructedNamedTypeSymbol(iListOfT, ImmutableArray.Create(new TypeWithModifiers(elementType))));
            }

            var iReadOnlyListOfT = declaringAssembly.GetSpecialType(SpecialType.System_Collections_Generic_IReadOnlyList_T);

            if (!iReadOnlyListOfT.IsErrorType())
            {
                constructedInterfaces.Add(new ConstructedNamedTypeSymbol(iReadOnlyListOfT, ImmutableArray.Create(new TypeWithModifiers(elementType))));
            }

            return constructedInterfaces.ToImmutableAndFree();
        }

        /// <summary>
        /// Gets the list of custom modifiers associated with the array.
        /// Returns an empty list if there are no custom modifiers.
        /// </summary>
        public ImmutableArray<CustomModifier> CustomModifiers
        {
            get
            {
                return _customModifiers;
            }
        }

        /// <summary>
        /// Gets the number of dimensions of the array. A regular single-dimensional array
        /// has rank 1, a two-dimensional array has rank 2, etc.
        /// </summary>
        public abstract int Rank { get; }

        /// <summary>
        /// Is this zero-based one-dimensional array, i.e. SZArray in CLR terms.
        /// </summary>
        internal abstract bool IsSZArray { get; }

        internal bool HasSameShapeAs(ArrayTypeSymbol other)
        {
            return Rank == other.Rank && IsSZArray == other.IsSZArray;
        }

        /// <summary>
        /// Specified sizes for dimensions, by position. The length can be less than <see cref="Rank"/>,
        /// meaning that some trailing dimensions don't have the size specified.
        /// The most common case is none of the dimensions have the size specified - an empty array is returned.
        /// </summary>
        internal virtual ImmutableArray<int> Sizes
        {
            get
            {
                return ImmutableArray<int>.Empty;
            }
        }

        /// <summary>
        /// Specified lower bounds for dimensions, by position. The length can be less than <see cref="Rank"/>,
        /// meaning that some trailing dimensions don't have the lower bound specified.
        /// The most common case is all dimensions are zero bound - a null array is returned in this case.
        /// </summary>
        internal virtual ImmutableArray<int> LowerBounds
        {
            get
            {
                return default(ImmutableArray<int>);
            }
        }

        /// <summary>
        /// Note, <see cref="Rank"/> equality should be checked separately!!!
        /// </summary>
        internal bool HasSameSizesAndLowerBoundsAs(ArrayTypeSymbol other)
        {
            if (this.Sizes.SequenceEqual(other.Sizes))
            {
                var thisLowerBounds = this.LowerBounds;

                if (thisLowerBounds.IsDefault)
                {
                    return other.LowerBounds.IsDefault;
                }

                var otherLowerBounds = other.LowerBounds;

                return !otherLowerBounds.IsDefault && thisLowerBounds.SequenceEqual(otherLowerBounds);
            }

            return false;
        }

        /// <summary>
        /// Normally C# arrays have default sizes and lower bounds - sizes are not specified and all dimensions are zero bound.
        /// This property should return false for any deviations.
        /// </summary>
        internal abstract bool HasDefaultSizesAndLowerBounds { get; }

        /// <summary>
        /// Gets the type of the elements stored in the array.
        /// </summary>
        public TypeSymbol ElementType
        {
            get
            {
                return _elementType;
            }
        }

        internal override NamedTypeSymbol BaseTypeNoUseSiteDiagnostics
        {
            get
            {
                return _baseType;
            }
        }

        public override bool IsReferenceType
        {
            get
            {
                return true;
            }
        }

        public override bool IsValueType
        {
            get
            {
                return false;
            }
        }

        internal sealed override bool IsManagedType
        {
            get
            {
                return true;
            }
        }

        internal sealed override ObsoleteAttributeData ObsoleteAttributeData
        {
            get { return null; }
        }

        public override ImmutableArray<Symbol> GetMembers()
        {
            return ImmutableArray<Symbol>.Empty;
        }

        public override ImmutableArray<Symbol> GetMembers(string name)
        {
            return ImmutableArray<Symbol>.Empty;
        }

        public override ImmutableArray<NamedTypeSymbol> GetTypeMembers()
        {
            return ImmutableArray<NamedTypeSymbol>.Empty;
        }

        public override ImmutableArray<NamedTypeSymbol> GetTypeMembers(string name)
        {
            return ImmutableArray<NamedTypeSymbol>.Empty;
        }

        public override ImmutableArray<NamedTypeSymbol> GetTypeMembers(string name, int arity)
        {
            return ImmutableArray<NamedTypeSymbol>.Empty;
        }

        public override SymbolKind Kind
        {
            get
            {
                return SymbolKind.ArrayType;
            }
        }

        public override TypeKind TypeKind
        {
            get
            {
                return TypeKind.Array;
            }
        }

        public override Symbol ContainingSymbol
        {
            get
            {
                return null;
            }
        }

        public override ImmutableArray<Location> Locations
        {
            get
            {
                return ImmutableArray<Location>.Empty;
            }
        }

        public override ImmutableArray<SyntaxReference> DeclaringSyntaxReferences
        {
            get
            {
                return ImmutableArray<SyntaxReference>.Empty;
            }
        }

        internal override TResult Accept<TArgument, TResult>(CSharpSymbolVisitor<TArgument, TResult> visitor, TArgument argument)
        {
            return visitor.VisitArrayType(this, argument);
        }

        public override void Accept(CSharpSymbolVisitor visitor)
        {
            visitor.VisitArrayType(this);
        }

        public override TResult Accept<TResult>(CSharpSymbolVisitor<TResult> visitor)
        {
            return visitor.VisitArrayType(this);
        }

        internal override bool Equals(TypeSymbol t2, bool ignoreCustomModifiersAndArraySizesAndLowerBounds, bool ignoreDynamic)
        {
            return this.Equals(t2 as ArrayTypeSymbol, ignoreCustomModifiersAndArraySizesAndLowerBounds, ignoreDynamic);
        }

        internal bool Equals(ArrayTypeSymbol other)
        {
            return Equals(other, false, false);
        }

        private bool Equals(ArrayTypeSymbol other, bool ignoreCustomModifiersAndArraySizesAndLowerBounds, bool ignoreDynamic)
        {
            if (ReferenceEquals(this, other))
            {
                return true;
            }

            if ((object)other == null || !other.HasSameShapeAs(this) ||
                !other.ElementType.Equals(ElementType, ignoreCustomModifiersAndArraySizesAndLowerBounds, ignoreDynamic))
            {
                return false;
            }

            // Make sure custom modifiers and bounds are the same.
            if (!ignoreCustomModifiersAndArraySizesAndLowerBounds)
            {
                var mod = this.CustomModifiers;
                var otherMod = other.CustomModifiers;
                var count = mod.Length;

                if (count != otherMod.Length)
                {
                    return false;
                }

                for (int i = 0; i < count; i++)
                {
                    if (!mod[i].Equals(otherMod[i]))
                    {
                        return false;
                    }
                }

                if (!this.HasSameSizesAndLowerBoundsAs(other))
                {
                    return false;
                }
            }

            return true;
        }

        public override int GetHashCode()
        {
            // We don't want to blow the stack if we have a type like T[][][][][][][][]....[][],
            // so we do not recurse until we have a non-array. Rather, hash all the ranks together
            // and then hash that with the "T" type.

            int hash = 0;
            TypeSymbol current = this;
            while (current.TypeKind == TypeKind.Array)
            {
                var cur = (ArrayTypeSymbol)current;
                hash = Hash.Combine(cur.Rank, hash);
                current = cur.ElementType;
            }

            return Hash.Combine(current, hash);
        }

        public override Accessibility DeclaredAccessibility
        {
            get
            {
                return Accessibility.NotApplicable;
            }
        }

        public override bool IsStatic
        {
            get
            {
                return false;
            }
        }

        public override bool IsAbstract
        {
            get
            {
                return false;
            }
        }

        public override bool IsSealed
        {
            get
            {
                return false;
            }
        }

        #region Use-Site Diagnostics

        internal override DiagnosticInfo GetUseSiteDiagnostic()
        {
            DiagnosticInfo result = null;

            // check element type
            if (DeriveUseSiteDiagnosticFromType(ref result, this.ElementType))
            {
                return result;
            }

            // check custom modifiers
            if (DeriveUseSiteDiagnosticFromCustomModifiers(ref result, this.CustomModifiers))
            {
                return result;
            }

            return result;
        }

        internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes)
        {
            return _elementType.GetUnificationUseSiteDiagnosticRecursive(ref result, owner, ref checkedTypes) ||
                   ((object)_baseType != null && _baseType.GetUnificationUseSiteDiagnosticRecursive(ref result, owner, ref checkedTypes)) ||
                   GetUnificationUseSiteDiagnosticRecursive(ref result, this.InterfacesNoUseSiteDiagnostics(), owner, ref checkedTypes) ||
                   GetUnificationUseSiteDiagnosticRecursive(ref result, this.CustomModifiers, owner, ref checkedTypes);
        }

        #endregion

        #region IArrayTypeSymbol Members

        ITypeSymbol IArrayTypeSymbol.ElementType
        {
            get { return this.ElementType; }
        }

        ImmutableArray<CustomModifier> IArrayTypeSymbol.CustomModifiers
        {
            get { return this.CustomModifiers; }
        }

        bool IArrayTypeSymbol.Equals(IArrayTypeSymbol symbol)
        {
            return this.Equals(symbol as ArrayTypeSymbol);
        }

        #endregion

        #region ISymbol Members

        public override void Accept(SymbolVisitor visitor)
        {
            visitor.VisitArrayType(this);
        }

        public override TResult Accept<TResult>(SymbolVisitor<TResult> visitor)
        {
            return visitor.VisitArrayType(this);
        }

        #endregion

        /// <summary>
        /// Represents SZARRAY - zero-based one-dimensional array
        /// </summary>
        private sealed class SZArray : ArrayTypeSymbol
        {
            private readonly ImmutableArray<NamedTypeSymbol> _interfaces;

            internal SZArray(
                TypeSymbol elementType,
                NamedTypeSymbol array,
                ImmutableArray<NamedTypeSymbol> constructedInterfaces,
                ImmutableArray<CustomModifier> customModifiers)
                : base(elementType, array, customModifiers)
            {
                Debug.Assert(constructedInterfaces.Length <= 2);
                _interfaces = constructedInterfaces;
            }

            public override int Rank
            {
                get
                {
                    return 1;
                }
            }

            internal override bool IsSZArray
            {
                get
                {
                    return true;
                }
            }

            internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<Symbol> basesBeingResolved = null)
            {
                return _interfaces;
            }

            internal override bool HasDefaultSizesAndLowerBounds
            {
                get
                {
                    return true;
                }
            }
        }

        /// <summary>
        /// Represents MDARRAY - multi-dimensional array (possibly of rank 1)
        /// </summary>
        private class MDArray : ArrayTypeSymbol
        {
            private readonly int _rank;

            internal MDArray(
                TypeSymbol elementType,
                int rank,
                NamedTypeSymbol array,
                ImmutableArray<CustomModifier> customModifiers)
                : base(elementType, array, customModifiers)
            {
                Debug.Assert(rank >= 1);
                _rank = rank;
            }

            public sealed override int Rank
            {
                get
                {
                    return _rank;
                }
            }

            internal sealed override bool IsSZArray
            {
                get
                {
                    return false;
                }
            }

            internal sealed override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<Symbol> basesBeingResolved = null)
            {
                return ImmutableArray<NamedTypeSymbol>.Empty;
            }

            internal override bool HasDefaultSizesAndLowerBounds
            {
                get
                {
                    return true;
                }
            }
        }

        private sealed class MDArrayWithSizesAndBounds : MDArray
        {
            private readonly ImmutableArray<int> _sizes;
            private readonly ImmutableArray<int> _lowerBounds;

            internal MDArrayWithSizesAndBounds(
                TypeSymbol elementType,
                int rank,
                ImmutableArray<int> sizes,
                ImmutableArray<int> lowerBounds,
                NamedTypeSymbol array,
                ImmutableArray<CustomModifier> customModifiers)
                : base(elementType, rank, array, customModifiers)
            {
                Debug.Assert(!sizes.IsDefaultOrEmpty || !lowerBounds.IsDefault);
                Debug.Assert(lowerBounds.IsDefaultOrEmpty || (!lowerBounds.IsEmpty && (lowerBounds.Length != rank || !lowerBounds.All(b => b == 0))));
                _sizes = sizes.NullToEmpty();
                _lowerBounds = lowerBounds;
            }

            internal override ImmutableArray<int> Sizes
            {
                get
                {
                    return _sizes;
                }
            }

            internal override ImmutableArray<int> LowerBounds
            {
                get
                {
                    return _lowerBounds;
                }
            }

            internal override bool HasDefaultSizesAndLowerBounds
            {
                get
                {
                    return false;
                }
            }
        }
    }
}


text:
const CONDENSED_WIDTH = 750;

export interface State {
  width: number;
  isEnlarged: boolean;
}

export interface Getters {
  isCondensed: boolean;
}

export const windowStore = {
  state: {
    width: window.outerWidth,
    isEnlarged: false,
  } as State,
  getters: {
    isCondensed: (state: State) => {
      return state.width <= CONDENSED_WIDTH;
    },
  },
  mutations: {
    UPDATE_WINDOW_WIDTH (state: State, width: number) {
      state.width = width;
      if (state.width > CONDENSED_WIDTH) {
        state.isEnlarged = false;
      }
    },
    SET_ENLARGED (state: State, isEnlarged: boolean) {
      state.isEnlarged = isEnlarged;
    },
  }
};

redpajama_set_name: RedPajamaGithub


text:
#import <UIKit/UIKit.h>

@interface SCDetailViewController : UIViewController

@property (weak, nonatomic) IBOutlet UILabel *detailDescriptionLabel;
@property (weak, nonatomic) IBOutlet UILabel *sampleTextLabel;
@property (weak, nonatomic) IBOutlet UIButton *downloadButton;
@property (strong, nonatomic) UIFontDescriptor *fontDescriptor;
@property (weak, nonatomic) IBOutlet UIProgressView *downloadProgressBar;

- (IBAction)handleDownloadPressed:(id)sender;

@end


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- Button labels -->
    <string name="yes">Ja</string>
    <string name="no">Nei</string>
    <string name="cancel">Avbryt</string>
    <string name="cont">Fortsett</string>
    <string name="login">Logg inn</string>
    <string name="logout">Logg ut</string>
    <!-- Home menu items -->
    <string name="menu_exit">Avslutt</string>
    <string name="menu_about">Om</string>
    <string name="menu_help">Hjelp</string>
    <string name="menu_new_bookmark">Ny tilkobling</string>
    <string name="menu_app_settings">Innstilling</string>
    <!-- Bookmark menu items -->
    <string name="menu_title_bookmark">Tilkobling</string>
    <string name="menu_connect">Koble til</string>
    <string name="menu_edit">Rediger</string>
    <string name="menu_delete">Slett</string>
    <!-- Session menu items -->
    <string name="menu_sys_keyboard">Tastatur</string>
    <string name="menu_ext_keyboard">Funksjonstaster</string>
    <string name="menu_touch_pointer">Trykkpeker</string>
    <string name="menu_home">hjem</string>
    <string name="menu_disconnect">Koble fra</string>
    <!-- List section headers -->
    <string name="section_bookmarks">Manuelle tilkoblinger</string>
    <string name="section_active_sessions">Pågående økter</string>
    <!-- Search strings -->
    <string name="search_hint">Koble til datamaskin</string>
    <!-- List placeholder labels -->
    <string name="list_placeholder_login">Logg inn</string>
    <string name="list_placeholder_no_servers">No Servers</string>
    <string name="list_placeholder_connecting">Kobler til …</string>
    <string name="list_placeholder_disconnecting">Kobler fra …</string>
    <string name="list_placeholder_connection_error">Mistet tilknytning</string>
    <string name="list_placeholder_wrong_password">Feil passord</string>
    <string name="list_placeholder_invalid_username">Ugyldig brukernavn</string>
    <string name="list_placeholder_add_bookmark">Ny tilkobling</string>
    <!-- Bookmark settings strings -->
    <string name="settings_cat_host">Vert</string>
    <string name="settings_label">Etikett</string>
    <string name="settings_hostname">Vertsnavn</string>
    <string name="settings_port">Port</string>
    <string name="settings_cat_credentials">Identitetsdetaljer</string>
    <string name="settings_credentials">Identitetsdetaljer</string>
    <string name="settings_username">Brukernavn</string>
    <string name="settings_password">Passord</string>
    <string name="settings_domain">Domene</string>
    <string name="settings_cat_settings">Innstillinger</string>
    <string name="settings_screen">Skjerm</string>
    <string name="settings_cat_screen">Skjeminnstillinger</string>
    <string name="settings_colors">Farger</string>
    <string-array name="colors_array">
        <item>Palett (8-biters)</item>
        <item>Høy farge (15-biters)</item>
        <item>Høy farge (16-biters)</item>
        <item>Sann farge (24-biters)</item>
        <item>Høyeste kvalitet (32-biters)</item>
    </string-array>
    <!-- This array is used as is in code,
	do not translate! -->
    <string-array name="colors_values_array" translatable="false">
        <item>8</item>
        <item>15</item>
        <item>16</item>
        <item>24</item>
        <item>32</item>
    </string-array>
    <string name="settings_resolution">Oppløsning</string>
    <string name="resolution_automatic">Automatisk</string>
    <string name="resolution_fit">Tilpass til skjerm</string>
    <string name="resolution_custom">Tilpasset</string>
    <string-array name="resolutions_array">
        <item>Automatic</item>
        <item>Tilpass til skjerm</item>
        <item>Egendefinert</item>
        <item>640x480</item>
        <item>720x480</item>
        <item>800x600</item>
        <item>1024x768</item>
        <item>1280x1024</item>
        <item>1440x900</item>
        <item>1920x1080</item>
        <item>1920x1200</item>
    </string-array>
    <!-- This array is used as is in code,
	do not translate! -->
    <string-array name="resolutions_values_array" translatable="false">
        <item>automatic</item>
        <item>fitscreen</item>
        <item>custom</item>
        <item>640x480</item>
        <item>720x480</item>
        <item>800x600</item>
        <item>1024x768</item>
        <item>1280x1024</item>
        <item>1440x900</item>
        <item>1920x1080</item>
        <item>1920x1200</item>
    </string-array>
    <string name="settings_width">Bredde</string>
    <string name="settings_height">Høyde</string>
    <string name="settings_performance">Ytelse</string>
    <string name="settings_cat_performance">Ytelsesinnstillinger</string>
    <string name="settings_perf_remotefx">RemoteFX</string>
    <string name="settings_perf_gfx" translatable="false">GFX</string>
    <string name="settings_perf_gfx_h264" translatable="false">H264</string>
    <string name="settings_perf_wallpaper">Skrivebordsbakgrunn</string>
    <string name="settings_perf_font_smoothing">Skriftglatting</string>
    <string name="settings_perf_desktop_composition">Skrivebordskomposisjon</string>
    <string name="settings_perf_full_window_drag">Vindusinnhold under dragning</string>
    <string name="settings_perf_menu_animation">Menyanimasjon</string>
    <string name="settings_perf_theming">Visuelle stiler</string>
    <string name="settings_advanced">Advansert</string>
    <string name="settings_cat_advanced">Avanserte innstillinger</string>
    <string name="settings_enable_3g_settings">3G-innstillinger</string>
    <string name="settings_screen_3g">3G-skjerm</string>
    <string name="settings_performance_3g">3G-ytelse</string>
    <string name="settings_cat_gateway">Portner</string>
    <string name="settings_enable_gateway_settings">Skru på portner</string>
    <string name="settings_gateway_settings">Portner-innstilinger</string>
    <string name="settings_redirect_sdcard">Videresend SD-kort</string>
    <string name="settings_redirect_sound">Videresend lyd</string>
    <string-array name="redirect_sound_array">
        <item>Ikke spill</item>
        <item>Spill på tjener</item>
        <item>Spill på enhet</item>
    </string-array>
    <!-- This array is used as is in code,
	do not translate! -->
    <string-array name="redirect_sound_values_array" translatable="false">
        <item>2</item>
        <item>1</item>
        <item>0</item>
    </string-array>
    <string name="settings_redirect_microphone">Videresend mikrofon</string>
    <string name="settings_security">Sikkerhet</string>
    <string-array name="security_array">
        <item>Automatisk</item>
        <item>RDP</item>
        <item>TLS</item>
        <item>NLA</item>
    </string-array>
    <!-- This array is used as is in code,
	do not translate! -->
    <string-array name="security_values_array" translatable="false">
        <item>0</item>
        <item>1</item>
        <item>2</item>
        <item>3</item>
    </string-array>
    <string name="settings_remote_program">Fjernprogram</string>
    <string name="settings_work_dir">Arbeidsmappe</string>
    <string name="settings_async_channel">Asynk-kanal</string>
    <string name="settings_async_input">Asynk-inndata</string>
    <string name="settings_async_update">Asynk-oppdatering</string>
    <string name="settings_console_mode">Konsollmodus</string>
    <!-- App settings strings -->
    <string name="settings_password_present">*******</string>
    <string name="settings_password_empty">ikke satt</string>
    <string name="settings_cat_ui">Brukergrensesnitt</string>
    <string name="settings_ui_hide_status_bar">Skjul statusfelt</string>
    <string name="settings_ui_hide_action_bar">Skjul handlingsfelt</string>
    <string name="settings_ui_hide_zoom_controls">Skjul forstørrelseskontroller</string>
    <string name="settings_ui_swap_mouse_buttons">Bytt museknapper</string>
    <string name="settings_ui_invert_scrolling">Inverter rulling</string>
    <string name="settings_ui_auto_scroll_touchpointer">Autorulling for trykkpeker</string>
    <string name="settings_ui_ask_on_exit">Vis dialogvindu ved avslutning</string>
    <string name="settings_cat_power">Strømsparing</string>
    <string name="settings_cat_client">Klient</string>
    <string name="settings_power_disconnect_timeout">Lukk tilkoblinger ved lediggang</string>
    <string name="settings_cat_security">Sikkerhet</string>
    <string name="settings_security_accept_certificates">Godta alle sertifikater</string>
    <string name="settings_security_clear_certificate_cache">Tøm sertifikatshurtiglager</string>
    <string name="settings_description_after_minutes">Etter %1$d minutt</string>
    <string name="settings_description_disabled">Avskrudd</string>
    <!-- Activity titles -->
    <string name="title_bookmark_settings">Tilkoblingsinnstillinger</string>
    <string name="title_application_settings">Innstillinger</string>
    <string name="title_home">aFreeRDP - FreeRDP for Android</string>
    <string name="title_create_shortcut">RDP-tilkoblinger</string>
    <string name="title_help">Hjelp</string>
    <string name="title_about">Om</string>
    <!-- Error message strings -->
    <string name="error_bookmark_incomplete_title">Avbryt uten å lagre?</string>
    <string name="error_bookmark_incomplete">Trykk "Avbryt" for å annullere!\nTrykk "Fortsett" for å angi påkrevde felter!</string>
    <string name="error_connection_failure">Klarte ikke å etablere tilknytning til tjeneren!</string>
    <!-- Info message strings -->
    <string name="info_capabilities_changed">Skjerminnstillingene har blitt endret til noe tjeneren støtter istedenfor.</string>
    <string name="info_reset_success">Slettet sertifikatshurtiglageret.</string>
    <string name="info_reset_failed">Klarte ikke å slette sertifikatshurtigageret!</string>
    <!-- Dialog strings -->
    <string name="dlg_title_verify_certificate">Bekreft sertifikat</string>
    <string name="dlg_msg_verify_certificate">Identiteten til datamaskinen annensteds hen kan ikke bekreftes. Ønsker du å koble til likevel?</string>
    <string name="dlg_title_credentials">Skriv inn dine identitetsdetaljer</string>
    <string name="dlg_title_create_shortcut">Opprett snarvei</string>
    <string name="dlg_msg_create_shortcut">Snarveisnavn:</string>
    <string name="dlg_msg_connecting">Kobler til …</string>
    <string name="dlg_msg_logging_in">Logger inn …</string>
    <string name="dlg_title_about">Om aFreeRDP</string>
    <string name="dlg_title_create_bookmark_after_qc">Lagre tilkoblingsinnstillinger?</string>
    <string name="dlg_msg_create_bookmark_after_qc">Ønsker du å lagre de ulagrede tilkoblingsinnstillingene?</string>
    <string name="dlg_title_save_bookmark">Lagre tilkobling?</string>
    <string name="dlg_save_bookmark">Ønsker du å lagre endringer gjort i tilkoblingsinnstillingene?</string>
    <string name="dlg_dont_show_again">Ikke spør igjen</string>
    <string name="dlg_title_exit">Avslutt program?</string>
    <string name="dlg_msg_exit">Er du sikker på at du vil avslutte programmet?</string>
    <string name="dlg_title_clear_cert_cache">Slett sertifikater?</string>
    <string name="dlg_msg_clear_cert_cache">Er du sikker på at du vil slette alle sertifikater i hurtiglager?</string>
    <string name="debug_level">Feilsøkingsnivå</string>
    <string name="settings_debug">Avlusingsinnstillinger</string>
    <string name="preference_title_client">Klient</string>
    <string name="preference_key_client_name" translatable="false">preference_key_client_name</string>
    <string name="preference_title_client_name">Klientnavn</string>
    <string name="preference_default_client_name" translatable="false">aFreeRDP</string>
    <string name="preference_key_accept_certificates" translatable="false">security.accept_certificates</string>
    <string name="preference_key_security_clear_certificate_cache" translatable="false">security.clear_certificate_cache</string>
    <string name="preference_key_power_disconnect_timeout" translatable="false">power.disconnect_timeout</string>
    <string name="preference_key_ui_hide_status_bar" translatable="false">ui.hide_status_bar</string>
    <string name="preference_key_ui_ask_on_exit" translatable="false">ui.ask_on_exit</string>
    <string name="preference_key_ui_auto_scroll_touchpointer" translatable="false">ui.auto_scroll_touchpointer</string>
    <string name="preference_key_ui_invert_scrolling" translatable="false">ui.invert_scrolling</string>
    <string name="preference_key_ui_swap_mouse_buttons" translatable="false">ui.swap_mouse_buttons</string>
    <string name="preference_key_ui_hide_zoom_controls" translatable="false">ui.hide_zoom_controls</string>
    <string name="preference_key_ui_hide_action_bar" translatable="false">ui.hide_action_bar</string>
    <string-array name="debug_array" translatable="false">
        <item>OFF</item>
        <item>FATAL</item>
        <item>ERROR</item>
        <item>WARN</item>
        <item>INFO</item>
        <item>DEBUG</item>
        <item>TRACE</item>
    </string-array>
    <!-- This array is used as is in code,
	do not translate! -->
    <string-array name="debug_values_array" translatable="false">
        <item>OFF</item>
        <item>FATAL</item>
        <item>ERROR</item>
        <item>WARN</item>
        <item>INFO</item>
        <item>DEBUG</item>
        <item>TRACE</item>
    </string-array>

    <string name="preference_key_h264_3g" translatable="false">bookmark.perf_gfx_h264</string>
    <string name="preference_key_h264" translatable="false">bookmark.perf_gfx_h264</string>
</resources>


text:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@android:color/white"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <com.xxqiang.myassistant.view.BreathView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:roundCount="8"
        app:percent="1"/>

</FrameLayout>


text:
@interface ZKRenderEmailTemplateRequest()
@property (assign,nonatomic) BOOL                  escapeHtmlInMergeFields__v;
@property (strong,nonatomic) NSArray<NSString *>  *templateBodies__v;
@property (strong,nonatomic) NSString             *whatId__v;
@property (strong,nonatomic) NSString             *whoId__v;
@end

@implementation ZKRenderEmailTemplateRequest

+(void)load {
    [self registerType:self xmlName:@"RenderEmailTemplateRequest"];
}

+(ZKComplexTypeInfo *)wsdlSchema {
   static ZKComplexTypeInfo *wsdlSchema;
   static dispatch_once_t onceToken;
   dispatch_once(&onceToken, ^{
       wsdlSchema = [[ZKComplexTypeInfo alloc] initWithType:@"RenderEmailTemplateRequest" parent:nil
                    fields:@[
                        [[ZKComplexTypeFieldInfo alloc] initWithElementName:@"escapeHtmlInMergeFields" propertyName:@"escapeHtmlInMergeFields" optional:YES nillable:NO],
                        [[ZKComplexTypeFieldInfo alloc] initWithElementName:@"templateBodies" propertyName:@"templateBodies" optional:NO nillable:NO],
                        [[ZKComplexTypeFieldInfo alloc] initWithElementName:@"whatId" propertyName:@"whatId" optional:YES nillable:NO],
                        [[ZKComplexTypeFieldInfo alloc] initWithElementName:@"whoId" propertyName:@"whoId" optional:YES nillable:NO],

                    ]];
   });
   return wsdlSchema;
}

-(BOOL)escapeHtmlInMergeFields {
    if ((fields__set[0] & 0x1) == 0) {
        self.escapeHtmlInMergeFields__v = [self boolean:@"escapeHtmlInMergeFields"];
        fields__set[0] |= 0x1;
    }
    return self.escapeHtmlInMergeFields__v;
}

-(void)setEscapeHtmlInMergeFields:(BOOL)v {
    self.escapeHtmlInMergeFields__v = v;
    fields__set[0] |= 0x1;
}

-(NSArray<NSString *> *)templateBodies {
    if ((fields__set[0] & 0x2) == 0) {
        self.templateBodies__v = [self strings:@"templateBodies"];
        fields__set[0] |= 0x2;
    }
    return self.templateBodies__v;
}

-(void)setTemplateBodies:(NSArray<NSString *> *)v {
    self.templateBodies__v = v;
    fields__set[0] |= 0x2;
}

-(NSString *)whatId {
    if ((fields__set[0] & 0x4) == 0) {
        self.whatId__v = [self string:@"whatId"];
        fields__set[0] |= 0x4;
    }
    return self.whatId__v;
}

-(void)setWhatId:(NSString *)v {
    self.whatId__v = v;
    fields__set[0] |= 0x4;
}

-(NSString *)whoId {
    if ((fields__set[0] & 0x8) == 0) {
        self.whoId__v = [self string:@"whoId"];
        fields__set[0] |= 0x8;
    }
    return self.whoId__v;
}

-(void)setWhoId:(NSString *)v {
    self.whoId__v = v;
    fields__set[0] |= 0x8;
}

-(void)serializeTo:(ZKXmlWriter *)env elemName:(NSString *)elemName {
	[env startElement:elemName];
	[env addBoolElement:@"escapeHtmlInMergeFields" elemValue:self.escapeHtmlInMergeFields];
	[env addElementArray:@"templateBodies"         elemValue:self.templateBodies];
	[env addElement:@"whatId"                      elemValue:self.whatId                  nillable:NO  optional:YES];
	[env addElement:@"whoId"                       elemValue:self.whoId                   nillable:NO  optional:YES];
	[env endElement:elemName];
}
@end


text:
package com.greghaskins.bankocr.control;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.instanceOf;

import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.Charset;

import org.junit.Test;

import com.greghaskins.bankocr.control.SimpleInputStreamReader;

public class SimpleInputStreamReaderTest {

    private static final Charset UTF8 = Charset.forName("UTF-8");

    @Test
    public void extendsInputStreamReader() throws Exception {
        assertThat(new SimpleInputStreamReader(new ByteArrayInputStream(new byte[0])),
                instanceOf(InputStreamReader.class));
    }

    @Test
    public void canGetWrappedInputStream() throws Exception {
        final InputStream inputStream = new ByteArrayInputStream(new byte[0]);
        final SimpleInputStreamReader streamReader = new SimpleInputStreamReader(inputStream);
        try {
            assertThat(streamReader.getInputStream(), equalTo(inputStream));
        } finally {
            streamReader.close();
        }
    }

    @Test
    public void readsFromInputStream() throws Exception {
        final String streamContents = "this is the first line\n" + "and here is the second\n";

        final byte[] inputBytes = streamContents.getBytes(UTF8);
        final ByteArrayInputStream inputStream = new ByteArrayInputStream(inputBytes);

        final SimpleInputStreamReader reader = new SimpleInputStreamReader(inputStream);
        try {

            final char[] readContent = new char[streamContents.length()];
            reader.read(readContent);
            assertThat(readContent, equalTo(streamContents.toCharArray()));
        } finally {
            reader.close();
        }
    }

    @Test
    public void usesUTF8Encoding() throws Exception {
        final SimpleInputStreamReader reader = new SimpleInputStreamReader(
                new ByteArrayInputStream(new byte[0]));
        try {
            assertThat(reader.getEncoding(), equalTo("UTF8"));
        } finally {
            reader.close();
        }
    }
}


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

<TITLE>
C-Index
</TITLE>

<META NAME="date" CONTENT="2013-02-15">

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

      Overview
      Package
      Class
      Use
      Tree
      Deprecated
    Index
      Help

 PREV LETTER
 NEXT LETTER

  FRAMES
 NO FRAMES

  All Classes

A C D E F G H I L M N P Q R S T U

C

cellId -
Variable in class fi.vtt.activitylogger.RawMeasurement

cellId -
Variable in class fi.vtt.activitylogger.UserRoutine

cellId -
Variable in class fi.vtt.routinelib.common.RawLogData

ConditionalAccess - Class in db
List common settings, constants and (static) methods used when accessing the routine_db
ConditionalAccess() -
Constructor for class db.ConditionalAccess

confidence -
Variable in class fi.vtt.activitylogger.UserRoutine

      Overview
      Package
      Class
      Use
      Tree
      Deprecated
    Index
      Help

 PREV LETTER
 NEXT LETTER

  FRAMES
 NO FRAMES

  All Classes

A C D E F G H I L M N P Q R S T U


text:
import unittest
import pdb
from app.factories.room_factory import RoomFactory
from app.factories.person_factory import PersonFactory
from app.amity import Amity
from app.executor import Executor

# choosing a concrete class here because oeprations happen driectly on concrete classes
# want to test stuff that actually performs actions, like room and commander!

class ExecuterTest(unittest.TestCase):
    def test_executer_can_add_people_to_room(self):
        amity = Amity()

        room = RoomFactory.create("Moon", 4)
        Amity.add_object_to_dictionary(amity, room)
        Amity.modify_dictionary_element(amity, "room", "000001", "purpose", "office")

        person = PersonFactory.create("fellow", "Femi", 25, "M", wants_residence="Y", level="D1")
        Amity.add_object_to_dictionary(amity, person)

        Executor.assign_occupant_to_room(person, room)
        self.assertIn(person.id, room.occupants)
        self.assertEqual(room.occupant_count, 1)
        self.assertEqual(amity.rooms["000001"].occupants, person)

if __name__ == '__main__':
    unittest.main()


text:
require 'spec_helper'

describe SelectFieldsController do
  context 'w @select_field' do
    before do
      location_mk(id: '34')
      ChoiceField.should_receive(:find).with('21') do
        select_field_mk(
          field_set: location_field_set_mk,
          parent_id: '34') # virtual
      end
      select_field_mk.should_receive(:parent).with('34') { @location_mock }
      @select_field_mock.stub_chain(:choices, :name_by_row) { ['c1','c2','c3'] }
    end

    describe 'GET edit' do
      before do
        select_field_mk.should_receive(:gist_fetch).with(@location_mock)
        get :edit, id: '21', parent_id: '34'
      end
      it do
        expect(assigns :choice_field).to be @select_field_mock
        expect(assigns :field_set).to be @location_field_set_mock
        expect(assigns :parent).to be @location_mock
        expect(assigns :choices).to eql ['c1','c2','c3']
        expect(response).to render_template :edit
      end
    end

    context 'PUT update' do
      describe 'w #gist_store' do
        before do
          select_field_mk.should_receive(:gist_store).with(@location_mock, valid_attributes) { true }
          @select_field_mock.should_receive(:type_human) { 'Select list field' }
          put :update, id: '21', choice_field: valid_attributes
        end
        it do
          expect(assigns :choice_field).to be @select_field_mock
          expect(flash[:notice]).to match /Select list field successfully updated/i
          expect(response).to redirect_to field_values_path(field_set_id: @location_field_set_mock.id, parent_id: @location_mock.id)
        end
      end

      describe 'w/o #gist_store' do
        before do
          select_field_mk.should_receive(:gist_store).with(@location_mock, valid_attributes) { false }
          @select_field_mock.stub_chain(:choices, :name_by_row) { ['c1','c2','c3'] }
          @select_field_mock.should_receive(:type_human).with(true) { 'select list field' }
          put :update, id: '21', choice_field: valid_attributes
        end
        it do
          expect(assigns :field_set).to be @location_field_set_mock
          expect(assigns :parent).to be @location_mock
          expect(assigns :choices).to eql ['c1','c2','c3']
          expect(flash[:alert]).to match /Failed to update select list field/i
          expect(response).to render_template :edit
        end
      end
    end
  end

private

  def valid_attributes() {
    'gist' => 'brown',
    'parent_id' => '34'}
  end
end


text:
package es.bsc.compss.worker;

import es.bsc.compss.log.Loggers;
import es.bsc.compss.worker.COMPSsWorker;

import java.util.TimerTask;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class TimeOutTask extends TimerTask {

    private static final Logger LOGGER = LogManager.getLogger(Loggers.WORKER_INVOKER);

    private final int taskId;

    public TimeOutTask(int taskId) {
        this.taskId = taskId;
    }

    @Override
    public void run() {
        LOGGER.info("Task " + this.taskId + " timed out");
        COMPSsWorker.setCancelled(this.taskId, CancelReason.TIMEOUT);
    }

}


text:
Rails.application.routes.draw do
  resources :wishlists
  resources :wished_products
  match '/wishlist' => "wishlists#show", :as => "default_wishlist"
end


text:
require 'optparse'

require_relative '../../../util'

def batch_approve_publisher_connections(realtimebidding, options)
  account_id = options[:account_id]
  parent = "bidders/#{account_id}"
  publisher_connection_names = options[:publisher_connection_ids].map{
      |publisher_connection_id| "bidders/#{account_id}/publisherConnections/#{publisher_connection_id}"}

  puts "Batch approving publisher connections for bidder with name: '#{parent}'"

  body = Google::Apis::RealtimebiddingV1::BatchApprovePublisherConnectionsRequest.new(
    names: publisher_connection_names
  )

  response = realtimebidding.batch_approve_publisher_connections(parent, body)

  unless response.publisher_connections.nil?
    response.publisher_connections.each do |publisher_connection|
      print_publisher_connection(publisher_connection)
    end
  end
end

if __FILE__ == $0
  begin
    # Retrieve the service used to make API requests.
    service = get_service()
  rescue ArgumentError => e
    raise 'Unable to create service, with error message: #{e.message}'
  rescue Signet::AuthorizationError => e
    raise 'Unable to create service, was the KEY_FILE in util.rb set? Error message: #{e.message}'
  end

  # Set options and default values for fields used in this example.
  options = [
    Option.new(
      'account_id',
      'The resource ID of the bidders resource under which the publisher connections exist. This will be used to '\
      'construct the parent used as a path parameter for the publisherConnections.batchApprove request, as well as '\
      'the publisher connection names passed in the request body.',
      type: Integer, short_alias: 'a', required: true, default_value: nil
    ),
    Option.new(
      'publisher_connection_ids',
      'One or more resource IDs for the bidders.publisherConnections resource that are being approved. Specify each '\
      'value separated by a comma. These will be used to construct the publisher connection names passed in the '\
      'publisherConnections.batchApprove request body.',
      type: Array, short_alias: 'p', required: true, default_value: nil
    ),
  ]

  # Parse options.
  parser = Parser.new(options)
  opts = parser.parse(ARGV)

  begin
    batch_approve_publisher_connections(service, opts)
  rescue Google::Apis::ServerError => e
    raise "The following server error occured:\n#{e.message}"
  rescue Google::Apis::ClientError => e
    raise "Invalid client request:\n#{e.message}"
  rescue Google::Apis::AuthorizationError => e
    raise "Authorization error occured:\n#{e.message}"
  end
end


text:
module MembersHelper
  # @field
  # @values
  # @options
  # Render HTML for members attributes
  def render_member_attribute(field, values, options = {})
    renderer = MemberAttributeRenderer.new field, values, options
    renderer.render
  end
end


text:
package com.amazonaws.services.simpleemail.model;

import java.io.Serializable;

/**
 * Describe Receipt Rule Set Result
 */
public class DescribeReceiptRuleSetResult implements Serializable, Cloneable {

    /**
     * The metadata for the receipt rule set, which consists of the rule set
     * name and the timestamp of when the rule set was created.
     */
    private ReceiptRuleSetMetadata metadata;

    /**
     * A list of the receipt rules that belong to the specified receipt rule
     * set.
     */
    private com.amazonaws.internal.ListWithAutoConstructFlag<ReceiptRule> rules;

    /**
     * The metadata for the receipt rule set, which consists of the rule set
     * name and the timestamp of when the rule set was created.
     *
     * @return The metadata for the receipt rule set, which consists of the rule set
     *         name and the timestamp of when the rule set was created.
     */
    public ReceiptRuleSetMetadata getMetadata() {
        return metadata;
    }

    /**
     * The metadata for the receipt rule set, which consists of the rule set
     * name and the timestamp of when the rule set was created.
     *
     * @param metadata The metadata for the receipt rule set, which consists of the rule set
     *         name and the timestamp of when the rule set was created.
     */
    public void setMetadata(ReceiptRuleSetMetadata metadata) {
        this.metadata = metadata;
    }

    /**
     * The metadata for the receipt rule set, which consists of the rule set
     * name and the timestamp of when the rule set was created.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param metadata The metadata for the receipt rule set, which consists of the rule set
     *         name and the timestamp of when the rule set was created.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public DescribeReceiptRuleSetResult withMetadata(ReceiptRuleSetMetadata metadata) {
        this.metadata = metadata;
        return this;
    }

    /**
     * A list of the receipt rules that belong to the specified receipt rule
     * set.
     *
     * @return A list of the receipt rules that belong to the specified receipt rule
     *         set.
     */
    public java.util.List<ReceiptRule> getRules() {
        if (rules == null) {
              rules = new com.amazonaws.internal.ListWithAutoConstructFlag<ReceiptRule>();
              rules.setAutoConstruct(true);
        }
        return rules;
    }

    /**
     * A list of the receipt rules that belong to the specified receipt rule
     * set.
     *
     * @param rules A list of the receipt rules that belong to the specified receipt rule
     *         set.
     */
    public void setRules(java.util.Collection<ReceiptRule> rules) {
        if (rules == null) {
            this.rules = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<ReceiptRule> rulesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<ReceiptRule>(rules.size());
        rulesCopy.addAll(rules);
        this.rules = rulesCopy;
    }

    /**
     * A list of the receipt rules that belong to the specified receipt rule
     * set.
     *

     * NOTE: This method appends the values to the existing list (if
     * any). Use {@link #setRules(java.util.Collection)} or {@link
     * #withRules(java.util.Collection)} if you want to override the existing
     * values.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param rules A list of the receipt rules that belong to the specified receipt rule
     *         set.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public DescribeReceiptRuleSetResult withRules(ReceiptRule... rules) {
        if (getRules() == null) setRules(new java.util.ArrayList<ReceiptRule>(rules.length));
        for (ReceiptRule value : rules) {
            getRules().add(value);
        }
        return this;
    }

    /**
     * A list of the receipt rules that belong to the specified receipt rule
     * set.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param rules A list of the receipt rules that belong to the specified receipt rule
     *         set.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public DescribeReceiptRuleSetResult withRules(java.util.Collection<ReceiptRule> rules) {
        if (rules == null) {
            this.rules = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<ReceiptRule> rulesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<ReceiptRule>(rules.size());
            rulesCopy.addAll(rules);
            this.rules = rulesCopy;
        }

        return this;
    }

    /**
     * Returns a string representation of this object; useful for testing and
     * debugging.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getMetadata() != null) sb.append("Metadata: " + getMetadata() + ",");
        if (getRules() != null) sb.append("Rules: " + getRules() );
        sb.append("}");
        return sb.toString();
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getMetadata() == null) ? 0 : getMetadata().hashCode());
        hashCode = prime * hashCode + ((getRules() == null) ? 0 : getRules().hashCode());
        return hashCode;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) return true;
        if (obj == null) return false;

        if (obj instanceof DescribeReceiptRuleSetResult == false) return false;
        DescribeReceiptRuleSetResult other = (DescribeReceiptRuleSetResult)obj;

        if (other.getMetadata() == null ^ this.getMetadata() == null) return false;
        if (other.getMetadata() != null && other.getMetadata().equals(this.getMetadata()) == false) return false;
        if (other.getRules() == null ^ this.getRules() == null) return false;
        if (other.getRules() != null && other.getRules().equals(this.getRules()) == false) return false;
        return true;
    }

    @Override
    public DescribeReceiptRuleSetResult clone() {
        try {
            return (DescribeReceiptRuleSetResult) super.clone();

        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }

    }

}


text:
/*

Note: This must be compiled with the target set to ES6

The content of index.io.js could be something like

    'use strict';

     import { AppRegistry } from 'react-native'
     import Welcome from './gen/Welcome'

     AppRegistry.registerComponent('MopNative', () => Welcome);

For a list of complete Typescript examples: check https://github.com/bgrieder/RNTSExplorer

 */

///<reference path="../react-native/react-native.d.ts" />

import * as React from 'react-native'
import {
    StyleSheet,
    Text,
    View,
    AppState,
    AppStateIOS,
    ViewPagerAndroid,
    Dimensions,
    BackAndroid,
} from 'react-native';

function testDimensions() {
  var {
    width,
    height,
    scale,
    fontScale,
  } = Dimensions.get("window");

  var {
    width,
    height,
    scale,
    fontScale,
  } = Dimensions.get("screen");
}

BackAndroid.addEventListener("hardwareBackPress", () => {
});

var styles = StyleSheet.create(
    {
        container:    {
            flex:            1,
            justifyContent:  'center',
            alignItems:      'center',
            backgroundColor: '#F5FCFF',
        },
        welcome:   {
            fontSize:  20,
            textAlign: 'center',
            margin:    10,
        },
        instructions: {
            textAlign:    'center',
            color:        '#333333',
            marginBottom: 5,
        },
    }
)

class Welcome extends React.Component<any,any> {

    testNativeMethods() {
      this.setNativeProps({});

      const { rootView } = this.refs;

      rootView.measure((x, y, width, height) => {
      });
    }

    render() {

        return (
            <View ref="rootView" style={styles.container}>
                <Text style={styles.welcome}>
                    Welcome to React Native
                </Text>
                <Text style={styles.instructions}>
                    To get started, edit index.ios.js
                </Text>
                <Text style={styles.instructions}>
                    Press Cmd+R to reload,{'\n'}
                    Cmd+D or shake for dev menu
                </Text>
            </View>
        )
    }
}

export default Welcome;

// App State

function appStateListener(state : string) {
    console.log('New state: ' + state);
}

function appStateTest() {
    console.log('Current state: ' + AppState.currentState);
    AppState.addEventListener('change', appStateListener);
}

function appStateIOSTest() {
    console.log('Current state: ' + AppStateIOS.currentState);
    AppStateIOS.addEventListener('change', appStateListener);
}

// ViewPagerAndroid

export class ViewPagerAndroidTest {
    render() {
        return (
            <ViewPagerAndroid style={{height: 56}}
                initialPage={0}
                keyboardDismissMode={'on-drag'}
                onPageScroll={(e) => {
                    console.log(`position: ${e.nativeEvent.position}`);
                    console.log(`offset: ${e.nativeEvent.offset}`);
                }}
                onPageSelected={(e) => {
                    console.log(`position: ${e.nativeEvent.position}`)
                }}
                />
        );
    }
}


text:
package joshie.mariculture.modules.fishery.loot;

import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonObject;
import com.google.gson.JsonSerializationContext;
import joshie.mariculture.api.fishing.Fishing.Size;
import joshie.mariculture.modules.fishery.FishingAPI;
import joshie.mariculture.modules.fishery.rod.FishingRod;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.JsonUtils;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.storage.loot.LootContext;
import net.minecraft.world.storage.loot.conditions.LootCondition;

import java.util.Locale;
import java.util.Random;

import static joshie.mariculture.core.lib.MaricultureInfo.MODID;

/** This loot condition checks the strength of the item the player is holding in their main hand **/
public class FishSize implements LootCondition {
    private final Size size;

    public FishSize(Size size) {
        this.size = size;
    }

    private boolean contains(Size[] sizes) {
        for (Size s: sizes) {
            if (s == size) return true;
        }

        return false;
    }

    @Override
    @SuppressWarnings("ConstantConditions")
    public boolean testCondition(Random rand, LootContext context) {
        EntityPlayer player = context.getKillerPlayer() instanceof EntityPlayer ? ((EntityPlayer)context.getKillerPlayer()) : null;
        if (player != null && player.getHeldItemMainhand() != null) {
            FishingRod rod = FishingAPI.INSTANCE.getFishingRodFromStack(player.getHeldItemMainhand());
            if (rod != null) {
                return contains(rod.getBestSizes()) ? rand.nextDouble() < 0.75D : rand.nextDouble() < 0.4D;
            }

            return false;
        }

        return false;
    }

    public static class Serializer extends LootCondition.Serializer<FishSize> {
        public Serializer() {
            super(new ResourceLocation(MODID, "fish_size"), FishSize.class);
        }

        public void serialize(JsonObject json, FishSize value, JsonSerializationContext context) {
            json.addProperty("size", value.size.name().toLowerCase(Locale.ENGLISH));
        }

        public FishSize deserialize(JsonObject json, JsonDeserializationContext context) {
            return new FishSize(Size.valueOf(JsonUtils.getString(json, "size").toUpperCase(Locale.ENGLISH)));
        }
    }
}


text:
from setuptools import setup, find_packages

with open('./surveymonty/VERSION', 'r') as version_file:
    version = version_file.read().strip()

setup(
    name='surveymonty',
    version=version,

    install_requires=[
        'requests>=2.12.4,<3.0'
    ],

    packages=find_packages(),
    include_package_data=True,

    author='Andrew Shim',
    author_email='andrewkshim92@gmail.com',
    description='Python wrapper for SurveyMonkey API',
    license='MIT',
    keywords=['SurveyMonkey'],
    url='https://github.com/andrewkshim/SurveyMonty',
)


text:
'use strict';

var plateNumber = {
    localGovtAreas: require('./localGovtArea.json'),

    genPlateNumber: function(localGovtName) {
        if(! plateNumber.localGovtAreas.hasOwnProperty(localGovtName)){
            return "Invalid Input or Local Govt doesn't exist";
        }

        return plateNumber.localGovtAreas[toUpperCase(localGovtName)] +  '-' + plateNumber.genRandomNumber(0, 999) + plateNumber.genlastTwoLetters();
    },
    genRandomNumber: function(min, max) {
        return Math.floor(Math.random() * (max - min + 1)) + min;
    },
    genlastTwoLetters: function() {
        var text = "";
        var letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

        for( var i=0; i < 2; i++ ) {
            text += letters.charAt(Math.floor(Math.random() * letters.length));
        }
        return text;
    }
};

module.exports = {
    plateNumber: plateNumber
}


text:
title: NuGet Error NU1001
description: NU1001 error code
author: zhili1208
ms.author: lzhi
ms.date: 06/25/2018
ms.topic: reference
ms.reviewer: anangaur
f1_keywords:
  - "NU1001"
---

# NuGet Error NU1001

The project 'Project' does not specify any target frameworks in 'ProjectFile'

### Issue
The project doesn't contain one or more frameworks.

### Solution
Add a `TargetFramework` or `TargetFrameworks` property to the specified project file.


text:
package activity.animatior;

import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.ViewById;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.view.animation.LayoutAnimationController;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.example.listviewanimationdemo.R;

/**
 * @author renzhiqiang ÊôÐÔ¶¯»Ð§¹ûÁбí
 */
@EActivity
public class PropertyAnimationActivity extends Activity implements
		OnClickListener {

	@ViewById(R.id.property_normal)
	protected TextView propertyNormalTextView;
	@ViewById(R.id.property_flakes)
	protected TextView propertyFlakes;
	@ViewById(R.id.container)
	protected LinearLayout container;
	@ViewById(R.id.layout_transation)
	protected TextView layoutAnimBtn;
	@ViewById(R.id.secret_textview)
	protected TextView secretTextView;
	@ViewById(R.id.click_imageview)
	protected TextView clickImageView;
	@ViewById(R.id.auto_scrollview)
	protected TextView autoScrollView;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.property_animation_layout);
		propertyNormalTextView.setOnClickListener(this);
		{
			propertyFlakes.setOnClickListener(this);
			layoutAnimBtn.setOnClickListener(this);
			secretTextView.setOnClickListener(this);
			clickImageView.setOnClickListener(this);
			autoScrollView.setOnClickListener(this);
		}

		Animation animation = AnimationUtils.loadAnimation(this, R.anim.shake);
		LayoutAnimationController mAnimationControll = new LayoutAnimationController(
				animation);
		container.setLayoutAnimation(mAnimationControll);
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.property_normal:
			startActivity(new Intent(this, ToggleActivity_.class));
			break;
		case R.id.property_flakes:
			startActivity(new Intent(this, DroidFlakesActivity.class));
			break;
		case R.id.layout_transation:
			startActivity(new Intent(this,
					LayoutAnimationTransationActivity.class));
			break;
		case R.id.secret_textview:
			startActivity(new Intent(this, SecretTextViewActivity.class));
			break;
		case R.id.click_imageview:
			startActivity(new Intent(this, ClickImageActivity.class));
			break;
		case R.id.auto_scrollview:
			startActivity(new Intent(this, AutoScrollActivity.class));
			break;
		}
	}
}


text:
class Solution(object):
    def findTheDifference(self, s, t):
        """
        :type s: str
        :type t: str
        :rtype: str
        """
        import collections
        import itertools

        c1 = collections.Counter(s)
        c2 = collections.Counter(t)

        for char in set(itertools.chain(s, t)):
            if c1[char] != c2[char]:
                return char

        return None


text:
namespace chromeos::language_packs {

class LanguagePacksImpl : public chromeos::language::mojom::LanguagePacks {
 public:
  // Singleton getter
  static LanguagePacksImpl& GetInstance();

  LanguagePacksImpl();
  LanguagePacksImpl(const LanguagePacksImpl&) = delete;
  LanguagePacksImpl& operator=(const LanguagePacksImpl&) = delete;
  // Called when mojom connection is destroyed.
  ~LanguagePacksImpl() override;

  void BindReceiver(
      mojo::PendingReceiver<language::mojom::LanguagePacks> receiver);

  // mojom::LanguagePacks interface methods.
  void GetPackInfo(chromeos::language::mojom::FeatureId feature_id,
                   const std::string& language,
                   GetPackInfoCallback callback) override;
  void InstallPack(chromeos::language::mojom::FeatureId feature_id,
                   const std::string& language,
                   InstallPackCallback callback) override;

 private:
  mojo::Receiver<chromeos::language::mojom::LanguagePacks> receiver_{this};
};

}  // namespace chromeos::language_packs

#endif  // CHROMEOS_LANGUAGE_LANGUAGE_PACKS_LANGUAGE_PACKS_IMPL_H_


text:
import React, {useState} from 'react'

import {Button, Icon} from '../ui'
import {stepToScale, scaleToStep} from './display'
import {DisplayControllerProps} from './types'

const ZOOM_RESET_TOOLTIP = 'Reset pan and zoom'
const ZOOM_OUT_TOOLTIP = 'Zoom out'
const ZOOM_IN_TOOTIP = 'Zoom in'

const CONTROLS_STYLE =
  'absolute absolute--center-w-third bottom-1 z-1 w-third flex items-center f5'
const ZOOM_ICON_STYLE = 'flex-none'
const ZOOM_RESET_STYLE = 'absolute bottom-2 left-50 tf-center-x'

const ZOOM_BAR_CONTAINER_STYLE = 'relative w-100 h2 flex items-center grab'
const ZOOM_BAR_STYLE = 'dib pt2 bg-white shadow w-100'
const ZOOM_SLIDER_STYLE =
  'absolute w1 h1 top-50 tf-center bg-brand o-70 left-animate'

export default function Controls(props: DisplayControllerProps): JSX.Element {
  const [grabbing, setGrabbing] = useState(false)
  const {step, reset, zoom, zoomIn, zoomOut} = props
  const sliderLeft = `${stepToScale(step) * 100}%`

  const handleGrabMove = (event: React.MouseEvent): void => {
    const {left, width} = event.currentTarget.getBoundingClientRect()
    const nextStep = scaleToStep((event.clientX - left) / width)
    zoom(nextStep - step)
  }

  return (

      <Button
        className={ZOOM_RESET_STYLE}
        onClick={reset}
        title={ZOOM_RESET_TOOLTIP}
      >
        <Icon name="expand" />
      </Button>
      <Button
        className={ZOOM_ICON_STYLE}
        onClick={zoomOut}
        title={ZOOM_OUT_TOOLTIP}
      >
        <Icon name="search-minus" />
      </Button>
       {
          setGrabbing(true)
          handleGrabMove(event)
        }}
        onMouseUp={() => setGrabbing(false)}
        onMouseMove={grabbing ? handleGrabMove : undefined}
      >

      <Button
        className={ZOOM_ICON_STYLE}
        onClick={zoomIn}
        title={ZOOM_IN_TOOTIP}
      >
        <Icon name="search-plus" />
      </Button>

  )
}