text:
.class public Landroid/text/util/Linkify;
.super Ljava/lang/Object;
.source "Linkify.java"

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Landroid/text/util/Linkify$1;,
        Landroid/text/util/Linkify$2;,
        Landroid/text/util/Linkify$3;,
        Landroid/text/util/Linkify$4;,
        Landroid/text/util/Linkify$MatchFilter;,
        Landroid/text/util/Linkify$TransformFilter;
    }
.end annotation

# static fields
.field public static final ALL:I = 0xf

.field public static final EMAIL_ADDRESSES:I = 0x2

.field public static final MAP_ADDRESSES:I = 0x8

.field public static final PHONE_NUMBERS:I = 0x4

.field private static final PHONE_NUMBER_MINIMUM_DIGITS:I = 0x5

.field public static final SEM_ALL_MIXED_CJK:I = 0x500a

.field public static final SEM_ALL_MIXED_KOR:I = 0x600a

.field public static final SEM_PHONE_NUMBERS_CJK:I = 0x8000

.field public static final SEM_PHONE_NUMBERS_KOR:I = 0x4000

.field public static final SEM_WEB_URLS_CJK:I = 0x1000

.field public static final SEM_WEB_URLS_KOR:I = 0x2000

.field public static final WEB_URLS:I = 0x1

.field public static final sPhoneNumberMatchFilter:Landroid/text/util/Linkify$MatchFilter;

.field public static final sPhoneNumberMatchFilterEX:Landroid/text/util/Linkify$MatchFilter;

.field public static final sPhoneNumberTransformFilter:Landroid/text/util/Linkify$TransformFilter;

.field public static final sUrlMatchFilter:Landroid/text/util/Linkify$MatchFilter;

# direct methods
.method static constructor <clinit>()V
    .locals 1

    new-instance v0, Landroid/text/util/Linkify$1;

    invoke-direct {v0}, Landroid/text/util/Linkify$1;-><init>()V

    sput-object v0, Landroid/text/util/Linkify;->sUrlMatchFilter:Landroid/text/util/Linkify$MatchFilter;

    new-instance v0, Landroid/text/util/Linkify$2;

    invoke-direct {v0}, Landroid/text/util/Linkify$2;-><init>()V

    sput-object v0, Landroid/text/util/Linkify;->sPhoneNumberMatchFilter:Landroid/text/util/Linkify$MatchFilter;

    new-instance v0, Landroid/text/util/Linkify$3;

    invoke-direct {v0}, Landroid/text/util/Linkify$3;-><init>()V

    sput-object v0, Landroid/text/util/Linkify;->sPhoneNumberMatchFilterEX:Landroid/text/util/Linkify$MatchFilter;

    new-instance v0, Landroid/text/util/Linkify$4;

    invoke-direct {v0}, Landroid/text/util/Linkify$4;-><init>()V

    sput-object v0, Landroid/text/util/Linkify;->sPhoneNumberTransformFilter:Landroid/text/util/Linkify$TransformFilter;

    return-void
.end method

.method public constructor <init>()V
    .locals 0

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

    return-void
.end method

.method private static final addLinkMovementMethod(Landroid/widget/TextView;)V
    .locals 2

    invoke-virtual {p0}, Landroid/widget/TextView;->getMovementMethod()Landroid/text/method/MovementMethod;

    move-result-object v0

    if-eqz v0, :cond_0

    instance-of v1, v0, Landroid/text/method/LinkMovementMethod;

    xor-int/lit8 v1, v1, 0x1

    if-eqz v1, :cond_1

    :cond_0
    invoke-virtual {p0}, Landroid/widget/TextView;->getLinksClickable()Z

    move-result v1

    if-eqz v1, :cond_1

    invoke-static {}, Landroid/text/method/LinkMovementMethod;->getInstance()Landroid/text/method/MovementMethod;

    move-result-object v1

    invoke-virtual {p0, v1}, Landroid/widget/TextView;->setMovementMethod(Landroid/text/method/MovementMethod;)V

    :cond_1
    return-void
.end method

.method public static final addLinks(Landroid/widget/TextView;Ljava/util/regex/Pattern;Ljava/lang/String;)V
    .locals 6

    const/4 v3, 0x0

    move-object v0, p0

    move-object v1, p1

    move-object v2, p2

    move-object v4, v3

    move-object v5, v3

    invoke-static/range {v0 .. v5}, Landroid/text/util/Linkify;->addLinks(Landroid/widget/TextView;Ljava/util/regex/Pattern;Ljava/lang/String;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)V

    return-void
.end method

.method public static final addLinks(Landroid/widget/TextView;Ljava/util/regex/Pattern;Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)V
    .locals 6

    const/4 v3, 0x0

    move-object v0, p0

    move-object v1, p1

    move-object v2, p2

    move-object v4, p3

    move-object v5, p4

    invoke-static/range {v0 .. v5}, Landroid/text/util/Linkify;->addLinks(Landroid/widget/TextView;Ljava/util/regex/Pattern;Ljava/lang/String;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)V

    return-void
.end method

