text:
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.location.suplclient.asn1.supl2.rrlp_components;

// Copyright 2008 Google Inc. All Rights Reserved.
/*
 * This class is AUTOMATICALLY GENERATED. Do NOT EDIT.
 */

//
//
import com.google.location.suplclient.asn1.base.Asn1Integer;
import com.google.location.suplclient.asn1.base.Asn1Tag;
import com.google.location.suplclient.asn1.base.BitStream;
import com.google.location.suplclient.asn1.base.BitStreamReader;
import com.google.common.collect.ImmutableList;
import java.util.Collection;
import javax.annotation.Nullable;

/**
 *
 */
public  class LAC extends Asn1Integer {
  //

  private static final Asn1Tag TAG_LAC
      = Asn1Tag.fromClassAndNumber(-1, -1);

  public LAC() {
    super();
    setValueRange(new java.math.BigInteger("0"), new java.math.BigInteger("65535"));

  }

  @Override
  @Nullable
  protected Asn1Tag getTag() {
    return TAG_LAC;
  }

  @Override
  protected boolean isTagImplicit() {
    return true;
  }

  public static Collection<Asn1Tag> getPossibleFirstTags() {
    if (TAG_LAC != null) {
      return ImmutableList.of(TAG_LAC);
    } else {
      return Asn1Integer.getPossibleFirstTags();
    }
  }

  /**
   * Creates a new LAC from encoded stream.
   */
  public static LAC fromPerUnaligned(byte[] encodedBytes) {
    LAC result = new LAC();
    result.decodePerUnaligned(new BitStreamReader(encodedBytes));
    return result;
  }

  /**
   * Creates a new LAC from encoded stream.
   */
  public static LAC fromPerAligned(byte[] encodedBytes) {
    LAC result = new LAC();
    result.decodePerAligned(new BitStreamReader(encodedBytes));
    return result;
  }

  @Override public Iterable<BitStream> encodePerUnaligned() {
    return super.encodePerUnaligned();
  }

  @Override public Iterable<BitStream> encodePerAligned() {
    return super.encodePerAligned();
  }

  @Override public void decodePerUnaligned(BitStreamReader reader) {
    super.decodePerUnaligned(reader);
  }

  @Override public void decodePerAligned(BitStreamReader reader) {
    super.decodePerAligned(reader);
  }

  @Override public String toString() {
    return toIndentedString("");
  }

  public String toIndentedString(String indent) {
    return "LAC = " + getInteger() + ";\n";
  }
}


text:
external help file: Microsoft.Azure.Commands.ResourceManager.Cmdlets.dll-Help.xml
ms.assetid: DEC01722-EB1A-45CE-BD30-9DB861718573
online version:
schema: 2.0.0
---

# Remove-AzureRmPolicyDefinition

## SYNOPSIS
Removes a policy definition.

## SYNTAX

### The policy definition name parameter set. (Default)
```
Remove-AzureRmPolicyDefinition -Name <String> [-Force] [-ApiVersion <String>] [-Pre]
 [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-WhatIf] [-Confirm]
 [<CommonParameters>]
```

### The policy definition Id parameter set.
```
Remove-AzureRmPolicyDefinition -Id <String> [-Force] [-ApiVersion <String>] [-Pre]
 [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-WhatIf] [-Confirm]
 [<CommonParameters>]
```

## DESCRIPTION
The **Remove-AzureRmPolicyDefinition** cmdlet removes a policy definition.

## EXAMPLES

### Example 1: Remove the policy definition by name
```
PS C:\>Remove-AzureRmPolicyDefinition -Name "VMPolicyDefinition"
```

This command removes the specified policy definition.

### Example 2: Remove policy definition by resource ID
```
PS C:\>$PolicyDefinition = Get-AzureRmPolicyDefinition -Name "VMPolicyDefinition"
PS C:\> Remove-AzureRmPolicyDefinition -Id $PolicyDefinition.ResourceId -Force
```

The first command gets a policy definition named VMPolicyDefinition by using the Get-AzureRmPolicyDefinition cmdlet.
The command stores it in the $PolicyDefinition variable.

The second command removes the policy definition identified by the **ResourceId** property of $PolicyDefinition.

## PARAMETERS

### -Name
Specifies the name of the policy definition that this cmdlet removes.

```yaml
Type: String
Parameter Sets: The policy definition name parameter set.
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -Force
Forces the command to run without asking for user confirmation.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ApiVersion
Specifies the version of the resource provider API to use.
If you do not specify a version, this cmdlet uses the latest available version.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Pre
Indicates that this cmdlet considers pre-release API versions when it automatically determines which version to use.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -InformationAction
Specifies how this cmdlet responds to an information event.

The acceptable values for this parameter are:

- Continue
- Ignore
- Inquire
- SilentlyContinue
- Stop
- Suspend

```yaml
Type: ActionPreference
Parameter Sets: (All)
Aliases: infa

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -InformationVariable
Specifies an information variable.

```yaml
Type: String
Parameter Sets: (All)
Aliases: iv

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Id
Specifies the fully qualified resource ID for the policy definition that this cmdlet removes.

```yaml
Type: String
Parameter Sets: The policy definition Id parameter set.
Aliases: ResourceId

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -Confirm
Prompts you for confirmation before running the cmdlet.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

## OUTPUTS

## NOTES

## RELATED LINKS

[Get-AzureRmPolicyDefinition](./Get-AzureRmPolicyDefinition.md)

[New-AzureRmPolicyDefinition](./New-AzureRmPolicyDefinition.md)

[Set-AzureRmPolicyDefinition](./Set-AzureRmPolicyDefinition.md)

redpajama_set_name: RedPajamaGithub


text:
package com.fincatto.nfe310.classes.evento;

import java.math.BigDecimal;

import org.joda.time.DateTime;
import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.Element;

import com.fincatto.nfe310.classes.NFAmbiente;
import com.fincatto.nfe310.classes.NFBase;
import com.fincatto.nfe310.classes.NFUnidadeFederativa;
import com.fincatto.nfe310.validadores.BigDecimalParser;
import com.fincatto.nfe310.validadores.IntegerValidador;
import com.fincatto.nfe310.validadores.StringValidador;

public class NFInfoEvento extends NFBase {

    @Attribute(name = "Id", required = true)
    private String id;

    @Element(name = "cOrgao", required = true)
    private NFUnidadeFederativa orgao;

    @Element(name = "tpAmb", required = true)
    private NFAmbiente ambiente;

    @Element(name = "CNPJ", required = false)
    private String cnpj;

    @Element(name = "CPF", required = false)
    private String cpf;

    @Element(name = "chNFe", required = true)
    private String chave;

    @Element(name = "dhEvento", required = true)
    private DateTime dataHoraEvento;

    @Element(name = "tpEvento", required = true)
    private String codigoEvento;

    @Element(name = "nSeqEvento", required = true)
    private Integer numeroSequencialEvento;

    @Element(name = "verEvento", required = true)
    private String versaoEvento;

    @Element(name = "detEvento", required = true)
    private NFTipoEvento dadosEvento;

    public void setOrgao(final NFUnidadeFederativa orgao) {
        this.orgao = orgao;
    }

    public void setVersaoEvento(final BigDecimal versaoEvento) {
        this.versaoEvento = BigDecimalParser.tamanho5Com2CasasDecimais(versaoEvento, "Info Evento Versao");
    }

    public String getId() {
        return this.id;
    }

    public void setId(final String id) {
        StringValidador.exatamente54(id, "Info Evento ID");
        this.id = id;
    }

    public NFAmbiente getAmbiente() {
        return this.ambiente;
    }

    public void setAmbiente(final NFAmbiente ambiente) {
        this.ambiente = ambiente;
    }

    public String getCnpj() {
        return this.cnpj;
    }

    public void setCnpj(final String cnpj) {
        if (this.cpf != null) {
            throw new IllegalStateException("CPF ja foi setado");
        }
        StringValidador.cnpj(cnpj);
        this.cnpj = cnpj;
    }

    public String getCpf() {
        return this.cpf;
    }

    public void setCpf(final String cpf) {
        if (this.cnpj != null) {
            throw new IllegalStateException("CNPJ ja foi setado");
        }
        StringValidador.cpf(cpf);
        this.cpf = cpf;
    }

    public String getChave() {
        return this.chave;
    }

    public void setChave(final String chave) {
        StringValidador.exatamente44N(chave, "Info Evento Chave");
        this.chave = chave;
    }

    public DateTime getDataHoraEvento() {
        return this.dataHoraEvento;
    }

    public void setDataHoraEvento(final DateTime dataHoraEvento) {
        this.dataHoraEvento = dataHoraEvento;
    }

    public String getCodigoEvento() {
        return this.codigoEvento;
    }

    public void setTipoEvento(final String tipoEvento) {
        StringValidador.exatamente6N(tipoEvento, "Tipo Evento");
        this.codigoEvento = tipoEvento;
    }

    public int getNumeroSequencialEvento() {
        return this.numeroSequencialEvento;
    }

    public void setNumeroSequencialEvento(final int numeroSequencialEvento) {
        IntegerValidador.tamanho1a2(numeroSequencialEvento, "Numero Sequencial Evento");
        this.numeroSequencialEvento = numeroSequencialEvento;
    }

    public String getVersaoEvento() {
        return this.versaoEvento;
    }

    public NFTipoEvento getDadosEvento() {
        return this.dadosEvento;
    }

    public void setDadosEvento(final NFTipoEvento cartaCorrecao) {
        this.dadosEvento = cartaCorrecao;
    }

    public NFUnidadeFederativa getOrgao() {
        return this.orgao;
    }

    public void setCodigoEvento(final String codigoEvento) {
        this.codigoEvento = codigoEvento;
    }
}


