text:
// ReSharper disable ClassWithVirtualMembersNeverInherited.Global
namespace Gu.Wpf.Reactive
{
    using System;
    using System.Reactive.Linq;

    /// <summary>
    /// A command that does not use the CommandParameter
    /// Signals CanExecuteChanged when observable signals.
    /// </summary>
    public class ObservingRelayCommand : ManualRelayCommand, IDisposable
    {
        private readonly IDisposable subscription;
        private bool disposed;

        /// <summary>
        /// Initializes a new instance of the <see cref="ObservingRelayCommand"/> class.
        /// </summary>
        /// <param name="action">The action to invoke when the command is executed.</param>
        /// <param name="criteria">The criteria for CanExecute.</param>
        /// <param name="observable">The observable notifying about update of CanExecute.</param>
        public ObservingRelayCommand(
            Action action,
            Func<bool> criteria,
            params IObservable<object?>[] observable)
            : base(action, criteria)
        {
            if (observable.Length == 0)
            {
                throw new ArgumentException("Expected at least one observable.", nameof(observable));
            }

            this.subscription = observable.Merge()
                                      .Subscribe(_ => this.RaiseCanExecuteChanged());
        }

        /// <inheritdoc/>
        public void Dispose()
        {
            this.Dispose(true);
            GC.SuppressFinalize(this);
        }

        /// <inheritdoc/>
        protected override bool InternalCanExecute(object? parameter)
        {
            this.ThrowIfDisposed();
            return base.InternalCanExecute(parameter);
        }

        /// <inheritdoc/>
        protected override void InternalExecute(object? parameter)
        {
            this.ThrowIfDisposed();
            base.InternalExecute(parameter);
        }

        /// <summary>
        /// Disposes of a <see cref="ObservingRelayCommand"/>.
        /// </summary>
        /// <remarks>
        /// Called from Dispose() with disposing=true.
        /// Guidelines:
        /// 1. We may be called more than once: do nothing after the first call.
        /// 2. Avoid throwing exceptions if disposing is false, i.e. if we're being finalized.
        /// </remarks>
        /// <param name="disposing">True if called from Dispose(), false if called from the finalizer.</param>
        protected virtual void Dispose(bool disposing)
        {
            if (this.disposed)
            {
                return;
            }

            this.disposed = true;
            if (disposing)
            {
                this.subscription.Dispose();
            }
        }

        /// <summary>
        /// Throws an <see cref="ObjectDisposedException"/> if the instance is disposed.
        /// </summary>
        protected void ThrowIfDisposed()
        {
            if (this.disposed)
            {
                throw new ObjectDisposedException(this.GetType().FullName);
            }
        }
    }
}


text:
__author__ = 'socialmoneydev'

from models.jsonBase import JsonBase
from utils.requestor import Requestor
from models.filecontent import FileContent

class Statement(JsonBase):

    def __init__(self):
        self.requestId = None
        self.statementId = None
        self.customerId = None
        self.type = None
        self.month = None
        self.year = None

    @staticmethod
    def getItem(customerId, statementId, connection = None, loggingObject = None):
        return Requestor().get("/statement/get/{0}/{1}".format(customerId, statementId), Statement, connection, loggingObject)

    @staticmethod
    def listItems(customerId, connection = None, loggingObject = None):
        return Requestor().get("/statement/list/{0}".format(customerId), Statement, connection, loggingObject)

    @staticmethod
    def downloadItem(customerId, statementId, connection = None, loggingObject = None):
        return Requestor.get("/statement/download/{0}/{1}".format(customerId, statementId), FileContent, connection, loggingObject)

redpajama_set_name: RedPajamaGithub


text:
static NSString * const kUPParcelListParcelsKey = @"parcels";
static NSString * const kUPParcelListUpdatedParcelsKey = @"updated-parcels";

@interface UPParcelList ()
@property (strong, nonatomic) NSMutableArray *parcelList;
@property (strong, nonatomic) NSMutableArray *updatedParcels;
@end

@implementation UPParcelList

#pragma mark - Singletone

+ (instancetype)sharedInstance
{
    static id instance = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        instance = [self loadParcelList];
        if (instance == nil) {
            instance = [[self alloc] init];
        }
    });
    return instance;
}

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.parcelList = [@[] mutableCopy];
        self.updatedParcels = [@[] mutableCopy];
    }
    return self;
}

#pragma mark - Parcel List

- (NSArray *)parcels
{
    return self.parcelList;
}

- (void)addParcel:(UPParcel *)parcel
{
    [self.parcelList insertObject:parcel atIndex:0];
    [self save];
}

- (void)removeParcel:(UPParcel *)parcel;
{
    [self.parcelList removeObject:parcel];
    [self save];
}

- (UPParcel *)parcelWithParcelID:(NSString *)parcelID
{
    for (UPParcel *parcel in self.parcelList) {
        if ([parcel.parcelID isEqualToString:parcelID]) {
            return parcel;
        }
    }
    return nil;
}

#pragma mark -

- (void)updateTrackerInfoForParcel:(UPParcel *)parcel completionBlock:(void (^)(UPParcel *parcel, BOOL updated))block
{
    [UPParcelTracker trackerInfoForParcelID:parcel.parcelID
                            completionBlock:^(NSString *parcelID, UPParcelTrackerInfo *info) {
                                UPParcel *parcel = [self parcelWithParcelID:parcelID];
                                BOOL updated = NO;
                                if (parcel.trackerInfo.operations) {
                                    UPParcelTrackerOperation *lastOperation = parcel.trackerInfo.operations.lastObject;
                                    UPParcelTrackerOperation *newLastOperation = info.operations.lastObject;
                                    if (lastOperation.date.timeIntervalSince1970 < newLastOperation.date.timeIntervalSince1970) {
                                        updated = YES;
                                        if (![self.updatedParcels containsObject:parcel]) {
                                            [self.updatedParcels addObject:parcel];
                                        }
                                        [self presentNotificationForParcel:parcel operation:newLastOperation];
                                    }
                                }
                                parcel.trackerInfo = info;
                                [self save];
                                block(parcel, updated);
                            }];
}

- (void)updateAllTrackerInfo
{
    for (UPParcel *parcel in self.parcels) {
        [self updateTrackerInfoForParcel:parcel completionBlock:^(UPParcel *parcel, BOOL updated) {

        }];
    }
}

#pragma mark - Notifications

- (void)presentNotificationForParcel:(UPParcel *)parcel operation:(UPParcelTrackerOperation *)operation
{
    UILocalNotification *notification = [[UILocalNotification alloc] init];
    notification.alertTitle = [NSString stringWithFormat:@"%@ - %@", parcel.name, parcel.parcelID, nil];
    notification.alertBody = [NSString stringWithFormat:@"%@ - %@ - %@",
                              operation.date,
                              operation.postOfficeName,
                              operation.operationDescription, nil];
    notification.applicationIconBadgeNumber = self.numberOfUpdatedParcels;
    notification.fireDate = [NSDate date];
    [[UIApplication sharedApplication] presentLocalNotificationNow:notification];
}

- (NSUInteger)numberOfUpdatedParcels
{
    return self.updatedParcels.count;
}

- (void)resetUpdatedParcels
{
    self.updatedParcels = [@[] mutableCopy];
    [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
}

#pragma mark - Save / Load

- (void)save
{
    NSData *data = [NSKeyedArchiver archivedDataWithRootObject:self];
    [data writeToFile:[self.class parcelListPath] atomically:YES];
}

+ (UPParcelList *)loadParcelList
{
    return [NSKeyedUnarchiver unarchiveObjectWithFile:[self.class parcelListPath]];
}

+ (NSString *)parcelListPath
{
    NSString *documentsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject];
    return [documentsPath stringByAppendingPathComponent:@"parcel.list"];
}

#pragma mark - NSCoding

- (id)initWithCoder:(NSCoder *)aDecoder
{
    self = [super init];
    if (self) {
        self.parcelList = [aDecoder decodeObjectForKey:kUPParcelListParcelsKey];
        self.updatedParcels = [aDecoder decodeObjectForKey:kUPParcelListUpdatedParcelsKey];
    }
    return self;
}

- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.parcelList forKey:kUPParcelListParcelsKey];
    [aCoder encodeObject:self.updatedParcels forKey:kUPParcelListUpdatedParcelsKey];
}

@end


text:
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows;
using System.Windows.Media;
using System.Xml;
using System.Xml.Schema;

using SharpLib.Texter.Utils;

namespace SharpLib.Texter.Highlighting.Xshd
{
    internal static class V2Loader
    {
        #region Константы

        public const string Namespace = "http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008";

        #endregion

        #region Поля

        internal static readonly ColorConverter ColorConverter = new ColorConverter();

        internal static readonly FontStyleConverter FontStyleConverter = new FontStyleConverter();

        internal static readonly FontWeightConverter FontWeightConverter = new FontWeightConverter();

        private static XmlSchemaSet schemaSet;

        #endregion

        #region Свойства

        private static XmlSchemaSet SchemaSet
        {
            get
            {
                if (schemaSet == null)
                {
                    using (var reader = new XmlTextReader(HighlightingResources.Instance.OpenStream(HighlightingResources.PREFIX_XSD + "ModeV2.xsd")))
                    {
                        schemaSet = HighlightingLoader.LoadSchemaSet(reader);
                    }
                }
                return schemaSet;
            }
        }

        #endregion

        #region Методы

