text:
.class public final Landroid/security/KeyChain;
.super Ljava/lang/Object;
.source "KeyChain.java"

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Landroid/security/KeyChain$KeyChainConnection;,
        Landroid/security/KeyChain$AliasResponse;
    }
.end annotation

# static fields
.field public static final ACCOUNT_TYPE:Ljava/lang/String; = "com.android.keychain"

.field private static final ACTION_CHOOSER:Ljava/lang/String; = "com.android.keychain.CHOOSER"

.field private static final ACTION_INSTALL:Ljava/lang/String; = "android.credentials.INSTALL"

.field public static final ACTION_STORAGE_CHANGED:Ljava/lang/String; = "android.security.STORAGE_CHANGED"

.field public static final EXTRA_ALIAS:Ljava/lang/String; = "alias"

.field public static final EXTRA_CERTIFICATE:Ljava/lang/String; = "CERT"

.field public static final EXTRA_HOST:Ljava/lang/String; = "host"

.field public static final EXTRA_NAME:Ljava/lang/String; = "name"

.field public static final EXTRA_PKCS12:Ljava/lang/String; = "PKCS12"

.field public static final EXTRA_PORT:Ljava/lang/String; = "port"

.field public static final EXTRA_RESPONSE:Ljava/lang/String; = "response"

.field public static final EXTRA_SENDER:Ljava/lang/String; = "sender"

.field private static final TAG:Ljava/lang/String; = "KeyChain"

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

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

    .line 386
    return-void
.end method

.method public static bind(Landroid/content/Context;)Landroid/security/KeyChain$KeyChainConnection;
    .locals 6
    .parameter "context"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/InterruptedException;
        }
    .end annotation

    .prologue
    const/4 v5, 0x1

    .line 411
    if-nez p0, :cond_0

    .line 412
    new-instance v3, Ljava/lang/NullPointerException;

    const-string v4, "context == null"

    invoke-direct {v3, v4}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v3

    .line 414
    :cond_0
    invoke-static {p0}, Landroid/security/KeyChain;->ensureNotOnMainThread(Landroid/content/Context;)V

    .line 415
    new-instance v2, Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-direct {v2, v5}, Ljava/util/concurrent/LinkedBlockingQueue;-><init>(I)V

    .line 416
    .local v2, q:Ljava/util/concurrent/BlockingQueue;,"Ljava/util/concurrent/BlockingQueue<Landroid/security/IKeyChainService;>;"
    new-instance v1, Landroid/security/KeyChain$1;

    invoke-direct {v1, v2}, Landroid/security/KeyChain$1;-><init>(Ljava/util/concurrent/BlockingQueue;)V

    .line 430
    .local v1, keyChainServiceConnection:Landroid/content/ServiceConnection;
    new-instance v3, Landroid/content/Intent;

    const-class v4, Landroid/security/IKeyChainService;

    invoke-virtual {v4}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    invoke-virtual {p0, v3, v1, v5}, Landroid/content/Context;->bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z

    move-result v0

    .line 433
    .local v0, isBound:Z
    if-nez v0, :cond_1

    .line 434
    new-instance v3, Ljava/lang/AssertionError;

    const-string v4, "could not bind to KeyChainService"

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

    throw v3

    .line 436
    :cond_1
    new-instance v4, Landroid/security/KeyChain$KeyChainConnection;

    invoke-interface {v2}, Ljava/util/concurrent/BlockingQueue;->take()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Landroid/security/IKeyChainService;

    const/4 v5, 0x0

    invoke-direct {v4, p0, v1, v3, v5}, Landroid/security/KeyChain$KeyChainConnection;-><init>(Landroid/content/Context;Landroid/content/ServiceConnection;Landroid/security/IKeyChainService;Landroid/security/KeyChain$1;)V

    return-object v4
.end method