text:
<!DOCTYPE html>

    <title>Customizing Bandwidth using RTCMultiConnection ® Muaz Khan</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <link rel="author" type="text/html" href="https://plus.google.com/+MuazKhan">
    <meta name="author" content="Muaz Khan">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

        ↑

                WEBRTC EXPERIMENTS

Customizing Bandwidth using RTCMultiConnection

            Copyright ©
            Muaz Khan
            <@muazkh
            >.

New Session:

            <button id="start-new-session">Start New Video Session</button>

Local video container

Remote videos container

You can customize bandwidth using URL parameters!

Go ahead and try RTCMultiConnection!

Pass "session-id" only-over the constructor:

            connection = new RTCMultiConnection('session-id'); connection.bandwidth = { audio: 50, video: 256 }; connection.open();

What is RTCMultiConnection?

RTCMultiConnection.js a javascript library supports features like audio/video conferencing; (one-way and one-to-many) broadcasting; screen sharing; data/text/file sharing (of any size); multi-and-manual sessions establishment; users ejection, rejection and presence detection; and more. It automatically keeps session "active" all the time; even if initiator leaves.

Feedback

                <textarea id="message" style="border: 1px solid rgb(189, 189, 189); height: 8em; margin: .2em; outline: none; resize: vertical; width: 98%;" placeholder="Have any message? Suggestions or something went wrong?"></textarea>

            <button id="send-message" style="font-size: 1em;">Send Message</button>

 WebRTC Experiments!© Muaz Khan,
            2013 » Email»
            @muazkh» Github


text:
namespace AxUtils
{
    public class EnumInfos<T> where T : struct
    {
        public T Value;
        public int Number;
        public string Name;
        public string Description;
    }
}


text:
RSpec.describe WpApiClient::Entities::Base do
  describe "general entity methods", vcr: {cassette_name: 'single_post', record: :new_episodes} do

    it "work to retrieve embedded hypermedia" do
      WpApiClient.configure { |api_client| api_client.embed = true }

      # Posts offer terms as embedded hypermedia
      @post = WpApiClient.get_client.get('posts/1')
      expect(@post.terms("category")).to be_a WpApiClient::Collection
    end

    it "work to retrieve non-embedded hypermedia" do
      WpApiClient.configure { |api_client| api_client.embed = false }

      # Posts offer terms as embedded hypermedia
      @post = WpApiClient.get_client.get('posts/1')
      expect(@post.terms("category")).to be_a WpApiClient::Collection
    end

    it "allows querying on specific relations from posts to terms" do
      @post = @api.get('posts/1')
      category = @post.terms("category")

      expect(category).to be_a WpApiClient::Collection
    end

    it "allows querying on specific relations from terms to posts" do
      category = @api.get('categories/1')

      expect(category.posts("posts")).to be_a WpApiClient::Collection
    end

  end
end


text:
.class public final Lo/Ex;
.super Lo/CU;
.source ""

# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "<K:Ljava/lang/Enum<TK;>;V:Ljava/lang/Enum<TV;>;>Lo/CU<TK;TV;>;"
    }
.end annotation

.annotation build Lo/Ai;
    ˋ = true
.end annotation

# static fields
.field private static final ˏ:J = 0x0L
    .annotation build Lo/Aj;
        ˊ = "not needed in emulated source."
    .end annotation
.end field

# instance fields
.field private transient ˋ:Ljava/lang/Class;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/Class<TK;>;"
        }
    .end annotation
.end field

.field private transient ˎ:Ljava/lang/Class;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/Class<TV;>;"
        }
    .end annotation
.end field

# direct methods
.method private constructor <init>(Ljava/lang/Class;Ljava/lang/Class;)V
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(Ljava/lang/Class<TK;>;Ljava/lang/Class<TV;>;)V"
        }
    .end annotation

    .line 79
    new-instance v0, Ljava/util/EnumMap;

    invoke-direct {v0, p1}, Ljava/util/EnumMap;-><init>(Ljava/lang/Class;)V

    invoke-static {v0}, Lo/LI;->ˊ(Ljava/util/Map;)Lo/LI;

    move-result-object v0

    new-instance v1, Ljava/util/EnumMap;

    invoke-direct {v1, p2}, Ljava/util/EnumMap;-><init>(Ljava/lang/Class;)V

    invoke-static {v1}, Lo/LI;->ˊ(Ljava/util/Map;)Lo/LI;

    move-result-object v1

    invoke-direct {p0, v0, v1}, Lo/CU;-><init>(Ljava/util/Map;Ljava/util/Map;)V

    .line 81
    iput-object p1, p0, Lo/Ex;->ˋ:Ljava/lang/Class;

    .line 82
    iput-object p2, p0, Lo/Ex;->ˎ:Ljava/lang/Class;

    .line 83
    return-void
.end method

.method private readObject(Ljava/io/ObjectInputStream;)V
    .locals 3
    .annotation build Lo/Aj;
        ˊ = "java.io.ObjectInputStream"
    .end annotation

    .line 140
    invoke-virtual {p1}, Ljava/io/ObjectInputStream;->defaultReadObject()V

    .line 141
    invoke-virtual {p1}, Ljava/io/ObjectInputStream;->readObject()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Class;

    iput-object v0, p0, Lo/Ex;->ˋ:Ljava/lang/Class;

    .line 142
    invoke-virtual {p1}, Ljava/io/ObjectInputStream;->readObject()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Class;

    iput-object v0, p0, Lo/Ex;->ˎ:Ljava/lang/Class;

    .line 143
    new-instance v0, Ljava/util/EnumMap;

    iget-object v1, p0, Lo/Ex;->ˋ:Ljava/lang/Class;

    invoke-direct {v0, v1}, Ljava/util/EnumMap;-><init>(Ljava/lang/Class;)V

    invoke-static {v0}, Lo/LI;->ˊ(Ljava/util/Map;)Lo/LI;

    move-result-object v0

    new-instance v1, Ljava/util/EnumMap;

    iget-object v2, p0, Lo/Ex;->ˎ:Ljava/lang/Class;

    invoke-direct {v1, v2}, Ljava/util/EnumMap;-><init>(Ljava/lang/Class;)V

    invoke-static {v1}, Lo/LI;->ˊ(Ljava/util/Map;)Lo/LI;

    move-result-object v1

    invoke-virtual {p0, v0, v1}, Lo/Ex;->ˊ(Ljava/util/Map;Ljava/util/Map;)V

    .line 146
    invoke-static {p0, p1}, Lo/Ke;->ˊ(Ljava/util/Map;Ljava/io/ObjectInputStream;)V

    .line 147
    return-void
.end method

.method private writeObject(Ljava/io/ObjectOutputStream;)V
    .locals 1
    .annotation build Lo/Aj;
        ˊ = "java.io.ObjectOutputStream"
    .end annotation

    .line 130
    invoke-virtual {p1}, Ljava/io/ObjectOutputStream;->defaultWriteObject()V

    .line 131
    iget-object v0, p0, Lo/Ex;->ˋ:Ljava/lang/Class;

    invoke-virtual {p1, v0}, Ljava/io/ObjectOutputStream;->writeObject(Ljava/lang/Object;)V

    .line 132
    iget-object v0, p0, Lo/Ex;->ˎ:Ljava/lang/Class;

    invoke-virtual {p1, v0}, Ljava/io/ObjectOutputStream;->writeObject(Ljava/lang/Object;)V

    .line 133
    invoke-static {p0, p1}, Lo/Ke;->ˊ(Ljava/util/Map;Ljava/io/ObjectOutputStream;)V

    .line 134
    return-void
.end method

.method public static ˊ(Ljava/lang/Class;Ljava/lang/Class;)Lo/Ex;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<K:Ljava/lang/Enum<TK;>;V:Ljava/lang/Enum<TV;>;>(Ljava/lang/Class<TK;>;Ljava/lang/Class<TV;>;)Lo/Ex<TK;TV;>;"
        }
    .end annotation

    .line 58
    new-instance v0, Lo/Ex;

    invoke-direct {v0, p0, p1}, Lo/Ex;-><init>(Ljava/lang/Class;Ljava/lang/Class;)V

    return-object v0
.end method

.method public static ˊ(Ljava/util/Map;)Lo/Ex;
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<K:Ljava/lang/Enum<TK;>;V:Ljava/lang/Enum<TV;>;>(Ljava/util/Map<TK;TV;>;)Lo/Ex<TK;TV;>;"
        }
    .end annotation

    .line 73
    invoke-static {p0}, Lo/Ex;->ˋ(Ljava/util/Map;)Ljava/lang/Class;

    move-result-object v0

    invoke-static {p0}, Lo/Ex;->ˏ(Ljava/util/Map;)Ljava/lang/Class;

    move-result-object v1

    invoke-static {v0, v1}, Lo/Ex;->ˊ(Ljava/lang/Class;Ljava/lang/Class;)Lo/Ex;

    move-result-object v2

    .line 74
    invoke-virtual {v2, p0}, Lo/Ex;->putAll(Ljava/util/Map;)V

    .line 75
    return-object v2
.end method

.method static ˋ(Ljava/util/Map;)Ljava/lang/Class;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<K:Ljava/lang/Enum<TK;>;>(Ljava/util/Map<TK;*>;)Ljava/lang/Class<TK;>;"
        }
    .end annotation

    .line 86
    instance-of v0, p0, Lo/Ex;

    if-eqz v0, :cond_0

    .line 87
    move-object v0, p0

    check-cast v0, Lo/Ex;

    invoke-virtual {v0}, Lo/Ex;->ˏ()Ljava/lang/Class;

    move-result-object v0

    return-object v0

    .line 89
    :cond_0
    instance-of v0, p0, Lo/Ey;

    if-eqz v0, :cond_1

    .line 90
    move-object v0, p0

    check-cast v0, Lo/Ey;

    invoke-virtual {v0}, Lo/Ey;->ˏ()Ljava/lang/Class;

    move-result-object v0

    return-object v0

    .line 92
    :cond_1
    invoke-interface {p0}, Ljava/util/Map;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_2

    const/4 v0, 0x1

    goto :goto_0

    :cond_2
    const/4 v0, 0x0

    :goto_0
    invoke-static {v0}, Lo/Bk;->ˊ(Z)V

    .line 93
    invoke-interface {p0}, Ljava/util/Map;->keySet()Ljava/util/Set;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v0

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

    move-result-object v0

    check-cast v0, Ljava/lang/Enum;

    invoke-virtual {v0}, Ljava/lang/Enum;->getDeclaringClass()Ljava/lang/Class;

    move-result-object v0

    return-object v0