        public static XshdSyntaxDefinition LoadDefinition(XmlReader reader, bool skipValidation)
        {
            reader = HighlightingLoader.GetValidatingReader(reader, true, skipValidation ? null : SchemaSet);
            reader.Read();
            return ParseDefinition(reader);
        }

        private static XshdSyntaxDefinition ParseDefinition(XmlReader reader)
        {
            Debug.Assert(reader.LocalName == "SyntaxDefinition");
            var def = new XshdSyntaxDefinition();
            def.Name = reader.GetAttribute("name");
            string extensions = reader.GetAttribute("extensions");
            if (extensions != null)
            {
                def.Extensions.AddRange(extensions.Split(';'));
            }
            ParseElements(def.Elements, reader);
            Debug.Assert(reader.NodeType == XmlNodeType.EndElement);
            Debug.Assert(reader.LocalName == "SyntaxDefinition");
            return def;
        }

        private static void ParseElements(ICollection<XshdElement> c, XmlReader reader)
        {
            if (reader.IsEmptyElement)
            {
                return;
            }
            while (reader.Read() && reader.NodeType != XmlNodeType.EndElement)
            {
                Debug.Assert(reader.NodeType == XmlNodeType.Element);
                if (reader.NamespaceURI != Namespace)
                {
                    if (!reader.IsEmptyElement)
                    {
                        reader.Skip();
                    }
                    continue;
                }
                switch (reader.Name)
                {
                    case "RuleSet":
                        c.Add(ParseRuleSet(reader));
                        break;
                    case "Property":
                        c.Add(ParseProperty(reader));
                        break;
                    case "Color":
                        c.Add(ParseNamedColor(reader));
                        break;
                    case "Keywords":
                        c.Add(ParseKeywords(reader));
                        break;
                    case "Span":
                        c.Add(ParseSpan(reader));
                        break;
                    case "Import":
                        c.Add(ParseImport(reader));
                        break;
                    case "Rule":
                        c.Add(ParseRule(reader));
                        break;
                    default:
                        throw new NotSupportedException("Unknown element " + reader.Name);
                }
            }
        }

        private static XshdElement ParseProperty(XmlReader reader)
        {
            var property = new XshdProperty();
            SetPosition(property, reader);
            property.Name = reader.GetAttribute("name");
            property.Value = reader.GetAttribute("value");
            return property;
        }

        private static XshdRuleSet ParseRuleSet(XmlReader reader)
        {
            var ruleSet = new XshdRuleSet();
            SetPosition(ruleSet, reader);
            ruleSet.Name = reader.GetAttribute("name");
            ruleSet.IgnoreCase = reader.GetBoolAttribute("ignoreCase");

            CheckElementName(reader, ruleSet.Name);
            ParseElements(ruleSet.Elements, reader);
            return ruleSet;
        }

        private static XshdRule ParseRule(XmlReader reader)
        {
            var rule = new XshdRule();
            SetPosition(rule, reader);
            rule.ColorReference = ParseColorReference(reader);
            if (!reader.IsEmptyElement)
            {
                reader.Read();
                if (reader.NodeType == XmlNodeType.Text)
                {
                    rule.Regex = reader.ReadContentAsString();
                    rule.RegexType = XshdRegexType.IgnorePatternWhitespace;
                }
            }
            return rule;
        }

        private static XshdKeywords ParseKeywords(XmlReader reader)
        {
            var keywords = new XshdKeywords();
            SetPosition(keywords, reader);
            keywords.ColorReference = ParseColorReference(reader);
            reader.Read();
            while (reader.NodeType != XmlNodeType.EndElement)
            {
                Debug.Assert(reader.NodeType == XmlNodeType.Element);
                keywords.Words.Add(reader.ReadElementString());
            }
            return keywords;
        }

        private static XshdImport ParseImport(XmlReader reader)
        {
            var import = new XshdImport();
            SetPosition(import, reader);
            import.RuleSetReference = ParseRuleSetReference(reader);
            if (!reader.IsEmptyElement)
            {
                reader.Skip();
            }
            return import;
        }

        private static XshdSpan ParseSpan(XmlReader reader)
        {
            var span = new XshdSpan();
            SetPosition(span, reader);
            span.BeginRegex = reader.GetAttribute("begin");
            span.EndRegex = reader.GetAttribute("end");
            span.Multiline = reader.GetBoolAttribute("multiline") ?? false;
            span.SpanColorReference = ParseColorReference(reader);
            span.RuleSetReference = ParseRuleSetReference(reader);
            if (!reader.IsEmptyElement)
            {
                reader.Read();
                while (reader.NodeType != XmlNodeType.EndElement)
                {
                    Debug.Assert(reader.NodeType == XmlNodeType.Element);
                    switch (reader.Name)
                    {
                        case "Begin":
                            if (span.BeginRegex != null)
                            {
                                throw Error(reader, "Duplicate Begin regex");
                            }
                            span.BeginColorReference = ParseColorReference(reader);
                            span.BeginRegex = reader.ReadElementString();
                            span.BeginRegexType = XshdRegexType.IgnorePatternWhitespace;
                            break;
                        case "End":
                            if (span.EndRegex != null)
                            {
                                throw Error(reader, "Duplicate End regex");
                            }
                            span.EndColorReference = ParseColorReference(reader);
                            span.EndRegex = reader.ReadElementString();
                            span.EndRegexType = XshdRegexType.IgnorePatternWhitespace;
                            break;
                        case "RuleSet":
                            if (span.RuleSetReference.ReferencedElement != null)
                            {
                                throw Error(reader, "Cannot specify both inline RuleSet and RuleSet reference");
                            }
                            span.RuleSetReference = new XshdReference<XshdRuleSet>(ParseRuleSet(reader));
                            reader.Read();
                            break;
                        default:
                            throw new NotSupportedException("Unknown element " + reader.Name);
                    }
                }
            }
            return span;
        }

        private static Exception Error(XmlReader reader, string message)
        {
            return Error(reader as IXmlLineInfo, message);
        }

        private static Exception Error(IXmlLineInfo lineInfo, string message)
        {
            if (lineInfo != null)
            {
                return new HighlightingDefinitionInvalidException(HighlightingLoader.FormatExceptionMessage(message, lineInfo.LineNumber, lineInfo.LinePosition));
            }
            return new HighlightingDefinitionInvalidException(message);
        }

        private static void SetPosition(XshdElement element, XmlReader reader)
        {
            var lineInfo = reader as IXmlLineInfo;
            if (lineInfo != null)
            {
                element.LineNumber = lineInfo.LineNumber;
                element.ColumnNumber = lineInfo.LinePosition;
            }
        }

        private static XshdReference<XshdRuleSet> ParseRuleSetReference(XmlReader reader)
        {
            string ruleSet = reader.GetAttribute("ruleSet");
            if (ruleSet != null)
            {
                int pos = ruleSet.LastIndexOf('/');
                if (pos >= 0)
                {
                    return new XshdReference<XshdRuleSet>(ruleSet.Substring(0, pos), ruleSet.Substring(pos + 1));
                }
                return new XshdReference<XshdRuleSet>(null, ruleSet);
            }
            return new XshdReference<XshdRuleSet>();
        }

        private static void CheckElementName(XmlReader reader, string name)
        {
            if (name != null)
            {
                if (name.Length == 0)
                {
                    throw Error(reader, "The empty string is not a valid name.");
                }
                if (name.IndexOf('/') >= 0)
                {
                    throw Error(reader, "Element names must not contain a slash.");
                }
            }
        }

        private static XshdColor ParseNamedColor(XmlReader reader)
        {
            var color = ParseColorAttributes(reader);

            color.Name = reader.GetAttribute("name");
            CheckElementName(reader, color.Name);
            color.ExampleText = reader.GetAttribute("exampleText");
            return color;
        }

        private static XshdReference<XshdColor> ParseColorReference(XmlReader reader)
        {
            string color = reader.GetAttribute("color");
            if (color != null)
            {
                int pos = color.LastIndexOf('/');
                if (pos >= 0)
                {
                    return new XshdReference<XshdColor>(color.Substring(0, pos), color.Substring(pos + 1));
                }
                return new XshdReference<XshdColor>(null, color);
            }
            return new XshdReference<XshdColor>(ParseColorAttributes(reader));
        }

        private static XshdColor ParseColorAttributes(XmlReader reader)
        {
            var color = new XshdColor();
            SetPosition(color, reader);
            var position = reader as IXmlLineInfo;
            color.Foreground = ParseColor(position, reader.GetAttribute("foreground"));
            color.Background = ParseColor(position, reader.GetAttribute("background"));
            color.FontWeight = ParseFontWeight(reader.GetAttribute("fontWeight"));
            color.FontStyle = ParseFontStyle(reader.GetAttribute("fontStyle"));
            color.Underline = reader.GetBoolAttribute("underline");
            return color;
        }

        private static HighlightingBrush ParseColor(IXmlLineInfo lineInfo, string color)
        {
            if (string.IsNullOrEmpty(color))
            {
                return null;
            }
            if (color.StartsWith("SystemColors.", StringComparison.Ordinal))
            {
                return GetSystemColorBrush(lineInfo, color);
            }
            return FixedColorHighlightingBrush((Color?)ColorConverter.ConvertFromInvariantString(color));
        }

        internal static SystemColorHighlightingBrush GetSystemColorBrush(IXmlLineInfo lineInfo, string name)
        {
            Debug.Assert(name.StartsWith("SystemColors.", StringComparison.Ordinal));
            string shortName = name.Substring(13);
            var property = typeof(SystemColors).GetProperty(shortName + "Brush");
            if (property == null)
            {
                throw Error(lineInfo, "Cannot find '" + name + "'.");
            }
            return new SystemColorHighlightingBrush(property);
        }