.method public static final addLinks(Landroid/widget/TextView;Ljava/util/regex/Pattern;Ljava/lang/String;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)V
    .locals 7

    invoke-virtual {p0}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;

    move-result-object v1

    invoke-static {v1}, Landroid/text/SpannableString;->valueOf(Ljava/lang/CharSequence;)Landroid/text/SpannableString;

    move-result-object v0

    move-object v1, p1

    move-object v2, p2

    move-object v3, p3

    move-object v4, p4

    move-object v5, p5

    invoke-static/range {v0 .. v5}, Landroid/text/util/Linkify;->addLinks(Landroid/text/Spannable;Ljava/util/regex/Pattern;Ljava/lang/String;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)Z

    move-result v6

    if-eqz v6, :cond_0

    invoke-virtual {p0, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    invoke-static {p0}, Landroid/text/util/Linkify;->addLinkMovementMethod(Landroid/widget/TextView;)V

    :cond_0
    return-void
.end method

.method public static final addLinks(Landroid/text/Spannable;I)Z
    .locals 16

    if-nez p1, :cond_0

    const/4 v2, 0x0

    return v2

    :cond_0
    invoke-interface/range {p0 .. p0}, Landroid/text/Spannable;->length()I

    move-result v2

    const-class v3, Landroid/text/style/URLSpan;

    const/4 v4, 0x0

    move-object/from16 v0, p0

    invoke-interface {v0, v4, v2, v3}, Landroid/text/Spannable;->getSpans(IILjava/lang/Class;)[Ljava/lang/Object;

    move-result-object v14

    check-cast v14, [Landroid/text/style/URLSpan;

    array-length v2, v14

    add-int/lit8 v8, v2, -0x1

    :goto_0
    if-ltz v8, :cond_1

    aget-object v2, v14, v8

    move-object/from16 v0, p0

    invoke-interface {v0, v2}, Landroid/text/Spannable;->removeSpan(Ljava/lang/Object;)V

    add-int/lit8 v8, v8, -0x1

    goto :goto_0

    :cond_1
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    and-int/lit8 v2, p1, 0x1

    if-eqz v2, :cond_2

    sget-object v3, Landroid/util/Patterns;->AUTOLINK_WEB_URL:Ljava/util/regex/Pattern;

    const/4 v2, 0x3

    new-array v4, v2, [Ljava/lang/String;

    const-string/jumbo v2, "http://"

    const/4 v5, 0x0

    aput-object v2, v4, v5

    const-string/jumbo v2, "https://"

    const/4 v5, 0x1

    aput-object v2, v4, v5

    const-string/jumbo v2, "rtsp://"

    const/4 v5, 0x2

    aput-object v2, v4, v5

    sget-object v5, Landroid/text/util/Linkify;->sUrlMatchFilter:Landroid/text/util/Linkify$MatchFilter;

    const/4 v6, 0x0

    move-object/from16 v2, p0

    invoke-static/range {v1 .. v6}, Landroid/text/util/Linkify;->gatherLinks(Ljava/util/ArrayList;Landroid/text/Spannable;Ljava/util/regex/Pattern;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)V

    :cond_2
    move/from16 v0, p1

    and-int/lit16 v2, v0, 0x1000

    if-eqz v2, :cond_a

    sget-object v3, Landroid/util/Patterns;->WEB_URL_EX:Ljava/util/regex/Pattern;

    const/4 v2, 0x4

    new-array v4, v2, [Ljava/lang/String;

    const-string/jumbo v2, "http://"

    const/4 v5, 0x0

    aput-object v2, v4, v5

    const-string/jumbo v2, "https://"

    const/4 v5, 0x1

    aput-object v2, v4, v5

    const-string/jumbo v2, "rtsp://"

    const/4 v5, 0x2

    aput-object v2, v4, v5

    const-string/jumbo v2, "ftp://"

    const/4 v5, 0x3

    aput-object v2, v4, v5

    sget-object v5, Landroid/text/util/Linkify;->sUrlMatchFilter:Landroid/text/util/Linkify$MatchFilter;

    const/4 v6, 0x0

    move-object/from16 v2, p0

    invoke-static/range {v1 .. v6}, Landroid/text/util/Linkify;->gatherLinks(Ljava/util/ArrayList;Landroid/text/Spannable;Ljava/util/regex/Pattern;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)V

    invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;

    move-result-object v11

    :cond_3
    :goto_1
    invoke-interface {v11}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_a

    invoke-interface {v11}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Landroid/text/util/LinkSpec;

    invoke-interface/range {p0 .. p0}, Landroid/text/Spannable;->toString()Ljava/lang/String;

    move-result-object v2

    iget v3, v10, Landroid/text/util/LinkSpec;->start:I

    iget v4, v10, Landroid/text/util/LinkSpec;->end:I

    invoke-virtual {v2, v3, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v12

    const-string/jumbo v2, "www."

    invoke-virtual {v12, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_7

    const-string/jumbo v2, "www."

    invoke-virtual {v12, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_6

    const-string/jumbo v2, "http://"

    invoke-virtual {v12, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_6

    const-string/jumbo v2, "https://"

    invoke-virtual {v12, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_6

    const-string/jumbo v2, "rtsp://"

    invoke-virtual {v12, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_6

    const-string/jumbo v2, "ftp://"

    invoke-virtual {v12, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    :goto_2
    xor-int/lit8 v2, v2, 0x1

    if-eqz v2, :cond_7

    iget v2, v10, Landroid/text/util/LinkSpec;->start:I

    const-string/jumbo v3, "www."

    invoke-virtual {v12, v3}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v3

    add-int/2addr v2, v3

    iput v2, v10, Landroid/text/util/LinkSpec;->start:I

    new-instance v2, Ljava/lang/StringBuilder;

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

    iget-object v3, v10, Landroid/text/util/LinkSpec;->url:Ljava/lang/String;

    iget-object v4, v10, Landroid/text/util/LinkSpec;->url:Ljava/lang/String;

    const-string/jumbo v5, "://"

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

    move-result v4

    add-int/lit8 v4, v4, 0x3

    const/4 v5, 0x0

    invoke-virtual {v3, v5, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v3

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

    move-result-object v2

    invoke-interface/range {p0 .. p0}, Landroid/text/Spannable;->toString()Ljava/lang/String;

    move-result-object v3

    iget v4, v10, Landroid/text/util/LinkSpec;->start:I

    iget v5, v10, Landroid/text/util/LinkSpec;->end:I

    invoke-virtual {v3, v4, v5}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v3

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

    move-result-object v2

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

    move-result-object v2

    iput-object v2, v10, Landroid/text/util/LinkSpec;->url:Ljava/lang/String;

    :cond_4
    :goto_3
    const-string/jumbo v2, "."

    invoke-virtual {v12, v2}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I

    move-result v15

    if-ltz v15, :cond_3

    invoke-virtual {v12}, Ljava/lang/String;->length()I

    move-result v2

    add-int/lit8 v2, v2, -0x1

    if-ge v15, v2, :cond_3

    const-string/jumbo v2, "http://api.map.baidu.com/marker?location="

    invoke-virtual {v12, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    xor-int/lit8 v2, v2, 0x1

    if-eqz v2, :cond_3

    add-int/lit8 v2, v15, 0x1

    invoke-virtual {v12, v2}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/String;->toCharArray()[C

    move-result-object v7

    const/4 v8, 0x0

    :goto_4
    array-length v2, v7

    if-ge v8, v2, :cond_5

    aget-char v2, v7, v8

    const/16 v3, 0x80

    if-lt v2, v3, :cond_9

    :cond_5
    array-length v2, v7

    if-ge v8, v2, :cond_3

    iget v2, v10, Landroid/text/util/LinkSpec;->end:I

    array-length v3, v7

    sub-int/2addr v3, v8

    sub-int/2addr v2, v3

    iput v2, v10, Landroid/text/util/LinkSpec;->end:I

    iget-object v2, v10, Landroid/text/util/LinkSpec;->url:Ljava/lang/String;

    iget-object v3, v10, Landroid/text/util/LinkSpec;->url:Ljava/lang/String;

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v3

    array-length v4, v7

    sub-int/2addr v4, v8

    sub-int/2addr v3, v4

    const/4 v4, 0x0

    invoke-virtual {v2, v4, v3}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v2

    iput-object v2, v10, Landroid/text/util/LinkSpec;->url:Ljava/lang/String;

    goto/16 :goto_1

    :cond_6
    const/4 v2, 0x1

    goto/16 :goto_2

    :cond_7
    const-string/jumbo v2, "wap."

    invoke-virtual {v12, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_4

    const-string/jumbo v2, "wap."

    invoke-virtual {v12, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_8

    const-string/jumbo v2, "http://"

    invoke-virtual {v12, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_8

    const-string/jumbo v2, "https://"

    invoke-virtual {v12, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_8

    const-string/jumbo v2, "rtsp://"

    invoke-virtual {v12, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_8

    const-string/jumbo v2, "ftp://"

    invoke-virtual {v12, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    :goto_5
    xor-int/lit8 v2, v2, 0x1

    if-eqz v2, :cond_4

    iget v2, v10, Landroid/text/util/LinkSpec;->start:I

    const-string/jumbo v3, "wap."

    invoke-virtual {v12, v3}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v3

    add-int/2addr v2, v3

    iput v2, v10, Landroid/text/util/LinkSpec;->start:I

    new-instance v2, Ljava/lang/StringBuilder;

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

    iget-object v3, v10, Landroid/text/util/LinkSpec;->url:Ljava/lang/String;

    iget-object v4, v10, Landroid/text/util/LinkSpec;->url:Ljava/lang/String;

    const-string/jumbo v5, "://"

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

    move-result v4

    add-int/lit8 v4, v4, 0x3

    const/4 v5, 0x0

    invoke-virtual {v3, v5, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v3

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

    move-result-object v2

    invoke-interface/range {p0 .. p0}, Landroid/text/Spannable;->toString()Ljava/lang/String;

    move-result-object v3

    iget v4, v10, Landroid/text/util/LinkSpec;->start:I

    iget v5, v10, Landroid/text/util/LinkSpec;->end:I

    invoke-virtual {v3, v4, v5}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v3

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

    move-result-object v2

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

    move-result-object v2

    iput-object v2, v10, Landroid/text/util/LinkSpec;->url:Ljava/lang/String;

    goto/16 :goto_3

    :cond_8
    const/4 v2, 0x1

    goto :goto_5

    :cond_9
    add-int/lit8 v8, v8, 0x1

    goto/16 :goto_4

    :cond_a
    move/from16 v0, p1

    and-int/lit16 v2, v0, 0x2000

    if-eqz v2, :cond_15

    sget-object v3, Landroid/util/Patterns;->WEB_URL_KR:Ljava/util/regex/Pattern;

    const/4 v2, 0x4

    new-array v4, v2, [Ljava/lang/String;

    const-string/jumbo v2, "http://"

    const/4 v5, 0x0

    aput-object v2, v4, v5

    const-string/jumbo v2, "https://"

    const/4 v5, 0x1

    aput-object v2, v4, v5

    const-string/jumbo v2, "rtsp://"

    const/4 v5, 0x2

    aput-object v2, v4, v5

    const-string/jumbo v2, "ftp://"

    const/4 v5, 0x3

    aput-object v2, v4, v5

    sget-object v5, Landroid/text/util/Linkify;->sUrlMatchFilter:Landroid/text/util/Linkify$MatchFilter;

    const/4 v6, 0x0

    move-object/from16 v2, p0

    invoke-static/range {v1 .. v6}, Landroid/text/util/Linkify;->gatherLinks(Ljava/util/ArrayList;Landroid/text/Spannable;Ljava/util/regex/Pattern;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)V

    const/4 v9, 0x0

    :cond_b
    :goto_6
    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v2

    if-ge v9, v2, :cond_15

    invoke-virtual {v1, v9}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Landroid/text/util/LinkSpec;

    invoke-interface/range {p0 .. p0}, Landroid/text/Spannable;->toString()Ljava/lang/String;

    move-result-object v2

    iget v3, v10, Landroid/text/util/LinkSpec;->start:I

    iget v4, v10, Landroid/text/util/LinkSpec;->end:I

    invoke-virtual {v2, v3, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v12

    const-string/jumbo v2, ".ht"

    invoke-virtual {v12, v2}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_f

    invoke-interface/range {p0 .. p0}, Landroid/text/Spannable;->length()I

    move-result v2

    iget v3, v10, Landroid/text/util/LinkSpec;->end:I

    add-int/lit8 v3, v3, 0x2

    if-lt v2, v3, :cond_f

    const-string/jumbo v2, "tp"

    invoke-interface/range {p0 .. p0}, Landroid/text/Spannable;->toString()Ljava/lang/String;

    move-result-object v3

    iget v4, v10, Landroid/text/util/LinkSpec;->end:I

    iget v5, v10, Landroid/text/util/LinkSpec;->end:I

    add-int/lit8 v5, v5, 0x2

    invoke-virtual {v3, v4, v5}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_f

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v2

    add-int/lit8 v3, v9, 0x1

    if-le v2, v3, :cond_e

    add-int/lit8 v2, v9, 0x1

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

    move-result-object v13

    check-cast v13, Landroid/text/util/LinkSpec;

    iget v2, v13, Landroid/text/util/LinkSpec;->start:I

    iget v3, v10, Landroid/text/util/LinkSpec;->end:I

    add-int/lit8 v3, v3, 0x5

    if-ne v2, v3, :cond_c

    invoke-interface/range {p0 .. p0}, Landroid/text/Spannable;->length()I

    move-result v2

    iget v3, v10, Landroid/text/util/LinkSpec;->end:I

    add-int/lit8 v3, v3, 0x5

    if-le v2, v3, :cond_c

    const-string/jumbo v2, "tp://"

    invoke-interface/range {p0 .. p0}, Landroid/text/Spannable;->toString()Ljava/lang/String;

    move-result-object v3

    iget v4, v10, Landroid/text/util/LinkSpec;->end:I

    iget v5, v10, Landroid/text/util/LinkSpec;->end:I

    add-int/lit8 v5, v5, 0x5

    invoke-virtual {v3, v4, v5}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_d

    :cond_c
    iget v2, v13, Landroid/text/util/LinkSpec;->start:I

    iget v3, v10, Landroid/text/util/LinkSpec;->end:I

    add-int/lit8 v3, v3, 0x6

    if-ne v2, v3, :cond_e

    invoke-interface/range {p0 .. p0}, Landroid/text/Spannable;->length()I

    move-result v2

    iget v3, v10, Landroid/text/util/LinkSpec;->end:I

    add-int/lit8 v3, v3, 0x6

    if-le v2, v3, :cond_e

    const-string/jumbo v2, "tps://"

    invoke-interface/range {p0 .. p0}, Landroid/text/Spannable;->toString()Ljava/lang/String;

    move-result-object v3

    iget v4, v10, Landroid/text/util/LinkSpec;->end:I

    iget v5, v10, Landroid/text/util/LinkSpec;->end:I

    add-int/lit8 v5, v5, 0x6

    invoke-virtual {v3, v4, v5}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_e

    :cond_d
    iget v2, v10, Landroid/text/util/LinkSpec;->end:I

    add-int/lit8 v2, v2, -0x2

    iput v2, v13, Landroid/text/util/LinkSpec;->start:I

    add-int/lit8 v2, v9, 0x1

    invoke-virtual {v1, v2, v13}, Ljava/util/ArrayList;->set(ILjava/lang/Object;)Ljava/lang/Object;

    :cond_e
    invoke-virtual {v1, v10}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z

    if-lez v9, :cond_b

    add-int/lit8 v9, v9, -0x1

    goto/16 :goto_6

    :cond_f
    const-string/jumbo v2, "www."

    invoke-virtual {v12, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_10

    const-string/jumbo v2, "www."

    invoke-virtual {v12, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_13

    const-string/jumbo v2, "http://"

    invoke-virtual {v12, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_13

    const-string/jumbo v2, "https://"

    invoke-virtual {v12, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_13

    const-string/jumbo v2, "rtsp://"

    invoke-virtual {v12, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_13

    const-string/jumbo v2, "ftp://"

    invoke-virtual {v12, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    :goto_7
    xor-int/lit8 v2, v2, 0x1

    if-eqz v2, :cond_10

    iget v2, v10, Landroid/text/util/LinkSpec;->start:I

    const-string/jumbo v3, "www."

    invoke-virtual {v12, v3}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v3

    add-int/2addr v2, v3

    iput v2, v10, Landroid/text/util/LinkSpec;->start:I

    new-instance v2, Ljava/lang/StringBuilder;

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

    iget-object v3, v10, Landroid/text/util/LinkSpec;->url:Ljava/lang/String;

    iget-object v4, v10, Landroid/text/util/LinkSpec;->url:Ljava/lang/String;

    const-string/jumbo v5, "://"

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

    move-result v4

    add-int/lit8 v4, v4, 0x3

    const/4 v5, 0x0

    invoke-virtual {v3, v5, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v3

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

    move-result-object v2

    invoke-interface/range {p0 .. p0}, Landroid/text/Spannable;->toString()Ljava/lang/String;

    move-result-object v3

    iget v4, v10, Landroid/text/util/LinkSpec;->start:I

    iget v5, v10, Landroid/text/util/LinkSpec;->end:I

    invoke-virtual {v3, v4, v5}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v3

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

    move-result-object v2

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

    move-result-object v2

    iput-object v2, v10, Landroid/text/util/LinkSpec;->url:Ljava/lang/String;

    :cond_10
    const-string/jumbo v2, "."

    invoke-virtual {v12, v2}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I

    move-result v15

    if-ltz v15, :cond_12

    invoke-virtual {v12}, Ljava/lang/String;->length()I

    move-result v2

    add-int/lit8 v2, v2, -0x1

    if-ge v15, v2, :cond_12

    add-int/lit8 v2, v15, 0x1

    invoke-virtual {v12, v2}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/String;->toCharArray()[C

    move-result-object v7

    const/4 v8, 0x0

    :goto_8
    array-length v2, v7

    if-ge v8, v2, :cond_11

    aget-char v2, v7, v8

    const/16 v3, 0x80

    if-lt v2, v3, :cond_14

    :cond_11
    array-length v2, v7

    if-ge v8, v2, :cond_12

    if-lez v8, :cond_12

    add-int/lit8 v2, v8, -0x1

    aget-char v2, v7, v2

    const/16 v3, 0x2f

    if-eq v2, v3, :cond_12

    iget v2, v10, Landroid/text/util/LinkSpec;->end:I

    array-length v3, v7

    sub-int/2addr v3, v8

    sub-int/2addr v2, v3

    iput v2, v10, Landroid/text/util/LinkSpec;->end:I

    iget-object v2, v10, Landroid/text/util/LinkSpec;->url:Ljava/lang/String;

    iget-object v3, v10, Landroid/text/util/LinkSpec;->url:Ljava/lang/String;

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v3

    array-length v4, v7

    sub-int/2addr v4, v8

    sub-int/2addr v3, v4

    const/4 v4, 0x0

    invoke-virtual {v2, v4, v3}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v2

    iput-object v2, v10, Landroid/text/util/LinkSpec;->url:Ljava/lang/String;

    :cond_12
    add-int/lit8 v9, v9, 0x1

    goto/16 :goto_6

    :cond_13
    const/4 v2, 0x1

    goto/16 :goto_7

    :cond_14
    add-int/lit8 v8, v8, 0x1

    goto :goto_8

    :cond_15
    and-int/lit8 v2, p1, 0x2

    if-eqz v2, :cond_16

    sget-object v3, Landroid/util/Patterns;->AUTOLINK_EMAIL_ADDRESS:Ljava/util/regex/Pattern;

    const/4 v2, 0x1

    new-array v4, v2, [Ljava/lang/String;

    const-string/jumbo v2, "mailto:"

    const/4 v5, 0x0

    aput-object v2, v4, v5

    const/4 v5, 0x0

    const/4 v6, 0x0

    move-object/from16 v2, p0

    invoke-static/range {v1 .. v6}, Landroid/text/util/Linkify;->gatherLinks(Ljava/util/ArrayList;Landroid/text/Spannable;Ljava/util/regex/Pattern;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)V

    :cond_16
    and-int/lit8 v2, p1, 0x4

    if-eqz v2, :cond_17

    move-object/from16 v0, p0

    invoke-static {v1, v0}, Landroid/text/util/Linkify;->gatherTelLinks(Ljava/util/ArrayList;Landroid/text/Spannable;)V

    :cond_17
    move/from16 v0, p1

    and-int/lit16 v2, v0, 0x4000

    if-eqz v2, :cond_18

    sget-object v3, Landroid/util/Patterns;->PHONE:Ljava/util/regex/Pattern;

    const/4 v2, 0x1

    new-array v4, v2, [Ljava/lang/String;

    const-string/jumbo v2, "tel:"

    const/4 v5, 0x0

    aput-object v2, v4, v5

    sget-object v5, Landroid/text/util/Linkify;->sPhoneNumberMatchFilter:Landroid/text/util/Linkify$MatchFilter;

    sget-object v6, Landroid/text/util/Linkify;->sPhoneNumberTransformFilter:Landroid/text/util/Linkify$TransformFilter;

    move-object/from16 v2, p0

    invoke-static/range {v1 .. v6}, Landroid/text/util/Linkify;->gatherLinks(Ljava/util/ArrayList;Landroid/text/Spannable;Ljava/util/regex/Pattern;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)V

    :cond_18
    const v2, 0x8000

    and-int v2, v2, p1

    if-eqz v2, :cond_19

    sget-object v3, Landroid/util/Patterns;->PHONE:Ljava/util/regex/Pattern;

    const/4 v2, 0x1

    new-array v4, v2, [Ljava/lang/String;

    const-string/jumbo v2, "tel:"

    const/4 v5, 0x0

    aput-object v2, v4, v5

    sget-object v5, Landroid/text/util/Linkify;->sPhoneNumberMatchFilterEX:Landroid/text/util/Linkify$MatchFilter;

    sget-object v6, Landroid/text/util/Linkify;->sPhoneNumberTransformFilter:Landroid/text/util/Linkify$TransformFilter;

    move-object/from16 v2, p0

    invoke-static/range {v1 .. v6}, Landroid/text/util/Linkify;->gatherLinks(Ljava/util/ArrayList;Landroid/text/Spannable;Ljava/util/regex/Pattern;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)V

    :cond_19
    and-int/lit8 v2, p1, 0x8

    if-eqz v2, :cond_1a

    move-object/from16 v0, p0

    invoke-static {v1, v0}, Landroid/text/util/Linkify;->gatherMapLinks(Ljava/util/ArrayList;Landroid/text/Spannable;)V

    :cond_1a
    invoke-static {v1}, Landroid/text/util/Linkify;->pruneOverlaps(Ljava/util/ArrayList;)V

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v2

    if-nez v2, :cond_1b

    const/4 v2, 0x0

    return v2

    :cond_1b
    invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;

    move-result-object v11

    :goto_9
    invoke-interface {v11}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_1c

    invoke-interface {v11}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v10

    check-cast v10, Landroid/text/util/LinkSpec;

    iget-object v2, v10, Landroid/text/util/LinkSpec;->url:Ljava/lang/String;

    iget v3, v10, Landroid/text/util/LinkSpec;->start:I

    iget v4, v10, Landroid/text/util/LinkSpec;->end:I

    move-object/from16 v0, p0

    invoke-static {v2, v3, v4, v0}, Landroid/text/util/Linkify;->applyLink(Ljava/lang/String;IILandroid/text/Spannable;)V

    goto :goto_9

    :cond_1c
    const/4 v2, 0x1

    return v2
.end method

.method public static final addLinks(Landroid/text/Spannable;Ljava/util/regex/Pattern;Ljava/lang/String;)Z
    .locals 6

    const/4 v3, 0x0

    move-object v0, p0

    move-object v1, p1

    move-object v2, p2

    move-object v4, v3

    move-object v5, v3

    invoke-static/range {v0 .. v5}, Landroid/text/util/Linkify;->addLinks(Landroid/text/Spannable;Ljava/util/regex/Pattern;Ljava/lang/String;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)Z

    move-result v0

    return v0
.end method

.method public static final addLinks(Landroid/text/Spannable;Ljava/util/regex/Pattern;Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)Z
    .locals 6

    const/4 v3, 0x0

    move-object v0, p0

    move-object v1, p1

    move-object v2, p2

    move-object v4, p3

    move-object v5, p4

    invoke-static/range {v0 .. v5}, Landroid/text/util/Linkify;->addLinks(Landroid/text/Spannable;Ljava/util/regex/Pattern;Ljava/lang/String;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)Z

    move-result v0

    return v0
.end method

.method public static final addLinks(Landroid/text/Spannable;Ljava/util/regex/Pattern;Ljava/lang/String;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)Z
    .locals 12

    if-nez p2, :cond_0

    const-string/jumbo p2, ""

    :cond_0
    if-eqz p3, :cond_1

    array-length v10, p3

    const/4 v11, 0x1

    if-ge v10, v11, :cond_2

    :cond_1
    sget-object p3, Llibcore/util/EmptyArray;->STRING:[Ljava/lang/String;

    :cond_2
    array-length v10, p3

    add-int/lit8 v10, v10, 0x1

    new-array v7, v10, [Ljava/lang/String;

    sget-object v10, Ljava/util/Locale;->ROOT:Ljava/util/Locale;

    invoke-virtual {p2, v10}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;

    move-result-object v10

    const/4 v11, 0x0

    aput-object v10, v7, v11

    const/4 v4, 0x0

    :goto_0
    array-length v10, p3

    if-ge v4, v10, :cond_4

    aget-object v6, p3, v4

    add-int/lit8 v11, v4, 0x1

    if-nez v6, :cond_3

    const-string/jumbo v10, ""

    :goto_1
    aput-object v10, v7, v11

    add-int/lit8 v4, v4, 0x1

    goto :goto_0

    :cond_3
    sget-object v10, Ljava/util/Locale;->ROOT:Ljava/util/Locale;

    invoke-virtual {v6, v10}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;

    move-result-object v10

    goto :goto_1

    :cond_4
    const/4 v3, 0x0

    invoke-virtual {p1, p0}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;

    move-result-object v5

    :cond_5
    :goto_2
    invoke-virtual {v5}, Ljava/util/regex/Matcher;->find()Z

    move-result v10

    if-eqz v10, :cond_7

    invoke-virtual {v5}, Ljava/util/regex/Matcher;->start()I

    move-result v8

    invoke-virtual {v5}, Ljava/util/regex/Matcher;->end()I

    move-result v2

    const/4 v1, 0x1

    if-eqz p4, :cond_6

    move-object/from16 v0, p4

    invoke-interface {v0, p0, v8, v2}, Landroid/text/util/Linkify$MatchFilter;->acceptMatch(Ljava/lang/CharSequence;II)Z

    move-result v1

    :cond_6
    if-eqz v1, :cond_5

    const/4 v10, 0x0

    invoke-virtual {v5, v10}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;

    move-result-object v10

    move-object/from16 v0, p5

    invoke-static {v10, v7, v5, v0}, Landroid/text/util/Linkify;->makeUrl(Ljava/lang/String;[Ljava/lang/String;Ljava/util/regex/Matcher;Landroid/text/util/Linkify$TransformFilter;)Ljava/lang/String;

    move-result-object v9

    invoke-static {v9, v8, v2, p0}, Landroid/text/util/Linkify;->applyLink(Ljava/lang/String;IILandroid/text/Spannable;)V

    const/4 v3, 0x1

    goto :goto_2

    :cond_7
    return v3
.end method

.method public static final addLinks(Landroid/widget/TextView;I)Z
    .locals 5

    const/4 v4, 0x1

    const/4 v3, 0x0

    if-nez p1, :cond_0

    return v3

    :cond_0
    invoke-virtual {p0}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;

    move-result-object v1

    instance-of v2, v1, Landroid/text/Spannable;

    if-eqz v2, :cond_2

    check-cast v1, Landroid/text/Spannable;

    invoke-static {v1, p1}, Landroid/text/util/Linkify;->addLinks(Landroid/text/Spannable;I)Z

    move-result v2

    if-eqz v2, :cond_1

    invoke-static {p0}, Landroid/text/util/Linkify;->addLinkMovementMethod(Landroid/widget/TextView;)V

    return v4

    :cond_1
    return v3

    :cond_2
    invoke-static {v1}, Landroid/text/SpannableString;->valueOf(Ljava/lang/CharSequence;)Landroid/text/SpannableString;

    move-result-object v0

    invoke-static {v0, p1}, Landroid/text/util/Linkify;->addLinks(Landroid/text/Spannable;I)Z

    move-result v2

    if-eqz v2, :cond_3

    invoke-static {p0}, Landroid/text/util/Linkify;->addLinkMovementMethod(Landroid/widget/TextView;)V

    invoke-virtual {p0, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    return v4

    :cond_3
    return v3
.end method

.method private static final applyLink(Ljava/lang/String;IILandroid/text/Spannable;)V
    .locals 2

    new-instance v0, Landroid/text/style/URLSpan;

    invoke-direct {v0, p0}, Landroid/text/style/URLSpan;-><init>(Ljava/lang/String;)V

    const/16 v1, 0x21

    invoke-interface {p3, v0, p1, p2, v1}, Landroid/text/Spannable;->setSpan(Ljava/lang/Object;III)V

    return-void
.end method

.method private static final gatherLinks(Ljava/util/ArrayList;Landroid/text/Spannable;Ljava/util/regex/Pattern;[Ljava/lang/String;Landroid/text/util/Linkify$MatchFilter;Landroid/text/util/Linkify$TransformFilter;)V
    .locals 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Landroid/text/util/LinkSpec;",
            ">;",
            "Landroid/text/Spannable;",
            "Ljava/util/regex/Pattern;",
            "[",
            "Ljava/lang/String;",
            "Landroid/text/util/Linkify$MatchFilter;",
            "Landroid/text/util/Linkify$TransformFilter;",
            ")V"
        }
    .end annotation

    invoke-virtual {p2, p1}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;

    move-result-object v1

    :cond_0
    :goto_0
    invoke-virtual {v1}, Ljava/util/regex/Matcher;->find()Z

    move-result v5

    if-eqz v5, :cond_2

    invoke-virtual {v1}, Ljava/util/regex/Matcher;->start()I

    move-result v3

    invoke-virtual {v1}, Ljava/util/regex/Matcher;->end()I

    move-result v0

    if-eqz p4, :cond_1

    invoke-interface {p4, p1, v3, v0}, Landroid/text/util/Linkify$MatchFilter;->acceptMatch(Ljava/lang/CharSequence;II)Z

    move-result v5

    if-eqz v5, :cond_0

    :cond_1
    new-instance v2, Landroid/text/util/LinkSpec;

    invoke-direct {v2}, Landroid/text/util/LinkSpec;-><init>()V

    const/4 v5, 0x0

    invoke-virtual {v1, v5}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;

    move-result-object v5

    invoke-static {v5, p3, v1, p5}, Landroid/text/util/Linkify;->makeUrl(Ljava/lang/String;[Ljava/lang/String;Ljava/util/regex/Matcher;Landroid/text/util/Linkify$TransformFilter;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v2, Landroid/text/util/LinkSpec;->url:Ljava/lang/String;

    iput v3, v2, Landroid/text/util/LinkSpec;->start:I

    iput v0, v2, Landroid/text/util/LinkSpec;->end:I

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

    goto :goto_0

    :cond_2
    return-void
.end method

.method private static final gatherMapLinks(Ljava/util/ArrayList;Landroid/text/Spannable;)V
    .locals 12
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Landroid/text/util/LinkSpec;",
            ">;",
            "Landroid/text/Spannable;",
            ")V"
        }
    .end annotation

    invoke-interface {p1}, Landroid/text/Spannable;->toString()Ljava/lang/String;

    move-result-object v9

    const/4 v1, 0x0

    :goto_0
    :try_start_0
    invoke-static {v9}, Landroid/webkit/WebView;->findAddress(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_0

    invoke-virtual {v9, v0}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v8

    if-gez v8, :cond_1

    :cond_0
    return-void

    :cond_1
    new-instance v7, Landroid/text/util/LinkSpec;

    invoke-direct {v7}, Landroid/text/util/LinkSpec;-><init>()V

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v6

    add-int v5, v8, v6

    add-int v10, v1, v8

    iput v10, v7, Landroid/text/util/LinkSpec;->start:I

    add-int v10, v1, v5

    iput v10, v7, Landroid/text/util/LinkSpec;->end:I

    invoke-virtual {v9, v5}, Ljava/lang/String;->substring(I)Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/UnsupportedOperationException; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v9

    add-int/2addr v1, v5

    const/4 v4, 0x0

    :try_start_1
    const-string/jumbo v10, "UTF-8"

    invoke-static {v0, v10}, Ljava/net/URLEncoder;->encode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    :try_end_1
    .catch Ljava/io/UnsupportedEncodingException; {:try_start_1 .. :try_end_1} :catch_1
    .catch Ljava/lang/UnsupportedOperationException; {:try_start_1 .. :try_end_1} :catch_0

    move-result-object v4

    :try_start_2
    new-instance v10, Ljava/lang/StringBuilder;

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

    const-string/jumbo v11, "geo:0,0?q="

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

    move-result-object v10

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

    move-result-object v10

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

    move-result-object v10

    iput-object v10, v7, Landroid/text/util/LinkSpec;->url:Ljava/lang/String;

    invoke-virtual {p0, v7}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
    :try_end_2
    .catch Ljava/lang/UnsupportedOperationException; {:try_start_2 .. :try_end_2} :catch_0

    goto :goto_0

    :catch_0
    move-exception v3

    return-void

    :catch_1
    move-exception v2

    goto :goto_0
.end method

.method private static final gatherTelLinks(Ljava/util/ArrayList;Landroid/text/Spannable;)V
    .locals 10
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Landroid/text/util/LinkSpec;",
            ">;",
            "Landroid/text/Spannable;",
            ")V"
        }
    .end annotation

    invoke-static {}, Lcom/android/i18n/phonenumbers/PhoneNumberUtil;->getInstance()Lcom/android/i18n/phonenumbers/PhoneNumberUtil;

    move-result-object v0

    invoke-interface {p1}, Landroid/text/Spannable;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;

    move-result-object v2

    invoke-virtual {v2}, Ljava/util/Locale;->getCountry()Ljava/lang/String;

    move-result-object v2

    sget-object v3, Lcom/android/i18n/phonenumbers/PhoneNumberUtil$Leniency;->POSSIBLE:Lcom/android/i18n/phonenumbers/PhoneNumberUtil$Leniency;

    const-wide v4, 0x7fffffffffffffffL

    invoke-virtual/range {v0 .. v5}, Lcom/android/i18n/phonenumbers/PhoneNumberUtil;->findNumbers(Ljava/lang/CharSequence;Ljava/lang/String;Lcom/android/i18n/phonenumbers/PhoneNumberUtil$Leniency;J)Ljava/lang/Iterable;

    move-result-object v8

    invoke-interface {v8}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;

    move-result-object v7

    :goto_0
    invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_0

    invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Lcom/android/i18n/phonenumbers/PhoneNumberMatch;

    new-instance v9, Landroid/text/util/LinkSpec;

    invoke-direct {v9}, Landroid/text/util/LinkSpec;-><init>()V

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string/jumbo v2, "tel:"

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

    move-result-object v1

    invoke-virtual {v6}, Lcom/android/i18n/phonenumbers/PhoneNumberMatch;->rawString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Landroid/telephony/PhoneNumberUtils;->normalizeNumber(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

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

    move-result-object v1

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

    move-result-object v1

    iput-object v1, v9, Landroid/text/util/LinkSpec;->url:Ljava/lang/String;

    invoke-virtual {v6}, Lcom/android/i18n/phonenumbers/PhoneNumberMatch;->start()I

    move-result v1

    iput v1, v9, Landroid/text/util/LinkSpec;->start:I

    invoke-virtual {v6}, Lcom/android/i18n/phonenumbers/PhoneNumberMatch;->end()I

    move-result v1

    iput v1, v9, Landroid/text/util/LinkSpec;->end:I

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

    goto :goto_0

    :cond_0
    return-void
.end method

.method private static final makeUrl(Ljava/lang/String;[Ljava/lang/String;Ljava/util/regex/Matcher;Landroid/text/util/Linkify$TransformFilter;)Ljava/lang/String;
    .locals 9

    const/4 v2, 0x0

    if-eqz p3, :cond_0

    invoke-interface {p3, p2, p0}, Landroid/text/util/Linkify$TransformFilter;->transformUrl(Ljava/util/regex/Matcher;Ljava/lang/String;)Ljava/lang/String;

    move-result-object p0

    :cond_0
    const/4 v7, 0x0

    const/4 v8, 0x0

    :goto_0
    array-length v0, p1

    if-ge v8, v0, :cond_1

    aget-object v3, p1, v8

    aget-object v0, p1, v8

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v5

    const/4 v1, 0x1

    move-object v0, p0

    move v4, v2

    invoke-virtual/range {v0 .. v5}, Ljava/lang/String;->regionMatches(ZILjava/lang/String;II)Z

    move-result v0

    if-eqz v0, :cond_3

    const/4 v7, 0x1

    aget-object v4, p1, v8

    aget-object v0, p1, v8

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v6

    move-object v1, p0

    move v3, v2

    move v5, v2

    invoke-virtual/range {v1 .. v6}, Ljava/lang/String;->regionMatches(ZILjava/lang/String;II)Z

    move-result v0

    if-nez v0, :cond_1

    new-instance v0, Ljava/lang/StringBuilder;

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

    aget-object v1, p1, v8

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

    move-result-object v0

    aget-object v1, p1, v8

    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v1

    invoke-virtual {p0, v1}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v1

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

    move-result-object v0

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

    move-result-object p0

    :cond_1
    if-nez v7, :cond_2

    array-length v0, p1

    if-lez v0, :cond_2

    new-instance v0, Ljava/lang/StringBuilder;

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

    aget-object v1, p1, v2

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

    move-result-object v0

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

    move-result-object v0

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

    move-result-object p0

    :cond_2
    return-object p0

    :cond_3
    add-int/lit8 v8, v8, 0x1

    goto :goto_0
.end method

.method private static final pruneOverlaps(Ljava/util/ArrayList;)V
    .locals 9
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Landroid/text/util/LinkSpec;",
            ">;)V"
        }
    .end annotation

    new-instance v2, Landroid/text/util/Linkify$5;

    invoke-direct {v2}, Landroid/text/util/Linkify$5;-><init>()V

    invoke-static {p0, v2}, Ljava/util/Collections;->sort(Ljava/util/List;Ljava/util/Comparator;)V

    invoke-virtual {p0}, Ljava/util/ArrayList;->size()I

    move-result v4

    const/4 v3, 0x0

    :goto_0
    add-int/lit8 v6, v4, -0x1

    if-ge v3, v6, :cond_4

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

    move-result-object v0

    check-cast v0, Landroid/text/util/LinkSpec;

    add-int/lit8 v6, v3, 0x1

    invoke-virtual {p0, v6}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/text/util/LinkSpec;

    const/4 v5, -0x1

    iget v6, v0, Landroid/text/util/LinkSpec;->start:I

    iget v7, v1, Landroid/text/util/LinkSpec;->start:I

    if-gt v6, v7, :cond_3

    iget v6, v0, Landroid/text/util/LinkSpec;->end:I

    iget v7, v1, Landroid/text/util/LinkSpec;->start:I

    if-le v6, v7, :cond_3

    iget v6, v1, Landroid/text/util/LinkSpec;->end:I

    iget v7, v0, Landroid/text/util/LinkSpec;->end:I

    if-gt v6, v7, :cond_1

    add-int/lit8 v5, v3, 0x1

    :cond_0
    :goto_1
    const/4 v6, -0x1

    if-eq v5, v6, :cond_3

    invoke-virtual {p0, v5}, Ljava/util/ArrayList;->remove(I)Ljava/lang/Object;

    add-int/lit8 v4, v4, -0x1

    goto :goto_0

    :cond_1
    iget v6, v0, Landroid/text/util/LinkSpec;->end:I

    iget v7, v0, Landroid/text/util/LinkSpec;->start:I

    sub-int/2addr v6, v7

    iget v7, v1, Landroid/text/util/LinkSpec;->end:I

    iget v8, v1, Landroid/text/util/LinkSpec;->start:I

    sub-int/2addr v7, v8

    if-le v6, v7, :cond_2

    add-int/lit8 v5, v3, 0x1

    goto :goto_1

    :cond_2
    iget v6, v0, Landroid/text/util/LinkSpec;->end:I

    iget v7, v0, Landroid/text/util/LinkSpec;->start:I

    sub-int/2addr v6, v7

    iget v7, v1, Landroid/text/util/LinkSpec;->end:I

    iget v8, v1, Landroid/text/util/LinkSpec;->start:I

    sub-int/2addr v7, v8

    if-ge v6, v7, :cond_0

    move v5, v3

    goto :goto_1

    :cond_3
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    :cond_4
    return-void
.end method


text:
// <copyright file="ColorSpaceConverter.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>

namespace ImageSharp.ColorSpaces.Conversion
{
    using ImageSharp.ColorSpaces.Conversion.Implementation.CieXyy;

    /// <content>
    /// Allows conversion to <see cref="CieXyy"/>.
    /// </content>
    internal partial class ColorSpaceConverter
    {
        private static readonly CieXyzAndCieXyyConverter CieXyzAndCieXyyConverter = new CieXyzAndCieXyyConverter();

        /// <summary>
        /// Converts a <see cref="CieLab"/> into a <see cref="CieXyy"/>
        /// </summary>
        /// <param name="color">The color to convert.</param>
        /// <returns>The <see cref="CieXyy"/></returns>
        public CieXyy ToCieXyy(CieLab color)
        {
            Guard.NotNull(color, nameof(color));

            var xyzColor = this.ToCieXyz(color);

            return this.ToCieXyy(xyzColor);
        }

        /// <summary>
        /// Converts a <see cref="CieLch"/> into a <see cref="CieXyy"/>
        /// </summary>
        /// <param name="color">The color to convert.</param>
        /// <returns>The <see cref="CieXyy"/></returns>
        public CieXyy ToCieXyy(CieLch color)
        {
            Guard.NotNull(color, nameof(color));

            var xyzColor = this.ToCieXyz(color);

            return this.ToCieXyy(xyzColor);
        }

        /// <summary>
        /// Converts a <see cref="CieLchuv"/> into a <see cref="CieXyy"/>
        /// </summary>
        /// <param name="color">The color to convert.</param>
        /// <returns>The <see cref="CieXyy"/></returns>
        public CieXyy ToCieXyy(CieLchuv color)
        {
            Guard.NotNull(color, nameof(color));

            var xyzColor = this.ToCieXyz(color);

            return this.ToCieXyy(xyzColor);
        }

        /// <summary>
        /// Converts a <see cref="CieLuv"/> into a <see cref="CieXyy"/>
        /// </summary>
        /// <param name="color">The color to convert.</param>
        /// <returns>The <see cref="CieXyy"/></returns>
        public CieXyy ToCieXyy(CieLuv color)
        {
            Guard.NotNull(color, nameof(color));

            var xyzColor = this.ToCieXyz(color);

            return this.ToCieXyy(xyzColor);
        }

        /// <summary>
        /// Converts a <see cref="CieXyz"/> into a <see cref="CieXyy"/>
        /// </summary>
        /// <param name="color">The color to convert.</param>
        /// <returns>The <see cref="CieXyy"/></returns>
        public CieXyy ToCieXyy(CieXyz color)
        {
            Guard.NotNull(color, nameof(color));

            return CieXyzAndCieXyyConverter.Convert(color);
        }

        /// <summary>
        /// Converts a <see cref="Cmyk"/> into a <see cref="CieXyy"/>
        /// </summary>
        /// <param name="color">The color to convert.</param>
        /// <returns>The <see cref="CieXyy"/></returns>
        public CieXyy ToCieXyy(Cmyk color)
        {
            Guard.NotNull(color, nameof(color));

            var xyzColor = this.ToCieXyz(color);

            return this.ToCieXyy(xyzColor);
        }

        /// <summary>
        /// Converts a <see cref="Hsl"/> into a <see cref="CieXyy"/>
        /// </summary>
        /// <param name="color">The color to convert.</param>
        /// <returns>The <see cref="CieXyy"/></returns>
        public CieXyy ToCieXyy(Hsl color)
        {
            Guard.NotNull(color, nameof(color));

            var xyzColor = this.ToCieXyz(color);

            return this.ToCieXyy(xyzColor);
        }

        /// <summary>
        /// Converts a <see cref="Hsv"/> into a <see cref="CieXyy"/>
        /// </summary>
        /// <param name="color">The color to convert.</param>
        /// <returns>The <see cref="CieXyy"/></returns>
        public CieXyy ToCieXyy(Hsv color)
        {
            Guard.NotNull(color, nameof(color));

            var xyzColor = this.ToCieXyz(color);

            return this.ToCieXyy(xyzColor);
        }

        /// <summary>
        /// Converts a <see cref="HunterLab"/> into a <see cref="CieXyy"/>
        /// </summary>
        /// <param name="color">The color to convert.</param>
        /// <returns>The <see cref="CieXyy"/></returns>
        public CieXyy ToCieXyy(HunterLab color)
        {
            Guard.NotNull(color, nameof(color));

            var xyzColor = this.ToCieXyz(color);

            return this.ToCieXyy(xyzColor);
        }

        /// <summary>
        /// Converts a <see cref="LinearRgb"/> into a <see cref="CieXyy"/>
        /// </summary>
        /// <param name="color">The color to convert.</param>
        /// <returns>The <see cref="CieXyy"/></returns>
        public CieXyy ToCieXyy(LinearRgb color)
        {
            Guard.NotNull(color, nameof(color));

            var xyzColor = this.ToCieXyz(color);

            return this.ToCieXyy(xyzColor);
        }

        /// <summary>
        /// Converts a <see cref="Lms"/> into a <see cref="CieXyy"/>
        /// </summary>
        /// <param name="color">The color to convert.</param>
        /// <returns>The <see cref="CieXyy"/></returns>
        public CieXyy ToCieXyy(Lms color)
        {
            Guard.NotNull(color, nameof(color));

            var xyzColor = this.ToCieXyz(color);

            return this.ToCieXyy(xyzColor);
        }

        /// <summary>
        /// Converts a <see cref="Rgb"/> into a <see cref="CieXyy"/>
        /// </summary>
        /// <param name="color">The color to convert.</param>
        /// <returns>The <see cref="CieXyy"/></returns>
        public CieXyy ToCieXyy(Rgb color)
        {
            Guard.NotNull(color, nameof(color));

            var xyzColor = this.ToCieXyz(color);

            return this.ToCieXyy(xyzColor);
        }

        /// <summary>
        /// Converts a <see cref="YCbCr"/> into a <see cref="CieXyy"/>
        /// </summary>
        /// <param name="color">The color to convert.</param>
        /// <returns>The <see cref="CieXyy"/></returns>
        public CieXyy ToCieXyy(YCbCr color)
        {
            Guard.NotNull(color, nameof(color));

            var xyzColor = this.ToCieXyz(color);

            return this.ToCieXyy(xyzColor);
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
package ua.com.fielden.platform.sample.domain;

import ua.com.fielden.platform.entity.meta.IAfterChangeEventHandler;
import ua.com.fielden.platform.entity.meta.MetaProperty;

public class TgDefinersExecutorCollectionalChildHandler implements IAfterChangeEventHandler<String> {

    @Override
    public void handle(final MetaProperty<String> property, final String entityPropertyValue) {
        System.out.println("handle [" + property + "] in type [" + property.getEntity().getClass().getSimpleName() + "] for value " + entityPropertyValue);

        final TgDefinersExecutorCollectionalChild child = (TgDefinersExecutorCollectionalChild) property.getEntity();
        final TgDefinersExecutorParent parent = child.getMember1();
        final TgDefinersExecutorCompositeKeyMember grandParent = parent.getKeyMember1();
        grandParent.addHandledProperty("member1.keyMember1", property.getName() + "[" + child + "]");
    }

}


text:
class DLLIMPEXP AsdkPie : public AcDbCircle {

private:
	CString mTitle ;
	AcDbHardPointerId mTitleTextStyleId ;
	double mTitleTextSize ;
	AcGePoint2d mTitlePosition ;
	bool mbClockwise ;
	double mStartAngle ;
	bool mbAllExploded ;
	double mExplodedOffset ;
	AcArray<AsdkPieSector *> mpSectors ;

public:
	ACRX_DECLARE_MEMBERS(AsdkPie) ;

protected:
	static Adesk::UInt32 kCurrentVersionNumber ;

public:
	AsdkPie () ;
	virtual ~AsdkPie () ;

	//----- AcDbObject protocols
	//- Dwg Filing protocol
	virtual Acad::ErrorStatus dwgOutFields (AcDbDwgFiler *pFiler) const ;
	virtual Acad::ErrorStatus dwgInFields (AcDbDwgFiler *pFiler) ;

	//- SubXXX() methods (self notification)
	virtual Acad::ErrorStatus subOpen (AcDb::OpenMode mode) ;
	virtual Acad::ErrorStatus subErase (Adesk::Boolean erasing) ;
	virtual Acad::ErrorStatus subCancel () ;
	virtual Acad::ErrorStatus subClose () ;
	virtual void subSetDatabaseDefaults (AcDbDatabase *pDb) ;

	//----- deepClone / wblockClone
	virtual Acad::ErrorStatus subDeepClone (AcDbObject *pOwnerObject, AcDbObject *&pClonedObject, AcDbIdMapping &idMap, Adesk::Boolean isPrimary =true) const ;
	virtual Acad::ErrorStatus subWblockClone (AcRxObject *pOwnerObject, AcDbObject *&pClonedObject, AcDbIdMapping &idMap, Adesk::Boolean isPrimary =true) const ;

	//- Automation support
	virtual Acad::ErrorStatus subGetClassID (CLSID *pClsid) const ;

	//----- AcDbEntity protocols
	//- Graphics protocol
	void CalculateSectorsPoints () ;
	//virtual void viewportDraw (AcGiViewportDraw *mode) ;
	virtual Adesk::Boolean subWorldDraw (AcGiWorldDraw *mode) ;

	//- Osnap points protocol
	//virtual Acad::ErrorStatus subGetOsnapPoints (
	//	AcDb::OsnapMode osnapMode,
	//	int gsSelectionMark,
	//	const AcGePoint3d &pickPoint,
	//	const AcGePoint3d &lastPoint,
	//	const AcGeMatrix3d &viewXform,
	//	AcGePoint3dArray &snapPoints,
	//	AcDbIntArray &geomIds) const ;
	virtual Acad::ErrorStatus subGetOsnapPoints (
		AcDb::OsnapMode osnapMode,
		int gsSelectionMark,
		const AcGePoint3d &pickPoint,
		const AcGePoint3d &lastPoint,
		const AcGeMatrix3d& viewXform,
		AcGePoint3dArray &snapPoints,
		AcDbIntArray &geomIds) const ;
	//virtual Acad::ErrorStatus subGetOsnapPoints (
	//	AcDb::OsnapMode osnapMode,
	//	int gsSelectionMark,
	//	const AcGePoint3d &pickPoint,
	//	const AcGePoint3d &lastPoint,
	//	const AcGeMatrix3d &viewXform,
	//	AcGePoint3dArray &snapPoints,
	//	AcDbIntArray &geomIds,
	//	const AcGeMatrix3d &insertionMat) const ;
	virtual Acad::ErrorStatus subGetOsnapPoints (
		AcDb::OsnapMode osnapMode,
		int gsSelectionMark,
		const AcGePoint3d &pickPoint,
		const AcGePoint3d &lastPoint,
		const AcGeMatrix3d &viewXform,
		AcGePoint3dArray &snapPoints,
		AcDbIntArray &geomIds,
		const AcGeMatrix3d &insertionMat) const ;

	//- Grip points protocol
	virtual Acad::ErrorStatus subGetGripPoints (AcGePoint3dArray &gripPoints, AcDbIntArray &osnapModes, AcDbIntArray &geomIds) const ;
	virtual Acad::ErrorStatus subMoveGripPointsAt (const AcDbIntArray &indices, const AcGeVector3d &offset) ;
	virtual Acad::ErrorStatus subGetGripPoints (
		AcDbGripDataPtrArray &grips, const double curViewUnitSize, const int gripSize,
		const AcGeVector3d &curViewDir, const int bitflags) const ;
	virtual Acad::ErrorStatus subMoveGripPointsAt (const AcDbVoidPtrArray &gripAppData, const AcGeVector3d &offset, const int bitflags) ;

	//- Data access
	AsdkPieSector *AppendData (
		double value,
		AsdkPieSector::AsdkPieSectorNumberType numberType =AsdkPieSector::kPercentage,
		bool bExploded =false, bool bVisible =true
	) ;

	LPCTSTR get_Title () const ;
	void put_Title (LPCTSTR title) ;
	AcDbObjectId get_TitleTextStyleId () const ;
	void put_TitleTextStyleId (AcDbObjectId id) ;
	double get_TitleTextSize () const ;
	void put_TitleTextSize (double titleTextSize) ;
	AcGePoint2d get_TitlePosition () const ;
	void put_TitlePosition (AcGePoint2d position) ;
	double get_StartAngle () const ;
	void put_StartAngle (double startAngle) ;
	bool isClockwise () const ;
	void put_Clockwise (bool bClockwise) ;
	bool isAllExploded () const ;
	void put_AllExploded (bool bExploded) ;
	double get_ExplodedOffset () const ;
	void put_ExplodedOffset (double explodedOffset) ;
	int get_SectorCount () const ;
	AsdkPieSector *get_Sector (int index) ;

} ;

//-----------------------------------------------------------------------------
#ifdef DEEPPROPINSPECTOR_MODULE
ACDB_REGISTER_OBJECT_ENTRY_AUTO(AsdkPie)
#endif


text:
using namespace satsolver;

void DpllTests::testBasicUsage() {
		  Clause *c1=new Clause(3, {1, 2, 3}), *c2=new Clause(3, {-1, 2, 3}),
		         *c3=new Clause(3, {1, -2, 3}), *c4=new Clause(3, {-1, -2, 3}),
		         *c5=new Clause(3, {1, 2, -3}), *c6=new Clause(3, {-1, 2, -3}),
		         *c7=new Clause(3, {1, -2, -3}), *c8=new Clause(3, {-1, -2, -3});
		  std::vector<std::shared_ptr<Clause>> clauses;
		  std::vector<std::shared_ptr<Clause>> clauses2 ;
          std::shared_ptr<Formula> f;
		  Affectation *solution;
		  clauses.push_back(std::shared_ptr<Clause>(c1));
		  clauses.push_back(std::shared_ptr<Clause>(c2));
		  clauses.push_back(std::shared_ptr<Clause>(c3));
		  clauses.push_back(std::shared_ptr<Clause>(c4));
		  clauses.push_back(std::shared_ptr<Clause>(c5));
		  clauses.push_back(std::shared_ptr<Clause>(c6));
		  clauses.push_back(std::shared_ptr<Clause>(c8));
		  clauses2.push_back(std::shared_ptr<Clause>(new Clause(*c1)));
		  clauses2.push_back(std::shared_ptr<Clause>(new Clause(*c2)));
		  clauses2.push_back(std::shared_ptr<Clause>(new Clause(*c3)));
		  clauses2.push_back(std::shared_ptr<Clause>(new Clause(*c4)));
		  clauses2.push_back(std::shared_ptr<Clause>(new Clause(*c5)));
		  clauses2.push_back(std::shared_ptr<Clause>(new Clause(*c6)));
		  clauses2.push_back(std::shared_ptr<Clause>(c7));
		  clauses2.push_back(std::shared_ptr<Clause>(new Clause(*c8)));
		  f = std::make_shared<Formula>(clauses, 3);
		  solution = solve(f);
		  CPPUNIT_ASSERT(solution->is_false(1));
		  CPPUNIT_ASSERT(solution->is_true(2));
		  CPPUNIT_ASSERT(solution->is_true(3));
		  f = std::make_shared<Formula>(clauses2, 3);
		  CPPUNIT_ASSERT_THROW(solve(f), Conflict);
}
void DpllTests::testBasicUsageWithWL() {
    WITH_WL = true;
    DpllTests::testBasicUsage();
    WITH_WL = false;
}
void DpllTests::testBasicUsageWithCL() {
    WITH_CL = true;
    DpllTests::testBasicUsage();
    WITH_CL = false;
}
void DpllTests::testBasicUsageWithWLWithCL() {
    WITH_WL = true;
    WITH_CL = true;
    DpllTests::testBasicUsage();
    WITH_WL = false;
    WITH_CL = false;
}

void DpllTests::testSmallConflict() {
    Clause *c1 = new Clause(1, {1}), *c2 = new Clause(1, {-1});
    std::vector<std::shared_ptr<Clause>> clauses;
    clauses.push_back(std::shared_ptr<Clause>(c1));
    clauses.push_back(std::shared_ptr<Clause>(c2));
    CPPUNIT_ASSERT_THROW(Formula(clauses, 3), Conflict) ;
}
void DpllTests::testSmallConflictWithWL() {
    WITH_WL = true;
    DpllTests::testSmallConflict();
    WITH_WL = false;
}
void DpllTests::testSmallConflictWithCL() {
    WITH_CL = true;
    DpllTests::testSmallConflict();
    WITH_CL = false;
}
void DpllTests::testSmallConflictWithWLWithCL() {
    WITH_WL = true;
    WITH_CL = true;
    DpllTests::testSmallConflict();
    WITH_CL = false;
    WITH_WL = false;
}

void DpllTests::testRAND() {
	HEURISTIC = RANDOM ;
	DpllTests::testBasicUsage();
	DpllTests::testBasicUsageWithWL();
	HEURISTIC = DUMB ;
}

void DpllTests::testMOMS() {
	HEURISTIC = MOMS ;
	DpllTests::testBasicUsage();
	DpllTests::testBasicUsageWithWL();
	HEURISTIC = DUMB ;
}

void DpllTests::testDLIS() {
	HEURISTIC = DLIS ;
	DpllTests::testBasicUsage();
	DpllTests::testBasicUsageWithWL();
	HEURISTIC = DUMB ;
}

CppUnit::Test* DpllTests::suite() {
    CppUnit::TestSuite *suite = new CppUnit::TestSuite("DpllTests");
    suite->addTest(new CppUnit::TestCaller<DpllTests>("DpllTests_testBasicUsageWithoutWLWithoutCL",
                &DpllTests::testBasicUsage));
    suite->addTest(new CppUnit::TestCaller<DpllTests>("DpllTests_testBasicUsageWithWLWithoutCL",
                &DpllTests::testBasicUsageWithWL));
    suite->addTest(new CppUnit::TestCaller<DpllTests>("DpllTests_testBasicUsageWithoutWLWithCL",
                &DpllTests::testBasicUsageWithCL));
    suite->addTest(new CppUnit::TestCaller<DpllTests>("DpllTests_testBasicUsageWithWLWithCL",
                &DpllTests::testBasicUsageWithWLWithCL));
    suite->addTest(new CppUnit::TestCaller<DpllTests>("DpllTests_testSmallConflictWithoutWLWithoutCL",
                &DpllTests::testSmallConflict));
    suite->addTest(new CppUnit::TestCaller<DpllTests>("DpllTests_testSmallConflictWithWLWithoutCL",
                &DpllTests::testSmallConflictWithWL));
    suite->addTest(new CppUnit::TestCaller<DpllTests>("DpllTests_testSmallConflictWithoutWLWithCL",
                &DpllTests::testSmallConflictWithCL));
    suite->addTest(new CppUnit::TestCaller<DpllTests>("DpllTests_testSmallConflictWithWLWithCL",
                &DpllTests::testSmallConflictWithWLWithCL));
    suite->addTest(new CppUnit::TestCaller<DpllTests>("DpllTests_testRAND",
                &DpllTests::testRAND));
    suite->addTest(new CppUnit::TestCaller<DpllTests>("DpllTests_testMOMS",
                &DpllTests::testMOMS));
    suite->addTest(new CppUnit::TestCaller<DpllTests>("DpllTests_testDLIS",
                &DpllTests::testDLIS));
    return suite;
}


text:
using System.Collections.Generic;
using System.Linq;

namespace NuGet.VisualStudio
{
    /// <summary>
    /// Represents a package repository that implements a dependency provider.
    /// </summary>
    public class FallbackRepository : IPackageRepository, IDependencyResolver, ISearchableRepository, IFindPackagesRepository
    {
        private readonly IPackageRepository _primaryRepository;
        private readonly IPackageRepository _dependencyResolver;

        public FallbackRepository(IPackageRepository primaryRepository, IPackageRepository dependencyResolver)
        {
            _primaryRepository = primaryRepository;
            _dependencyResolver = dependencyResolver;
        }

        public string Source
        {
            get { return _primaryRepository.Source; }
        }

        public bool SupportsPrereleasePackages
        {
            get
            {
                return _primaryRepository.SupportsPrereleasePackages;
            }
        }

        internal IPackageRepository SourceRepository
        {
            get { return _primaryRepository; }
        }

        internal IPackageRepository DependencyResolver
        {
            get { return _dependencyResolver; }
        }

        public IQueryable<IPackage> GetPackages()
        {
            return _primaryRepository.GetPackages();
        }

        public void AddPackage(IPackage package)
        {
            _primaryRepository.AddPackage(package);
        }

        public void RemovePackage(IPackage package)
        {
            _primaryRepository.RemovePackage(package);
        }

        public IPackage ResolveDependency(PackageDependency dependency, IPackageConstraintProvider constraintProvider, bool allowPrereleaseVersions, bool preferListedPackages)
        {
            // Use the primary repository to look up dependencies. Fallback to the aggregate repository only if we can't find a package here.
            return _primaryRepository.ResolveDependency(dependency, constraintProvider, allowPrereleaseVersions, preferListedPackages) ??
                   _dependencyResolver.ResolveDependency(dependency, constraintProvider, allowPrereleaseVersions, preferListedPackages);
        }

        public IQueryable<IPackage> Search(string searchTerm, IEnumerable<string> targetFrameworks, bool allowPrereleaseVersions)
        {
            return _primaryRepository.Search(searchTerm, targetFrameworks, allowPrereleaseVersions);
        }

        public IEnumerable<IPackage> FindPackagesById(string packageId)
        {
            return _primaryRepository.FindPackagesById(packageId);
        }
    }
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <title>Reference</title>
    <link rel="stylesheet" href="../luadoc.css" type="text/css" />

<big></big>

LuaDoc

Index

Modules

		luci.dispatcher

		luci.http.protocol

luci.http.protocol.conditionals

		luci.http.protocol.date

		luci.http.protocol.mime

		luci.i18n

		luci.ip

		luci.ip.cidr

		luci.jsonc

		luci.jsonc.parser

		luci.sys.init

		luci.sys.iptparser

		luci.sys.net

		luci.sys.process

		luci.sys.user

		luci.sys.wifi

		nixio

		nixio.CHANGELOG

		nixio.CryptoHash

		nixio.File

		nixio.README

		nixio.Socket

		nixio.TLSContext

		nixio.TLSSocket

		nixio.UnifiedIO

		nixio.bin

		nixio.bit

		nixio.crypto

		nixio.fs

Class luci.http.protocol.conditionals

Functions

	if_match (req, stat)

14.24 / If-Match

Test whether the given message object contains an "If-Match" header and
compare it against the given stat object.

	if_modified_since (req, stat)

14.25 / If-Modified-Since

Test whether the given message object contains an "If-Modified-Since" header
and compare it against the given stat object.

	if_none_match (req, stat)

14.26 / If-None-Match

Test whether the given message object contains an "If-None-Match" header and
compare it against the given stat object.

	if_range (req, stat)

14.27 / If-Range

The If-Range header is currently not implemented due to the lack of general
byte range stuff in luci.http.protocol .

	if_unmodified_since (req, stat)

14.28 / If-Unmodified-Since

Test whether the given message object contains an "If-Unmodified-Since"
header and compare it against the given stat object.

	mk_etag (stat)

Implement 14.19 / ETag.

Functions

if_match (req, stat)

14.24 / If-Match

Test whether the given message object contains an "If-Match" header and
compare it against the given stat object.

Parameters

	  req: HTTP request message object

	  stat: A file.stat object

Return values:

Boolean indicating whether the precondition is ok

Alternative status code if the precondition failed

if_modified_since (req, stat)

14.25 / If-Modified-Since

Test whether the given message object contains an "If-Modified-Since" header
and compare it against the given stat object.

Parameters

	  req: HTTP request message object

	  stat: A file.stat object

Return values:

Boolean indicating whether the precondition is ok

Alternative status code if the precondition failed

Table containing extra HTTP headers if the precondition failed

if_none_match (req, stat)

14.26 / If-None-Match

Test whether the given message object contains an "If-None-Match" header and
compare it against the given stat object.

Parameters

	  req: HTTP request message object

	  stat: A file.stat object

Return values:

Boolean indicating whether the precondition is ok

Alternative status code if the precondition failed

Table containing extra HTTP headers if the precondition failed

if_range (req, stat)

14.27 / If-Range

The If-Range header is currently not implemented due to the lack of general
byte range stuff in luci.http.protocol . This function will always return
false, 412 to indicate a failed precondition.

Parameters

	  req: HTTP request message object

	  stat: A file.stat object

Return values:

Boolean indicating whether the precondition is ok

Alternative status code if the precondition failed

if_unmodified_since (req, stat)

14.28 / If-Unmodified-Since

Test whether the given message object contains an "If-Unmodified-Since"
header and compare it against the given stat object.

Parameters

	  req: HTTP request message object

	  stat: A file.stat object

Return values:

Boolean indicating whether the precondition is ok

Alternative status code if the precondition failed

mk_etag (stat)

Implement 14.19 / ETag.

Parameters

	  stat: A file.stat structure

Return value:

String containing the generated tag suitable for ETag headers


text:
{{album.albumartist}} - {{album.title}} ({{album.year}})

                <button class="btn btn-default"  ng-click='PlayerService.addAlbum(album.tracks);'>Add to playlist</button>

                        Songs

                            {{track.track}}. {{track.title}}


text:
package nu.validator.io;

import java.io.IOException;
import java.io.InputStream;

/**
 * @version $Id$
 * @author hsivonen
 */
public class ObservableInputStream extends InputStream {

    private StreamObserver observer;

    private InputStream delegate;

    /**
     *
     */
    public ObservableInputStream(InputStream delegate, StreamObserver obs) {
        this.delegate = delegate;
        this.observer = obs;
    }

    /**
     * @see java.io.InputStream#available()
     */
    @Override
    public int available() throws IOException {
        try {
            return delegate.available();
        } catch (IOException | RuntimeException e) {
            observer.exceptionOccurred(e);
            throw new RuntimeException("The observer failed to throw per API contract.");
        }
    }

    /**
     * @see java.io.InputStream#close()
     */
    @Override
    public void close() throws IOException {
        try {
            observer.closeCalled();
            delegate.close();
        } catch (IOException | RuntimeException e) {
            observer.exceptionOccurred(e);
            throw new RuntimeException("The observer failed to throw per API contract.");
        }
    }

    /**
     * @see java.io.InputStream#mark(int)
     */
    @Override
    public void mark(int arg0) {
        try {
            delegate.mark(arg0);
        } catch (RuntimeException e) {
            try {
                observer.exceptionOccurred(e);
            } catch (IOException e1) {
                throw new RuntimeException("The observer threw against the  API contract.", e1);
            }
            throw new RuntimeException("The observer failed to throw per API contract.");
        }
    }

    /**
     * @see java.io.InputStream#markSupported()
     */
    @Override
    public boolean markSupported() {
        try {
            return delegate.markSupported();
        } catch (RuntimeException e) {
            try {
                observer.exceptionOccurred(e);
            } catch (IOException e1) {
                throw new RuntimeException("The observer threw against the  API contract.", e1);
            }
            throw new RuntimeException("The observer failed to throw per API contract.");
        }
    }

    /**
     * @return
     * @throws java.io.IOException
     */
    @Override
    public int read() throws IOException {
        try {
            return delegate.read();
        } catch (IOException | RuntimeException e) {
            observer.exceptionOccurred(e);
            throw new RuntimeException("The observer failed to throw per API contract.");
        }
    }

    /**
     * @see java.io.InputStream#read(byte[])
     */
    @Override
    public int read(byte[] arg0) throws IOException {
        try {
            return delegate.read(arg0);
        } catch (IOException | RuntimeException e) {
            observer.exceptionOccurred(e);
            throw new RuntimeException("The observer failed to throw per API contract.");
        }
    }

    /**
     * @see java.io.InputStream#read(byte[], int, int)
     */
    @Override
    public int read(byte[] arg0, int arg1, int arg2) throws IOException {
        try {
            return delegate.read(arg0, arg1, arg2);
        } catch (IOException | RuntimeException e) {
            if ("Corrupt GZIP trailer".equals(e.getMessage())) {
                return -1;
            } else {
                observer.exceptionOccurred(e);
                throw new RuntimeException("The observer failed to throw per API contract.");
            }
        }
    }

    /**
     * @see java.io.InputStream#reset()
     */
    @Override
    public void reset() throws IOException {
        try {
            delegate.reset();
        } catch (IOException | RuntimeException e) {
            observer.exceptionOccurred(e);
            throw new RuntimeException("The observer failed to throw per API contract.");
        }
    }

    /**
     * @see java.io.InputStream#skip(long)
     */
    @Override
    public long skip(long arg0) throws IOException {
        try {
            return delegate.skip(arg0);
        } catch (IOException | RuntimeException e) {
            observer.exceptionOccurred(e);
            throw new RuntimeException("The observer failed to throw per API contract.");
        }
    }

    /**
     * @see java.lang.Object#finalize()
     */
    @SuppressWarnings("deprecation")
    @Override
    protected void finalize() throws Throwable {
        observer.finalizerCalled();
        super.finalize();
    }
}


text:
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Comments for page "Arrancar Village"</title>
		<link>http://bvs.wikidot.com/forum/t-65817/arrancar-village</link>
		<description>Posts in the discussion thread "Arrancar Village"</description>
				<copyright></copyright>
		<lastBuildDate>Sun, 10 Jul 2022 04:19:16 +0000</lastBuildDate>

				</channel>
</rss>


text:
package validation

import (
	"kpt.dev/configsync/pkg/api/configmanagement/v1/repo"
	"kpt.dev/configsync/pkg/status"
	"sigs.k8s.io/controller-runtime/pkg/client"
)

// IncorrectTopLevelDirectoryErrorCode is the error code for IllegalKindInClusterError
const IncorrectTopLevelDirectoryErrorCode = "1039"

var incorrectTopLevelDirectoryErrorBuilder = status.NewErrorBuilder(IncorrectTopLevelDirectoryErrorCode)

// ShouldBeInSystemError reports that an object belongs in system/.
func ShouldBeInSystemError(resource client.Object) status.Error {
	return incorrectTopLevelDirectoryErrorBuilder.
		Sprintf("Repo and HierarchyConfig configs MUST be declared in `%s/`. "+
			"To fix, move the %s to `%s/`.", repo.SystemDir, resource.GetObjectKind().GroupVersionKind().Kind, repo.SystemDir).
		BuildWithResources(resource)
}

// ShouldBeInClusterRegistryError reports that an object belongs in clusterregistry/.
func ShouldBeInClusterRegistryError(resource client.Object) status.Error {
	return incorrectTopLevelDirectoryErrorBuilder.
		Sprintf("Cluster and ClusterSelector configs MUST be declared in `%s/`. "+
			"To fix, move the %s to `%s/`.", repo.ClusterRegistryDir, resource.GetObjectKind().GroupVersionKind().Kind, repo.ClusterRegistryDir).
		BuildWithResources(resource)
}

// ShouldBeInClusterError reports that an object belongs in cluster/.
func ShouldBeInClusterError(resource client.Object) status.Error {
	return incorrectTopLevelDirectoryErrorBuilder.
		Sprintf("Cluster-scoped configs except Namespaces MUST be declared in `%s/`. "+
			"To fix, move the %s to `%s/`.", repo.ClusterDir, resource.GetObjectKind().GroupVersionKind().Kind, repo.ClusterDir).
		BuildWithResources(resource)
}

// ShouldBeInNamespacesError reports that an object belongs in namespaces/.
func ShouldBeInNamespacesError(resource client.Object) status.Error {
	return incorrectTopLevelDirectoryErrorBuilder.
		Sprintf("Namespace-scoped and Namespace configs MUST be declared in `%s/`. "+
			"To fix, move the %s to `%s/`.", repo.NamespacesDir, resource.GetObjectKind().GroupVersionKind().Kind, repo.NamespacesDir).
		BuildWithResources(resource)
}


text:
// $Id: Handle_L_SPIPE.cpp 91670 2010-09-08 18:02:26Z johnnyw $

#include "Handle_L_SPIPE.h"

#if !defined (__ACE_INLINE__)
#include "Handle_L_SPIPE.inl"
#endif /* __ACE_INLINE__ */

#if defined (ACE_HAS_STREAM_PIPES)

const ACE_TCHAR *Handle_L_SPIPE::DEFAULT_RENDEZVOUS = ACE_TEXT ("/tmp/foo_spipe");

Handle_L_SPIPE local_spipe;
ACE_Service_Object_Type lsp (&local_spipe, ACE_TEXT ("Local_SPIPE"));

#endif /* ACE_HAS_STREAM_PIPES */


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width">
	<title> Connectors style example </title>
	<link rel="stylesheet" href="../../Treant.css">
	<link rel="stylesheet" href="connectors.css">

	<link rel="stylesheet" href="../../perfect-scrollbar/perfect-scrollbar.css">


text:
%IBVS   Implement classical IBVS for point features
%
% A concrete class for simulation of image-based visual servoing (IBVS), a subclass of
% VisualServo.  Two windows are shown and animated:
%   - The camera view, showing the desired view (*) and the
%     current view (o)
%   - The external view, showing the target points and the camera
%
% Methods::
% run            Run the simulation, complete results kept in the object
% plot_p         Plot image plane coordinates of points vs time
% plot_vel       Plot camera velocity vs time
% plot_camera    Plot camera pose vs time
% plot_jcond     Plot Jacobian condition vs time
% plot_z         Plot point depth vs time
% plot_error     Plot feature error vs time
% plot_all       Plot all of the above in separate figures
% char           Convert object to a concise string
% display        Display the object as a string
%
% Example::
%         cam = CentralCamera('default');
%         ibvs = IBVS_l(cam, 'example');
%         ibvs.run()
%
% References::
% - Robotics, Vision & Control, Chap 15
%   P. Corke, Springer 2011.
%
% Notes::
% - The history property is a vector of structures each of which is a snapshot at
%   each simulation step of information about the image plane, camera pose, error,
%   Jacobian condition number, error norm, image plane size and desired feature
%   locations.
% - Lines are constructed by joining consecutive point features.
%
% See also VisualServo, PBVS, IBVS_l, IBVS_e.
% IMPLEMENTATION NOTE
%
% 1.  As per task function notation (Chaumette papers) the error is
%     defined as actual-demand, the reverse of normal control system
%     notation.
% 2.  The gain, lambda, is always positive
% 3.  The negative sign is written into the control law

classdef IBVS_l < VisualServo

    properties
        lambda          % IBVS gain
        eterm

        tr_star         % desired theta-rho coordinates
        tr_star_plot
        planes
    end

    methods

        function ibvs = IBVS_l(cam, varargin)
            %IBVS_l.IBVS_l Create IBVS line visual servo object
            %
            % IB = IBVS_l(camera, options)
            %
            % Options::
            % 'example'         Use set of canned parameters
            % 'niter',N         Maximum number of iterations
            % 'eterm',E         Terminate when norm of feature error < E
            % 'lambda',L        Control gain, positive definite scalar or matrix
            % 'T0',T            The initial pose
            % 'Tf',T            The final camera pose used only to determine desired
            %                   image plane coordinates (default 1m in z-direction)
            % 'P',p             The set of world points (3xN)
            % 'planes',P        The world planes holding the lines (4xN)
            % 'fps',F           Number of simulation frames per second (default t)
            % 'verbose'         Print out extra information during simulation
            %
            % Notes::
            % - If 'P' is specified the lines join points 1-2, 2-3, N-1.
            %
            % See also VisualServo.

            % invoke superclass constructor
            ibvs = ibvs@VisualServo(cam, varargin{:});

            % handle arguments
            opt.eterm = 0.01;
            opt.planes = [];
            opt.lambda = 0.08;         % control gain
            opt.example = false;

            opt = tb_optparse(opt, ibvs.arglist);

            if opt.example
                % run a canned example
                fprintf('----------------------------\n');
                fprintf('canned example, line-based IBVS with three lines\n');
                fprintf('----------------------------\n');
                ibvs.planes = repmat([0 0 1 -3]', 1, 3);
                ibvs.P = circle([0 0 3], 1, 'n', 3);
                ibvs.T0 = transl(1,1,-3)*trotz(0.6);
            else
                ibvs.planes = opt.planes;
            end

            % copy options to IBVS object
            ibvs.lambda = opt.lambda;
            ibvs.eterm = opt.eterm;
        end

        function init(vs)
            %IBVS_l.init Initialize simulation
            %
            % IB.init() initializes the simulation.  Implicitly called by
            % IB.run().
            %
            % See also VisualServo, IBVS_l.run.

            if isempty(vs.Tf)
                vs.Tf = transl(0, 0, 1);
                warning('setting Tf to default');
            end

            % final pose is specified in terms of a camera-target pose
            %   convert to image coords
            vs.tr_star = vs.getlines(vs.Tf, inv(vs.camera.K));
            vs.tr_star_plot = vs.getlines(vs.Tf);

            % initialize the vservo variables
            vs.camera.T = vs.T0;    % set camera back to its initial pose
            vs.Tcam = vs.T0;                % initial camera/robot pose

            vs.camera.plot(vs.P);    % show initial view

            % this is the 'external' view of the points and the camera
            %plot_sphere(vs.P, 0.05, 'b')
            %cam2 = showcamera(T0);
            vs.camera.plot_camera();
            %camup([0,-1,0]);

            vs.history = [];
        end

        function lines = getlines(vs, T, scale)
            p = vs.camera.project(vs.P, 'Tcam', T);
            if nargin > 2
                p = homtrans(scale, p);
            end
            for i=1:numcols(p)
                j = mod(i,numcols(p))+1;
                theta = atan2(p(2,j)-p(2,i), p(1,i)-p(1,j));
                rho = sin(theta)*p(1,i) + cos(theta)*p(2,i);
                lines(1,i) = theta; lines(2,i) = rho;
            end
        end

        function status = step(vs)
            %IBVS_l.step Simulate one time step
            %
            % STAT = IB.step() performs one simulation time step of IBVS.  It is
            % called implicitly from the superclass run method.  STAT is
            % one if the termination condition is met, else zero.
            %
            % See also VisualServo, IBVS_l.run.
            status = 0;
            Zest = [];

            % compute the view
            vs.camera.clf();
            uv = vs.camera.project(vs.P);
            tr = vs.getlines(vs.Tcam);
            vs.camera.hold(true);
            vs.camera.plot_line_tr(tr);
            vs.camera.plot_line_tr(vs.tr_star_plot, 'r--');

            tr = vs.getlines(vs.Tcam, inv(vs.camera.K));

            % compute image plane error as a column
            e = tr - vs.tr_star;   % feature error
            e = e(:);
            for i=1:2:numrows(e)
                if e(i) > pi
                    e(i) = e(i) - 2*pi;
                elseif e(i) < -pi
                    e(i) = e(i) + 2*pi;
                end
            end

            vs.tr_star

            J = vs.camera.visjac_l(tr, vs.planes);

            % compute the velocity of camera in camera frame
            v = -vs.lambda * pinv(J) * e;
            if vs.verbose
                fprintf('v: %.3f %.3f %.3f %.3f %.3f %.3f\n', v);
            end

            % update the camera pose
            Td = delta2tr(v);    % differential motion

            vs.Tcam = vs.Tcam * Td;       % apply it to current pose
            vs.Tcam = trnorm(vs.Tcam);

            % update the camera pose
            vs.camera.T = vs.Tcam;

            % update the history variables
            hist.uv = uv(:);
            vel = tr2delta(Td);
            hist.vel = vel;
            hist.e = e;
            hist.en = norm(e);
            hist.jcond = cond(J);
            hist.Tcam = vs.Tcam;

            vs.history = [vs.history hist];

            if norm(e) < vs.eterm,
                status = 1;
                return
            end
        end
    end % methods
end % class