.end method

.method private static ˏ(Ljava/util/Map;)Ljava/lang/Class;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<V:Ljava/lang/Enum<TV;>;>(Ljava/util/Map<*TV;>;)Ljava/lang/Class<TV;>;"
        }
    .end annotation

    .line 97
    instance-of v0, p0, Lo/Ex;

    if-eqz v0, :cond_0

    .line 98
    move-object v0, p0

    check-cast v0, Lo/Ex;

    iget-object v0, v0, Lo/Ex;->ˎ:Ljava/lang/Class;

    return-object v0

    .line 100
    :cond_0
    invoke-interface {p0}, Ljava/util/Map;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_1

    const/4 v0, 0x1

    goto :goto_0

    :cond_1
    const/4 v0, 0x0

    :goto_0
    invoke-static {v0}, Lo/Bk;->ˊ(Z)V

    .line 101
    invoke-interface {p0}, Ljava/util/Map;->values()Ljava/util/Collection;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;

    move-result-object v0

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

    move-result-object v0

    check-cast v0, Ljava/lang/Enum;

    invoke-virtual {v0}, Ljava/lang/Enum;->getDeclaringClass()Ljava/lang/Class;

    move-result-object v0

    return-object v0
.end method

# virtual methods
.method public bridge synthetic L_()Ljava/util/Set;
    .locals 1

    .line 43
    invoke-super {p0}, Lo/CU;->L_()Ljava/util/Set;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic N_()Lo/DD;
    .locals 1

    .line 43
    invoke-super {p0}, Lo/CU;->N_()Lo/DD;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic clear()V
    .locals 0

    .line 43
    invoke-super {p0}, Lo/CU;->clear()V

    return-void
.end method

.method public bridge synthetic containsValue(Ljava/lang/Object;)Z
    .locals 1

    .line 43
    invoke-super {p0, p1}, Lo/CU;->containsValue(Ljava/lang/Object;)Z

    move-result v0

    return v0
.end method

.method public bridge synthetic entrySet()Ljava/util/Set;
    .locals 1

    .line 43
    invoke-super {p0}, Lo/CU;->entrySet()Ljava/util/Set;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic keySet()Ljava/util/Set;
    .locals 1

    .line 43
    invoke-super {p0}, Lo/CU;->keySet()Ljava/util/Set;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic putAll(Ljava/util/Map;)V
    .locals 0

    .line 43
    invoke-super {p0, p1}, Lo/CU;->putAll(Ljava/util/Map;)V

    return-void
.end method

.method ˊ(Ljava/lang/Enum;)Ljava/lang/Enum;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TK;)TK;"
        }
    .end annotation

    .line 116
    invoke-static {p1}, Lo/Bk;->ˊ(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Enum;

    return-object v0
.end method

.method bridge synthetic ˊ(Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1

    .line 43
    move-object v0, p1

    check-cast v0, Ljava/lang/Enum;

    invoke-virtual {p0, v0}, Lo/Ex;->ˊ(Ljava/lang/Enum;)Ljava/lang/Enum;

    move-result-object v0

    return-object v0
.end method

.method ˋ(Ljava/lang/Enum;)Ljava/lang/Enum;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TV;)TV;"
        }
    .end annotation

    .line 121
    invoke-static {p1}, Lo/Bk;->ˊ(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Enum;

    return-object v0
.end method

.method bridge synthetic ˋ(Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1

    .line 43
    move-object v0, p1

    check-cast v0, Ljava/lang/Enum;

    invoke-virtual {p0, v0}, Lo/Ex;->ˋ(Ljava/lang/Enum;)Ljava/lang/Enum;

    move-result-object v0

    return-object v0
.end method

.method public ˏ()Ljava/lang/Class;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()Ljava/lang/Class<TK;>;"
        }
    .end annotation

    .line 106
    iget-object v0, p0, Lo/Ex;->ˋ:Ljava/lang/Class;

    return-object v0
.end method

.method public ᐝ()Ljava/lang/Class;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()Ljava/lang/Class<TV;>;"
        }
    .end annotation

    .line 111
    iget-object v0, p0, Lo/Ex;->ˎ:Ljava/lang/Class;

    return-object v0
.end method


text:
package project

import (
	"bufio"
	"bytes"
	"encoding/json"
	"fmt"
	"io"
	"io/ioutil"
	"os"
	"path/filepath"
	"regexp"
	"runtime"
	"sort"
	"strings"
	"unicode"

	"github.com/easeway/langx.go/errors"
	"github.com/easeway/langx.go/mapper"
	"github.com/flosch/pongo2"
	zglob "github.com/mattn/go-zglob"
	yaml "gopkg.in/yaml.v2"
)

const (
	// Format is the supported format
	Format = "hypermake.v0"
	// RcFile is the filename of local setting file to override some settings
	RcFile = ".hmakerc"
	// WorkFolder is the name of project WorkFolder
	WorkFolder = ".hmake"
	// SummaryFileName is the filename of summary
	SummaryFileName = "hmake.summary.json"
	// LogFileName is the filename of hmake debug log
	LogFileName = "hmake.debug.log"
	// WrapperMagic is the magic string at the beginning of the file
	WrapperMagic = "#hmake-wrapper"
	// WrapperName is project name for wrapped project
	WrapperName = "wrapper"
	// WrapperDesc is project description for wrapped project
	WrapperDesc = "wrapped HyperMake project"
	// MaxNameLen restricts the maximum length of project/target name
	MaxNameLen = 1024
)

var (
	// RootFile is hmake filename sits on root
	RootFile = "HyperMake"

	// ErrUnsupportedFormat indicates the file is not recognized
	ErrUnsupportedFormat = fmt.Errorf("unsupported format")
	// ErrNameMissing indicates name is required, but missing
	ErrNameMissing = fmt.Errorf("name is required")
	// ErrNameTooLong indicates the length of name exceeds MaxNameLen
	ErrNameTooLong = fmt.Errorf("name is too long")
	// ErrNameFirstChar indicates the first char in name is illegal
	ErrNameFirstChar = fmt.Errorf("name must start from a letter or an underscore")
	// ErrProjectNameMissing indicates project name is absent
	ErrProjectNameMissing = fmt.Errorf("project name is required")
	// ErrWrapperImageMissing indicates image name is missing
	ErrWrapperImageMissing = fmt.Errorf("image name missing after " + WrapperMagic)
)

// File defines the content of HyperMake or .hmake file
type File struct {
	// Format indicates file format
	Format string `json:"format"`
	// Name is name of the project
	Name string `json:"name"`
	// Desc is description of the project
	Desc string `json:"description"`
	// Targets are targets defined in current file
	Targets map[string]*Target `json:"targets"`
	// Settings are properties
	Settings Settings `json:"settings"`
	// Local are properties only applied to file
	Local Settings `json:"local"`
	// Includes are patterns for sourcing external files
	Includes []string `json:"includes"`

	// Source is the relative path to the project
	Source string `json:"-"`
	// WrapperTarget specifies the default target in wrapper mode
	WrapperTarget string `json:"-"`
}

// Project is the world view of hmake
type Project struct {
	// Name is name of the project
	Name string
	// BaseDir is the root directory of project
	BaseDir string
	// LaunchPath is relative path under BaseDir where hmake launches
	LaunchPath string
	// MasterFile is the file with everything merged
	MasterFile File

	// All loaded make files
	Files []*File

	// Tasks are built from resolved targets
	Targets TargetNameMap
}

// CommonSettings are well known settings
type CommonSettings struct {
	DefaultTargets []string `json:"default-targets"`
	ExecTarget     string   `json:"exec-target"`
	ExecShell      string   `json:"exec-shell"`
}

func loadAndRender(fn string) ([]byte, error) {
	data, err := ioutil.ReadFile(fn)
	if err != nil {
		return nil, err
	}
	tpl, err := pongo2.FromBytes(data)
	if err != nil {
		return nil, err
	}
	return tpl.ExecuteBytes(pongo2.Context{
		"os":   runtime.GOOS,
		"arch": runtime.GOARCH,
	})
}

func loadYaml(filename string) (map[string]interface{}, error) {
	data, err := loadAndRender(filename)
	if err != nil {
		return nil, err
	}
	val := make(map[string]interface{})
	if err = yaml.Unmarshal(data, val); err != nil {
		if !os.IsNotExist(err) {
			err = fmt.Errorf("%s: %v", filename, err)
		}
		return nil, err
	}

	// normalize yaml by converting
	// map[interface{}]interface{} to map[string]interface{}
	return normalizeMap(val).(map[string]interface{}), nil
}

func normalizeMap(val interface{}) interface{} {
	switch v := val.(type) {
	case []interface{}:
		for n, item := range v {
			v[n] = normalizeMap(item)
		}
	case map[interface{}]interface{}:
		m := make(map[string]interface{})
		for key, value := range v {
			m[fmt.Sprintf("%v", key)] = normalizeMap(value)
		}
		val = m
	case map[string]interface{}:
		for key, value := range v {
			v[key] = normalizeMap(value)
		}
	}
	return val
}