        private static HighlightingBrush FixedColorHighlightingBrush(Color? color)
        {
            if (color == null)
            {
                return null;
            }
            return new SimpleHighlightingBrush(color.Value);
        }

        private static FontWeight? ParseFontWeight(string fontWeight)
        {
            if (string.IsNullOrEmpty(fontWeight))
            {
                return null;
            }
            return (FontWeight?)FontWeightConverter.ConvertFromInvariantString(fontWeight);
        }

        private static FontStyle? ParseFontStyle(string fontStyle)
        {
            if (string.IsNullOrEmpty(fontStyle))
            {
                return null;
            }
            return (FontStyle?)FontStyleConverter.ConvertFromInvariantString(fontStyle);
        }

        #endregion
    }
}


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2013.07.27 at 08:11:57 PM EEST
//

package uk.org.siri.siri;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.Duration;
import javax.xml.datatype.XMLGregorianCalendar;

/**
 * Type Onwards calls at stop.
 *
 *
Java class for OnwardCallStructure complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="OnwardCallStructure">
 *   <complexContent>
 *     <extension base="{http://www.siri.org.uk/siri}AbstractMonitoredCallStructure">
 *       <sequence>
 *         <sequence>
 *           <element ref="{http://www.siri.org.uk/siri}VehicleAtStop" minOccurs="0"/>
 *           <element ref="{http://www.siri.org.uk/siri}TimingPoint" minOccurs="0"/>
 *         </sequence>
 *         <group ref="{http://www.siri.org.uk/siri}OnwardsCallGroup"/>
 *         <element ref="{http://www.siri.org.uk/siri}Extensions" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "OnwardCallStructure", propOrder = {
    "vehicleAtStop",
    "timingPoint",
    "aimedArrivalTime",
    "expectedArrivalTime",
    "arrivalStatus",
    "arrivalPlatformName",
    "arrivalBoardingActivity",
    "aimedDepartureTime",
    "expectedDepartureTime",
    "departureStatus",
    "departurePlatformName",
    "departureBoardingActivity",
    "aimedHeadwayInterval",
    "expectedHeadwayInterval",
    "extensions"
})
public class OnwardCallStructure
    extends AbstractMonitoredCallStructure
{

    @XmlElement(name = "VehicleAtStop")
    protected Boolean vehicleAtStop;
    @XmlElement(name = "TimingPoint", defaultValue = "true")
    protected Boolean timingPoint;
    @XmlElement(name = "AimedArrivalTime")
    @XmlSchemaType(name = "dateTime")
    protected XMLGregorianCalendar aimedArrivalTime;
    @XmlElement(name = "ExpectedArrivalTime")
    @XmlSchemaType(name = "dateTime")
    protected XMLGregorianCalendar expectedArrivalTime;
    @XmlElement(name = "ArrivalStatus")
    protected ProgressStatusEnumeration arrivalStatus;
    @XmlElement(name = "ArrivalPlatformName")
    protected NaturalLanguageStringStructure arrivalPlatformName;
    @XmlElement(name = "ArrivalBoardingActivity", defaultValue = "alighting")
    protected ArrivalBoardingActivityEnumeration arrivalBoardingActivity;
    @XmlElement(name = "AimedDepartureTime")
    @XmlSchemaType(name = "dateTime")
    protected XMLGregorianCalendar aimedDepartureTime;
    @XmlElement(name = "ExpectedDepartureTime")
    @XmlSchemaType(name = "dateTime")
    protected XMLGregorianCalendar expectedDepartureTime;
    @XmlElement(name = "DepartureStatus")
    protected ProgressStatusEnumeration departureStatus;
    @XmlElement(name = "DeparturePlatformName")
    protected NaturalLanguageStringStructure departurePlatformName;
    @XmlElement(name = "DepartureBoardingActivity", defaultValue = "boarding")
    protected DepartureBoardingActivityEnumeration departureBoardingActivity;
    @XmlElement(name = "AimedHeadwayInterval")
    protected Duration aimedHeadwayInterval;
    @XmlElement(name = "ExpectedHeadwayInterval")
    protected Duration expectedHeadwayInterval;
    @XmlElement(name = "Extensions")
    protected ExtensionsStructure extensions;

    /**
     * Gets the value of the vehicleAtStop property.
     *
     * @return
     *     possible object is
     *     {@link Boolean }
     *
     */
    public Boolean isVehicleAtStop() {
        return vehicleAtStop;
    }

    /**
     * Sets the value of the vehicleAtStop property.
     *
     * @param value
     *     allowed object is
     *     {@link Boolean }
     *
     */
    public void setVehicleAtStop(Boolean value) {
        this.vehicleAtStop = value;
    }

    /**
     * Gets the value of the timingPoint property.
     *
     * @return
     *     possible object is
     *     {@link Boolean }
     *
     */
    public Boolean isTimingPoint() {
        return timingPoint;
    }

    /**
     * Sets the value of the timingPoint property.
     *
     * @param value
     *     allowed object is
     *     {@link Boolean }
     *
     */
    public void setTimingPoint(Boolean value) {
        this.timingPoint = value;
    }

    /**
     * Gets the value of the aimedArrivalTime property.
     *
     * @return
     *     possible object is
     *     {@link XMLGregorianCalendar }
     *
     */
    public XMLGregorianCalendar getAimedArrivalTime() {
        return aimedArrivalTime;
    }

    /**
     * Sets the value of the aimedArrivalTime property.
     *
     * @param value
     *     allowed object is
     *     {@link XMLGregorianCalendar }
     *
     */
    public void setAimedArrivalTime(XMLGregorianCalendar value) {
        this.aimedArrivalTime = value;
    }

    /**
     * Gets the value of the expectedArrivalTime property.
     *
     * @return
     *     possible object is
     *     {@link XMLGregorianCalendar }
     *
     */
    public XMLGregorianCalendar getExpectedArrivalTime() {
        return expectedArrivalTime;
    }

    /**
     * Sets the value of the expectedArrivalTime property.
     *
     * @param value
     *     allowed object is
     *     {@link XMLGregorianCalendar }
     *
     */
    public void setExpectedArrivalTime(XMLGregorianCalendar value) {
        this.expectedArrivalTime = value;
    }

    /**
     * Gets the value of the arrivalStatus property.
     *
     * @return
     *     possible object is
     *     {@link ProgressStatusEnumeration }
     *
     */
    public ProgressStatusEnumeration getArrivalStatus() {
        return arrivalStatus;
    }

    /**
     * Sets the value of the arrivalStatus property.
     *
     * @param value
     *     allowed object is
     *     {@link ProgressStatusEnumeration }
     *
     */
    public void setArrivalStatus(ProgressStatusEnumeration value) {
        this.arrivalStatus = value;
    }

    /**
     * Gets the value of the arrivalPlatformName property.
     *
     * @return
     *     possible object is
     *     {@link NaturalLanguageStringStructure }
     *
     */
    public NaturalLanguageStringStructure getArrivalPlatformName() {
        return arrivalPlatformName;
    }

    /**
     * Sets the value of the arrivalPlatformName property.
     *
     * @param value
     *     allowed object is
     *     {@link NaturalLanguageStringStructure }
     *
     */
    public void setArrivalPlatformName(NaturalLanguageStringStructure value) {
        this.arrivalPlatformName = value;
    }

    /**
     * Gets the value of the arrivalBoardingActivity property.
     *
     * @return
     *     possible object is
     *     {@link ArrivalBoardingActivityEnumeration }
     *
     */
    public ArrivalBoardingActivityEnumeration getArrivalBoardingActivity() {
        return arrivalBoardingActivity;
    }

    /**
     * Sets the value of the arrivalBoardingActivity property.
     *
     * @param value
     *     allowed object is
     *     {@link ArrivalBoardingActivityEnumeration }
     *
     */
    public void setArrivalBoardingActivity(ArrivalBoardingActivityEnumeration value) {
        this.arrivalBoardingActivity = value;
    }

    /**
     * Gets the value of the aimedDepartureTime property.
     *
     * @return
     *     possible object is
     *     {@link XMLGregorianCalendar }
     *
     */
    public XMLGregorianCalendar getAimedDepartureTime() {
        return aimedDepartureTime;
    }

    /**
     * Sets the value of the aimedDepartureTime property.
     *
     * @param value
     *     allowed object is
     *     {@link XMLGregorianCalendar }
     *
     */
    public void setAimedDepartureTime(XMLGregorianCalendar value) {
        this.aimedDepartureTime = value;
    }

    /**
     * Gets the value of the expectedDepartureTime property.
     *
     * @return
     *     possible object is
     *     {@link XMLGregorianCalendar }
     *
     */
    public XMLGregorianCalendar getExpectedDepartureTime() {
        return expectedDepartureTime;
    }

    /**
     * Sets the value of the expectedDepartureTime property.
     *
     * @param value
     *     allowed object is
     *     {@link XMLGregorianCalendar }
     *
     */
    public void setExpectedDepartureTime(XMLGregorianCalendar value) {
        this.expectedDepartureTime = value;
    }

    /**
     * Gets the value of the departureStatus property.
     *
     * @return
     *     possible object is
     *     {@link ProgressStatusEnumeration }
     *
     */
    public ProgressStatusEnumeration getDepartureStatus() {
        return departureStatus;
    }

    /**
     * Sets the value of the departureStatus property.
     *
     * @param value
     *     allowed object is
     *     {@link ProgressStatusEnumeration }
     *
     */
    public void setDepartureStatus(ProgressStatusEnumeration value) {
        this.departureStatus = value;
    }

    /**
     * Gets the value of the departurePlatformName property.
     *
     * @return
     *     possible object is
     *     {@link NaturalLanguageStringStructure }
     *
     */
    public NaturalLanguageStringStructure getDeparturePlatformName() {
        return departurePlatformName;
    }

    /**
     * Sets the value of the departurePlatformName property.
     *
     * @param value
     *     allowed object is
     *     {@link NaturalLanguageStringStructure }
     *
     */
    public void setDeparturePlatformName(NaturalLanguageStringStructure value) {
        this.departurePlatformName = value;
    }

    /**
     * Gets the value of the departureBoardingActivity property.
     *
     * @return
     *     possible object is
     *     {@link DepartureBoardingActivityEnumeration }
     *
     */
    public DepartureBoardingActivityEnumeration getDepartureBoardingActivity() {
        return departureBoardingActivity;
    }

    /**
     * Sets the value of the departureBoardingActivity property.
     *
     * @param value
     *     allowed object is
     *     {@link DepartureBoardingActivityEnumeration }
     *
     */
    public void setDepartureBoardingActivity(DepartureBoardingActivityEnumeration value) {
        this.departureBoardingActivity = value;
    }

    /**
     * Gets the value of the aimedHeadwayInterval property.
     *
     * @return
     *     possible object is
     *     {@link Duration }
     *
     */
    public Duration getAimedHeadwayInterval() {
        return aimedHeadwayInterval;
    }

    /**
     * Sets the value of the aimedHeadwayInterval property.
     *
     * @param value
     *     allowed object is
     *     {@link Duration }
     *
     */
    public void setAimedHeadwayInterval(Duration value) {
        this.aimedHeadwayInterval = value;
    }

    /**
     * Gets the value of the expectedHeadwayInterval property.
     *
     * @return
     *     possible object is
     *     {@link Duration }
     *
     */
    public Duration getExpectedHeadwayInterval() {
        return expectedHeadwayInterval;
    }

    /**
     * Sets the value of the expectedHeadwayInterval property.
     *
     * @param value
     *     allowed object is
     *     {@link Duration }
     *
     */
    public void setExpectedHeadwayInterval(Duration value) {
        this.expectedHeadwayInterval = value;
    }

    /**
     * Gets the value of the extensions property.
     *
     * @return
     *     possible object is
     *     {@link ExtensionsStructure }
     *
     */
    public ExtensionsStructure getExtensions() {
        return extensions;
    }

    /**
     * Sets the value of the extensions property.
     *
     * @param value
     *     allowed object is
     *     {@link ExtensionsStructure }
     *
     */
    public void setExtensions(ExtensionsStructure value) {
        this.extensions = value;
    }

}