.method public static choosePrivateKeyAlias(Landroid/app/Activity;Landroid/security/KeyChainAliasCallback;[Ljava/lang/String;[Ljava/security/Principal;Ljava/lang/String;ILjava/lang/String;)V
    .locals 5
    .parameter "activity"
    .parameter "response"
    .parameter "keyTypes"
    .parameter "issuers"
    .parameter "host"
    .parameter "port"
    .parameter "alias"

    .prologue
    const/4 v4, 0x0

    .line 266
    if-nez p0, :cond_0

    .line 267
    new-instance v1, Ljava/lang/NullPointerException;

    const-string v2, "activity == null"

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

    throw v1

    .line 269
    :cond_0
    if-nez p1, :cond_1

    .line 270
    new-instance v1, Ljava/lang/NullPointerException;

    const-string/jumbo v2, "response == null"

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

    throw v1

    .line 272
    :cond_1
    new-instance v0, Landroid/content/Intent;

    const-string v1, "com.android.keychain.CHOOSER"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 273
    .local v0, intent:Landroid/content/Intent;
    const-string/jumbo v1, "response"

    new-instance v2, Landroid/security/KeyChain$AliasResponse;

    const/4 v3, 0x0

    invoke-direct {v2, p1, v3}, Landroid/security/KeyChain$AliasResponse;-><init>(Landroid/security/KeyChainAliasCallback;Landroid/security/KeyChain$1;)V

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/IBinder;)Landroid/content/Intent;

    .line 274
    const-string v1, "host"

    invoke-virtual {v0, v1, p4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 275
    const-string/jumbo v1, "port"

    invoke-virtual {v0, v1, p5}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 276
    const-string v1, "alias"

    invoke-virtual {v0, v1, p6}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 278
    const-string/jumbo v1, "sender"

    new-instance v2, Landroid/content/Intent;

    invoke-direct {v2}, Landroid/content/Intent;-><init>()V

    invoke-static {p0, v4, v2, v4}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;

    .line 279
    invoke-virtual {p0, v0}, Landroid/app/Activity;->startActivity(Landroid/content/Intent;)V

    .line 280
    return-void
.end method

.method public static createInstallIntent()Landroid/content/Intent;
    .locals 3

    .prologue
    .line 206
    new-instance v0, Landroid/content/Intent;

    const-string v1, "android.credentials.INSTALL"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 207
    .local v0, intent:Landroid/content/Intent;
    const-string v1, "com.android.certinstaller"

    const-string v2, "com.android.certinstaller.CertInstallerMain"

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 209
    return-object v0
.end method

.method private static ensureNotOnMainThread(Landroid/content/Context;)V
    .locals 3
    .parameter "context"

    .prologue
    .line 440
    invoke-static {}, Landroid/os/Looper;->myLooper()Landroid/os/Looper;

    move-result-object v0

    .line 441
    .local v0, looper:Landroid/os/Looper;
    if-eqz v0, :cond_0

    invoke-virtual {p0}, Landroid/content/Context;->getMainLooper()Landroid/os/Looper;

    move-result-object v1

    if-ne v0, v1, :cond_0

    .line 442
    new-instance v1, Ljava/lang/IllegalStateException;

    const-string v2, "calling this from your main thread can lead to deadlock"

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

    throw v1

    .line 445
    :cond_0
    return-void
.end method

.method public static getCertificateChain(Landroid/content/Context;Ljava/lang/String;)[Ljava/security/cert/X509Certificate;
    .locals 11
    .parameter "context"
    .parameter "alias"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/security/KeyChainException;,
            Ljava/lang/InterruptedException;
        }
    .end annotation

    .prologue
    .line 337
    if-nez p1, :cond_0

    .line 338
    new-instance v9, Ljava/lang/NullPointerException;

    const-string v10, "alias == null"

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

    throw v9

    .line 340
    :cond_0
    invoke-static {p0}, Landroid/security/KeyChain;->bind(Landroid/content/Context;)Landroid/security/KeyChain$KeyChainConnection;

    move-result-object v6

    .line 342
    .local v6, keyChainConnection:Landroid/security/KeyChain$KeyChainConnection;
    :try_start_0
    invoke-virtual {v6}, Landroid/security/KeyChain$KeyChainConnection;->getService()Landroid/security/IKeyChainService;

    move-result-object v7

    .line 343
    .local v7, keyChainService:Landroid/security/IKeyChainService;
    invoke-interface {v7, p1}, Landroid/security/IKeyChainService;->getCertificate(Ljava/lang/String;)[B

    move-result-object v1

    .line 344
    .local v1, certificateBytes:[B
    new-instance v2, Ljava/util/ArrayList;

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

    .line 345
    .local v2, chain:Ljava/util/List;,"Ljava/util/List<Ljava/security/cert/X509Certificate;>;"
    invoke-static {v1}, Landroid/security/KeyChain;->toCertificate([B)Ljava/security/cert/X509Certificate;

    move-result-object v9

    invoke-interface {v2, v9}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 346
    new-instance v8, Lorg/apache/harmony/xnet/provider/jsse/TrustedCertificateStore;

    invoke-direct {v8}, Lorg/apache/harmony/xnet/provider/jsse/TrustedCertificateStore;-><init>()V

    .line 347
    .local v8, store:Lorg/apache/harmony/xnet/provider/jsse/TrustedCertificateStore;
    const/4 v4, 0x0

    .line 348
    .local v4, i:I
    :goto_0
    invoke-interface {v2, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/security/cert/X509Certificate;

    .line 349
    .local v0, cert:Ljava/security/cert/X509Certificate;
    invoke-virtual {v0}, Ljava/security/cert/X509Certificate;->getSubjectX500Principal()Ljavax/security/auth/x500/X500Principal;

    move-result-object v9

    invoke-virtual {v0}, Ljava/security/cert/X509Certificate;->getIssuerX500Principal()Ljavax/security/auth/x500/X500Principal;

    move-result-object v10

    invoke-static {v9, v10}, Llibcore/util/Objects;->equal(Ljava/lang/Object;Ljava/lang/Object;)Z

    move-result v9

    if-eqz v9, :cond_2

    .line 358
    :cond_1
    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v9

    new-array v9, v9, [Ljava/security/cert/X509Certificate;

    invoke-interface {v2, v9}, Ljava/util/List;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;

    move-result-object v9

    check-cast v9, [Ljava/security/cert/X509Certificate;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_1

    .line 365
    invoke-virtual {v6}, Landroid/security/KeyChain$KeyChainConnection;->close()V

    .line 358
    return-object v9

    .line 352
    :cond_2
    :try_start_1
    invoke-virtual {v8, v0}, Lorg/apache/harmony/xnet/provider/jsse/TrustedCertificateStore;->findIssuer(Ljava/security/cert/X509Certificate;)Ljava/security/cert/X509Certificate;

    move-result-object v5

    .line 353
    .local v5, issuer:Ljava/security/cert/X509Certificate;
    if-eqz v5, :cond_1

    .line 356
    invoke-interface {v2, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0
    .catch Landroid/os/RemoteException; {:try_start_1 .. :try_end_1} :catch_0
    .catch Ljava/lang/RuntimeException; {:try_start_1 .. :try_end_1} :catch_1

    .line 347
    add-int/lit8 v4, v4, 0x1

    goto :goto_0

    .line 359
    .end local v0           #cert:Ljava/security/cert/X509Certificate;
    .end local v1           #certificateBytes:[B
    .end local v2           #chain:Ljava/util/List;,"Ljava/util/List<Ljava/security/cert/X509Certificate;>;"
    .end local v4           #i:I
    .end local v5           #issuer:Ljava/security/cert/X509Certificate;
    .end local v7           #keyChainService:Landroid/security/IKeyChainService;
    .end local v8           #store:Lorg/apache/harmony/xnet/provider/jsse/TrustedCertificateStore;
    :catch_0
    move-exception v3

    .line 360
    .local v3, e:Landroid/os/RemoteException;
    :try_start_2
    new-instance v9, Landroid/security/KeyChainException;

    invoke-direct {v9, v3}, Landroid/security/KeyChainException;-><init>(Ljava/lang/Throwable;)V

    throw v9
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    .line 365
    .end local v3           #e:Landroid/os/RemoteException;
    :catchall_0
    move-exception v9

    invoke-virtual {v6}, Landroid/security/KeyChain$KeyChainConnection;->close()V

    throw v9

    .line 361
    :catch_1
    move-exception v3

    .line 363
    .local v3, e:Ljava/lang/RuntimeException;
    :try_start_3
    new-instance v9, Landroid/security/KeyChainException;

    invoke-direct {v9, v3}, Landroid/security/KeyChainException;-><init>(Ljava/lang/Throwable;)V

    throw v9
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0
.end method

.method public static getPrivateKey(Landroid/content/Context;Ljava/lang/String;)Ljava/security/PrivateKey;
    .locals 7
    .parameter "context"
    .parameter "alias"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/security/KeyChainException;,
            Ljava/lang/InterruptedException;
        }
    .end annotation

    .prologue
    .line 302
    if-nez p1, :cond_0

    .line 303
    new-instance v5, Ljava/lang/NullPointerException;

    const-string v6, "alias == null"

    invoke-direct {v5, v6}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v5

    .line 305
    :cond_0
    invoke-static {p0}, Landroid/security/KeyChain;->bind(Landroid/content/Context;)Landroid/security/KeyChain$KeyChainConnection;

    move-result-object v2

    .line 307
    .local v2, keyChainConnection:Landroid/security/KeyChain$KeyChainConnection;
    :try_start_0
    invoke-virtual {v2}, Landroid/security/KeyChain$KeyChainConnection;->getService()Landroid/security/IKeyChainService;

    move-result-object v3

    .line 308
    .local v3, keyChainService:Landroid/security/IKeyChainService;
    invoke-interface {v3, p1}, Landroid/security/IKeyChainService;->requestPrivateKey(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    .line 309
    .local v4, keyId:Ljava/lang/String;
    if-nez v4, :cond_1

    .line 310
    new-instance v5, Landroid/security/KeyChainException;

    const-string/jumbo v6, "keystore had a problem"

    invoke-direct {v5, v6}, Landroid/security/KeyChainException;-><init>(Ljava/lang/String;)V

    throw v5
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_1
    .catch Ljava/security/InvalidKeyException; {:try_start_0 .. :try_end_0} :catch_2

    .line 315
    .end local v3           #keyChainService:Landroid/security/IKeyChainService;
    .end local v4           #keyId:Ljava/lang/String;
    :catch_0
    move-exception v0

    .line 316
    .local v0, e:Landroid/os/RemoteException;
    :try_start_1
    new-instance v5, Landroid/security/KeyChainException;

    invoke-direct {v5, v0}, Landroid/security/KeyChainException;-><init>(Ljava/lang/Throwable;)V

    throw v5
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 323
    .end local v0           #e:Landroid/os/RemoteException;
    :catchall_0
    move-exception v5

    invoke-virtual {v2}, Landroid/security/KeyChain$KeyChainConnection;->close()V

    throw v5

    .line 313
    .restart local v3       #keyChainService:Landroid/security/IKeyChainService;
    .restart local v4       #keyId:Ljava/lang/String;
    :cond_1
    :try_start_2
    const-string/jumbo v5, "keystore"

    invoke-static {v5}, Lorg/apache/harmony/xnet/provider/jsse/OpenSSLEngine;->getInstance(Ljava/lang/String;)Lorg/apache/harmony/xnet/provider/jsse/OpenSSLEngine;

    move-result-object v1

    .line 314
    .local v1, engine:Lorg/apache/harmony/xnet/provider/jsse/OpenSSLEngine;
    invoke-virtual {v1, v4}, Lorg/apache/harmony/xnet/provider/jsse/OpenSSLEngine;->getPrivateKeyById(Ljava/lang/String;)Ljava/security/PrivateKey;
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0
    .catch Landroid/os/RemoteException; {:try_start_2 .. :try_end_2} :catch_0
    .catch Ljava/lang/RuntimeException; {:try_start_2 .. :try_end_2} :catch_1
    .catch Ljava/security/InvalidKeyException; {:try_start_2 .. :try_end_2} :catch_2

    move-result-object v5

    .line 323
    invoke-virtual {v2}, Landroid/security/KeyChain$KeyChainConnection;->close()V

    .line 314
    return-object v5

    .line 317
    .end local v1           #engine:Lorg/apache/harmony/xnet/provider/jsse/OpenSSLEngine;
    .end local v3           #keyChainService:Landroid/security/IKeyChainService;
    .end local v4           #keyId:Ljava/lang/String;
    :catch_1
    move-exception v0

    .line 319
    .local v0, e:Ljava/lang/RuntimeException;
    :try_start_3
    new-instance v5, Landroid/security/KeyChainException;

    invoke-direct {v5, v0}, Landroid/security/KeyChainException;-><init>(Ljava/lang/Throwable;)V

    throw v5

    .line 320
    .end local v0           #e:Ljava/lang/RuntimeException;
    :catch_2
    move-exception v0

    .line 321
    .local v0, e:Ljava/security/InvalidKeyException;
    new-instance v5, Landroid/security/KeyChainException;

    invoke-direct {v5, v0}, Landroid/security/KeyChainException;-><init>(Ljava/lang/Throwable;)V

    throw v5
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0
.end method

.method private static toCertificate([B)Ljava/security/cert/X509Certificate;
    .locals 5
    .parameter "bytes"

    .prologue
    .line 370
    if-nez p0, :cond_0

    .line 371
    new-instance v3, Ljava/lang/IllegalArgumentException;

    const-string v4, "bytes == null"

    invoke-direct {v3, v4}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v3

    .line 374
    :cond_0
    :try_start_0
    const-string v3, "X.509"

    invoke-static {v3}, Ljava/security/cert/CertificateFactory;->getInstance(Ljava/lang/String;)Ljava/security/cert/CertificateFactory;

    move-result-object v1

    .line 375
    .local v1, certFactory:Ljava/security/cert/CertificateFactory;
    new-instance v3, Ljava/io/ByteArrayInputStream;

    invoke-direct {v3, p0}, Ljava/io/ByteArrayInputStream;-><init>([B)V

    invoke-virtual {v1, v3}, Ljava/security/cert/CertificateFactory;->generateCertificate(Ljava/io/InputStream;)Ljava/security/cert/Certificate;

    move-result-object v0

    .line 376
    .local v0, cert:Ljava/security/cert/Certificate;
    check-cast v0, Ljava/security/cert/X509Certificate;
    :try_end_0
    .catch Ljava/security/cert/CertificateException; {:try_start_0 .. :try_end_0} :catch_0

    .end local v0           #cert:Ljava/security/cert/Certificate;
    return-object v0

    .line 377
    .end local v1           #certFactory:Ljava/security/cert/CertificateFactory;
    :catch_0
    move-exception v2

    .line 378
    .local v2, e:Ljava/security/cert/CertificateException;
    new-instance v3, Ljava/lang/AssertionError;

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

    throw v3
.end method


text:
import * as schema from './Schema';
import {
  getReferential,
  putReferential,
  postReferential,
  delReferential,
} from '../utils/Action';

export const fetchLogs = (exerciseId) => (dispatch) => {
  const uri = `/api/exercises/${exerciseId}/logs`;
  return getReferential(schema.arrayOfLogs, uri)(dispatch);
};

export const fetchLog = (exerciseId, logId) => (dispatch) => {
  const uri = `/api/exercises/${exerciseId}/logs/${logId}`;
  return getReferential(schema.log, uri)(dispatch);
};

export const updateLog = (exerciseId, logId, data) => (dispatch) => {
  const uri = `/api/exercises/${exerciseId}/logs/${logId}`;
  return putReferential(schema.log, uri, data)(dispatch);
};

export const addLog = (exerciseId, data) => (dispatch) => {
  const uri = `/api/exercises/${exerciseId}/logs`;
  return postReferential(schema.log, uri, data)(dispatch);
};

export const deleteLog = (exerciseId, logId) => (dispatch) => {
  const uri = `/api/exercises/${exerciseId}/logs/${logId}`;
  return delReferential(uri, 'logs', logId)(dispatch);
};

redpajama_set_name: RedPajamaGithub


text:
  Aroue-Ithorots-Olhaïby est
       un village
       géographiquement positionné dans le département des Pyrénées-Atlantiques en Aquitaine. Elle comptait 260 habitants en 2008.

La ville propose quelques  équipements sportifs, elle dispose, entre autres, de une boucle de randonnée.

À coté de Aroue-Ithorots-Olhaïby sont localisées les villes de
Lichos à 3 km, 135 habitants,
Espiute localisée à 4 km, 112 habitants,
Charre à 3 km, 214 habitants,
Nabas située à 3 km, 110 habitants,
Charritte-de-Bas située à 3 km, 238 habitants,
Gestas à 4 km, 68 habitants,
 entre autres. De plus, Aroue-Ithorots-Olhaïby est située à seulement 28 km de Oloron-Sainte-Marie.

Si vous envisagez de venir habiter à Aroue-Ithorots-Olhaïby, vous pourrez facilement trouver une maison à acheter.

Le parc de logements, à Aroue-Ithorots-Olhaïby, se décomposait en 2011 en 18 appartements et 106 maisons soit
 un marché relativement équilibré.


text:
#import "NSObject.h"

@class MRRenderer, NSDictionary, NSOperationQueue;

@interface MRRenderArguments : NSObject
{
    MRRenderer *_renderer;
    NSOperationQueue *_preloadQueue;
    NSDictionary *_forcedState;
    double _unalteredTime;
    double _displayLinkTimestamp;
    double _morphingProgress;
    int _thumbnailPolicy;
    unsigned char _currentLayoutIndex;
    _Bool _isPreloading;
    _Bool _freezesSizeOfImageRequests;
    _Bool _skipsAnimations;
}

@property(nonatomic) _Bool skipsAnimations; // @synthesize skipsAnimations=_skipsAnimations;
@property _Bool freezesSizeOfImageRequests; // @synthesize freezesSizeOfImageRequests=_freezesSizeOfImageRequests;
@property int thumbnailPolicy; // @synthesize thumbnailPolicy=_thumbnailPolicy;
@property(readonly) _Bool isPreloading; // @synthesize isPreloading=_isPreloading;
@property unsigned char currentLayoutIndex; // @synthesize currentLayoutIndex=_currentLayoutIndex;
@property double morphingProgress; // @synthesize morphingProgress=_morphingProgress;
@property double displayLinkTimestamp; // @synthesize displayLinkTimestamp=_displayLinkTimestamp;
@property double unalteredTime; // @synthesize unalteredTime=_unalteredTime;
@property(retain) NSDictionary *forcedState; // @synthesize forcedState=_forcedState;
@property(retain) NSOperationQueue *preloadQueue; // @synthesize preloadQueue=_preloadQueue;
@property(readonly) MRRenderer *renderer; // @synthesize renderer=_renderer;
- (id)copyForPreloading;
- (void)cleanup;
- (void)dealloc;
- (id)initWithRenderer:(id)arg1;

@end


text:
<?xml version="1.0" encoding="UTF-8"?>

<recipeml version="0.5">
  <recipe>
    <head>
      <title>Avocado Relish</title>
      <categories>
        <cat>Relishes</cat>
        <cat>Condiments</cat></categories>
      <yield>4</yield></head>
    <ingredients>
      <ing>
        <amt>
          <qty>1/2</qty>
          <unit>medium</unit></amt>
        <item>Avocado (about 1/4 pound), pared and finely diced</item></ing>
      <ing>
        <amt>
          <qty>2</qty>
          <unit>tablespoons</unit></amt>
        <item>Lime juice (no sugar added)</item></ing>
      <ing>
        <amt>
          <qty>1/4</qty>
          <unit>cups</unit></amt>
        <item>Each diced red onion, red bell pepper, and green bell pepper</item></ing>
      <ing>
        <amt>
          <qty>2</qty>
          <unit>large</unit></amt>
        <item>Plum tomatoes, diced</item></ing>
      <ing>
        <amt>
          <qty>1</qty>
          <unit>tablespoon</unit></amt>
        <item>Each chopped fresh cilantro or parsley, and seeded mild or hot</item></ing>
      <ing>
        <amt>
          <qty/>
          <unit/></amt>
        <item>Chili pepper</item></ing>
      <ing>
        <amt>
          <qty>2</qty>
          <unit>small</unit></amt>
        <item>Cloves garlic, chopped</item></ing>
      <ing>
        <amt>
          <qty>2</qty>
          <unit>teaspoons</unit></amt>
        <item>Olive or vegetable oil</item></ing>
      <ing>
        <amt>
          <qty>1</qty>
          <unit>dash</unit></amt>
        <item>Each salt and pepper</item></ing></ingredients>
    <directions>
      <step>  In small bowl, combine avocado and lime juice; set aside. In separate bowl
  combine remaining ingredients, mix well; carefully fold into avocado
  mixture.  Cover with plastic wrap and refrigerate until flavors blend, at
  least 30 minutes.  Just before serving, stir well. A nice addition to
  broiled chicken or fish. Makes 4 servings, about 1/2 c each

  ///\oo/\\\ From the hearth in Sandee's Kitchen...

  From Gemini's MASSIVE MealMaster collection at www.synapse.com/~gemini

</step></directions></recipe></recipeml>


text:
This StackStorm Opscenter pack provides integrations to Datastax opscenter product via
opscenter APIs. At the time of writing this pack, http://docs.datastax.com/en/
opscenter/5.1/api/docs/index.html was used.

## Configuration

Copy the example configuration in [opscenter.yaml.example](./opscenter.yaml.example)
to `/opt/stackstorm/configs/opscenter.yaml` and edit as required.

You'll need to setup base url for opscenter deployment and cluster_id that you want to work with in config.yaml.

```yaml
---
opscenter_base_url: http://myopscenter.mydomain.com:8888
cluster_id: "TestCluster"
```

You can also use dynamic values from the datastore. See the
[docs](https://docs.stackstorm.com/reference/pack_configs.html) for more info.

## Actions

cluster_id in most of these actions are optional and is read from config.yaml. If you are
operating multiple clusters with same opscenter, be sure to explicitly provide the
`cluster_id` argument for the actions.

### General actions

`get_cluster_configs` - Lists configurations of all clusters managed by opscenter.

### Cluster actions

`get_cluster_info` - Lists info about specified cluster.

`start_cluster_repair` - Starts repair operation in specified cluster.

`get_repair_status` - Get status of repair operation in specified cluster.

`get_cluster_repair_progress` - Get repair progress for specified cluster.

`restart_cluster` - Restarts the specified cluster.

`get_nodes_info` - Dumps info about all nodes in cluster.

`get_storage_capacity` - Lists info about storage capacity of specified cluster.

### Node actions

For node actions, node_ip argument is mandatory.

`decommission_node` - Decommissions a node from cluster.

`drain_node` - Drains a Cassandra node.

`start_node` - Starts the specified node.

`stop_node` - Stops the specified node.

`restart_node` - Restarts the specified node.

`set_node_conf` - Sets configuration for specified node.

`get_node_conf` - Dumps configuration for specified node.

### Helper actions

`get_request_status` - Some actions return a request id. You can query
    status of request using this action.

`cancel_request` - Cancel a long running request.

`list_requests` - List all outstanding requests for a request type.

## Sensors

`EventsConsumer` - Consumes all events from opscenter and injects them into StackStorm
    with trigger ref as `opscenter.event` and payload as event info. Please see sensors/events_consumer.yaml for event specification.


text:
<?php
/**
 *
 */

namespace Mvc5\Route\Match;

use Mvc5\Arg;
use Mvc5\Http\Request;
use Mvc5\Route\Route;

use function preg_match;
use function strlen;

class Path
{
    /**
     *
     */
    use Plugin\Params;

    /**
     * @param Route $route
     * @param Request $request
     * @param string $path
     * @param int $offset
     * @param callable $next
     * @return Request|mixed
     */
    protected function match(Route $route, Request $request, string $path, int $offset, callable $next)
    {
        if (!preg_match('(\G' . $route->regex() . ')', $path, $match, 0, $offset)) {
            return null;
        }

        $offset += strlen($match[0]);
        $matched = !isset($path[$offset]);

        $request = $request->with([
            Arg::CONTROLLER => $route->controller(),
            Arg::MATCHED => $matched ?: $offset,
            Arg::NAME => $route->name(),
            Arg::PARAMS => $this->params($match, $route->defaults() + (array) $request[Arg::PARAMS]),
            Arg::PARENT => $request,
            Arg::ROUTE => $route
        ]);

        return $matched ? $next($route, $request) : ($route->children() ? $request : null);
    }

    /**
     * @param Route $route
     * @param Request $request
     * @param callable $next
     * @return Request|mixed
     */
    function __invoke(Route $route, Request $request, callable $next)
    {
        return $this->match($route, $request, $request[Arg::URI][Arg::PATH], (int) $request[Arg::MATCHED], $next);
    }
}


text:
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.

defined('MOODLE_INTERNAL') || die();

require_once($CFG->dirroot . '/mod/assign/backup/moodle2/backup_assign_stepslib.php');
//require_once($CFG->dirroot . '/mod/assign/backup/moodle2/backup_assign_settingslib.php');

/**
 * assign backup task that provides all the settings and steps to perform one complete backup of the activity
 *
 * @package   mod_assign
 * @copyright 2012 NetSpot {@link http://www.netspot.com.au}
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */
class backup_assign_activity_task extends backup_activity_task {

    /**
     * Define (add) particular settings this activity can have
     */
    protected function define_my_settings() {
        // No particular settings for this activity
    }

    /**
     * Define (add) particular steps this activity can have
     */
    protected function define_my_steps() {
        $this->add_step(new backup_assign_activity_structure_step('assign_structure', 'assign.xml'));
    }

    /**
     * Code the transformations to perform in the activity in
     * order to get transportable (encoded) links
     * @param string $content
     * @return string
     */
    static public function encode_content_links($content) {
        global $CFG;

        $base = preg_quote($CFG->wwwroot,"/");

        // Link to the list of choices
        $search="/(".$base."\/mod\/assign\/index.php\?id\=)([0-9]+)/";
        $content= preg_replace($search, '$@ASSIGNINDEX*$2@$', $content);

        // Link to choice view by moduleid
        $search="/(".$base."\/mod\/assign\/view.php\?id\=)([0-9]+)/";
        $content= preg_replace($search, '$@ASSIGNVIEWBYID*$2@$', $content);

        return $content;
    }

}


text:
package com.github.scr.hashmap.utils;

import java.nio.CharBuffer;
import java.util.Iterator;

/**
 * Created by scr on 7/2/15.
 */
public class CharSequences {
    public static int hashCode(CharSequence charSequence) {
        int length = charSequence.length();
        int h = 0;
        for (int i = 0; i < length; ++i) {
            h = 31 * h + charSequence.charAt(i);
        }
        return h;
    }

    public static boolean equalTo(CharSequence a, CharBuffer b, int bStart, int bLength) {
        int aLength = a.length();
        if (aLength != bLength) {
            return false;
        }
        for (int i = 0; i < aLength; ++i) {
            if (a.charAt(i) != b.get(bStart + i)) {
                return false;
            }
        }
        return true;
    }

    public static boolean equalTo(CharSequence a, CharSequence b) {
        int aLength = a.length();
        if (aLength != b.length()) {
            return false;
        }
        for (int i = 0; i < aLength; ++i) {
            if (a.charAt(i) != b.charAt(i)) {
                return false;
            }
        }
        return true;
    }

    public static boolean allEqualTo(Iterable<CharSequence> a, Iterable<CharSequence> b) {
        Iterator<CharSequence> aIterator = a.iterator();
        Iterator<CharSequence> bIterator = b.iterator();

        while(aIterator.hasNext()) {
            if (!bIterator.hasNext()) {
                return false;
            }
            if (!equalTo(aIterator.next(), bIterator.next())) {
                return false;
            }
        }
        return !bIterator.hasNext();
    }

    public static int compareTo(CharSequence a, CharSequence b) {
        int aLength = a.length();
        int bLength = b.length();
        for (int i = 0; i < aLength; ++i) {
            if (i >= bLength) {
                return +1;
            }
            int diff = Character.compare(a.charAt(i), b.charAt(i));
            if (diff != 0) {
                return diff;
            }
        }
        return (aLength < bLength) ? -1 : 0;
    }
}


text:
<?php

namespace App\Entity\Traits;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;

trait CommunicationTrait
{
    /**
     * @var string
     *
     * @ORM\Column(type="text", nullable=true)
     */
    private $phone;

    /**
     * @var string
     *
     * @ORM\Column(type="text")
     * @Assert\NotBlank()
     * @Assert\Email()
     */
    private $email;

    /**
     * @return string
     */
    public function getPhone()
    {
        return $this->phone;
    }

    /**
     * @param string $phone
     *
     * @return static
     */
    public function setPhone($phone)
    {
        $this->phone = $phone;

        return $this;
    }

    /**
     * @return string
     */
    public function getEmail()
    {
        return $this->email;
    }

    /**
     * @param string $email
     *
     * @return static
     */
    public function setEmail($email)
    {
        $this->email = $email;

        return $this;
    }

    /**
     * get non-empty communication lines.
     *
     * @return string[]
     */
    public function getCommunicationLines()
    {
        $res = [];
        if (mb_strlen($this->getPhone()) > 0) {
            $res[] = $this->getPhone();
        }
        if (mb_strlen($this->getEmail()) > 0) {
            $res[] = $this->getEmail();
        }

        return $res;
    }
}


text:
<?php

namespace BinSoul\Test\Net\Http\Router\Matcher;

use BinSoul\Net\Http\Router\DefaultRoute;
use BinSoul\Net\Http\Router\Matcher\ParameterMatcher;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\UriInterface;

class ParameterMatcherTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @param string $path
     *
     * @return RequestInterface
     */
    private function buildRequest($path = '/path/to/file.html')
    {
        $uri = $this->getMock(UriInterface::class);
        $uri->expects($this->any())->method('getPath')->willReturn($path);

        $request = $this->getMock(RequestInterface::class);
        $request->expects($this->any())->method('getUri')->willReturn($uri);

        return $request;
    }

    /**
     * @param bool $allowPartialMatches
     *
     * @return ParameterMatcher
     */
    private function buildMatcher($allowPartialMatches = true)
    {
        return new ParameterMatcher(
            [
                '/archive/[year=number(4)]/[month=number(2)]/[day=number(1-2)]' => ['regex' => 1],
                '/archive[/+year=number][/+month=number?]' => ['regex' => 2],
                '/blog/[entry-+name].html' => ['regex' => 3],
                '/blog/[id=number][.+format?]' => ['regex' => 4],
                '/[+product=any]' => ['regex' => 5],
            ],
            $allowPartialMatches
        );
    }

    public function test_matches_longest_path()
    {
        $route = new DefaultRoute($this->buildRequest('/archive/2015/10/09'));
        $matcher = $this->buildMatcher();

        $matcher->match($route);

        $this->assertTrue($route->isFound());
        $this->assertEquals('/archive/2015/10/09', $route->getMatchedPath());
        $this->assertEquals('2015', $route->getParameter('year'));
        $this->assertEquals('10', $route->getParameter('month'));
        $this->assertEquals('09', $route->getParameter('day'));
        $this->assertEquals(1, $route->getParameter('regex'));
    }

    public function test_matches_parameter_length()
    {
        $route = new DefaultRoute($this->buildRequest('/archive/2015/10/9'));
        $matcher = $this->buildMatcher();

        $matcher->match($route);

        $this->assertTrue($route->isFound());
        $this->assertEquals('/archive/2015/10/9', $route->getMatchedPath());
        $this->assertEquals('2015', $route->getParameter('year'));
        $this->assertEquals('10', $route->getParameter('month'));
        $this->assertEquals('9', $route->getParameter('day'));
        $this->assertEquals(1, $route->getParameter('regex'));

        $route = new DefaultRoute($this->buildRequest('/archive/2015/8/7'));
        $matcher->match($route);
        $this->assertFalse($route->isFound());
        $this->assertNotEquals(1, $route->getParameter('regex'));
    }

    public function test_matches_optional_parameters()
    {
        $route = new DefaultRoute($this->buildRequest('/archive/2015'));
        $matcher = $this->buildMatcher();

        $matcher->match($route);

        $this->assertTrue($route->isFound());
        $this->assertEquals('/archive/2015', $route->getMatchedPath());
        $this->assertEquals('2015', $route->getParameter('year'));
        $this->assertFalse($route->hasParameter('month'));

        $route = new DefaultRoute($this->buildRequest('/archive/2015/10'));
        $matcher = $this->buildMatcher();
        $matcher->match($route);
        $this->assertTrue($route->isFound());
        $this->assertEquals('/archive/2015/10', $route->getMatchedPath());
        $this->assertEquals('2015', $route->getParameter('year'));
        $this->assertEquals('10', $route->getParameter('month'));

        $route = new DefaultRoute($this->buildRequest('/blog/1'));
        $matcher->match($route);

        $this->assertTrue($route->isFound());
        $this->assertEquals('/blog/1', $route->getMatchedPath());
        $this->assertNull($route->getParameter('format'));

        $route = new DefaultRoute($this->buildRequest('/blog/1.json'));
        $matcher->match($route);

        $this->assertTrue($route->isFound());
        $this->assertEquals('/blog/1.json', $route->getMatchedPath());
        $this->assertEquals('json', $route->getParameter('format'));
    }

    public function test_matches_multichar_prefix()
    {
        $route = new DefaultRoute($this->buildRequest('/blog/entry-foobar.html'));
        $matcher = $this->buildMatcher();

        $matcher->match($route);

        $this->assertTrue($route->isFound());
        $this->assertEquals('/blog/entry-foobar.html', $route->getMatchedPath());
        $this->assertEquals('foobar', $route->getParameter('name'));
        $this->assertEquals(3, $route->getParameter('regex'));
    }

    public function test_matches_without_parameters()
    {
        $route = new DefaultRoute($this->buildRequest('/blog/en'));
        $matcher = new ParameterMatcher(
            [
                '/blog/en' => ['regex' => 1],
            ]
        );

        $matcher->match($route);

        $this->assertTrue($route->isFound());
        $this->assertEquals('/blog/en', $route->getMatchedPath());
    }

    /**
     * @expectedException \InvalidArgumentException
     */
    public function test_throws_exception_for_invalid_definition()
    {
        $route = new DefaultRoute($this->buildRequest('/blog/en'));
        $matcher = new ParameterMatcher(
            [
                '/blog/[en=?]' => ['regex' => 1],
            ]
        );

        $matcher->match($route);
    }

    /**
     * @expectedException \InvalidArgumentException
     */
    public function test_throws_exception_for_invalid_format()
    {
        $route = new DefaultRoute($this->buildRequest('/blog/en'));
        $matcher = new ParameterMatcher(
            [
                '/blog/[en=foobar]' => ['regex' => 1],
            ]
        );

        $matcher->match($route);
    }
}


text:
<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Productcategory_model
 *
 * @author Nguyen Ruy
 */
class Menu_model extends CI_Model {

    public $table = 'menu';
    //put your code here
    public function __construct() {
        parent::__construct();
    }

    public function get_all($limit = 10, $offset = 0) {
        $this->db->order_by("priority", "desc");
        return  $this->db->get( $this->table, $limit, $offset)->result();
    }

    public function get_one( $id) {
        $this->db->where('id', $id);
        $data =  $this->db->get( $this->table)->result();
        return !empty($data) ? $data[0] : array();
    }

    public function count_all_results() {
        $this->db->from( $this->table);
        return $this->db->count_all_results();
    }

    public function del_one ($id){
        return $this->db->delete( $this->table, array('id' => $id));
    }

    public function del_all(){
        return $this->db->empty_table( $this->table);
    }

    public function update($id , $data = array()){
        $this->db->where('id', $id);
        return $this->db->update( $this->table, $data);
    }

    public function insert ($data, $insert_batch = false){
        if ( $insert_batch) {
            $this->db->insert_batch( $this->table, $data);
            return true;
        }
        $this->db->insert( $this->table, $data);
        return true;
    }

}


text:
<component name="libraryTable">
  <library name="espresso-core-2.2">
    <CLASSES>
      <root url="jar://$PROJECT_DIR$/app/build/intermediates/exploded-aar/com.android.support.test.espresso/espresso-core/2.2/jars/classes.jar!/" />
      <root url="file://$PROJECT_DIR$/app/build/intermediates/exploded-aar/com.android.support.test.espresso/espresso-core/2.2/res" />
    </CLASSES>
    <JAVADOC />
    <SOURCES>
      <root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/test/espresso/espresso-core/2.2/espresso-core-2.2-sources.jar!/" />
    </SOURCES>
  </library>
</component>


text:
/**
 * @author 陈志杭
 * @contact 279397942@qq.com
 * @date 2016/12/29
 * @description
 * @file zh/plugins/bootstrap/widget/layout/_FormInlineExtend
 */
define([
    'zh/plugins/bootstrap/widget/layout/FormInlineFormGroup',
    'dojo/_base/lang',
    'zh/util/dojoUtils',
], function (FormInlineFormGroup, lang, dojoUtils) {
    return {
        baseClass: 'form-inline',
        class: ' overflow-hide',
        isHorizontalLayout: false,
        _maxColSm: 12,
        postMixInProperties: function () {
            this.baseClass = this.isHorizontalLayout ? 'form-horizontal' : 'form-inline';
            this.inherited(arguments);
        },
        addChild: function (item) {
            this.inherited(arguments);
            return this;
        },
        addItem: function (item) {
            if (dojoUtils.isInstanceFrom(item, FormInlineFormGroup)) {
                item.isHorizontalLayout = this.isHorizontalLayout;
                this.addChild(item);
                return this;
            }
            else {
                item.colSm = item.colSm || 11;
                var formInlineFormGroup = new FormInlineFormGroup({
                    isHorizontalLayout: this.isHorizontalLayout,
                });
            }
            formInlineFormGroup.addItem(item);
            this.addChild(formInlineFormGroup);
            return this;
        }
    }

});


text:
package com.devbrackets.android.androidmarkupdemo.ui.widget;

import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;

import com.devbrackets.android.androidmarkup.widget.MarkupEditText;
import com.devbrackets.android.androidmarkupdemo.R;

/**
 * A simple widget to perform the controls for interacting with the
 * {@link MarkupEditText}
 */
public class MarkupControls extends FrameLayout {
    public interface Callback {
        boolean onBoldClick();
        boolean onItalicClick();
        boolean onUnorderedListClick();
        boolean onOrderedListClick();
    }

    protected ImageView boldView;
    protected ImageView italicView;
    protected ImageView unorderedListView;
    protected ImageView orderedListView;

    @Nullable
    private Callback callback;
    @Nullable
    private MarkupEditText markupEditText;

    public MarkupControls(Context context) {
        super(context);
        init(context, null);
    }

    public MarkupControls(Context context, AttributeSet attrs) {
        super(context, attrs);
        init(context, attrs);
    }

    public MarkupControls(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init(context, attrs);
    }

    @TargetApi(Build.VERSION_CODES.LOLLIPOP)
    public MarkupControls(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
        init(context, attrs);
    }

    public void setCallback(@Nullable Callback callback) {
        this.callback = callback;
    }

    public void setMarkupEditText(@Nullable MarkupEditText markupEditText) {
        this.markupEditText = markupEditText;
    }

    /**
     * Initializes the playback controls by setting the layout, preparing helpers, and
     * linking views and callbacks.
     *
     * @param context The context for the owner of the playback controls
     */
    private void init(Context context, @Nullable AttributeSet attrs) {
        View.inflate(context, R.layout.widget_markup_controls, this);

        //Done to support the xml layout preview
        if (isInEditMode()) {
            return;
        }

        retrieveViews();
        setupListeners();
    }

    private void retrieveViews() {
        boldView = (ImageView)findViewById(R.id.markup_controls_bold);
        italicView = (ImageView)findViewById(R.id.markup_controls_italic);
        orderedListView = (ImageView)findViewById(R.id.markup_controls_ordered_list);
        unorderedListView = (ImageView)findViewById(R.id.markup_controls_unordered_list);
    }

    private void setupListeners() {
        boldView.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                onBoldClick();
            }
        });

        italicView.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                onItalicClick();
            }
        });

        orderedListView.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                onOrderedListClick();
            }
        });

        unorderedListView.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                onUnorderedListClick();
            }
        });
    }

    private void onBoldClick() {
        if ((callback == null || !callback.onBoldClick()) && markupEditText != null) {
            markupEditText.toggleBold();
        }
    }

    private void onItalicClick() {
        if ((callback == null || !callback.onItalicClick()) && markupEditText != null) {
            markupEditText.toggleItalics();
        }
    }

    private void onUnorderedListClick() {
        if ((callback == null || !callback.onUnorderedListClick()) && markupEditText != null) {
            markupEditText.toggleUnOrderedList();
        }
    }

    private void onOrderedListClick() {
        if ((callback == null || !callback.onOrderedListClick()) && markupEditText != null) {
            markupEditText.toggleOrderedList();
        }
    }
}