func loadAsWrapper(fn string) (*File, error) {
	data, err := loadAndRender(fn)
	if err != nil {
		return nil, err
	}

	rd := bufio.NewReader(bytes.NewBuffer(data))
	lineBytes, err := rd.ReadBytes('\n')
	if err != nil && err != io.EOF {
		return nil, err
	}
	if !bytes.HasPrefix(lineBytes, []byte(WrapperMagic+" ")) {
		return nil, err
	}
	line := string(bytes.TrimSpace(lineBytes[len(WrapperMagic)+1:]))
	tokens := strings.Split(line, " ")
	if len(tokens) == 0 || tokens[0] == "" {
		return nil, ErrWrapperImageMissing
	}

	image := tokens[0]
	tokens = tokens[1:]

	projFile := &File{
		Format:   Format,
		Name:     WrapperName,
		Desc:     WrapperDesc,
		Targets:  make(map[string]*Target),
		Settings: make(Settings),
	}

	buildFrom := ""
	var buildArgs []string
	for n, token := range tokens {
		if token != "" {
			buildFrom = token
			buildArgs = tokens[n+1:]
			break
		}
	}

	if buildFrom != "" {
		t := &Target{
			Name:    "toolchain",
			Desc:    "build toolchain image",
			Watches: []string{buildFrom},
			Ext: map[string]interface{}{
				"image": image,
				"build": buildFrom,
			},
		}
		if len(buildArgs) > 0 {
			t.Ext["build-args"] = buildArgs
		}
		projFile.Targets[t.Name] = t
	}
	t := &Target{
		Name: "build",
		Desc: "wrapped build target",
		Ext: map[string]interface{}{
			"image": image,
		},
	}
	content, err := ioutil.ReadAll(rd)
	if err != nil {
		return nil, err
	}
	content = bytes.TrimSpace(content)
	if len(content) > 0 {
		if bytes.HasPrefix(content, []byte("#!")) {
			t.Ext["script"] = string(content)
		} else {
			t.Ext["script"] = "#!/bin/sh\n" + string(content)
		}
	} else {
		t.Ext["cmds"] = []string{
			`make "$@"`,
		}
	}
	if buildFrom != "" {
		t.After = append(t.After, "toolchain")
	}
	projFile.Targets[t.Name] = t
	projFile.WrapperTarget = t.Name
	projFile.Settings["default-targets"] = []string{t.Name}
	projFile.Settings["exec-target"] = t.Name
	return projFile, nil
}

var expandableTargetPattern = regexp.MustCompile(`^(\w+):(([\w-\.]+,)*)([\w-\.]+)$`)

type expToken struct {
	name   string
	values []string
	text   string
}

func parseTarget(name string) (tokens []expToken, err error) {
	str := name
	for len(str) > 0 {
		pos := strings.Index(str, "[")
		if pos >= 0 {
			if pos > 0 {
				tokens = append(tokens, expToken{text: str[:pos]})
			}
			pos1 := strings.Index(str[pos:], "]")
			if pos1 <= 0 {
				return nil, fmt.Errorf("invalid expandable target name: %s: missing ]", name)
			}
			token := expToken{text: str[pos+1 : pos+pos1]}
			if !expandableTargetPattern.MatchString(token.text) {
				return nil, fmt.Errorf("invalid expandable target name: %s: bad format: %s", name, token.text)
			}
			str = str[pos+pos1+1:]

			pos = strings.Index(token.text, ":")
			token.name = token.text[:pos]
			token.values = strings.Split(token.text[pos+1:], ",")
			tokens = append(tokens, token)
		} else {
			tokens = append(tokens, expToken{text: str})
			break
		}
	}
	return
}

// substitute string containing "$[var]" to the value in vars
// there's no escape, except "$[$]" is substituted to "$"
// undefined vars are not substituted
func substString(vars map[string]string, val string) (res string) {
	forVar := false
	for len(val) > 0 {
		if forVar {
			if pos := strings.Index(val, "]"); pos > 0 {
				name := val[2:pos]
				if name == "$" {
					res += name
				} else if v, ok := vars[name]; ok {
					res += v
				} else {
					res += val[:pos+1]
				}
				val = val[pos+1:]
				forVar = false
				continue
			}
		} else if pos := strings.Index(val, "$["); pos >= 0 {
			res += val[:pos]
			val = val[pos:]
			forVar = true
			continue
		}
		res += val
		break
	}
	return
}

func substStrings(vars map[string]string, strs []string) []string {
	result := make([]string, len(strs))
	for n, str := range strs {
		result[n] = substString(vars, str)
	}
	return result
}

func substMap(vars map[string]string, m map[string]interface{}) map[string]interface{} {
	if m == nil {
		return m
	}
	d := make(map[string]interface{})
	for k, v := range m {
		d[substString(vars, k)] = substInterface(vars, v)
	}
	return d
}

func substSlice(vars map[string]string, v []interface{}) []interface{} {
	result := make([]interface{}, len(v))
	for n, val := range v {
		result[n] = substInterface(vars, val)
	}
	return result
}

func substInterface(vars map[string]string, v interface{}) interface{} {
	switch val := v.(type) {
	case string:
		return substString(vars, val)
	case []interface{}:
		return substSlice(vars, val)
	case map[string]interface{}:
		return substMap(vars, val)
	default:
		return v
	}
}

func buildTarget(origin *Target, name string, vars map[string]string, result map[string]*Target) error {
	if result[name] != nil {
		return fmt.Errorf("target already exists: %s", name)
	}
	t := &Target{
		Name:       name,
		Desc:       substString(vars, origin.Desc),
		Before:     substStrings(vars, origin.Before),
		After:      substStrings(vars, origin.After),
		ExecDriver: substString(vars, origin.ExecDriver),
		WorkDir:    substString(vars, origin.WorkDir),
		Watches:    substStrings(vars, origin.Watches),
		Artifacts:  substStrings(vars, origin.Artifacts),
		Ext:        substMap(vars, origin.Ext),
		Always:     origin.Always,
	}
	result[name] = t
	return nil
}

func constructTargets(tokens []expToken, prefix string, n int,
	t *Target, vars map[string]string, result map[string]*Target) error {
	if n >= len(tokens) {
		return buildTarget(t, prefix, vars, result)
	}
	if name := tokens[n].name; name != "" {
		for _, val := range tokens[n].values {
			vars[name] = val
			if err := constructTargets(tokens, prefix+val, n+1, t, vars, result); err != nil {
				return err
			}
		}
	} else {
		return constructTargets(tokens, prefix+tokens[n].text, n+1, t, vars, result)
	}
	return nil
}

func expandTargets(origin map[string]*Target) (map[string]*Target, error) {
	keys := make([]string, 0, len(origin))
	for key := range origin {
		keys = append(keys, key)
	}

	result := make(map[string]*Target)
	for _, key := range keys {
		tokens, err := parseTarget(key)
		if err != nil {
			return nil, err
		}
		err = constructTargets(tokens, "", 0, origin[key], make(map[string]string), result)
		if err != nil {
			return nil, err
		}
	}
	return result, nil
}

// LoadFile loads from specified path
func LoadFile(baseDir, path string, allowWrapper bool) (*File, error) {
	fn := filepath.Join(baseDir, path)
	if allowWrapper {
		if f, err := loadAsWrapper(fn); err != nil || f != nil {
			return f, err
		}
	}

	val, err := loadYaml(fn)
	if err != nil {
		return nil, err
	}

	if format, ok := val["format"].(string); !ok || format != Format {
		return nil, fmt.Errorf("unsupported format: " + format)
	}

	f := &File{}
	err = mapper.Map(f, val)
	if err != nil {
		return nil, err
	}
	f.Targets, err = expandTargets(f.Targets)
	if err == nil {
		f.Source = path
	}
	return f, err
}

// LocateProjectFrom creates a project by locating the root file from startDir
func LocateProjectFrom(startDir, projectFile string) (*Project, error) {
	wd, err := filepath.Abs(startDir)
	if err != nil {
		return nil, err
	}
	launchPath := ""

	for {
		p := &Project{BaseDir: wd, LaunchPath: launchPath}
		_, err := p.Load(projectFile)
		if err == nil {
			return p, nil
		}
		if !os.IsNotExist(err) {
			return nil, err
		}
		dir := filepath.Dir(wd)
		if dir == wd {
			break
		}
		launchPath = filepath.Join(filepath.Base(wd), launchPath)
		wd = dir
	}

	return nil, os.ErrNotExist
}

// LocateProject creates a project by locating the root file
func LocateProject() (*Project, error) {
	wd, err := os.Getwd()
	if err != nil {
		return nil, err
	}
	return LocateProjectFrom(wd, RootFile)
}

// LoadProjectFrom locates, resolves and finalizes project from startDir
func LoadProjectFrom(startDir, projectFile string) (p *Project, err error) {
	if p, err = LocateProjectFrom(startDir, projectFile); err != nil {
		return
	}
	if err = p.Resolve(); err != nil {
		return
	}
	err = p.Finalize()
	return
}

// LoadProject locates, resolves and finalizes project
func LoadProject() (p *Project, err error) {
	wd, err := os.Getwd()
	if err != nil {
		return nil, err
	}
	return LoadProjectFrom(wd, RootFile)
}

// RelPath translate a source relative path to project relative path
func RelPath(source, path string) string {
	srcDir := filepath.Dir(source)
	if srcDir != "." {
		return filepath.Join(srcDir, path)
	}
	return path
}

// ValidateName checks if a name is legal: starting from a letter/underscore
// and following characters are from letters/digits/underscore/dash/dot
func ValidateName(name string) error {
	if name == "" {
		return ErrNameMissing
	}
	if len(name) > MaxNameLen {
		return ErrNameTooLong
	}
	for n, r := range name {
		if n == 0 {
			if !unicode.IsLetter(r) && r != '_' {
				return ErrNameFirstChar
			}
		} else if !unicode.IsLetter(r) && !unicode.IsDigit(r) &&
			r != '_' && r != '-' && r != '.' {
			return fmt.Errorf("invalid character in name %v", r)
		}
	}
	return nil
}