text:
import BamCache from './bamCache';
import {BamDataService} from '../../../../../../dataServices';
import {CoverageTransformer} from '../transformers';
import {dataModes} from '../../modes';

const Math = window.Math;

export default class BamCacheService {

    dataService;

    _properties = {
        maxAlignmentsRange: null,
        maxCoverageRange: null,
        rendering: null,
        request: null
    };

    _cache: BamCache;

    get cache(): BamCache {
        return this._cache;
    }

    constructor(track, config, cache) {
        this.dataService = new BamDataService(config.dispatcher);
        this._cache = cache || new BamCache(track);
        this._config = config;
        this._coverageTransformer = new CoverageTransformer(this._cache, config);
        this._coverageTransformer.registerGroupAutoScaleManager(config.groupAutoScaleManager, track);
        if (!cache) {
            this.cache.invalidate();
        }
    }

    get properties() {
        return this._properties;
    }

    set properties(props) {
        this.cache.invalidate();
        this._properties = Object.assign(this._properties, props || {});
        this.cache.renderingProperties = this._properties.rendering;
    }

    getRequestBoundaries(viewport) {
        const boundaries = {
            endIndex: Math.min(
                Math.ceil(viewport.brush.end + viewport.brushSize * this._config.requestPreCache),
                viewport.chromosomeSize
            ),
            startIndex: Math.max(
                Math.floor(viewport.brush.start - viewport.brushSize * this._config.requestPreCache),
                1
            )
        };
        if (viewport.isShortenedIntronsMode) {
            boundaries.startIndex = Math.floor(viewport.shortenedIntronsViewport
                .translatePosition(viewport.brush.start, - viewport.shortenedIntronsViewport.brush.shortenedSize));
            boundaries.endIndex = Math.ceil(viewport.shortenedIntronsViewport
                .translatePosition(viewport.brush.end, viewport.shortenedIntronsViewport.brush.shortenedSize));
        }
        return boundaries;
    }

    async _completeCacheWhenInvalid(viewport, boundaries, features, callbacks) {
        const {onStart} = callbacks;
        this.cache
            .invalidate()
            .startUpdate(boundaries);
        if (onStart) {
            onStart();
        }
        const dataRequestParameters = BamCacheService.getUpdateParameters(viewport, boundaries);
        let data = await this.createDataRequest(dataRequestParameters.length === 1 ? dataRequestParameters[0] : dataRequestParameters);
        await this.cache.append(data, features);
        data = null;
        return this.cache.endUpdate(viewport, this._coverageTransformer, features);
    }

    async _renewCache(viewport, boundaries, features, callbacks) {
        const {onStart} = callbacks;
        this.cache
            .invalidate(true)
            .startUpdate(boundaries);
        if (onStart) {
            onStart();
        }
        const dataRequestParameters = BamCacheService.getUpdateParameters(viewport, boundaries);
        let data = await this.createDataRequest(dataRequestParameters.length === 1 ? dataRequestParameters[0] : dataRequestParameters);
        await this.cache.append(data, features);
        data = null;
        return this.cache.endUpdate(viewport, this._coverageTransformer, features);
    }

    static getUpdateParameters(viewport, boundaries) {
        const dataRequestParameters = [];
        if (viewport.isShortenedIntronsMode) {
            for (let i = 0; i < viewport.shortenedIntronsViewport._coveredRange.ranges.length; i++) {
                const range = viewport.shortenedIntronsViewport._coveredRange.ranges[i];
                if (boundaries.endIndex < range.startIndex || boundaries.startIndex > range.endIndex) {
                    continue;
                }
                dataRequestParameters.push(
                    {
                        endIndex: Math.min(boundaries.endIndex, range.endIndex),
                        side: 'center',
                        startIndex: Math.max(boundaries.startIndex, range.startIndex),
                        scaleFactor: viewport.factor
                    });
            }
        } else {
            dataRequestParameters.push(
                {
                    endIndex: boundaries.endIndex,
                    side: 'center',
                    startIndex: boundaries.startIndex,
                    scaleFactor: viewport.factor
                });
        }
        return dataRequestParameters;
    }

    static getLeftUpdateParameters(endIndex, viewport, boundaries) {
        const dataRequestParameters = [];
        if (viewport.isShortenedIntronsMode) {
            for (let i = 0; i < viewport.shortenedIntronsViewport._coveredRange.ranges.length; i++) {
                const range = viewport.shortenedIntronsViewport._coveredRange.ranges[i];
                if (endIndex < range.startIndex || boundaries.startIndex > range.endIndex) {
                    continue;
                }
                if (range.endIndex < endIndex) {
                    dataRequestParameters.push(
                        {
                            endIndex: range.endIndex,
                            side: 'center',
                            startIndex: Math.max(boundaries.startIndex, range.startIndex),
                            scaleFactor: viewport.factor
                        });
                } else {
                    dataRequestParameters.push(
                        {
                            endIndex: endIndex,
                            side: 'left',
                            startIndex: Math.max(boundaries.startIndex, range.startIndex),
                            scaleFactor: viewport.factor
                        });
                }
            }
        } else {
            dataRequestParameters.push(
                {
                    endIndex: endIndex,
                    side: 'left',
                    startIndex: boundaries.startIndex,
                    scaleFactor: viewport.factor
                });
        }
        return dataRequestParameters;
    }

    static getRightUpdateParameters(startIndex, viewport, boundaries) {
        const dataRequestParameters = [];
        if (viewport.isShortenedIntronsMode) {
            for (let i = 0; i < viewport.shortenedIntronsViewport._coveredRange.ranges.length; i++) {
                const range = viewport.shortenedIntronsViewport._coveredRange.ranges[i];
                if (boundaries.endIndex < range.startIndex || startIndex > range.endIndex) {
                    continue;
                }
                if (range.startIndex > startIndex) {
                    dataRequestParameters.push(
                        {
                            endIndex: Math.min(boundaries.endIndex, range.endIndex),
                            side: 'center',
                            startIndex: range.startIndex,
                            scaleFactor: viewport.factor
                        });
                } else {
                    dataRequestParameters.push(
                        {
                            endIndex: Math.min(boundaries.endIndex, range.endIndex),
                            side: 'right',
                            startIndex: startIndex,
                            scaleFactor: viewport.factor
                        });
                }
            }
        } else {
            dataRequestParameters.push(
                {
                    endIndex: boundaries.endIndex,
                    side: 'right',
                    startIndex: startIndex,
                    scaleFactor: viewport.factor
                });
        }
        return dataRequestParameters;
    }