// ValidateProjectName validates if project name is legal
func ValidateProjectName(name string) error {
	if name == "" {
		return ErrProjectNameMissing
	}
	return ValidateName(name)
}

// Merge merges content from another file
func (f *File) Merge(s *File) error {
	errs := &errors.AggregatedError{}
	if f.Targets == nil {
		f.Targets = make(map[string]*Target)
	}
	for name, t := range s.Targets {
		if target, exist := f.Targets[name]; exist {
			errs.Add(fmt.Errorf("duplicated target %s defined in %s and %s",
				name, target.File.Source, s.Source))
		} else {
			f.Targets[name] = t
		}
	}
	if f.Settings == nil {
		f.Settings = make(Settings)
	}
	errs.Add(f.Settings.Merge(s.Settings))

	for _, inc := range s.Includes {
		path := RelPath(s.Source, inc)
		found := false
		for _, item := range f.Includes {
			if item == path {
				found = true
				break
			}
		}
		if !found {
			f.Includes = append(f.Includes, path)
		}
	}
	return errs.Aggregate()
}

// Load loads and merges an additional files
func (p *Project) Load(path string) (*File, error) {
	for _, f := range p.Files {
		if f.Source == path {
			return f, nil
		}
	}
	f, err := LoadFile(p.BaseDir, path, len(p.Files) == 0)
	if err != nil {
		return nil, err
	}
	for name, t := range f.Targets {
		if err = ValidateName(name); err != nil {
			return nil, fmt.Errorf("%s: illegal target name '%s': %v",
				f.Source, name, err.Error())
		}
		t.File = f
	}
	p.Files = append(p.Files, f)
	if err = p.MasterFile.Merge(f); err != nil {
		return f, err
	}
	if len(p.Files) == 1 {
		p.MasterFile.Source = f.Source
		p.MasterFile.WrapperTarget = f.WrapperTarget
		p.Name = f.Name
		err = ValidateProjectName(p.Name)
	}
	return f, err
}

// LoadRcFiles load .hmakerc files inside project directories
func (p *Project) LoadRcFiles() error {
	var files []string
	path := p.LaunchPath
	for {
		files = append(files, filepath.Join(path, RcFile))
		if path == "" {
			break
		}
		dir := filepath.Dir(path)
		if dir == "." {
			path = ""
		} else {
			path = dir
		}
	}

	errs := &errors.AggregatedError{}
	for i := len(files) - 1; i >= 0; i-- {
		_, err := p.Load(files[i])
		if err != nil && !os.IsNotExist(err) {
			errs.Add(err)
		}
	}
	return errs.Aggregate()
}

// Glob matches files inside project with pattern
func (p *Project) Glob(pattern string) (paths []string, err error) {
	prefix := p.BaseDir + string(filepath.Separator)
	fullPattern := prefix + pattern
	paths, err = zglob.Glob(fullPattern)
	if err != nil {
		return
	}
	prefixLen := len(prefix)
	for n, fullpath := range paths {
		paths[n] = fullpath[prefixLen:]
	}
	return
}

// Resolve loads additional includes
func (p *Project) Resolve() error {
	errs := &errors.AggregatedError{}
	for i := 0; i < len(p.MasterFile.Includes); i++ {
		paths, err := p.Glob(p.MasterFile.Includes[i])
		if errs.Add(err) {
			continue
		}
		for _, path := range paths {
			st, err := os.Stat(filepath.Join(p.BaseDir, path))
			if errs.Add(err) || st.IsDir() {
				continue
			}
			_, err = p.Load(path)
			errs.Add(err)
		}
	}
	return errs.Aggregate()
}

// Finalize builds up the relationship between targets and settings
// and also verifies any cyclic dependencies
func (p *Project) Finalize() error {
	errs := errors.AggregatedError{}
	p.Targets = make(TargetNameMap)
	for name, t := range p.MasterFile.Targets {
		t.Initialize(name, p)
		errs.Add(p.Targets.Add(t))
	}
	errs.AddMany(
		p.Targets.BuildDeps(),
		p.Targets.CheckCyclicDeps(),
	)

	return errs.Aggregate()
}

// Plan creates an ExecPlan for this project
func (p *Project) Plan() *ExecPlan {
	return NewExecPlan(p)
}

// TargetNames returns sorted target names
func (p *Project) TargetNames() []string {
	targets := make([]string, 0, len(p.Targets))
	for name := range p.Targets {
		targets = append(targets, name)
	}
	sort.Strings(targets)
	return targets
}

// TargetNamesMatch returns sorted and matched target names
func (p *Project) TargetNamesMatch(pattern string) (names []string, err error) {
	names, err = p.Targets.CompleteName(pattern)
	if err == nil {
		sort.Strings(names)
	}
	return
}

// GetSettings maps settings into provided variable
func (p *Project) GetSettings(v interface{}) error {
	return p.MasterFile.Settings.Get(v)
}

// GetSettingsIn maps settings[name] into provided variable
func (p *Project) GetSettingsIn(name string, v interface{}) error {
	return p.MasterFile.Settings.GetBy(name, v)
}

// MergeSettingsFlat merges settings from a flat key/value map
func (p *Project) MergeSettingsFlat(flat map[string]interface{}) error {
	sets := p.MasterFile.Settings
	if sets == nil {
		sets = make(Settings)
		p.MasterFile.Settings = sets
	}
	return sets.MergeFlat(flat)
}

// WorkPath returns the internal state folder (.hmake) for hmake
func (p *Project) WorkPath() string {
	return filepath.Join(p.BaseDir, WorkFolder)
}

// DebugLogFile returns the fullpath to debug log file
func (p *Project) DebugLogFile() string {
	return filepath.Join(p.WorkPath(), LogFileName)
}

// SummaryFile returns the fullpath to summary file
func (p *Project) SummaryFile() string {
	return filepath.Join(p.WorkPath(), SummaryFileName)
}

// Summary loads the execution summary
func (p *Project) Summary() (ExecSummary, error) {
	f, err := os.Open(p.SummaryFile())
	if err != nil {
		return nil, err
	}
	defer f.Close()
	var summary ExecSummary
	return summary, json.NewDecoder(f).Decode(&summary)
}

// WrapperTarget returns the wrapper target if in wrapper mode
func (p *Project) WrapperTarget() *Target {
	name := p.MasterFile.WrapperTarget
	if name != "" {
		return p.Targets[name]
	}
	return nil
}


text:
'use strict';

const _ = require('lodash');
const misc = require('../../misc');
const wait = require('../../wait');

describe('cluster state', () => {
    const teraslice = misc.teraslice();

    function findWorkers(nodes, type, jobId) {
        return _.filter(nodes, (worker) => {
            if (jobId) {
                if (type) {
                    return worker.assignment === type && worker.job_id === jobId;
                }

                return worker.job_id === jobId;
            }

            return worker.assignment === type;
        });
    }

    function checkState(state, type, jobId) {
        return _.flatten(_.map(state, node => findWorkers(node.active, type, jobId))).length;
    }

    function verifyClusterMaster(state) {
        // verify that the cluster master worker exists within the state
        const nodes = _.filter(state, (node) => {
            const cms = findWorkers(node.active, 'cluster_master');
            return cms.length > 0;
        });

        expect(nodes).toBeArrayOfSize(1);

        // verify that the cluster master has the cluster master worker
        const activeWorkers = nodes[0].active;
        expect(activeWorkers.length).toBeGreaterThanOrEqualTo(1);
        const cmWorkers = findWorkers(activeWorkers, 'cluster_master');
        expect(cmWorkers).toBeArrayOfSize(1);
        expect(cmWorkers[0].assignment).toEqual('cluster_master');

        // verify that the cluster master has the assets service worker
        const amWorkers = findWorkers(activeWorkers, 'assets_service');
        expect(amWorkers).toBeArrayOfSize(1);
        expect(amWorkers[0].assignment).toEqual('assets_service');
    }

    function verifyClusterState(state, nodeCount) {
        expect(_.keys(state)).toBeArrayOfSize(nodeCount);

        // verify each node
        _.forEach(state, (node) => {
            expect(node.total).toBe(5);
            expect(node.node_id).toBeDefined();
            expect(node.hostname).toBeDefined();

            // Nodes should have 1-5 workers available.
            expect(node.available).toBeWithinRange(0, 6);

            const expectActiveLength = node.total - node.available;
            expect(node.active).toBeArrayOfSize(expectActiveLength);
        });

        // verify cluster master
        verifyClusterMaster(state);
    }

    it('should match default configuration', (done) => {
        teraslice.cluster.state()
            .then((state) => {
                verifyClusterState(state, 4);
            })
            .catch(fail)
            .finally(done);
    });

    it('should update after adding and removing a worker node', (done) => {
        // Add a second worker node
        misc.scale(5)
            .then(() =>
            // Wait for it to show up in cluster state.
                wait.forNodes(6))
            .then(() => teraslice.cluster.state())
            .then((state) => {
                verifyClusterState(state, 6);
            })
            .then(() =>
            // Scale back to a default worker count.
                misc.scale(3))
            .then(() =>
            // Should just be 4 nodes now.
                wait.forNodes(4))
            .then(() => teraslice.cluster.state())
            .then((state) => {
                verifyClusterState(state, 4);
            })
            .catch(fail)
            .finally(done);
    });

    it('should update after adding and removing 10 worker nodes', (done) => {
        // Add additional worker nodes. There's one already and we want 13 more.
        misc.scale(13)
            .then(() =>
            // Wait for all the nodes to show up in cluster state.
                wait.forNodes(14))
            .then(() => teraslice.cluster.state())
            .then((state) => {
                verifyClusterState(state, 14);
            })
            .then(() =>
            // Scale back to a default worker count.
                misc.scale(3))
            .then(() =>
            // Should just be 4 nodes now.
                wait.forNodes(4))
            .then(() => teraslice.cluster.state())
            .then((state) => {
                verifyClusterState(state, 4);
            })
            .catch(fail)
            .finally(done);
    });

    it('should be correct for running job with 1 worker', (done) => {
        const jobSpec = misc.newJob('reindex');
        jobSpec.name = 'cluster state with 1 worker';
        jobSpec.operations[0].index = 'example-logs-1000';
        jobSpec.operations[0].size = 100;
        jobSpec.operations[1].index = 'test-clusterstate-job-1-1000';
        let jobId;

        teraslice.jobs.submit(jobSpec)
            .then((job) => {
                jobId = job.id();
                // The job may run for a while so we have to wait for it to finish.
                return job
                    .waitForStatus('running')
                    .then(() => teraslice.cluster.state())
                    .then((state) => {
                        const nodes = _.keys(state);
                        nodes.forEach((node) => {
                            expect(state[node].total).toBe(5);

                            // / Nodes should have 1-5 workers available.
                            expect(state[node].available).toBeWithinRange(0, 6);

                            // The node with more than one worker should have the actual worker
                            // and there should only be one.
                            if (state[node].active.length > 2) {
                                expect(findWorkers(state[node].active, 'worker', jobId).length).toBe(1);
                            }
                            expect(checkState(state, null, jobId)).toBe(2);
                        });
                    })
                    .then(() => job.waitForStatus('completed'));
            })
            .then(() => misc.indexStats('test-clusterstate-job-1-1000')
                .then((stats) => {
                    expect(stats.count).toBe(1000);
                    expect(stats.deleted).toBe(0);
                }))
            .catch((err) => {
                fail(err);
            })
            .finally(done);
    });

    it('should be correct for running job with 4 workers', (done) => {
        const jobSpec = misc.newJob('reindex');
        jobSpec.name = 'cluster state with 2 workers';
        jobSpec.workers = 4;
        jobSpec.operations[0].index = 'example-logs-1000';
        jobSpec.operations[0].size = 20;
        jobSpec.operations[1].index = 'test-clusterstate-job-4-1000';
        let jobId;

        teraslice.jobs.submit(jobSpec)
            .then((job) => {
                // The job may run for a while so we have to wait for it to finish.
                jobId = job.id();

                return job
                    .waitForStatus('running')
                    .then(() => teraslice.cluster.state())
                    .then((state) => {
                        const nodes = _.keys(state);
                        nodes.forEach((node) => {
                            expect(state[node].total).toBe(5);

                            // Nodes should have 1-5 workers available.
                            expect(state[node].available).toBeWithinRange(0, 6);

                            // Both nodes should have at least one worker.
                            expect(findWorkers(state[node].active, 'worker', jobId).length).toBeGreaterThan(0);

                            expect(checkState(state, null, jobId)).toBe(5);
                        });
                    })
                    .then(() => job.waitForStatus('completed'));
            })
            .then(() => misc.indexStats('test-clusterstate-job-4-1000')
                .then((stats) => {
                    expect(stats.count).toBe(1000);
                    expect(stats.deleted).toBe(0);
                }))
            .catch(fail)
            .finally(done);
    });
});


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

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>OpenNI 1.5.7: xn::ModuleExtendedSerializationInterface Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

OpenNI 1.5.7

Main Page

Related Pages

Modules

Namespaces

Classes

Files

Class List

Class Index

Class Hierarchy

Class Members

xn

ModuleExtendedSerializationInterface

Public Member Functions |
List of all members

xn::ModuleExtendedSerializationInterface Class Referenceabstract

#include <XnModuleCppInterface.h>

Public Member Functions

virtual 	~ModuleExtendedSerializationInterface ()

virtual XnStatus 	NotifyExState (XnNodeNotifications *pNotifications, void *pCookie)=0

virtual void 	UnregisterExNotifications ()=0

Constructor & Destructor Documentation

          virtual xn::ModuleExtendedSerializationInterface::~ModuleExtendedSerializationInterface
          (
          	)

inlinevirtual

Member Function Documentation

          virtual XnStatus xn::ModuleExtendedSerializationInterface::NotifyExState
          (
          XnNodeNotifications *
          pNotifications,

          void *
          pCookie

          )

pure virtual

          virtual void xn::ModuleExtendedSerializationInterface::UnregisterExNotifications
          (
          	)

pure virtual

The documentation for this class was generated from the following file:

XnModuleCppInterface.h

<address class="footer">
Generated on Tue Nov 12 2013 13:40:22 for OpenNI 1.5.7 by

 1.8.3.1
</address>


text:
var express = require('express');
var fs = require('fs');
var router = express.Router();

router.get('/emma/faq', function(req, res) {
  var faqs = JSON.parse(fs.readFileSync('public/projects/emma/faq/faq.json', 'utf8'));
  res.render('projects/emma/faq', {faqs: faqs});
});

module.exports = router;


text:
namespace LemonStorage.Classes.Accessories
{
    using LemonStorage.Interfaces;
    using System;

    public class LaptopBag : Accessories,IAccessories, IProduct, ISavable
    {
        private const double MinCapacity = 7;

        private double maximumCapacityInInches; //Example: for laptop 15.6 inches
        private string wearingStyle; //backpack, bag

        public LaptopBag(int price, string brand, string model, string color, string material, double maximumCapacityInInches, string wearingStyle)
            : base(price, brand, model, color, material)
        {
            this.MaximumCapacityInInches = maximumCapacityInInches;
            this.WearingStyle = wearingStyle;
        }

         public double MaximumCapacityInInches
         {
             get
             {
                 return this.maximumCapacityInInches;
             }
             set
             {
                 if (value < MinCapacity)
                 {
                     throw new ArgumentNullException(string.Format("Capacity can not be less than {0}!", MinCapacity));
                 }
                 this.maximumCapacityInInches = value;
             }
         }

         public string WearingStyle
         {
             get
             {
                 return this.wearingStyle;
             }
             set
             {
                 if (string.IsNullOrEmpty(value))
                 {
                     throw new ArgumentNullException("Wearing style can not be empty!");
                 }
                 this.wearingStyle = value;
             }
         }
    }
}


text:
from ethereum.utils import decode_hex

from raiden.raiden_service import RaidenService, DEFAULT_REVEAL_TIMEOUT, DEFAULT_SETTLE_TIMEOUT
from raiden.network.transport import UDPTransport, TokenBucket
from raiden.utils import pex

INITIAL_PORT = 40001
DEFAULT_EVENTS_POLL_TIMEOUT = 0.5

class App(object):  # pylint: disable=too-few-public-methods
    default_config = dict(
        host='',
        port=INITIAL_PORT,
        privatekey_hex='',
        # number of blocks that a node requires to learn the secret before the lock expires
        reveal_timeout=DEFAULT_REVEAL_TIMEOUT,
        settle_timeout=DEFAULT_SETTLE_TIMEOUT,
        # how long to wait for a transfer until TimeoutTransfer is sent (time in milliseconds)
        msg_timeout=100.00,
        # throttle policy for token bucket
        throttle_capacity=10.,
        throttle_fill_rate=10.,
    )

    def __init__(self, config, chain, discovery, transport_class=UDPTransport):
        self.config = config
        self.discovery = discovery
        self.transport = transport_class(config['host'], config['port'])
        self.transport.throttle_policy = TokenBucket(
            config['throttle_capacity'],
            config['throttle_fill_rate']
        )
        self.raiden = RaidenService(
            chain,
            decode_hex(config['privatekey_hex']),
            self.transport,
            discovery,
            config,
        )
        self.services = {'raiden': self.raiden}
        self.start_console = True

    def __repr__(self):
        return '<{} {}>'.format(
            self.__class__.__name__,
            pex(self.raiden.address),
        )

    def stop(self):
        self.raiden.stop()

        # The transport must be stopped after the protocol. The protocol can be
        # running multiple threads of execution and it expects the protocol to
        # be available.
        self.transport.stop()


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

<title>Uses of Class com.vangav.backend.networks.rest_client.RestResponseJson</title>
<meta name="date" content="2016-10-22">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Class
com.vangav.backend.networks.rest_client.RestResponseJson

Packages that use RestResponseJson

Package
Description

com.vangav.backend.networks.rest_client

com.vangav.backend.public_apis.car2go

com.vangav.backend.public_apis.car2go.json.gas_stations

com.vangav.backend.public_apis.car2go.json.operation_area

com.vangav.backend.public_apis.car2go.json.parking_spots

com.vangav.backend.public_apis.car2go.json.vehicles

com.vangav.backend.public_apis.facebook

com.vangav.backend.public_apis.facebook.json

com.vangav.backend.public_apis.facebook.json.edges.albums

com.vangav.backend.public_apis.facebook.json.edges.books

com.vangav.backend.public_apis.facebook.json.edges.edge

com.vangav.backend.public_apis.facebook.json.edges.family

com.vangav.backend.public_apis.facebook.json.edges.feed

com.vangav.backend.public_apis.facebook.json.edges.friends

com.vangav.backend.public_apis.facebook.json.edges.games

com.vangav.backend.public_apis.facebook.json.edges.invitable_friends

com.vangav.backend.public_apis.facebook.json.edges.likes

com.vangav.backend.public_apis.facebook.json.edges.movies

com.vangav.backend.public_apis.facebook.json.edges.music

com.vangav.backend.public_apis.facebook.json.edges.permissions

com.vangav.backend.public_apis.facebook.json.edges.photos

com.vangav.backend.public_apis.facebook.json.edges.taggable_friends

com.vangav.backend.public_apis.facebook.json.edges.tagged_places

com.vangav.backend.public_apis.facebook.json.edges.television

com.vangav.backend.public_apis.facebook.json.fields

com.vangav.backend.public_apis.facebook.json.fields.age_range

com.vangav.backend.public_apis.facebook.json.fields.cover

com.vangav.backend.public_apis.facebook.json.fields.currency

com.vangav.backend.public_apis.facebook.json.fields.devices