    async completeCacheData(viewport, features, callbacks) {
        if (this.cache.isUpdating) {
            return false;
        }
        const {onStart} = callbacks;
        const boundaries = this.getRequestBoundaries(viewport);
        const cacheCompletenessResult = this.cache.check(boundaries);
        if (cacheCompletenessResult.cacheIsComplete && this.cache.dataMode === dataModes.full) {
            return false;
        }
        if (cacheCompletenessResult.dataModeChanged || this.cache.dataMode !== dataModes.full) {
            return this._renewCache(viewport, boundaries, features, callbacks);
        } else if (cacheCompletenessResult.cacheIsInvalid) {
            return this._completeCacheWhenInvalid(viewport, boundaries, features, callbacks);
        } else {
            this.cache.startUpdate(boundaries);
            if (onStart) {
                onStart();
            }
            if (cacheCompletenessResult.needUpdateLeftSide) {
                const dataRequestParameters = BamCacheService.getLeftUpdateParameters(this.cache.coverageRange.startIndex - 1,
                    viewport, boundaries);
                let data = await this.createDataRequest(dataRequestParameters.length === 1 ?
                    dataRequestParameters[0] : dataRequestParameters);
                this.cache.appendLeft(data, features);
                data = null;
            }
            if (cacheCompletenessResult.needUpdateRightSide) {
                const dataRequestParameters = BamCacheService.getRightUpdateParameters(this.cache.coverageRange.endIndex + 1, viewport, boundaries);
                let data = await this.createDataRequest(dataRequestParameters.length === 1 ? dataRequestParameters[0] : dataRequestParameters);
                this.cache.appendRight(data, features);
                data = null;
            }
            return this.cache.endUpdate(viewport, this._coverageTransformer, features);
        }
    }

    transform(viewport, scaleConfig){
        this.cache.updateCoverageData(viewport, this._coverageTransformer, scaleConfig);
    }

    createDataRequest(props) {
        const filter = {
            failedVendorChecks: this.properties.rendering.filterFailedVendorChecks,
            pcrOpticalDuplicates: this.properties.rendering.filterPcrOpticalDuplicates,
            secondaryAlignments: this.properties.rendering.filterSecondaryAlignments,
            supplementaryAlignments: this.properties.rendering.filterSupplementaryAlignments
        };

        if (props instanceof Array) {
            const requestParameters = [];
            for (let i = 0; i < props.length; i++) {
                requestParameters.push({...props[i], ...this.properties.request, mode: this.cache.dataMode});
            }
            return this.dataService.getReads(requestParameters, this.properties.rendering.isSoftClipping, filter);
        } else {
            return this.dataService.getReads({...props, ...this.properties.request, mode: this.cache.dataMode}, this.properties.rendering.isSoftClipping, filter);
        }
    }

    clear() {
        this.cache.invalidate();
    }

    clone() {
        const cache = this._cache.clone();
        if (!cache) {
            return undefined;
        }
        const cloned = new BamCacheService(cache.track, this._config, cache);
        cloned._properties = this._properties;
        return cloned;
    }
}


text:
class SubscribersController < ApplicationController
  def create
    subscriber = Subscriber.new(name: params[:name], email: params[:email])

    if subscriber.save
      cookies.permanent[:subscribed] = true
      render json: { ok: 1 }
    else
      if subscriber.errors[:email][0] && subscriber.errors[:email][0][:error] == :taken
        # True hero! Tries to subscribe twice
        cookies.permanent[:subscribed] = true
        render json: { ok: 1 }
      else
        head :unprocessable_entity
      end
    end
  end
end


text:
A ruby library for Mailchimp API V3.0, you can manage your lists and add members to them.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'mailchimpv3'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install mailchimpv3

## Usage

Initialize the client with your API_KEY

```ruby
api_client = Mailchimpv3::API.new "API_KEY"
```

### Lists

#### All
You can now list all your lists

```ruby
api_client = Mailchimpv3::API.new "API_KEY"
api_client.lists().all()
```

#### Find
Find a list based on its id

```ruby
api_client = Mailchimpv3::API.new "API_KEY"
api_client.lists().find("id")
```

You can also specify the params that you want to recieve

```ruby
api_client = Mailchimpv3::API.new "API_KEY"
api_client.lists().find("id", {fields: 'lists.id, lists.name, lists.contact,
                    lists.permission_reminder,lists.campaign_defaults,
                    lists.email_type_option,lists.stats.member_count'})
```

#### Create new list
You can now create a new list with the name, contact info, the permission reminder
and the campaign defaults. Verify Mailchimp API 3.0 Docs for more info.

```ruby
api = Mailchimpv3::API.new correct_key
api.list(name: "alive",
        contact:
          { :company => "MailChimp",
            :address1 => "675 Ponce De Leon Ave NE",
            :address2 => "Suite 5000",
            :city=> "Atlanta",
            :state=>"GA",
            :zip=> "30308",
            :country=>"US",
            :phone => ""
          },
        permission_reminder: "You're receiving this email because you signed up for updates about",
        campaign_defaults:
          { :from_name=>"Freddie",
            :from_email=>"freddie@freddiehats.com",
            :subject=>"News",
            :language=>"es"
          }
      ).save()
```

#### Add members
Add a new member with the email and status

```ruby
api_client = Mailchimpv3::API.new "API_KEY"
list = api.list().find("f355f76299")
list.addmember("popolokm@mail.com","suscribed")
```

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Xosmond/mailchimpv3.

NOTE: You must sign your commits.

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).


text:
import functools
import requests
import time

def token():
    with open("token.txt") as f:
        return f.read().replace("\n", "")

def pgns():
    with open("all_chess_dot_com_games.pgn") as f:
        content = "".join(f.readlines())
        return content.split("""[Event "Let's Play!"]\n""")

def run():
    url = "https://lichess.org/api/import"
    header = {"Authorization": f"Bearer {token()}"}
    for n, pgn in enumerate(pgns()):
        try:
            requests_call = functools.partial(
                requests.post(url, headers=header, data={"pgn": pgn})
            )
            response = requests_call()
            print(response.json()["url"])
        except:
            print(f"Unable to import {n}th record")
            time.sleep(120)
            response = requests_call()
            print(response.json()["url"])

if __name__ == "__main__":
    run()


text:
<!doctype html>

    <title>Histories 2.19</title>
    <meta charset="utf-8">
    <link rel="stylesheet" href="reader.css">

Histories 2.19

1
When the Nile is in flood, it overflows not only the Delta but also the lands called Libyan and Arabian, as far as two days' journey from either bank in places, and sometimes more than this, sometimes less. Concerning its nature, I could not learn anything either from the priests or from any others.

2 Yet I was anxious to learn from them why the Nile comes down with a rising flood for a hundred days from the summer solstice; and when this number of days is passed, sinks again with a diminishing stream, so that the river is low for the whole winter until the summer solstice again.

3 I was not able to get any information from any of the Egyptians regarding this, when I asked them what power the Nile has to be contrary in nature to all other rivers. I wished to know this, and asked; also, why no breezes blew from it as from every other river.

        <
        >


text:
package org.citydb.core.database.schema.mapping;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlType;

@XmlType(name = "geometryProperty", propOrder = {
	    "join"
	})
public class GeometryProperty extends AbstractProperty {
	@XmlElements({
        @XmlElement(type = Join.class),
        @XmlElement(name = "reverseJoin", type = ReverseJoin.class)
    })
    protected AbstractJoin join;
	@XmlAttribute(required = false)
	protected Integer lod;
	@XmlAttribute(required = false)
	protected String refColumn;
	@XmlAttribute(required = false)
	protected String inlineColumn;
	@XmlAttribute(required = true)
	protected GeometryType type;
	@XmlAttribute
	protected Integer srsDimension;

	protected GeometryProperty() {
	}

    public GeometryProperty(String path, GeometryType type, AppSchema schema) {
    	super(path, schema);
    	this.type = type;
    }

	@Override
    public AbstractJoin getJoin() {
        return join;
    }

	@Override
    public boolean isSetJoin() {
        return join != null;
    }

	public void setJoin(Join join) {
		this.join = join;
	}

	public void setJoin(ReverseJoin join) {
		this.join = join;
	}

	public int getLod() {
		return lod != null ? lod.intValue() : -1;
	}

	public boolean isSetLod() {
		return lod != null;
	}

	public void setLod(int lod) {
		if (lod < 0 || lod > 4)
			throw new IllegalArgumentException("LOD level of a geometry property must be between 0 and 4.");

		this.lod = lod;
	}

	public String getRefColumn() {
		return refColumn;
	}

	public boolean isSetRefColumn() {
		return refColumn != null && !refColumn.isEmpty();
	}

	public void setRefColumn(String refColumn) {
		this.refColumn = refColumn;
	}

	public String getInlineColumn() {
		return inlineColumn;
	}

	public boolean isSetInlineColumn() {
		return inlineColumn != null;
	}

	public void setInlineColumn(String inlineColumn) {
		this.inlineColumn = inlineColumn;
	}

	public GeometryType getType() {
		return type;
	}

	public boolean isSetType() {
		return type != null;
	}

	public void setType(GeometryType type) {
		this.type = type;
	}

	public int getSrsDimension() {
		return srsDimension == null ? 3 : srsDimension.intValue();
	}

	public void setSrsDimension(int srsDimension) {
		if (srsDimension > 1 && srsDimension < 4)
			this.srsDimension = srsDimension;
	}

	@Override
	public PathElementType getElementType() {
		return PathElementType.GEOMETRY_PROPERTY;
	}