com.vangav.backend.public_apis.facebook.json.fields.education

com.vangav.backend.public_apis.facebook.json.fields.favorite_athletes

com.vangav.backend.public_apis.facebook.json.fields.favorite_teams

com.vangav.backend.public_apis.facebook.json.fields.hometown

com.vangav.backend.public_apis.facebook.json.fields.languages

com.vangav.backend.public_apis.facebook.json.fields.location

com.vangav.backend.public_apis.facebook.json.fields.sports

com.vangav.backend.public_apis.facebook.json.fields.work

com.vangav.backend.security.authentication.facebook

com.vangav.backend.security.authentication.google

Uses of RestResponseJson in com.vangav.backend.networks.rest_client

Methods in com.vangav.backend.networks.rest_client that return RestResponseJson

Modifier and Type
Method and Description

RestResponseJson
RestResponseJson.fromJsonString(java.lang.String json)

fromJsonString

RestResponseJson
RestAsync.getRestResponseJson()

getRestResponseJson

RestResponseJson
RestResponseJsonGroup.getRestResponseJson(int httpStatusCode)

getRestResponseJson

static RestResponseJson
RestSyncInl.getRestResponseJson(RestResponseJsonGroup restResponseJsonGroup,
                   java.net.URLConnection urlConnection)

getRestResponseJson

static RestResponseJson
RestSyncInl.getRestResponseJson(RestResponseJson restResponseJson,
                   java.net.URLConnection urlConnection)

getRestResponseJson

Methods in com.vangav.backend.networks.rest_client with parameters of type RestResponseJson

Modifier and Type
Method and Description

void
RestResponseJsonGroup.addRestResponseJson(int httpStatusCode,
                   RestResponseJson restResponseJson)

addRestResponseJson
 adds/updates a pair of http status code and the corresponding
   RestResponseJson Object

RestResponseJsonGroup.RestResponseJsonGroupBuilder
RestResponseJsonGroup.RestResponseJsonGroupBuilder.addRestResponseJson(int httpStatusCode,
                   RestResponseJson restResponseJson)

addRestResponseJson
 used to add as many RestResponseJson Objects as needed for the HTTP
   Status Codes to be handled

static RestResponseJson
RestSyncInl.getRestResponseJson(RestResponseJson restResponseJson,
                   java.net.URLConnection urlConnection)

getRestResponseJson

Constructors in com.vangav.backend.networks.rest_client with parameters of type RestResponseJson

Constructor and Description

RestResponseJsonGroup(RestResponseJson restResponseJsonSuccess)

Constructor RestResponseJsonGroup
 simplified constructor in case user only wants to define a response for
   SUCCESS 200 requests and null otherwise

RestResponseJsonGroup(RestResponseJson restResponseJsonSuccess,
                     RestResponseJson restResponseJsonBadRequest)

Constructor RestResponseJsonGroup
 simplified constructor in case user only wants to define a response for
   SUCCESS 200 and BAD_REQUEST 400 requests and null otherwise

RestResponseJsonGroup(RestResponseJson restResponseJsonSuccess,
                     RestResponseJson restResponseJsonBadRequest,
                     RestResponseJson restResponseJsonInternalError)

Constructor RestResponseJsonGroup
 simplified constructor in case user only wants to define a response for
   SUCCESS 200, BAD_REQUEST 400 and INTERNAL_ERROR 500 requests and null
   otherwise

Uses of RestResponseJson in com.vangav.backend.public_apis.car2go

Subclasses of RestResponseJson in com.vangav.backend.public_apis.car2go

Modifier and Type
Class and Description

class
ErrorResponse

ErrorResponse represents Car2Go's graph API responses other than Success
   200

 v2.1

 Reference:
 https://github.com/car2go/openAPI

Methods in com.vangav.backend.public_apis.car2go that return types with arguments of type RestResponseJson

Modifier and Type
Method and Description

java.util.Map<LocationType,Pair<java.lang.Boolean,RestResponseJson>>
Car2GoApi.getEdgeAsync(java.lang.String requestTrackingUuid)

getEdgeAsync
 BLOCKING method
 gets the response of a previously issued async request

java.util.Map<LocationType,Pair<java.lang.Boolean,RestResponseJson>>
Car2GoApi.getEdgeSync(Car2GoApi.EdgeType edgeType,
           LocationType... locations)

getEdgeSync
 BLOCKING method
 gets an edge's data (from param edgeType) for param locations

Uses of RestResponseJson in com.vangav.backend.public_apis.car2go.json.gas_stations

Subclasses of RestResponseJson in com.vangav.backend.public_apis.car2go.json.gas_stations

Modifier and Type
Class and Description

class
GasStations

GasStations represents car2go API's gas stations in a given location

 v2.1

 Reference:
 https://github.com/car2go/openAPI

Uses of RestResponseJson in com.vangav.backend.public_apis.car2go.json.operation_area

Subclasses of RestResponseJson in com.vangav.backend.public_apis.car2go.json.operation_area

Modifier and Type
Class and Description

class
OperationAreas

OperationAreas represents car2go API's operation areas in a given location

 v2.1

 Reference:
 https://github.com/car2go/openAPI

Uses of RestResponseJson in com.vangav.backend.public_apis.car2go.json.parking_spots

Subclasses of RestResponseJson in com.vangav.backend.public_apis.car2go.json.parking_spots

Modifier and Type
Class and Description

class
ParkingSpots

ParkingSpots represents car2go API's parking spots in a given location

 v2.1

 Reference:
 https://github.com/car2go/openAPI

Uses of RestResponseJson in com.vangav.backend.public_apis.car2go.json.vehicles

Subclasses of RestResponseJson in com.vangav.backend.public_apis.car2go.json.vehicles

Modifier and Type
Class and Description

class
Vehicles

Vehicles represents car2go API's vehicles in a given location

 v2.1

 Reference:
 https://github.com/car2go/openAPI

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook

Methods in com.vangav.backend.public_apis.facebook that return types with arguments of type RestResponseJson

Modifier and Type
Method and Description

java.util.Map<FacebookGraphApiEdgeType,Pair<FacebookGraph.FacebookApiResponseStatus,RestResponseJson>>
FacebookGraph.getEdgesAsync(java.lang.String requestTrackingUuid)

getEdgesAsync
 BLOCKING method
 NOTE: This method doesn't support paging (gets only the first page),
         paging will be added in the next iteration.

java.util.Map<FacebookGraphApiEdgeType,Pair<FacebookGraph.FacebookApiResponseStatus,RestResponseJson>>
FacebookGraph.getEdgesSync(FacebookGraphApiEdgeType... edges)

getEdgesSync
 BLOCKING method
 NOTE: This method doesn't support paging (gets only the first page),
         paging will be added in the next iteration.

java.util.Map<FacebookGraphApiFieldType,Pair<FacebookGraph.FacebookApiResponseStatus,RestResponseJson>>
FacebookGraph.getFieldsAsync(java.lang.String requestTrackingUuid)

getFieldsAsync
 BLOCKING method

java.util.Map<FacebookGraphApiFieldType,Pair<FacebookGraph.FacebookApiResponseStatus,RestResponseJson>>
FacebookGraph.getFieldsSync(FacebookGraphApiFieldType... fields)

getFieldsSync
 BLOCKING method

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json

Modifier and Type
Class and Description

class
BadRequestResponse

BadRequestResponse represents Facebook's graph API BadRequest response

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.albums

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.albums

Modifier and Type
Class and Description

class
Albums

Albums represents Facebook's graph API edge albums

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.books

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.books

Modifier and Type
Class and Description

class
Books

Books represents Facebook's graph API edge books

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.edge

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.edge

Modifier and Type
Class and Description

class
FacebookGraphApiEdge

FacebookGraphApiEdge is the parent class for all Facebook Graph API edges

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.family

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.family

Modifier and Type
Class and Description

class
Family

Family represents Facebook's graph API edge family

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.feed

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.feed

Modifier and Type
Class and Description

class
Feed

Feed represents Facebook's graph API edge feed

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.friends

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.friends

Modifier and Type
Class and Description

class
Friends

Friends represents Facebook's graph API edge friends

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.games

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.games

Modifier and Type
Class and Description

class
Games

Games represents Facebook's graph API edge games

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.invitable_friends

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.invitable_friends

Modifier and Type
Class and Description

class
InvitableFriends

InvitableFriend represents Facebook's graph API edge invitable_friends

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.likes

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.likes

Modifier and Type
Class and Description

class
Likes

Likes represents Facebook's graph API edge likes

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.movies

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.movies

Modifier and Type
Class and Description

class
Movies

Movies represents Facebook's graph API edge movies

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.music

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.music

Modifier and Type
Class and Description

class
Music

Music represents Facebook's graph API edge music

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.permissions

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.permissions

Modifier and Type
Class and Description

class
Permissions

Permissions represents Facebook's graph API edge permissions

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.photos

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.photos

Modifier and Type
Class and Description

class
Photos

Photos represents Facebook's graph API edge photos

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.taggable_friends

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.taggable_friends

Modifier and Type
Class and Description

class
TaggableFriends

TaggableFriends represents Facebook's graph API edge taggable_friends

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.tagged_places

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.tagged_places

Modifier and Type
Class and Description

class
TaggedPlaces

TaggedPlaces represents Facebook's graph API edge tagged_places

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.television

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.edges.television

Modifier and Type
Class and Description

class
Television

Television represents Facebook's graph API edge television

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields

Modifier and Type
Class and Description

class
About

About represents Facebook's graph API about field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

class
Bio

Bio represents Facebook's graph API bio field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

class
Birthday

Birthday represents Facebook's graph API birthday field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

class
Email

Email represents Facebook's graph API email field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

class
FacebookGraphApiField

FacebookGraphApiField is the parent class for all Facebook Graph API fields

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

class
FirstName

FirstName represents Facebook's graph API first_name field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