	@Override
	protected void validate(SchemaMapping schemaMapping, Object parent) throws SchemaMappingException {
		super.validate(schemaMapping, parent);

		if (refColumn == null && inlineColumn == null)
			throw new SchemaMappingException("A geometry property must provide a reference column or an inline column.");
		else if (getSrsDimension() < 2 || getSrsDimension() > 3)
			throw new SchemaMappingException("The SRS dimension of a geometry property must be between 2 and 3.");
		else if (refColumn != null && getSrsDimension() == 2)
			throw new SchemaMappingException("The SRS dimension of a surface geometry property must be 3.");

		if (isSetLod() && (lod < 0 || lod > 4))
			throw new IllegalArgumentException("LOD level of a geometry property must be between 0 and 4.");
	}

}


text:
'use strict';

/**
 * Custom middleware used by the application
 */
module.exports = {

	/**
	 *  Protect routes on your api from unauthenticated access
	 */
	auth: function auth(req, res, next) {
		console.log('auth');
		if (req.isAuthenticated()) return next();
		res.send(401);
	},

	/**
	 * Set a cookie for angular so it knows we have an http session
	 */
	setUserCookie: function (req, res, next) {
		console.log('setUserCookie');
		// console.log(req.user);
		if (req.user) {
			var advUserInfo = req.user.userInfo;
			advUserInfo.id = req.user._id;

			//TODO: passing user id now, need a safer way to do this.

			res.cookie('user', JSON.stringify(advUserInfo));
//			res.cookie('user', JSON.stringify(req.user.userInfo));
		}

		next();
	}
};


text:
<!DOCTYPE>

        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>气象监测</title>

        <link href='./css/bootstrap.min.css' rel='stylesheet' />
        <link href='./css/bootstrap-responsive.min.css' rel='stylesheet' />

            <input type="button" class="btn" value="播放" onclick="startAnimator()" />
            <input type="button" class="btn" value="暂停" onclick="pauseAnimator()" />


text:
using System;
using NetRuntimeSystem = System;
using System.ComponentModel;
using NetOffice.Attributes;

namespace NetOffice.ExcelApi
{
	/// <summary>
	/// DisplayUnitLabel
	/// </summary>
	[SyntaxBypass]
 	public class DisplayUnitLabel_ : COMObject
	{
		#region Ctor

		/// <param name="factory">current used factory core</param>
		/// <param name="parentObject">object there has created the proxy</param>
		/// <param name="proxyShare">proxy share instead if com proxy</param>
		public DisplayUnitLabel_(Core factory, ICOMObject parentObject, COMProxyShare proxyShare) : base(factory, parentObject, proxyShare)
		{
		}

		///<param name="factory">current used factory core</param>
		///<param name="parentObject">object there has created the proxy</param>
        ///<param name="comProxy">inner wrapped COM proxy</param>
		public DisplayUnitLabel_(Core factory, ICOMObject parentObject, object comProxy) : base(factory, parentObject, comProxy)
		{

		}

        /// <param name="parentObject">object there has created the proxy</param>
        /// <param name="comProxy">inner wrapped COM proxy</param>
        [EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
		public DisplayUnitLabel_(ICOMObject parentObject, object comProxy) : base(parentObject, comProxy)
		{
		}

		/// <param name="parentObject">object there has created the proxy</param>
        /// <param name="comProxy">inner wrapped COM proxy</param>
        /// <param name="comProxyType">Type of inner wrapped COM proxy"</param>
        [EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
		public DisplayUnitLabel_(ICOMObject parentObject, object comProxy, NetRuntimeSystem.Type comProxyType) : base(parentObject, comProxy, comProxyType)
		{
		}

		///<param name="factory">current used factory core</param>
		///<param name="parentObject">object there has created the proxy</param>
        ///<param name="comProxy">inner wrapped COM proxy</param>
        ///<param name="comProxyType">Type of inner wrapped COM proxy"</param>
		[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
		public DisplayUnitLabel_(Core factory, ICOMObject parentObject, object comProxy, NetRuntimeSystem.Type comProxyType) : base(factory, parentObject, comProxy, comProxyType)
		{

		}

		/// <param name="replacedObject">object to replaced. replacedObject are not usable after this action</param>
		[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
		public DisplayUnitLabel_(ICOMObject replacedObject) : base(replacedObject)
		{
		}

		/// <summary>
        /// Hidden stub .ctor
        /// </summary>
		[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
		public DisplayUnitLabel_() : base()
		{
		}

		/// <param name="progId">registered progID</param>
		[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
		public DisplayUnitLabel_(string progId) : base(progId)
		{
		}

		#endregion

		#region Properties

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Get
		/// </summary>
		/// <param name="start">optional object start</param>
		/// <param name="length">optional object length</param>
		/// MSDN Online Documentation: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.Characters"/>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
		[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
		public NetOffice.ExcelApi.Characters get_Characters(object start, object length)
		{
			return Factory.ExecuteKnownReferencePropertyGet<NetOffice.ExcelApi.Characters>(this, "Characters", NetOffice.ExcelApi.Characters.LateBindingApiWrapperType, start, length);
		}

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Alias for get_Characters
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.Characters"/> </remarks>
		/// <param name="start">optional object start</param>
		/// <param name="length">optional object length</param>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16), Redirect("get_Characters")]
		public NetOffice.ExcelApi.Characters Characters(object start, object length)
		{
			return get_Characters(start, length);
		}

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Get
		/// </summary>
		/// <param name="start">optional object start</param>
		/// MSDN Online Documentation: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.Characters"/>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
		[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
		public NetOffice.ExcelApi.Characters get_Characters(object start)
		{
			return Factory.ExecuteKnownReferencePropertyGet<NetOffice.ExcelApi.Characters>(this, "Characters", NetOffice.ExcelApi.Characters.LateBindingApiWrapperType, start);
		}

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Alias for get_Characters
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.Characters"/> </remarks>
		/// <param name="start">optional object start</param>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16), Redirect("get_Characters")]
		public NetOffice.ExcelApi.Characters Characters(object start)
		{
			return get_Characters(start);
		}

		#endregion

		#region Methods

		#endregion

	}

	/// <summary>
	/// DispatchInterface DisplayUnitLabel
	/// SupportByVersion Excel, 9,10,11,12,14,15,16
	/// </summary>
	/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel(object)"/> </remarks>
	[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
	[EntityType(EntityType.IsDispatchInterface)]
 	public class DisplayUnitLabel : DisplayUnitLabel_
	{
		#pragma warning disable

		#region Type Information

        /// <summary>
        /// Instance Type
        /// </summary>
		[EditorBrowsable(EditorBrowsableState.Advanced), Browsable(false), Category("NetOffice"), CoreOverridden]
        public override Type InstanceType
        {
            get
            {
                return LateBindingApiWrapperType;
            }
        }

        private static Type _type;

		[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
        public static Type LateBindingApiWrapperType
        {
            get
            {
                if (null == _type)
                    _type = typeof(DisplayUnitLabel);
                return _type;
            }
        }

        #endregion

		#region Ctor

		/// <param name="factory">current used factory core</param>
		/// <param name="parentObject">object there has created the proxy</param>
		/// <param name="proxyShare">proxy share instead if com proxy</param>
		public DisplayUnitLabel(Core factory, ICOMObject parentObject, COMProxyShare proxyShare) : base(factory, parentObject, proxyShare)
		{
		}

		///<param name="factory">current used factory core</param>
		///<param name="parentObject">object there has created the proxy</param>
        ///<param name="comProxy">inner wrapped COM proxy</param>
		public DisplayUnitLabel(Core factory, ICOMObject parentObject, object comProxy) : base(factory, parentObject, comProxy)
		{

		}

        ///<param name="parentObject">object there has created the proxy</param>
        ///<param name="comProxy">inner wrapped COM proxy</param>
        [EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
		public DisplayUnitLabel(ICOMObject parentObject, object comProxy) : base(parentObject, comProxy)
		{
		}

		///<param name="factory">current used factory core</param>
		///<param name="parentObject">object there has created the proxy</param>
        ///<param name="comProxy">inner wrapped COM proxy</param>
        ///<param name="comProxyType">Type of inner wrapped COM proxy"</param>
		[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
		public DisplayUnitLabel(Core factory, ICOMObject parentObject, object comProxy, NetRuntimeSystem.Type comProxyType) : base(factory, parentObject, comProxy, comProxyType)
		{

		}

		///<param name="parentObject">object there has created the proxy</param>
        ///<param name="comProxy">inner wrapped COM proxy</param>
        ///<param name="comProxyType">Type of inner wrapped COM proxy"</param>
        [EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
		public DisplayUnitLabel(ICOMObject parentObject, object comProxy, NetRuntimeSystem.Type comProxyType) : base(parentObject, comProxy, comProxyType)
		{
		}

		///<param name="replacedObject">object to replaced. replacedObject are not usable after this action</param>
		[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
		public DisplayUnitLabel(ICOMObject replacedObject) : base(replacedObject)
		{
		}

		[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
		public DisplayUnitLabel() : base()
		{
		}

		/// <param name="progId">registered progID</param>
		[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
		public DisplayUnitLabel(string progId) : base(progId)
		{
		}

		#endregion

		#region Properties

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Get
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.Application"/> </remarks>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
		public NetOffice.ExcelApi.Application Application
		{
			get
			{
				return Factory.ExecuteKnownReferencePropertyGet<NetOffice.ExcelApi.Application>(this, "Application", NetOffice.ExcelApi.Application.LateBindingApiWrapperType);
			}
		}

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Get
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.Creator"/> </remarks>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
		public NetOffice.ExcelApi.Enums.XlCreator Creator
		{
			get
			{
				return Factory.ExecuteEnumPropertyGet<NetOffice.ExcelApi.Enums.XlCreator>(this, "Creator");
			}
		}

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Get
		/// Unknown COM Proxy
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.Parent"/> </remarks>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16), ProxyResult]
		public object Parent
		{
			get
			{
				return Factory.ExecuteReferencePropertyGet(this, "Parent");
			}
		}

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Get
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.Name"/> </remarks>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
		public string Name
		{
			get
			{
				return Factory.ExecuteStringPropertyGet(this, "Name");
			}
		}

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Get
		/// </summary>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
		public NetOffice.ExcelApi.Border Border
		{
			get
			{
				return Factory.ExecuteKnownReferencePropertyGet<NetOffice.ExcelApi.Border>(this, "Border", NetOffice.ExcelApi.Border.LateBindingApiWrapperType);
			}
		}

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Get
		/// </summary>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
		public NetOffice.ExcelApi.Interior Interior
		{
			get
			{
				return Factory.ExecuteKnownReferencePropertyGet<NetOffice.ExcelApi.Interior>(this, "Interior", NetOffice.ExcelApi.Interior.LateBindingApiWrapperType);
			}
		}

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Get
		/// </summary>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
		public NetOffice.ExcelApi.ChartFillFormat Fill
		{
			get
			{
				return Factory.ExecuteKnownReferencePropertyGet<NetOffice.ExcelApi.ChartFillFormat>(this, "Fill", NetOffice.ExcelApi.ChartFillFormat.LateBindingApiWrapperType);
			}
		}

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Get/Set
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.Caption"/> </remarks>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
		public string Caption
		{
			get
			{
				return Factory.ExecuteStringPropertyGet(this, "Caption");
			}
			set
			{
				Factory.ExecuteValuePropertySet(this, "Caption", value);
			}
		}

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Get
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.Characters"/> </remarks>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
		public NetOffice.ExcelApi.Characters Characters
		{
			get
			{
				return Factory.ExecuteKnownReferencePropertyGet<NetOffice.ExcelApi.Characters>(this, "Characters", NetOffice.ExcelApi.Characters.LateBindingApiWrapperType);
			}
		}

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Get
		/// </summary>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
		public NetOffice.ExcelApi.Font Font
		{
			get
			{
				return Factory.ExecuteKnownReferencePropertyGet<NetOffice.ExcelApi.Font>(this, "Font", NetOffice.ExcelApi.Font.LateBindingApiWrapperType);
			}
		}

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Get/Set
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.HorizontalAlignment"/> </remarks>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
		public object HorizontalAlignment
		{
			get
			{
				return Factory.ExecuteVariantPropertyGet(this, "HorizontalAlignment");
			}
			set
			{
				Factory.ExecuteVariantPropertySet(this, "HorizontalAlignment", value);
			}
		}

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Get/Set
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.Left"/> </remarks>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
		public Double Left
		{
			get
			{
				return Factory.ExecuteDoublePropertyGet(this, "Left");
			}
			set
			{
				Factory.ExecuteValuePropertySet(this, "Left", value);
			}
		}

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Get/Set
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.Orientation"/> </remarks>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
		public object Orientation
		{
			get
			{
				return Factory.ExecuteVariantPropertyGet(this, "Orientation");
			}
			set
			{
				Factory.ExecuteVariantPropertySet(this, "Orientation", value);
			}
		}

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Get/Set
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.Shadow"/> </remarks>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
		public bool Shadow
		{
			get
			{
				return Factory.ExecuteBoolPropertyGet(this, "Shadow");
			}
			set
			{
				Factory.ExecuteValuePropertySet(this, "Shadow", value);
			}
		}

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Get/Set
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.Text"/> </remarks>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
		public string Text
		{
			get
			{
				return Factory.ExecuteStringPropertyGet(this, "Text");
			}
			set
			{
				Factory.ExecuteValuePropertySet(this, "Text", value);
			}
		}

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Get/Set
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.Top"/> </remarks>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
		public Double Top
		{
			get
			{
				return Factory.ExecuteDoublePropertyGet(this, "Top");
			}
			set
			{
				Factory.ExecuteValuePropertySet(this, "Top", value);
			}
		}

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Get/Set
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.VerticalAlignment"/> </remarks>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
		public object VerticalAlignment
		{
			get
			{
				return Factory.ExecuteVariantPropertyGet(this, "VerticalAlignment");
			}
			set
			{
				Factory.ExecuteVariantPropertySet(this, "VerticalAlignment", value);
			}
		}

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Get/Set
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.ReadingOrder"/> </remarks>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
		public Int32 ReadingOrder
		{
			get
			{
				return Factory.ExecuteInt32PropertyGet(this, "ReadingOrder");
			}
			set
			{
				Factory.ExecuteValuePropertySet(this, "ReadingOrder", value);
			}
		}

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// Get/Set
		/// </summary>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
		public object AutoScaleFont
		{
			get
			{
				return Factory.ExecuteVariantPropertyGet(this, "AutoScaleFont");
			}
			set
			{
				Factory.ExecuteVariantPropertySet(this, "AutoScaleFont", value);
			}
		}

		/// <summary>
		/// SupportByVersion Excel 12, 14, 15, 16
		/// Get/Set
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.Position"/> </remarks>
		[SupportByVersion("Excel", 12,14,15,16)]
		public NetOffice.ExcelApi.Enums.XlChartElementPosition Position
		{
			get
			{
				return Factory.ExecuteEnumPropertyGet<NetOffice.ExcelApi.Enums.XlChartElementPosition>(this, "Position");
			}
			set
			{
				Factory.ExecuteEnumPropertySet(this, "Position", value);
			}
		}

		/// <summary>
		/// SupportByVersion Excel 12, 14, 15, 16
		/// Get
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.Format"/> </remarks>
		[SupportByVersion("Excel", 12,14,15,16)]
		public NetOffice.ExcelApi.ChartFormat Format
		{
			get
			{
				return Factory.ExecuteKnownReferencePropertyGet<NetOffice.ExcelApi.ChartFormat>(this, "Format", NetOffice.ExcelApi.ChartFormat.LateBindingApiWrapperType);
			}
		}

		/// <summary>
		/// SupportByVersion Excel 14, 15, 16
		/// Get
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.Height"/> </remarks>
		[SupportByVersion("Excel", 14,15,16)]
		public Double Height
		{
			get
			{
				return Factory.ExecuteDoublePropertyGet(this, "Height");
			}
		}

		/// <summary>
		/// SupportByVersion Excel 14, 15, 16
		/// Get
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.Width"/> </remarks>
		[SupportByVersion("Excel", 14,15,16)]
		public Double Width
		{
			get
			{
				return Factory.ExecuteDoublePropertyGet(this, "Width");
			}
		}

		/// <summary>
		/// SupportByVersion Excel 14, 15, 16
		/// Get/Set
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.Formula"/> </remarks>
		[SupportByVersion("Excel", 14,15,16)]
		public string Formula
		{
			get
			{
				return Factory.ExecuteStringPropertyGet(this, "Formula");
			}
			set
			{
				Factory.ExecuteValuePropertySet(this, "Formula", value);
			}
		}

		/// <summary>
		/// SupportByVersion Excel 14, 15, 16
		/// Get/Set
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.FormulaR1C1"/> </remarks>
		[SupportByVersion("Excel", 14,15,16)]
		public string FormulaR1C1
		{
			get
			{
				return Factory.ExecuteStringPropertyGet(this, "FormulaR1C1");
			}
			set
			{
				Factory.ExecuteValuePropertySet(this, "FormulaR1C1", value);
			}
		}

		/// <summary>
		/// SupportByVersion Excel 14, 15, 16
		/// Get/Set
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.FormulaLocal"/> </remarks>
		[SupportByVersion("Excel", 14,15,16)]
		public string FormulaLocal
		{
			get
			{
				return Factory.ExecuteStringPropertyGet(this, "FormulaLocal");
			}
			set
			{
				Factory.ExecuteValuePropertySet(this, "FormulaLocal", value);
			}
		}

		/// <summary>
		/// SupportByVersion Excel 14, 15, 16
		/// Get/Set
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.FormulaR1C1Local"/> </remarks>
		[SupportByVersion("Excel", 14,15,16)]
		public string FormulaR1C1Local
		{
			get
			{
				return Factory.ExecuteStringPropertyGet(this, "FormulaR1C1Local");
			}
			set
			{
				Factory.ExecuteValuePropertySet(this, "FormulaR1C1Local", value);
			}
		}

		#endregion

		#region Methods

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.Select"/> </remarks>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
		public object Select()
		{
			return Factory.ExecuteVariantMethodGet(this, "Select");
		}

		/// <summary>
		/// SupportByVersion Excel 9, 10, 11, 12, 14, 15, 16
		/// </summary>
		/// <remarks> Docs: <see href="https://docs.microsoft.com/en-us/office/vba/api/Excel.DisplayUnitLabel.Delete"/> </remarks>
		[SupportByVersion("Excel", 9,10,11,12,14,15,16)]
		public object Delete()
		{
			return Factory.ExecuteVariantMethodGet(this, "Delete");
		}

		/// <summary>
		/// SupportByVersion Excel 12, 14, 15, 16
		/// </summary>
		[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
		[SupportByVersion("Excel", 12,14,15,16)]
		public void _Dummy21()
		{
			 Factory.ExecuteMethod(this, "_Dummy21");
		}

		#endregion

		#pragma warning restore
	}
}


text:
using System.Windows.Controls;

namespace ArcGISRuntimeSDKDotNet_DesktopSamples.Samples
{
    /// <summary>
    /// Demonstrates adding a WMTS layer to a Map in XAML.
    /// </summary>
    /// <title>WMTS Layer</title>
	/// <category>Layers</category>
	/// <subcategory>Tiled Layers</subcategory>
	public partial class WmtsLayerSample : UserControl
    {
        public WmtsLayerSample()
        {
            InitializeComponent();
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns="http://java.sun.com/xml/ns/javaee"
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
	version="3.0">
	<display-name>Order</display-name>
	<welcome-file-list>
		<welcome-file>/WebContent/jsp/User/login.jsp</welcome-file>
		<welcome-file>index.htm</welcome-file>
		<welcome-file>index.jsp</welcome-file>
		<welcome-file>default.html</welcome-file>
		<welcome-file>default.htm</welcome-file>
		<welcome-file>default.jsp</welcome-file>
	</welcome-file-list>

	<context-param>
		<param-name>webAppRootKey</param-name>
		<param-value>webapp.Order</param-value>
	</context-param>
	<servlet>
		<servlet-name>springmvc</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

		<init-param>
			<param-name>contextConfigLocation</param-name>
			<param-value>/WEB-INF/classes/profile/spring-config.xml</param-value>
		</init-param>
		<!-- 应用启动时,创建servlet实例,作为后台服务,该值越小,越优先启动 -->
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>springmvc</servlet-name>
		<url-pattern>/</url-pattern>
	</servlet-mapping>

	<!-- 上下文监听器 -->
	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>/WEB-INF/classes/profile/applcationContext.xml</param-value>
	</context-param>

	<!-- session过滤器 -->
	<filter>
		<filter-name>SessionFilter</filter-name>
		<filter-class>com.common.SessionFilter</filter-class>
		<init-param>
			<param-name>logonStrings</param-name><!-- 对登录页面不进行过滤 -->
			<param-value>/login;</param-value>
		</init-param>
		<init-param>
			<param-name>includeStrings</param-name><!-- 只对指定过滤参数后缀进行过滤 -->
			<param-value>.do;.jsp</param-value>
		</init-param>
		<init-param>
			<param-name>redirectPath</param-name><!-- 未通过跳转到登录界面 -->
			<param-value>/webapp/jsp/frame/login.jsp</param-value>
		</init-param>
		<init-param>
			<param-name>disabletestfilter</param-name><!-- Y:过滤 -->
			<param-value>Y</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>SessionFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>

	<!-- 字符编码过滤器 -->
	<filter>
		<filter-name>CharacterEncodingFilter</filter-name>
		<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
		<init-param>
			<param-name>encoding</param-name>
			<param-value>UTF-8</param-value>
		</init-param>
		<init-param>
			<param-name>forceEncoding</param-name>
			<param-value>true</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>CharacterEncodingFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>

	<context-param>
    	<param-name>logbackConfigLocation</param-name>
    	<param-value>/WEB-INF/classes/profile/logback.xml</param-value>
  	</context-param>
  	<listener>
    	<listener-class>ch.qos.logback.ext.spring.web.LogbackConfigListener</listener-class>
  	</listener>

	<!-- defaultServlet来处理静态文件 -->
	<servlet-mapping>
		<servlet-name>default</servlet-name>
		<url-pattern>*.gif</url-pattern>
		<url-pattern>*.png</url-pattern>
		<url-pattern>*.jpg</url-pattern>
		<url-pattern>*.css</url-pattern>
		<url-pattern>*.js</url-pattern>
		<url-pattern>*.ico</url-pattern>
		<url-pattern>*.eot</url-pattern>
		<url-pattern>*.svg</url-pattern>
		<url-pattern>*.ttf</url-pattern>
		<url-pattern>*.woff</url-pattern>
		<url-pattern>*.mp3</url-pattern>
		<url-pattern>*.html</url-pattern>
	</servlet-mapping>

	<error-page>
		<error-code>404</error-code>
		<location>/webapp/jsp/404.html</location>
	</error-page>
	<error-page>
		<error-code>405</error-code>
		<location>/webapp/jsp/404.html</location>
	</error-page>
</web-app>


text:
using System;
using System.Threading.Tasks;
using DotNetAirbrake.Models;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;

namespace DotNetAirbrake.AspNetCore
{
    public static class AirbrakeExceptionHttpExtensions
    {
        public static Task SendToAirbrakeAsync(this Exception exc, HttpContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            var notice = AirbrakeExceptionHttpExtensions.BuildNoticeMessage(exc, context);

            var client = context.RequestServices.GetService<AirbrakeClient>();
            return client.SendAsync(notice);
        }

        private static AirbrakeCreateNoticeMessage BuildNoticeMessage(Exception exc, HttpContext httpContext)
        {
            var builder = new AirbrakeCreateNoticeMessageBuilder();
            builder.WithNotifier();
            builder.WithHttpContext(httpContext);
            builder.WithException(exc);
            return builder.Build();
        }
    }
}


text:
<?php

require_once(dirname(__FILE__) . '/parts/header.html');

?>

Eksamensdata

Gratulerer! Du har nå satt opp en ny PHP klient som har fått autorisert tilgang til FS sitt API for eksamensresultater, og har fått hentet ut data derfra på vegne av en sluttbruker som er autentisert med Feide.

(Og det var ikke mange linjene med kode ;)

<?php echo (json_encode($data['eksamensdata'], JSON_PRETTY_PRINT)); ?>

		Reset session
		Refresh page

Feide Connect User info

<?php echo (json_encode($data['userinfo'], JSON_PRETTY_PRINT)); ?>

Obtained OAuth 2.0 Access Token

<?php echo (json_encode($data['token'], JSON_PRETTY_PRINT)); ?>

Your local configuration

<?php echo (json_encode($data['config'], JSON_PRETTY_PRINT)); ?>

<?php

require_once(dirname(__FILE__) . '/parts/footer.html');


text:
namespace SimpleAuth.Permissions
{
    using System;
    using System.Collections.ObjectModel;
    using System.Linq;
    using System.Security.Claims;

    using SimpleAuth.Claims;
    using SimpleAuth.Extensions;

    public class PermissionAuthorization<TPermission> : IClaimsResolver, IClaimsAuthorizer
    {
        private readonly IPermissionsResolver<TPermission> permissionsResolver;

        public PermissionAuthorization(IPermissionsResolver<TPermission> permissionsResolver)
        {
            if (permissionsResolver == null)
            {
                throw new ArgumentNullException("permissionsResolver");
            }

            this.permissionsResolver = permissionsResolver;
        }

        public ClaimInformation GetClaims(string name)
        {
            return new ClaimInformation
                       {
                           Claims = this.permissionsResolver.GetPermissions(name)
                                        .Select(p => new Claim("http://simpleauth/permission", p.ToDescription())),
                           NameClaimType = ClaimTypes.Name,
                           RoleClaimType = ClaimTypes.Role
                       };
        }

        public bool CheckAccess(ClaimsPrincipal principal, Collection<Claim> resources, Collection<Claim> actions)
        {
            var resource = resources.First().Value;
            var action = actions.First().Value;

            if (resource == "http://simpleauth/permission")
            {
                return principal.HasClaim("http://simpleauth/permission", action);
            }

            return true;
        }
    }
}


text: ALTER TABLE person COLUMN  id DROP DEFAULT;


text:
#ifndef H_CNewToDoTiming
#define H_CNewToDoTiming

#include "CNewTimingPanel.h"

class CDateTimeZoneSelect;
class CDurationSelect;

class JXRadioGroup;
class JXTextCheckbox;
class JXTextRadioButton;

// ===========================================================================
//	CNewToDoTiming

class CNewToDoTiming : public CNewTimingPanel
{
public:
	CNewToDoTiming(JXContainer* enclosure,
						const HSizingOption hSizing, const VSizingOption vSizing,
						const JCoordinate x, const JCoordinate y,
						const JCoordinate w, const JCoordinate h)
		: CNewTimingPanel(enclosure, hSizing, vSizing, x, y, w, h) {}
	virtual				~CNewToDoTiming() {}

	virtual void	OnCreate();

	virtual bool	GetAllDay() const;
	virtual void	GetTimezone(iCal::CICalendarTimezone& tz) const;

	virtual void	SetToDo(const iCal::CICalendarVToDo& vtodo, const iCal::CICalendarComponentExpanded* expanded);
	virtual void	GetToDo(iCal::CICalendarVToDo& vtodo);

	virtual void	SetReadOnly(bool read_only);

protected:
	enum
	{
		eDue_NoDue = 1,
		eDue_DueBy,
		eDue_Start
	};

	// UI Objects
// begin JXLayout1

    JXTextCheckbox*      mAllDay;
    JXRadioGroup*        mDueGroup;
    JXTextRadioButton*   mNoDue;
    JXTextRadioButton*   mDueBy;
    CDateTimeZoneSelect* mDueDateTimeZone;
    JXTextRadioButton*   mStarts;
    CDateTimeZoneSelect* mStartDateTimeZone;
    CDurationSelect*     mDuration;

// end JXLayout1

	virtual void Receive(JBroadcaster* sender, const Message& message);

			void	DoAllDay(bool set);
			void	DoDueGroup(JIndex group);
};

#endif