class
Gender

Gender represents Facebook's graph API gender field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

class
Id

Id represents Facebook's graph API id field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

class
InterestedIn

InterestedIn represents Facebook's graph API interested_in field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

class
IsVerified

IsVerified represents Facebook's graph API is_verified field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

class
LastName

LastName represents Facebook's graph API last_name field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

class
Link

Link represents Facebook's graph API link field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

class
Locale

Locale represents Facebook's graph API locale field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

class
MeetingFor

MeetingFor represents Facebook's graph API meeting_for field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

class
MiddleName

MiddleName represents Facebook's graph API middle_name field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

class
Name

Name represents Facebook's graph API name field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

class
NameFormat

NameFormat represents Facebook's graph API name_format field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

class
Quotes

Quotes represents Facebook's graph API quotes field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

class
RelationshipStatus

RelationshipStatus represents Facebook's graph API relationship_status field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

class
ThirdPartyId

ThirdPartyId represents Facebook's graph API third_party_id field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

class
Timezone

Timezone represents Facebook's graph API timezone field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

class
Verified

Verified represents Facebook's graph API verified field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.age_range

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.age_range

Modifier and Type
Class and Description

class
AgeRange

AgeRange represents Facebook's graph API age_range field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.cover

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.cover

Modifier and Type
Class and Description

class
Cover

Cover represents Facebook's graph API cover field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.currency

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.currency

Modifier and Type
Class and Description

class
Currency

Currency represents Facebook's graph API currency field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.devices

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.devices

Modifier and Type
Class and Description

class
Devices

Devices represents Facebook's graph API devices field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.education

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.education

Modifier and Type
Class and Description

class
Education

Education represents Facebook's graph API education field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.favorite_athletes

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.favorite_athletes

Modifier and Type
Class and Description

class
FavoriteAthletes

FavoriteAthletes represents Facebook's graph API favorite_athletes field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.favorite_teams

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.favorite_teams

Modifier and Type
Class and Description

class
FavoriteTeams

FavoriteTeams represents Facebook's graph API favorite_teams field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.hometown

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.hometown

Modifier and Type
Class and Description

class
Hometown

Hometown represents Facebook's graph API hometown field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.languages

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.languages

Modifier and Type
Class and Description

class
Languages

Languages represents Facebook's graph API languages field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.location

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.location

Modifier and Type
Class and Description

class
Location

Location represents Facebook's graph API location field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.sports

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.sports

Modifier and Type
Class and Description

class
Sports

Sports represents Facebook's graph API sports field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.work

Subclasses of RestResponseJson in com.vangav.backend.public_apis.facebook.json.fields.work

Modifier and Type
Class and Description

class
Work

Work represents Facebook's graph API work field

 Reference:
 https://developers.facebook.com/docs/graph-api/reference/v2.7/user

Uses of RestResponseJson in com.vangav.backend.security.authentication.facebook

Subclasses of RestResponseJson in com.vangav.backend.security.authentication.facebook

Modifier and Type
Class and Description

class
ResponseFacebookAuth

ResponseFacebookAuth: JSON class representing Facebook's authentication
                         response

Uses of RestResponseJson in com.vangav.backend.security.authentication.google

Subclasses of RestResponseJson in com.vangav.backend.security.authentication.google

Modifier and Type
Class and Description

class
ResponseGoogleAuth

ResponseGoogleAuth: JSON class representing Google's authentication
                       response

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes


text:
import * as KeyCode from 'keycode-js';

const shouldBeMultiSelectable = (maxSelectionCount, selectedKeys, key) => (maxSelectionCount < 0 || selectedKeys.indexOf(key) >= 0 || selectedKeys.length < maxSelectionCount);

/**
 * Returns a new array, updated with the newKey being added or removed from the existing.
 */
const updatedMultiSelectedKeys = (currentKeys, newKey) => {
  let newKeys = [];
  if (currentKeys.length) {
    if (currentKeys.indexOf(newKey) >= 0) {
      newKeys = currentKeys.slice();
      newKeys.splice(newKeys.indexOf(newKey), 1);
    } else {
      newKeys = currentKeys.concat([newKey]);
    }
  } else {
    newKeys.push(newKey);
  }
  return newKeys;
};

/**
 * Returns a wrapped onClick callback function. If the onSelect method isn't passed, we return the initial onClick.
 */
const wrappedOnClickForItem = (onClick, onSelect, metaData) => {
  if (!onSelect) {
    return onClick;
  }
  return (event) => {
    onSelect(event, metaData);

    if (onClick) {
      onClick(event);
    }
  };
};

/**
 * Returns a wrapped onKeyDown callback function with enter and space keys triggering onSelect. If the onSelect method isn't passed, we return the initial onClick.
 */
const wrappedOnKeyDownForItem = (onKeyDown, onSelect, metaData) => {
  if (!onSelect) {
    return onKeyDown;
  }
  return (event) => {
    if (event.nativeEvent.keyCode === KeyCode.KEY_RETURN || event.nativeEvent.keyCode === KeyCode.KEY_SPACE) {
      onSelect(event, metaData);
    }

    if (onKeyDown) {
      onKeyDown(event);
    }
  };
};

/**
 * Returns a function that wraps both the old and new callback.
 */
const wrappedEventCallback = (callback, newCallback) => {
  if (!callback) {
    return newCallback;
  }
  return (event) => {
    newCallback(event);

    if (callback) {
      callback(event);
    }
  };
};

const SelectableUtils = {
  updatedMultiSelectedKeys,
  shouldBeMultiSelectable,
  wrappedOnClickForItem,
  wrappedOnKeyDownForItem,
  wrappedEventCallback,
};

export default SelectableUtils;


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Gyrophora depressa f. vulgaris Schaer.

### Remarks
null


text:
import spawn from 'cross-spawn'
import logUpdate from 'log-update'
import { spinner } from './spinner'
import { logger } from './logger'
import { SAOError } from './error'

export type NPM_CLIENT = 'npm' | 'yarn' | 'pnpm'

let cachedNpmClient: NPM_CLIENT | null = null

export function setNpmClient(npmClient: NPM_CLIENT): void {
  cachedNpmClient = npmClient
}

export function getNpmClient(): NPM_CLIENT {
  if (cachedNpmClient) {
    return cachedNpmClient
  }

  if (spawn.sync('yarn', ['--version']).status === 0) {
    cachedNpmClient = 'yarn'
  } else {
    cachedNpmClient = 'npm'
  }

  return cachedNpmClient
}

export interface InstallOptions {
  cwd: string
  npmClient?: NPM_CLIENT
  installArgs?: string[]
  packages?: string[]
  saveDev?: boolean
  registry?: string
}

export const installPackages = async ({
  cwd,
  npmClient: _npmClient,
  installArgs,
  packages,
  saveDev,
  registry,
}: InstallOptions): Promise<{ code: number }> => {
  const npmClient = _npmClient || getNpmClient()

  const packageName = packages ? packages.join(', ') : 'packages'

  return new Promise((resolve, reject) => {
    // `npm/pnpm/yarn add <packages>`
    // `npm/pnpm/yarn install`
    const args = [packages ? 'add' : 'install'].concat(packages ? packages : [])
    if (saveDev) {
      args.push(npmClient === 'npm' ? '-D' : '--dev')
    }
    if (registry) {
      args.push('--registry', registry)
    }

    if (installArgs) {
      args.push(...installArgs)
    }

    logger.debug(npmClient, args.join(' '))
    logger.debug('install directory', cwd)
    spinner.start(`Installing ${packageName} with ${npmClient}`)
    const ps = spawn(npmClient, args, {
      stdio: [0, 'pipe', 'pipe'],
      cwd,
      env: Object.assign(
        {
          FORCE_COLOR: true,
          /* eslint-disable camelcase */
          npm_config_color: 'always',
          npm_config_progress: true,
          /* eslint-enable camelcase */
        },
        process.env
      ),
    })

    let stdoutLogs = ''
    let stderrLogs = ''

    ps.stdout &&
      ps.stdout.setEncoding('utf8').on('data', (data) => {
        if (npmClient === 'pnpm') {
          stdoutLogs = data
        } else {
          stdoutLogs += data
        }
        spinner.stop()
        logUpdate(stdoutLogs)
        spinner.start()
      })

    ps.stderr &&
      ps.stderr.setEncoding('utf8').on('data', (data) => {
        if (npmClient === 'pnpm') {
          stderrLogs = data
        } else {
          stderrLogs += data
        }
        spinner.stop()
        logUpdate.clear()
        logUpdate.stderr(stderrLogs)
        logUpdate(stdoutLogs)
        spinner.start()
      })

    ps.on('close', (code) => {
      spinner.stop()
      // Clear output when succeeded
      if (code === 0) {
        logUpdate.clear()
        logUpdate.stderr.clear()
        logger.success(`Installed ${packageName}`)
        resolve({ code })
      } else {
        reject(new SAOError(`Failed to install ${packageName} in ${cwd}`))
      }
    })

    ps.on('error', reject)
  })
}


text:
import React, {useState} from 'react';
import {EuiSuperSelect} from "@elastic/eui";

export const seekStates = [
   "EARLIEST",
   "LATEST",
]

/**
 * A component that renders a drop-down of seek states.
 * The provided callback is invoked when the selected value changes.
 *
 * @param selected the initially selected value, or null
 * @param onSelect the callback invoked when the value changes
 */
export const PipelineSeekDropDown = ({selected, onSelect}) => {

   const [value, setValue] = useState(selected ? selected : "");

   const options = seekStates.map(state => {
      return {
         value: state,
         inputDisplay: state,
      }
   });

   const onChange = (value) => {
      setValue(value);
      onSelect(value);
   };

   return (
      <EuiSuperSelect
         options={options}
         valueOfSelected={value}
         isLoading={false}
         onChange={(value) => onChange(value)}
      />
   );
}