text:
define({
           id: 'es',
           name: 'Spanish',
           texts: {
            preferences: {
              thousandSeparator: '\u2009',
              decimalSeparator: '.'
            },
               faults: {
                   //101: 'File not found.',
                   101: 'Archivo no encontrado.',
                   //102: 'Wallet has not been created.',
                   102: 'El monedero no ha sido creado.',
                   //103: 'Wallet file is corrupted. Please recover your wallet from a back-up you should have taken when you created the wallet or added an account to it.',
                   103: 'El archivo de monedero está corrupto. Favor recuperar su monedero de una copia de seguridad que debio de haber creado en el momento en que el monedero fue creado o en que agrego una cuenta a este.',
                   //104: 'The provided password is not correct. Hopefully you can remember the correct password. The password cannot be recovered if lost!',
                   104: 'La contraseña especificada es inválida. Esperemos que pueda recordar la contraseña correcta. La contraseña no puede ser recuperada si se pierde!',
                   //106: 'Before you can work with a wallet, it has to be opened. To ensure that you are eligible for accessing the wallet, you have to provide the password for that wallet.',
                   106: 'Antes de que puedas comenzar a usar un monedero, este debe abrirse. Debes de proveer la contraseña para asegurar que eres elegible para accesar el monedero.',
                   //107: 'Wallet does not contain this account.',
                   107: 'El monedero no contiene esta cuenta.',
                   //108: 'The account cannot be removed. Most likely because the account still has a balance greater than 0 NEMs or the account you are trying to remove is the primary account.',
                   108: 'La cuenta no puede ser removida. Probablemente se debe a que la cuenta aún tiene un balance mayor de 0 NEMs o a que la cuenta que estás tratando de remover es la cuenta primaria.',
                   //109: 'Another wallet with the same name exists already. Please choose an other wallet name.',
                   109: 'Ya existe un monedero con el mismo nombre. Por favor, elija otro nombre de monedero.',
                   //110: 'Wallet already contains this account.',
                   110: 'El monedero ya contiene esta cuenta.', //TODO Revisit?
                   //202: 'An encrypted message cannot be sent because the recipient has never made a transaction before.',
                   202: 'Enviar una transacción encriptada no es posible debido a que el destinatario nunca ha realizado una transacción.',
                   //305: 'NEM Infrastructure Server is not available.',
                   305: 'El Servidor de Infraestructura NEM no está disponible.',
                   //306: 'An error occurred that the development team did not have foreseen. Apologies for this, maybe a retry might help. Otherwise, please open up an issue within the NEM NIS/NCC community.',
                   306: 'Un error imprevisto ha ocurrido. Pedimos disculpas por este problema. Tal vez re-intentar ayude a resolver el problema. De otra ma nera',
                   //400: 'Some parameter is missing or invalid.',
                   400: 'Algún parametro requerido no ha sido especificado o es inválido.',
                   //404: 'The requested resource could not be found.',
                   404: 'El recurso solicitado no se ha encontrado.',
                   //500: 'Failed to save configuration file.',
                   500: 'Error al guardar archivo de configuración.',
                   //600: 'NCC requires NIS server to be booted for sending and receiving transactions from the NEM cloud. Please use the NCC menu entry for booting the local node.',
                   600: 'NCC requiere la iniciación de un servidor NIS para enviar y recibir transacciones de la nube NEM. Por favor, use las opciones de menu NCC para iniciar un servidor NIS local.',
                   //601: 'The nis node is already booted. A second attempt to boot nis is not possible.',
                   601: 'El nodo NIS ya ha sido iniciado. No es válido intentar iniciar el nodo NIS ya estando iniciado.',
                   //700: 'The provided account does not satisfy the basic criteria for harvesting. Mainly it is related to the amount of NEMs within the account. Harvesting starts with at least 1000 NEM.',
                   700: 'La cuenta especificada no satisface los criterios básicos para recolectar. Normalmente este problema está relacionado al balance de la cuenta. Al menos 1000 NEMs son necesarios para participar en el proceso de recolecta.',
                   //701: 'The provided deadline is in the past. The deadline must be provided within a 1 day period.',
                   701: 'La fecha limite especificada esta en el pasado. La fecha limite especificada debe de estar dentro del periodo de un dia.',
                   //702: 'The provided deadline is too far in the future. The deadline must be within one day time period.',
                   702: 'La fecha limite especificada esta muy lejos en el futuro. La fecha limite especificada debe de estar dentro del periodo de un dia.',
                   //703: 'Your account does not have the right balance to send the provided amount of NEMs.',
                   703: 'La cuenta no tiene balance suficiente para enviar la cantidad especificada de NEMs.',
                   //704: 'The provided message text is too large to be send via NEM. Please try to reduce the length of the message you want to send.',
                   704: 'El texto especificado es muy largo para ser enviado via NEM. Por favor, intente reducir el tamaño del mensaje que desea enviar.',
                   //705: 'The transaction hash already exists in the database or the list of unconfirmed transactions.',
                   705: 'The transaction hash already exists in the database or the list of unconfirmed transactions.',
                   //706: 'The signature of the transaction could not be verified.',
                   706: 'La firma de la transacción no pudo ser verificada.',
                   //707: 'The time stamp of the transaction id too far in the past.',
                   707: 'La marca de tiempo de la transacción esta muy lejos en el pasado.',
                   //708: 'The time stamp of the transaction is too far in the future.',
                   708: 'La marca de tiempo de la transacción esta muy lejos en el futuro.',
                   //709: 'The account is unknown. An account needs to be part of at least one transaction (sender or recipient) to be known to the network.',
                   709: 'La cuenta es desconocida. Una cuenta necesita ser parte de al menos una transacción (ya sea emisor o destinatario) para ser conocida en la red.',
                   //901: 'There was an error setting up offline mode.'
                   901: 'Hubo un error al intentar establecer el modo fuera de linea' // TODO Revisit: 'modo desconectado' sounds better?
               },
               common: {
                   //success: 'Success', //title of the Success message modals
                   success: 'Éxito', //title of the Success message modals
                   nisStatus: {
                       nccUnavailable: 'NCC is not available',
                       //unavailable: 'NIS is not available',
                       unavailable: 'NIS no esta disponible',
                       //notBooted: 'NIS requires to be booted. Please open your wallet and boot a local node via the popup dialog.',
                       notBooted: 'NIS requiere ser iniciado. Por favor, abra el monedero e inicie un nodo local',
                       //synchronizing: 'NIS is synchronizing. At block {{1}}, est. {{2}} days behind.'
                       synchronizing: 'NIS está sincronizando. En el bloque {{1}}: aproximadamente {{2}} día(s) atras.'
                   },
                   synchronized: 'NIS is synchronized!'
               },
               modals: {
                   error: {
                       //title: 'Oops!',
                       title: 'Oops!',
                       //caption: 'ERROR {{1}}'
                       caption: 'ERROR {{1}}'
                   },
                   confirmDefault: {
                       //yes: 'Yes',
                       yes: 'Si',
                       //no: 'No'
                       no: 'No'
                   },
                   sendNem: {
                       //title: 'Send NEM'
                       title: 'Enviar NEM',
                       //labelDesc: 'This account is labeled as {{1}}',
                       labelDesc: 'Esta cuenta está etiquetada como {{1}}',
                       //nullLabelDesc: "This account doesn't have a label",
                       nullLabelDesc: "Esta cuenta no está etiquetada.",
                       //amount: 'Amount',
                       amount: 'Cantidad',
                       //recipient: "Recipient's account",
                       recipient: "Cuenta de destinatario",
                       //message: 'Message',
                       message: 'Mensaje',
                       //encrypt: 'Encrypt message',
                       encrypt: 'Encriptar mensaje',
                       //fee: 'Fee',
                       fee: 'Tarifa',
                       //dueBy: 'Due by',
                       dueBy: 'Debido por',
                       //resetFee: 'Reset to minimum fee',
                       resetFee: 'Reestablecer a valor de tarifa mínimo',
                       //hours: 'hours',
                       hours: 'horas',
                       //password: 'Password',
                       password: 'Contraseña',
                       //send: 'Send',
                       send: 'Enviar',
                       //sending: 'Sending...',
                       sending: 'Enviando...',
                       //successMessage: 'Transaction has been sent successfully!'
                       successMessage: '¡La transacción ha sido enviada exitosamente!'
                   },
                   clientInfo: {
                       //title: 'Client info',
                       title: 'Informacion de cliente',
                       //ncc: 'NEM Community Client - NCC',
                       ncc: 'Cliente de Comunidad NEM - NCC',
                       //signer: 'Signer',
                       signer: 'Firmante',
                       //remoteServer: 'Remote Server',
                       remoteServer: 'Servidor Remoto',
                       //local: 'Local',
                       local: 'Local', // TODO: Translate to 'Servidor Local' instead?
                       //nis: 'NEM Infrastructure Server - NIS',
                       nis: 'Servidor de Infraestructura NEM - NIS',
                       //sync: 'Synchronized',
                       sync: 'Sincronizado',
                       //notSync: 'Not synchronized',
                       notSync: 'No esta sincronizado',
                       //notConnected: 'Not connected to NEM Cloud',
                       notConnected: 'No esta conectado a la nube NEM',
                       //loading: 'Loading...'
                       loading: 'Cargando...'
                   },
                   transactionDetails: {
                       //title: 'Transaction Details',
                       title: 'Detalles de Transacción',
                       // this might be block or transaction ID
                       //id: 'ID',
                       id: 'ID',
                       // this might be block or transaction Hash
                       //hash: 'Hash',
                       hash: 'Hash',
                       //type: 'Transaction Type',
                       type: 'Tipo de Transacción',
                       //pending: 'Pending',
                       pending: 'Pendiente',
                       //outgoing: 'Outgoing',
                       outgoing: 'Saliente',
                       //incoming: 'Incoming',
                       incoming: 'Entrante',
                       //self: 'Self',
                       self: 'Yo', //TODO: Otra traducccion?
                       //sender: 'Sender',
                       sender: 'Emisor',
                       //recipient: 'Recipient',
                       recipient: 'Destinatario', //TODO 'Recipiente', 'Recibidor'?
                       //message: 'Message',
                       message: 'Mensaje',
                       //noMessage: 'No message',
                       noMessage: 'Sin mensaje',
                       //encrypted: 'Message is encrypted',
                       encrypted: 'Mensaje está encriptado.',
                       //time: 'Timestamp',
                       time: 'Marca de tiempo',
                       //confirmations: 'Confirmations',
                       confirmations: 'Confirmaciones',
                       //amount: 'Amount',
                       amount: 'Cantidad',
                       //fee: 'Fee'
                       fee: 'Tarifa'
                   },
                   bootLocalNode: {
                       //title: 'Boot local node',
                       title: 'Inicializar nodo local',
                       //account: 'Account to boot local node',
                       account: 'Cuenta para inicializar nodo local',
                       //noLabel: '<No label>',
                       noLabel: '<Sin etiqueta>',
                       //wallet: 'Wallet',
                       wallet: 'Monedero',
                       //node: 'Node name',
                       node: 'Nombre de nodo',
                       //boot: 'Boot',
                       boot: 'Inicializar',
                       //booting: 'Booting...'
                       booting: 'Inicializando...'
                   },
                   notBootedWarning: {
                       //title: 'Node has not been booted!',
                       title: 'Nodo no ha sido iniciado!',
                       //message: 'A local node needs to be booted before you can send NEM!'
                       message: 'Un nodo local necesita ser iniciado antes de que pueda enviar NEMs!'
                   },
                   closeWallet: {
                       //title: 'Close wallet',
                       title: 'Cerrar monedero',
                       //message: 'Are you sure you want to close your wallet and return to landing page?'
                       message: 'Está seguro que desea cerrar el monedero y volver a la pagina de inicio?'
                   },
                   createAccount: {
                       //title: 'Create new account',
                       title: 'Crear cuenta nueva',
                       //label: 'Private label',
                       label: 'Etiqueta privada', //TODO: 'Identificador'?
                       //wallet: 'Wallet',
                       wallet: 'Monedero',
                       //password: "Wallet's password",
                       password: "Contraseña de monedero",
                       //successMessage: 'Account {{1}} {{#2}}({{2}}){{/2}} has been created!',
                       successMessage: 'Cuenta {{1}} {{#2}}({{2}}){{/2}} ha sido creada!',
                       //create: 'Create'
                       create: 'Crear'
                   },
                   addAccount: {
                       //title: 'Add an Existing Account',
                       title: 'Añadir cuenta existente',
                       //privateKey: "Account's Private Key",
                       privateKey: "Clave privada de cuenta",
                       //wallet: 'Wallet',
                       wallet: 'Monedero',
                       //password: "Wallet's password",
                       password: "Contraseña de monedero",
                       //successMessage: 'Account {{1}} {{#2}}({{2}}){{/2}} has been added to wallet!',
                       successMessage: 'Cuenta {{1}} {{#2}}({{2}}){{/2}} ha sido añadida al monedero!',
                       //add: 'Add',
                       add: 'Añadir',
                       //label: 'Label'
                       label: 'Etiqueta'
                   },
                   setPrimary: {
                       //title: 'Set primary account',
                       title: 'Definir cuenta primaria',
                       //account: 'Account to be set as Primary',
                       account: 'Cuenta a ser definida como primaria',
                       //noLabel: '<No label>',
                       noLabel: '<Sin etiqueta>',
                       //wallet: 'Wallet',
                       wallet: 'Monedero',
                       //password: "Wallet's password",
                       password: "Contraseña de monedero",
                       //successMessage: 'Account {{1}} {{#2}}({{2}}){{/2}} has been set as primary!',
                       successMessage: 'Cuenta {{1}} {{#2}}({{2}}){{/2}} ha sido definida como cuenta primaria!',
                       //set: 'Set as primary'
                       set: 'Definir como primaria'
                   },
                   changeWalletName: {
                       //title: 'Change wallet name',
                       title: 'Cambiar nombre de monedero',
                       //wallet: 'Current wallet name',
                       wallet: 'Nombre actual de monedero',
                       //newName: 'New wallet name',
                       newName: 'Nuevo nombre de monedero',
                       //password: "Wallet's password",
                       password: "Contraseña de monedero",
                       //successMessage: 'Wallet name has been successfully changed from {{1}} to {{2}}',
                       successMessage: 'El nombre de monedero ha sido cambiado exitosamente de {{1}} a {{2}}',
                       //change: 'Change'
                       change: 'Cambiar'
                   },
                   changeWalletPassword: {
                       //title: 'Change wallet password',
                       title: 'Cambiar contraseña de monedero',
                       //wallet: 'Wallet',
                       wallet: 'Monedero',
                       //password: 'Current password',
                       password: 'Contraseña actual',
                       //newPassword: 'New password',
                       newPassword: 'Nueva contraseña',
                       //confirmPassword: 'Confirm new password',
                       confirmPassword: 'Confirmar nueva contraseña',
                       //successMessage: 'Wallet password has been successfully changed',
                       successMessage: 'La contraseña de monedero ha sido cambiada exitosamente.',
                       //change: 'Change',
                       change: 'Cambiar',
                       //passwordNotMatchTitle: 'Oops!',
                       passwordNotMatchTitle: 'Oops!',
                       //passwordNotMatchMessage: 'Your entered password and password confirmation do not match. Please be sure you type your new password correctly.'
                       passwordNotMatchMessage: 'La nueva contraseña especificada no coincide con la contraseña de confirmación. Por favor, asegurese de especificar la nueva contraseña correctamente.'
                   },
                   changeAccountLabel: {
                       //title: 'Change account label',
                       title: 'Cambiar etiqueta de cuenta',
                       //label: 'Account label',
                       label: 'Etiqueta de cuenta',
                       //wallet: 'Wallet',
                       wallet: 'Monedero',
                       //password: "Wallet's password",
                       password: "Contraseña de monedero",
                       //successMessage: 'Account {{1}} is now labeled as {{2}}',
                       successMessage: 'Cuenta {{1}} ahora esta etiquetada como {{2}}',
                       //change: 'Change'
                       change: 'Cambiar'
                   },
                   removeAccount: {
                       //title: 'Remove account',
                       title: 'Remover cuenta',
                       //wallet: 'Wallet',
                       wallet: 'Monedero',
                       //password: "Wallet's password",
                       password: "Contraseña de monedero",
                       //warning: 'Please ensure that your account has no NEMs left before you remove it, or they would be lost forever.',
                       warning: 'Por favor, asegúrese que la cuenta que desea remover no contiene NEMs, ya que estos se perderian para siempre al removerla.',
                       //successMessage: 'Account {{1}} {{#2}}({{2}}){{/2}} has been removed!',
                       successMessage: 'Cuenta {{1}} {{#2}}({{2}}){{/2}} ha sido removida!',
                       //remove: 'Remove'
                       remove: 'Remover'
                   },
                   nisUnavailable: {
                       //title: 'NIS unavailable',
                       title: 'NIS no esta disponible',
                       //message: 'Disconnected from NIS, waiting for connection'
                       message: 'Desconectado de NIS, esperando conección'
                   },
                   shutdown: {
                       //title: 'Close program',
                       title: 'Cerrar programa',
                       //message: 'Are you sure you want to close NEM Community Client?'
                       message: 'Está seguro que desea cerrar el Cliente de Comunidad NEM?'
                   }
               },
               landing: {
                   //importSuccess: 'Wallet has been sucessfully imported!',
                   importSuccess: 'El monedero ha sido importado exitosamente!',
                   nav: {
                       //start: 'Getting Started',
                       start: 'Comienze aquí',
                       //about: 'About NEM',
                       about: 'Acerca de NEM',
                       //help: 'Help'
                       help: 'Ayuda'
                   },
                   main: {
                       //leftTitle: 'New to NEM?',
                       leftTitle: 'Nuevo en NEM?',
                       //leftButton: 'Create new wallet',
                       leftButton: 'Crear nuevo monedero',
                       //walletNamePlh: 'Name of your wallet',
                       walletNamePlh: 'Nombre de su monedero',
                       //passwordPlh: 'Password',
                       passwordPlh: 'Contraseña',
                       //create: 'Create',
                       create: 'Crear',
                       //rightTitle: 'Already a NEMber?',
                       rightTitle: 'Ya es miembro de NEM?',
                       //rightButton: 'Open your wallet',
                       rightButton: 'Abrir su monedero',
                       //openButton: 'Open',
                       openButton: 'Abrir',
                       //walletsFound: 'Found {{1}} wallets',
                       walletsFound: 'Se encontro {{1}} monedero(s)',
                       //copyright: 'Photography by Cas Cornelissen'
                       copyright: 'Fotografía por Cas Cornelissen'
                   },
                   carousel: {
                       items: [
                           {
                               //title: 'NCC encrypts your wallet',
                               title: 'NCC encripta su monedero',
                               //description: 'Security is very important for NEM to avoid theft of NEM coins & assets.'
                               description: 'La seguridad es bien importante para evitar robo de monedas NEM y/o activos.'
                           },
                           {
                               //title: 'NCC encrypts your wallet',
                               title: 'NCC encripta su monedero',
                               //description: 'Security is very important for NEM to avoid theft of NEM coins & assets.'
                               description: 'La seguridad es bien importante para evitar robo de monedas NEM y/o activos.'
                           }
                       ]
                   },
                   about: {
                       sections: [
                           {
                               //title: 'How NCC works?',
                               title: 'Como funciona NCC?',
                               paragraphs: [
                                   //'NCC provides an access to your assets and NEMs like a traditional wallet does. You may',
                                   //'NCC requires access to an NIS server in order to operate. Standard is to have a local server active (is installed together with the NCC)',
                                   //'You may also configure an access to a remote NIS.'
                                   'NCC te provee acceso a tus activos y NEMs como cualquier monedero tradicional. Usted puede',
                                   'NCC requiere acceso a un servidor NIS para poder operar. La convención es tener un servidor NIS local activo (instalado junto a NCC)',
                                   'Usted también puede configurar acceso a un servidor NIS remoto'
                               ],
                               listItems: [
                                   'Tener multiples monederos', //'Have multiple wallets',
                                   'Asociar multiples cuentas a un monedero' //'Define multiple accounts to be included in a wallet'
                               ]
                           },
                           {
                               //title: 'What is *NIS?',
                               title: 'Qué es *NIS?',
                               paragraphs: [
                                   //'This component is responsible for keeping the NEM cloud alive.',
                                   //'The more NIS the better the security.',
                                   //'NIS is the access point into the NEM cloud.'
                                   'Este componente es responsable de mantener la nube NEM con vida',
                                   'Mayor sera la seguridad mientras mas instancias de NIS esten conectadas a la nube NEM',
                                   'NIS es el punto de acceso a la nube NEM'

                               ],
                               //legend: '*NIS stands for NEM Infrastructure Server'
                               legend: '*NIS significa Servidor de Infraestructura NEM'
                           }
                       ]
                   },
                   footer: {
                       //copyright: '© Copyright 2014. NEM Community Client.'
                       copyright: '© Copyright 2014. Cliente de Comunidad NEM.'
                   }
               },
               wallet: {
                   //lastAccess: 'About {{1}} days ago',
                   lastAccess: 'Hace {{1}} dia(s) aproximadamente',
                   //lastAccessJustNow: 'Just now',
                   lastAccessJustNow: 'En estos momentos',
                   //lastAccessTooltip: 'Last access was {{1}}',
                   lastAccessTooltip: 'Último acceso fue en {{1}}',
                   //primary: 'primary',
                   primary: 'primario',
                   primaryShort: 'P',
                   //noLabel: '<No label>',
                   noLabel: '<Sin etiqueta>',
                   //copyToClipboard: 'Click to copy address to clipboard',
                   copyToClipboard: 'Clic para copiar dirección al portapapeles',
                   //copiedToClipboard: 'Address has been copied to clipboard!',
                   copiedToClipboard: 'Dirección ha sido copiada al portapapeles!',
                   actions: {
                       //refreshInfo: 'Refresh Info',
                       refreshInfo: 'Actualizar informacion',
                       //bootLocalNode: 'Boot Local Node',
                       bootLocalNode: 'Inicializar nodo local',
                       //changeWalletName: 'Change Wallet Name',
                       changeWalletName: 'Cambiar nombre de monedero',
                       //changeWalletPassword: 'Change Wallet Password',
                       changeWalletPassword: 'Cambiar contraseña de monedero',
                       //mergeWallets: 'Merge Wallets',
                       mergeWallets: 'Fusionar monederos',
                       //exportWallet: 'Export Wallet',
                       exportWallet: 'Exportar monedero',
                       //createAccount: 'Create new Account',
                       createAccount: 'Crear cuenta nueva',
                       //addAccount: 'Add an Existing Account',
                       addAccount: 'Añadir cuenta existente',
                       //changeAccountLabel: 'Change Account Label',
                       changeAccountLabel: 'Cambiar etiqueta de cuenta',
                       //setPrimary: 'Set as Primary Account',
                       setPrimary: 'Set como cuenta primaria',
                       //removeAccount: 'Remove Account',
                       removeAccount: 'Remover cuenta',
                       //clientInfo: 'Client Info',
                       clientInfo: 'Informacion de cliente',
                       //closeWallet: 'Close Wallet',
                       closeWallet: 'Cerrar monedero',
                       //closeProgram: 'Close Program'
                       closeProgram: 'Cerrar programa'
                   },
                   nav: [
                       'Panel de información', //'Dashboard',
                       'Mensajes', //'Messages',
                       'Contactos', //'Contacts',
                       'Transacciones', //'Transactions',
                       'Bloques recolectados', //'Harvested blocks',
                       'Intercambio de activos', //'Asset Exchange',
                       'Noticias', //'News',
                       'Aplicaciones', //'Applications',
                       'Cuentas', //'Accounts',
                       'Configuración', //'Settings',
                       'Cerrar programa' //'Close Program'
                   ],
                   //bootNodeWarning: "A local node needs to be booted before you can fully utilize NCC's features."
                   bootNodeWarning: "Se necesita iniciar un nodo local antes de poder utilizar todas las características de NCC."
               },
               dashboard: {
                   assets: {
                       //title: 'Your assets'
                       title: 'Tus activos'
                   },
                   importance: {
                       //title: 'Importance score',
                       title: 'Puntuación de importancia',
                       //unknown: 'Unknown status',
                       unknown: 'Estado desconocido',
                       //start: 'Start harvesting',
                       start: 'Comenzar recolecta',
                       //harvesting: 'Harvesting',
                       harvesting: 'Recolectando',
                       //stop: 'Stop harvesting',
                       stop: 'Detener recolecta',
                       //description: 'importance of account to the NEM cloud'
                       description: 'importancia de la cuenta para la nube NEM'
                   },
                   transactions: {
                       //title: 'Recent Transactions',
                       title: 'Transacciones recientes',
                       //sendNem: 'Send NEM',
                       sendNem: 'Enviar NEM',
                       //balance: 'Current balance',
                       balance: 'Saldo actual',
                       //syncStatus: '(at block {{1}}{{#2}} : est. {{3}} days behind{{/2}})',
                       syncStatus: '(En el bloque {{1}}{{#2}}: aproximadamente {{3}} dia(s) atras{{/2}})',
                       //unknown: 'unknown',
                       unknown: 'desconocido',
                       columns: [
                           '',
                           'Tiempo', //'Time',
                           'Emisor/Destinatario', //'Sender/Recipient',
                           'Mensaje', //'Message',
                           '',
                           'Detalles', // 'Details',
                           'Confirmaciones', //'Confirmations',
                           'Tarifa', //'Fee',
                           'Cantidad' // 'Amount'
                       ],
                       types: {
                           //pending: 'Pending transaction',
                           pending: 'Transacción pendiente',
                           //outgoing: 'Outgoing transaction',
                           outgoing: 'Transacción saliente',
                           //incoming: 'Incoming transaction',
                           incoming: 'Transacción entrante',
                           //self: 'Self transaction',
                           self: 'Transacción a sí mismo'
                       },
                       //noMessage: 'No message',
                       noMessage: 'Sin mensaje',
                       //encrypted: 'Message is encrypted',
                       encrypted: 'Mensaje esta encriptado',
                       //view: 'View',
                       view: 'Ver',
                       //pending: 'Pending',
                       pending: 'Pendiente',
                       //seeAll: 'See all transactions',
                       seeAll: 'Ver todas las transacciones',
                       //noTransactions: 'No transactions have been performed yet'
                       noTransactions: 'Aun no se ha ejecutado ninguna transacción'
                   },
                   nemValue: {
                       //title: 'NEM value statistics'
                       title: 'Valores de estadísticas de NEM'
                   },
                   messages: {
                       //titleTooltip: 'Messages'
                       titleTooltip: 'Mensajes'
                   },
                   news: {
                       //titleTooltip: 'News'
                       titleTooltip: 'Noticias'
                   },
                   //notAvailable: 'Not yet available in alpha release'
                   notAvailable: 'No disponible en versión alfa'
               },
               transactions: {
                   //title: 'Transactions',
                   title: 'Transacciones',
                   //sendNem: 'Send NEM',
                   sendNem: 'Enviar NEM',
                   //balance: 'Current Balance',
                   balance: 'Balance actual',
                   filters: {
                       //all: 'All transactions',
                       all: 'Todas las transacciones',
                       //pending: 'Pending',
                       pending: 'Pendiente',
                       //incoming: 'Incoming',
                       incoming: 'Entrante',
                       //outgoing: 'Outgoing'
                       outgoing: 'Saliente'
                   },
                   table: {
                       columns: [
                           '',
                           'Tiempo', //'Time',
                           'Emisor/Destinatario', //'Sender/Recipient',
                           'Mensaje', //'Message',
                           '',
                           'Detalles', // 'Details',
                           'Confirmaciones', //'Confirmations',
                           'Tarifa', //'Fee',
                           'Cantidad' // 'Amount'
                       ],
                       types: {
                           //pending: 'Pending transaction',
                           pending: 'Transacción pendiente',
                           //outgoing: 'Outgoing transaction',
                           outgoing: 'Transacción saliente',
                           //incoming: 'Incoming transaction',
                           incoming: 'Transacción entrante',
                           //self: 'Self transaction',
                           self: 'Transacción a sí mismo'
                       },
                       //noMessage: 'No message',
                       noMessage: 'Sin mensaje',
                       //encrypted: 'Message is encrypted',
                       encrypted: 'Mensaje esta encriptado',
                       //view: 'View',
                       view: 'Ver',
                       //pending: 'Pending',
                       pending: 'Pendiente',
                       //noTransactions: 'No transactions have been performed yet',
                       noTransactions: 'Aun no se ha ejecutado ninguna transacción',
                       //loading: 'Loading more transactions...'
                       loading: 'Cargando mas transacciones...'
                   }
               },
               harvestedBlocks: {
                   //title: 'Harvested Blocks',
                   title: 'Bloques recolectados',
                   //feeEarned: 'Fees earned from the last 25 harvested blocks',
                   feeEarned: 'Comisiones devengadas por los últimos 25 bloques recolectados',
                   table: {
                       columns: [
                           'Altura', //'Height',
                           'Tiempo', //'Time', TODO: Translate to 'Hora' instead?
                           'Hash de bloque', //'Block hash',
                           'Tarifa' //'Fee'
                       ],
                       //noBlocks: 'No harvested blocks ',
                       noBlocks: 'No hay bloques recolectados',
                       //loadMore: 'See older harvested blocks'
                       loadMore: 'Ver bloques recolectados mas viejos'
                   },
                   harvesting: {
                       //unknown: 'Unknown status',
                       unknown: 'Estado desconocido',
                       //start: 'Start harvesting',
                       start: 'Comenzar recolecta',
                       //harvesting: 'Harvesting',
                       harvesting: 'Recolectando',
                       //stop: 'Stop harvesting',
                       stop: 'Detener recolecta'
                   }
               },
               settings: {
                   //title: 'Settings',
                   title: 'Configuración',
                   settings: [
                       {
                           //name: 'Language',
                           name: 'Idioma'
                       }
                   ],
                   //save: 'Save changes',
                   save: 'Guardar cambios',
                   //saveSuccess: 'Settings have been saved successfully'
                   saveSuccess: 'La configuración ha sido actualizada exitosamente' //TODO: revisit
               }
           }
       });


text:
MMPlaceHolder
=============
[![CocoaPods](https://img.shields.io/cocoapods/v/MMPlaceHolder.svg)]()
[![CocoaPods](https://img.shields.io/cocoapods/p/MMPlaceHolder.svg)]()
[![CocoaPods](https://img.shields.io/cocoapods/l/MMPlaceHolder.svg)]()

A drop in solution to set a placeholder or show UIView's size

[中文介绍](http://adad184.com/2014/08/21/kai-yuan-xiang-mu-mmplaceholder/)

you can use it for frame debug
![demo](https://raw.githubusercontent.com/adad184/MMPlaceHolder/master/Screenshot/screenshot2.PNG)

or you can use it for size debug
![show](https://raw.githubusercontent.com/adad184/MMPlaceHolder/master/Screenshot/screenshot1.PNG)

Installation
============

The preferred way of installation is via [CocoaPods](http://cocoapods.org). Just add

```ruby
pod 'MMPlaceHolder'
```

and run `pod install`. It will install the most recent version of MMPlaceHolder.

If you would like to use the latest code of MMPlaceHolder use:

```ruby
pod 'MMPlaceHolder', :head
```

Usage
===============

simply, you only need one line code.

```objc
[yourView showPlaceHolder];
```

or you can customize youself.

```objc
@interface  UIView(MMPlaceHolder)

- (void)showPlaceHolder;
- (void)showPlaceHolderWithAllSubviews;
- (void)showPlaceHolderWithAllSubviews:(NSInteger)maxDepth;
- (void)showPlaceHolderWithLineColor:(UIColor*)lineColor;
- (void)showPlaceHolderWithLineColor:(UIColor*)lineColor backColor:(UIColor*)backColor;
- (void)showPlaceHolderWithLineColor:(UIColor*)lineColor backColor:(UIColor*)backColor arrowSize:(CGFloat)arrowSize;
- (void)showPlaceHolderWithLineColor:(UIColor*)lineColor backColor:(UIColor*)backColor arrowSize:(CGFloat)arrowSize lineWidth:(CGFloat)lineWidth;
- (void)showPlaceHolderWithLineColor:(UIColor*)lineColor backColor:(UIColor*)backColor arrowSize:(CGFloat)arrowSize lineWidth:(CGFloat)lineWidth frameWidth:(CGFloat)frameWidth frameColor:(UIColor*)frameColor;

- (void)hidePlaceHolder;
- (void)hidePlaceHolderWithAllSubviews;
- (void)removePlaceHolder;
- (void)removePlaceHolderWithAllSubviews;
- (MMPlaceHolder *)getPlaceHolder;

@end
```

and you can use the global configuration

```objc
@interface MMPlaceHolderConfig : NSObject

+ (MMPlaceHolderConfig*) defaultConfig;

@property (nonatomic, strong) UIColor *backColor;
@property (nonatomic, assign) CGFloat arrowSize;
@property (nonatomic, strong) UIColor *lineColor;
@property (nonatomic, assign) CGFloat lineWidth;
@property (nonatomic, strong) UIColor *frameColor;
@property (nonatomic, assign) CGFloat frameWidth;

@property (nonatomic, assign) BOOL showArrow;
@property (nonatomic, assign) BOOL showText;

@property (nonatomic, assign) BOOL visible;
@property (nonatomic, assign) BOOL autoDisplay;
@property (nonatomic, strong) NSArray *visibleMemberOfClasses;
@property (nonatomic, strong) NSArray *visibleKindOfClasses;

@end
```

Changelog
===============

v1.8  now you can hide the system view and keep the interface clean & tidy

```objc

	@property (nonatomic, assign) BOOL autoDisplaySystemView;

```

v1.7  now you can display the specific class while in Autodisplay mode(thx [pull request](https://github.com/adad184/MMPlaceHolder/pull/3) from [@mrdaios](https://github.com/mrdaios))

```objc

    @property (nonatomic, strong) NSArray *visibleMemberOfClasses;
    @property (nonatomic, strong) NSArray *visibleKindOfClasses;

    [MMPlaceHolderConfig defaultConfig].visibleMemberOfClasses = @[UIImageView.class];
    [MMPlaceHolderConfig defaultConfig].visibleKindOfClasses   = @[UIButton.class];

```

v1.6  now you can control the visibility of frame & arrow & text by

```objc

	@property (nonatomic, strong) UIColor *frameColor;
	@property (nonatomic, assign) CGFloat frameWidth;

	[MMPlaceHolderConfig defaultConfig].showArrow = YES;
	[MMPlaceHolderConfig defaultConfig].showText = YES;
```
and modified the function `hidePlaceHolder` & add new function `removePlaceHolder`

```objc
	- (void)removePlaceHolder;
	- (void)removePlaceHolderWithAllSubviews;
```
most important thing is you can automatic display the placeholder with one line code by

```objc
    [MMPlaceHolderConfig defaultConfig].autoDisplay = YES;
```

v1.5  fix hidePlaceHolder bug when subviews shows placeholder

v1.4  add a demo project & now you can config the global visability by

```objc
    [MMPlaceHolderConfig defaultConfig].visible = NO;
```

v1.3  now you can add placeholders recursively by

```objc
    - (void)showPlaceHolderWithAllSubviews;
    - (void)showPlaceHolderWithAllSubviews:(NSInteger)maxDepth;
    - (void)hidePlaceHolderWithAllSubviews;
```

v1.2  now you can change default configuration by `[MMPlaceHolderConfig defaultConfig]`

```objc
    [MMPlaceHolderConfig defaultConfig].lineColor = [UIColor whiteColor];
    [MMPlaceHolderConfig defaultConfig].backColor = [UIColor clearColor];
    [MMPlaceHolderConfig defaultConfig].arrowSize = 3;
    [MMPlaceHolderConfig defaultConfig].lineWidth = 1;
```

v1.1  now you can get or remove `MMPlaceHolder` by

```objc
    - (void)hidePlaceHolder;
    - (MMPlaceHolder *)getPlaceHolder;
```

v1.0  you can custom or simply use it by

```objc
    - (void)showPlaceHolder;
    - (void)showPlaceHolderWithLineColor:(UIColor*)lineColor;
    - (void)showPlaceHolderWithLineColor:(UIColor*)lineColor backColor:(UIColor*)backColor;
    - (void)showPlaceHolderWithLineColor:(UIColor*)lineColor backColor:(UIColor*)backColor arrowSize:(CGFloat)arrowSize ;
    - (void)showPlaceHolderWithLineColor:(UIColor*)lineColor backColor:(UIColor*)backColor arrowSize:(CGFloat)arrowSize lineWidth:(CGFloat)lineWidth;
```

redpajama_set_name: RedPajamaGithub


text: **Just a React app for study purpose**


text:
name: ⁉ Support Question
about: Having trouble with Bolt? -> http://bolt.cm/community.
---

This issue tracker is NOT meant for support questions. If you have a question,
please join us in the community, on one of our social platforms like Slack or
the forum: http://bolt.cm/community.

Thanks!


text:
import Helper from './_helper';
import { Model } from 'ember-cli-mirage';
import { module, test } from 'qunit';

module('Integration | ORM | Belongs To | One To One | create', {
  beforeEach() {
    this.helper = new Helper();
    this.helper.schema.registerModel('foo', Model);
  }
});

test('it sets up associations correctly when passing in the foreign key', function(assert) {
  let { schema } = this.helper;
  let profile = schema.create('profile');
  let user = schema.create('user', {
    profileId: profile.id
  });
  profile.reload();

  assert.equal(user.profileId, profile.id);
  assert.deepEqual(user.profile.attrs, profile.attrs);
  assert.deepEqual(profile.user.attrs, user.attrs);
  assert.equal(schema.db.users.length, 1);
  assert.equal(schema.db.profiles.length, 1);
  assert.deepEqual(schema.db.users[0], { id: '1', profileId: '1' });
  assert.deepEqual(schema.db.profiles[0], { id: '1', userId: '1' });
});

test('it sets up associations correctly when passing in the association itself', function(assert) {
  let { schema } = this.helper;
  let profile = schema.create('profile');
  let user = schema.create('user', {
    profile
  });

  assert.equal(user.profileId, profile.id);
  assert.deepEqual(user.profile.attrs, profile.attrs);
  assert.deepEqual(profile.user.attrs, user.attrs);
  assert.equal(schema.db.users.length, 1);
  assert.equal(schema.db.profiles.length, 1);
  assert.deepEqual(schema.db.users[0], { id: '1', profileId: '1' });
  assert.deepEqual(schema.db.profiles[0], { id: '1', userId: '1' });
});

test('it throws an error if a model is passed in without a defined relationship', function(assert) {
  let { schema } = this.helper;

  assert.throws(function() {
    schema.create('user', {
      foo: schema.create('foo')
    });
  }, /you haven't defined that key as an association on your model/);
});

test('it throws an error if a collection is passed in without a defined relationship', function(assert) {
  let { schema } = this.helper;
  schema.create('foo');
  schema.create('foo');

  assert.throws(function() {
    schema.create('user', {
      foos: schema.foos.all()
    });
  }, /you haven't defined that key as an association on your model/);
});


text:
namespace fu = ::arangodb::fuerte;

static void performRequests(std::string const& host) {
  fu::EventLoopService loop;
  // Set connection parameters
  fu::ConnectionBuilder cbuilder;
  cbuilder.endpoint(host);
  setupAuthenticationFromEnv(cbuilder);

  // make connection
  auto connection = cbuilder.connect(loop);

  // should fail after 1s
  auto req = fu::createRequest(fu::RestVerb::Post, "/_api/cursor");
  req->timeout(std::chrono::milliseconds(1000));
  {
    VPackBuilder builder;
    builder.openObject();
    builder.add("query", VPackValue("RETURN SLEEP(10)"));
    builder.close();
    req->addVPack(builder.slice());
  }

  fu::WaitGroup wg;
  wg.add();
  connection->sendRequest(std::move(req), [&](fu::Error e, std::unique_ptr<fu::Request> req,
                                              std::unique_ptr<fu::Response> res) {
    fu::WaitGroupDone done(wg);
    ASSERT_EQ(e, fu::Error::Timeout);
  });
  ASSERT_TRUE(wg.wait_for(std::chrono::seconds(3)));

  std::this_thread::sleep_for(std::chrono::milliseconds(100));
  // connection must now reconnect and work again
  req = fu::createRequest(fu::RestVerb::Post, "/_api/version");
  wg.add();
  connection->sendRequest(std::move(req), [&](fu::Error e, std::unique_ptr<fu::Request> req,
                                              std::unique_ptr<fu::Response> res) {
    fu::WaitGroupDone done(wg);
    if (e != fu::Error::NoError) {
      ASSERT_TRUE(false) << fu::to_string(e);
    } else {
      ASSERT_EQ(res->statusCode(), fu::StatusOK);
      auto slice = res->slices().front();
      auto version = slice.get("version").copyString();
      auto server = slice.get("server").copyString();
      ASSERT_EQ(server, "arango");
      ASSERT_EQ(version[0], '3'); // major version
    }
  });
  wg.wait();
}

TEST(Timeouts, VelocyStream){
  performRequests("vst://127.0.0.1:8529");
}

TEST(RequestTimeout, HTTP) {
  performRequests("http://127.0.0.1:8529");
}


text:
from Hologram.Event import Event
from Exceptions.HologramError import NetworkError
from Hologram.Network.Route import Route
from Hologram.Network.Modem import Modem, E303, MS2131, E372, BG96, EC21, Nova_U201, NovaM, DriverLoader
from Hologram.Network import Network, NetworkScope
import time
from serial.tools import list_ports

# Cellular return codes.
CLOUD_DISCONNECTED = 0
CLOUD_CONNECTED = 1
CLOUD_ERR_SIM = 3
CLOUD_ERR_SIGNAL = 5
CLOUD_ERR_CONNECT = 12

DEFAULT_CELLULAR_TIMEOUT = 200 # slightly more than 3 mins

class Cellular(Network):

    _modemHandlers = {
        'e303': E303.E303,
        'ms2131': MS2131.MS2131,
        'e372': E372.E372,
        'bg96': BG96.BG96,
        'ec21': EC21.EC21,
        'nova': Nova_U201.Nova_U201,
        'novam': NovaM.NovaM,
        '': Modem
    }

    def __init__(self, event=Event()):
        super().__init__(event=event)
        self._connection_status = CLOUD_DISCONNECTED
        self._modem = None
        self._route = Route()
        self.__receive_port = None

    def autodetect_modem(self):
        # scan for a modem and set it if found
        dev_devices = self._scan_for_modems()
        if dev_devices is None:
            raise NetworkError('Modem not detected')
        self.modem = dev_devices[0]

    def load_modem_drivers(self):
        self._load_modem_drivers()

    def getConnectionStatus(self):
        return self._connection_status

    def is_connected(self):
        return self._connection_status == CLOUD_CONNECTED or self.modem.is_connected()

    def connect(self, timeout = DEFAULT_CELLULAR_TIMEOUT):
        self.logger.info('Connecting to cell network with timeout of %s seconds', timeout)
        success = False
        try:
            success = self.modem.connect(timeout = timeout)
        except KeyboardInterrupt as e:
            pass

        if success:
            self.logger.info('Successfully connected to cell network')
            # Disable at sockets mode since we're already establishing PPP.
            # This call is needed in certain modems that have limited interfaces to work with.
            time.sleep(2)
            # give the device a little time to enumerate
            self.disable_at_sockets_mode()
            self.__configure_routing()
            self._connection_status = CLOUD_CONNECTED
            self.event.broadcast('cellular.connected')
            super().connect()
        else:
            self.logger.info('Failed to connect to cell network')

        return success

    def disconnect(self):
        self.logger.info('Disconnecting from cell network')
        self.__remove_routing()
        success = self.modem.disconnect()
        if success:
            self.logger.info('Successfully disconnected from cell network')
            self.enable_at_sockets_mode()
            self._connection_status = CLOUD_DISCONNECTED
            self.event.broadcast('cellular.disconnected')
            super().disconnect()
        else:
            self.logger.info('Failed to disconnect from cell network')

        return success

    def reconnect(self):
        self.logger.info('Reconnecting to cell network')
        success = self.disconnect()

        if success == False:
            self.logger.info('Failed to disconnect from cell network')
            return False

        return self.connect()

    def create_socket(self):
        self.modem.create_socket()

    def connect_socket(self, host, port):
        self.modem.connect_socket(host, port)
        # This delay is required as recommended in the uBlox spec sheet.
        time.sleep(2)

    def listen_socket(self, port):
        self.modem.listen_socket(port)

    def write_socket(self, data):
        return self.modem.write_socket(data)

    def close_socket(self):
        return self.modem.close_socket()

    def send_message(self, data):
        return self.modem.send_message(data)

    def open_receive_socket(self, receive_port):
        self.__receive_port = receive_port
        self.event.subscribe('cellular.forced_disconnect', self.__reconnect_after_forced_disconnect)
        return self.modem.open_receive_socket(receive_port)

    def pop_received_message(self):
        return self.modem.pop_received_message()

    def disable_at_sockets_mode(self):
        self.modem.disable_at_sockets_mode()

    def enable_at_sockets_mode(self):
        self.modem.enable_at_sockets_mode()

    def enableSMS(self):
        return self.modem.enableSMS()

    def disableSMS(self):
        return self.modem.disableSMS()

    def popReceivedSMS(self):
        return self.modem.popReceivedSMS()

    # EFFECTS: Returns the sim otp response from the sim.
    def get_sim_otp_response(self, command):
        return self.modem.get_sim_otp_response(command)

    def __reconnect_and_receive(self):
        if not self.at_sockets_available:
            self.connect()
        self.open_receive_socket(self.__receive_port)

    def __reconnect_after_forced_disconnect(self):
        self.logger.info('Reconnecting after forced disconnect...')
        time.sleep(5)  # uBlox takes some time to update internal state after disconnect
        self.__reconnect_and_receive()
        while not self.is_connected():
            self.logger.info('Reconnect failed. Retrying in 5 seconds...')
            time.sleep(5)
            self.__reconnect_and_receive()
        self.logger.info('Ready to receive data on port %s', self.__receive_port)

    def __configure_routing(self):
        # maybe we don't have to tear down the routes but we probably should
        self.logger.info('Adding routes to Hologram cloud')
        self._route.add('10.176.0.0/16', self.localIPAddress)
        self._route.add('10.254.0.0/16', self.localIPAddress)
        if self.scope == NetworkScope.SYSTEM:
            self.logger.info('Adding system-wide default route to cellular interface')
            self._route.add_default(self.localIPAddress)

    def __remove_routing(self):
        self.logger.info('Removing routes to Hologram cloud')
        if self.localIPAddress:
            self._route.delete('10.176.0.0/16', self.localIPAddress)
            self._route.delete('10.254.0.0/16', self.localIPAddress)
            if self.scope == NetworkScope.SYSTEM:
                self.logger.info('Removing system-wide default route to cellular interface')
                self._route.delete_default(self.localIPAddress)

    def _load_modem_drivers(self):
        dl = DriverLoader.DriverLoader()
        for (modemName, modemHandler) in self._modemHandlers.items():
            module = modemHandler.module
            if module:
                if not dl.is_module_loaded(module):
                    self.logger.info('Loading module %s for %s', module, modemName)
                    dl.load_module(module)
                    syspath = modemHandler.syspath
                    if syspath:
                        usb_ids = modemHandler.usb_ids
                        for vid_pid in usb_ids:
                            dl.force_driver_for_device(syspath, vid_pid[0], vid_pid[1])

    def _scan_for_modems(self):
        res = None
        for (modemName, modemHandler) in self._modemHandlers.items():
            if self._scan_for_modem(modemHandler):
                res = (modemName, modemHandler)
                break
        return res

    def _scan_for_modem(self, modemHandler):
        usb_ids = modemHandler.usb_ids
        for vid_pid in usb_ids:
            if not vid_pid:
                continue
            self.logger.debug('checking for vid_pid: %s', str(vid_pid))
            for dev in list_ports.grep("{0}:{1}".format(vid_pid[0], vid_pid[1])):
                self.logger.info('Detected modem %s', modemHandler.__name__)
                return True
        return False

    @property
    def modem(self):
        return self._modem

    @modem.setter
    def modem(self, modem):
        if modem not in self._modemHandlers:
            raise NetworkError('Invalid modem type: %s' % modem)
        else:
            self._modem = self._modemHandlers[modem](event=self.event)

    @property
    def localIPAddress(self):
        return self.modem.localIPAddress

    @property
    def remoteIPAddress(self):
        return self.modem.remoteIPAddress

    @property
    def signal_strength(self):
        return self.modem.signal_strength

    @property
    def modem_id(self):
        return self.modem.modem_id

    @property
    def imsi(self):
        return self.modem.imsi

    @property
    def iccid(self):
        return self.modem.iccid

    @property
    def operator(self):
        return self.modem.operator

    # This property will be set to None if a modem is not physically attached.
    @property
    def active_modem_interface(self):
        return repr(self.modem)

    @property
    def description(self):
        return self.modem.description

    @property
    def location(self):
        return self.modem.location

    @property
    def at_sockets_available(self):
        return self.modem.at_sockets_available


text:
package org.knowm.xchange.ftx.dto.account;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

public class FtxConvertSimulatetDto {

  @JsonProperty("quoteId")
  private final int quoteId;

  @JsonCreator
  public FtxConvertSimulatetDto(@JsonProperty("quoteId") int quoteId) {
    this.quoteId = quoteId;
  }

  public int getQuoteId() {
    return quoteId;
  }

  @Override
  public String toString() {
    return "FtxConvertSimulatetDto [quoteId=" + quoteId + "]";
  }
}


text:
require "test_helper"

describe Cover do
  let(:cover) { Cover.new }

  it "must be valid" do
    value(cover).must_be :valid?
  end
end


text:
import {
  Component,
  trigger,
  state,
  style,
  transition,
  animate
} from '@angular/core';

@Component({
  moduleId: module.id,
  selector: 'carousel',
  templateUrl: 'carousel.component.html',
  styleUrls: ['carousel.component.css'],
  animations: [
    trigger('slideState', [
      state('center', style({
        transform: 'translateX(0px)'
      })),
      state('rightToCenter', style({
        transform: 'translateX(0px)'
      })),
      state('leftToCenter', style({
        transform: 'translateX(0px)'
      })),
      state('centerToLeft', style({
        transform: 'translateX(-100%)'
      })),
      state('centerToRight', style({
        transform: 'translateX(102%)'
      })),

      transition('* => rightToCenter', [
        style({
          transform: 'translateX(102%)'
        }),
        animate('500ms ease', style({
          transform: 'translateX(0px)'
        }))
      ]),
      transition('* => leftToCenter', [
        style({
          transform: 'translateX(-100%)'
        }),
        animate('500ms ease', style({
          transform: 'translateX(0px)'
        }))
      ]),
      transition('* => centerToLeft', [
        style({
          transform: 'translateX(0px)'
        }),
        animate('500ms ease', style({
          transform: 'translateX(-100%)'
        }))
      ]),
      transition('* => centerToRight', [
        style({
          transform: 'translateX(0px)'
        }),
        animate('500ms ease', style({
          transform: 'translateX(100%)'
        }))
      ])
    ])
  ]
})

export class CarouselComponent {
  private currentIndex = 0;
  private totalSlides = 0;
  private animationOff = true;
  arrImages: SliderImage[] = [
    { imageUrl: 'app/components/carousel_component/images/image1.jpg', state: 'center' },
    { imageUrl: 'app/components/carousel_component/images/image2.jpg', state: '' }
  ];

  ngOnInit() {
    this.totalSlides = this.arrImages.length;
  }

  private nextSlider() {
    if (this.animationOff) {
      let nextIndex = (this.currentIndex + 1) % this.totalSlides;
      this.arrImages[this.currentIndex].state = 'centerToLeft';
      this.arrImages[nextIndex].state = 'rightToCenter';
      this.currentIndex = nextIndex;
    }
  }

  private prevSlider() {
    if (this.animationOff) {
      let nextIndex = this.currentIndex - 1;
      nextIndex = (nextIndex < 0) ? this.totalSlides - 1 : nextIndex;
      this.arrImages[this.currentIndex].state = 'centerToRight';
      this.arrImages[nextIndex].state = 'leftToCenter';
      this.currentIndex = nextIndex;
    }
  }

  private animationStarted(event: any) {
    if (event.totalTime > 0) {
      this.animationOff = false;
    }
  }
  private animationDone(event: any) {
    if (event.totalTime > 0) {
      this.animationOff = true;
    }
  }

}

class SliderImage {
  imageUrl: string;
  state: string;
}


text:
package sun.awt.X11;

import java.awt.*;
import java.awt.peer.*;
import java.awt.event.*;

import java.util.Vector;
import sun.awt.AWTAccessor;
import java.util.logging.*;

public class XPopupMenuPeer extends XMenuWindow implements PopupMenuPeer {

    /************************************************
     *
     * Data members
     *
     ************************************************/
    private static Logger log = Logger.getLogger("sun.awt.X11.XBaseMenuWindow");

    /*
     * Primary members
     */
    private XComponentPeer componentPeer;
    private PopupMenu popupMenuTarget;

    /*
     * If mouse button is clicked on item showing submenu
     * we have to hide its submenu.
     * This member saves the submenu under cursor
     * Only if it's showing
     */
    private XMenuPeer showingMousePressedSubmenu = null;

    /*
     * Painting constants
     */
    private final static int CAPTION_MARGIN_TOP = 4;
    private final static int CAPTION_SEPARATOR_HEIGHT = 6;

    /************************************************
     *
     * Construction
     *
     ************************************************/
    XPopupMenuPeer(PopupMenu target) {
        super(null);
        this.popupMenuTarget = target;
    }

    /************************************************
     *
     * Implementaion of interface methods
     *
     ************************************************/
    /*
     * From MenuComponentPeer
     */
    public void setFont(Font f) {
        resetMapping();
        setItemsFont(f);
        postPaintEvent();
    }

    /*
     * From MenuItemPeer
     */
    public void setLabel(String label) {
        resetMapping();
        postPaintEvent();
    }

    public void setEnabled(boolean enabled) {
        postPaintEvent();
    }

    /**
     * DEPRECATED:  Replaced by setEnabled(boolean).
     * @see java.awt.peer.MenuItemPeer
     */
    public void enable() {
        setEnabled( true );
    }

    /**
     * DEPRECATED:  Replaced by setEnabled(boolean).
     * @see java.awt.peer.MenuItemPeer
     */
    public void disable() {
        setEnabled( false );
    }

    /*
     * From MenuPeer
     */
    /**
     * addSeparator routines are not used
     * in peers. Shared code invokes addItem("-")
     * for adding separators
     */
    public void addSeparator() {
        if (log.isLoggable(Level.FINER)) log.finer("addSeparator is not implemented");
    }

    /*
     * From PopupMenuPeer
     */
    public void show(Event e) {
        target = (Component)e.target;
        // Get menus from the target.
        Vector targetItemVector = getMenuTargetItems();
        if (targetItemVector != null) {
            reloadItems(targetItemVector);
            //Fix for 6287092: JCK15a: api/java_awt/interactive/event/EventTests.html#EventTest0015 fails, mustang
            Point tl = target.getLocationOnScreen();
            Point pt = new Point(tl.x + e.x, tl.y + e.y);
            //Fixed 6266513: Incorrect key handling in XAWT popup menu
            //No item should be selected when showing popup menu
            if (!ensureCreated()) {
                return;
            }
            Dimension dim = getDesiredSize();
            //Fix for 6267162: PIT: Popup Menu gets hidden below the screen when opened
            //near the periphery of the screen, XToolkit
            Rectangle bounds = getWindowBounds(pt, dim);
            reshape(bounds);
            xSetVisible(true);
            toFront();
            selectItem(null, false);
            grabInput();
        }
    }

    /************************************************
     *
     * Access to target's fields
     *
     ************************************************/

    //Fix for 6267144: PIT: Popup menu label is not shown, XToolkit
    Font getTargetFont() {
        if (popupMenuTarget == null) {
            return XWindow.defaultFont;
        }
        return AWTAccessor.getMenuComponentAccessor()
                   .getFont_NoClientCode(popupMenuTarget);
    }

    //Fix for 6267144: PIT: Popup menu label is not shown, XToolkit
    String getTargetLabel() {
        if (target == null) {
            return "";
        }
        return AWTAccessor.getMenuItemAccessor().getLabel(popupMenuTarget);
    }

    //Fix for 6184485: Popup menu is not disabled on XToolkit even when calling setEnabled (false)
    boolean isTargetEnabled() {
        if (popupMenuTarget == null) {
            return false;
        }
        return AWTAccessor.getMenuItemAccessor().isEnabled(popupMenuTarget);
    }

    Vector getMenuTargetItems() {
        if (popupMenuTarget == null) {
            return null;
        }
        return AWTAccessor.getMenuAccessor().getItems(popupMenuTarget);
    }

    /************************************************
     *
     * Utility functions
     *
     ************************************************/

    //Fix for 6267162: PIT: Popup Menu gets hidden below the screen when opened
    //near the periphery of the screen, XToolkit

    /**
     * Calculates placement of popup menu window
     * given origin in global coordinates and
     * size of menu window. Returns suggested
     * rectangle for menu window in global coordinates
     * @param origin the origin point specified in show()
     * function converted to global coordinates
     * @param windowSize the desired size of menu's window
     */
    protected Rectangle getWindowBounds(Point origin, Dimension windowSize) {
        Rectangle globalBounds = new Rectangle(origin.x, origin.y, 0, 0);
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        Rectangle res;
        res = fitWindowRight(globalBounds, windowSize, screenSize);
        if (res != null) {
            return res;
        }
        res = fitWindowLeft(globalBounds, windowSize, screenSize);
        if (res != null) {
            return res;
        }
        res = fitWindowBelow(globalBounds, windowSize, screenSize);
        if (res != null) {
            return res;
        }
        res = fitWindowAbove(globalBounds, windowSize, screenSize);
        if (res != null) {
            return res;
        }
        return fitWindowToScreen(windowSize, screenSize);
   }

    /************************************************
     *
     * Overriden XMenuWindow caption-painting functions
     * Necessary to fix 6267144: PIT: Popup menu label is not shown, XToolkit
     *
     ************************************************/
    /**
     * Returns height of menu window's caption.
     * Can be overriden for popup menus and tear-off menus
     */
    protected Dimension getCaptionSize() {
        String s = getTargetLabel();
        if (s.equals("")) {
            return null;
        }
        Graphics g = getGraphics();
        if (g == null) {
            return null;
        }
        try {
            g.setFont(getTargetFont());
            FontMetrics fm = g.getFontMetrics();
            String str = getTargetLabel();
            int width = fm.stringWidth(str);
            int height = CAPTION_MARGIN_TOP + fm.getHeight() + CAPTION_SEPARATOR_HEIGHT;
            Dimension textDimension = new Dimension(width, height);
            return textDimension;
        } finally {
            g.dispose();
        }
    }

    /**
     * Paints menu window's caption.
     * Can be overriden for popup menus and tear-off menus.
     * Default implementation does nothing
     */
    protected void paintCaption(Graphics g, Rectangle rect) {
        String s = getTargetLabel();
        if (s.equals("")) {
            return;
        }
        g.setFont(getTargetFont());
        FontMetrics fm = g.getFontMetrics();
        String str = getTargetLabel();
        int width = fm.stringWidth(str);
        int textx = rect.x + (rect.width - width) / 2;
        int texty = rect.y + CAPTION_MARGIN_TOP + fm.getAscent();
        int sepy = rect.y + rect.height - CAPTION_SEPARATOR_HEIGHT / 2;
        g.setColor(isTargetEnabled() ? getForegroundColor() : getDisabledColor());
        g.drawString(s, textx, texty);
        draw3DRect(g, rect.x, sepy,  rect.width, 2, false);
    }

    /************************************************
     *
     * Overriden XBaseMenuWindow functions
     *
     ************************************************/
    protected void doDispose() {
        super.doDispose();
        XToolkit.targetDisposedPeer(popupMenuTarget, this);
    }

    protected void handleEvent(AWTEvent event) {
        switch(event.getID()) {
        case MouseEvent.MOUSE_PRESSED:
        case MouseEvent.MOUSE_RELEASED:
        case MouseEvent.MOUSE_CLICKED:
        case MouseEvent.MOUSE_MOVED:
        case MouseEvent.MOUSE_ENTERED:
        case MouseEvent.MOUSE_EXITED:
        case MouseEvent.MOUSE_DRAGGED:
            doHandleJavaMouseEvent((MouseEvent)event);
            break;
        case KeyEvent.KEY_PRESSED:
        case KeyEvent.KEY_RELEASED:
            doHandleJavaKeyEvent((KeyEvent)event);
            break;
        default:
            super.handleEvent(event);
            break;
        }
    }

    /************************************************
     *
     * Overriden XWindow general-purpose functions
     *
     ************************************************/
    void ungrabInputImpl() {
        hide();
    }

    /************************************************
     *
     * Overriden XWindow keyboard processing
     *
     ************************************************/

    /*
     * In previous version keys were handled in handleKeyPress.
     * Now we override this function do disable F10 explicit
     * processing. All processing is done using KeyEvent.
     */
    public void handleKeyPress(XEvent xev) {
        XKeyEvent xkey = xev.get_xkey();
        if (log.isLoggable(Level.FINE)) {
            log.fine(xkey.toString());
        }
        if (isEventDisabled(xev)) {
            return;
        }
        final Component currentSource = (Component)getEventSource();
        handleKeyPress(xkey);
    }

}


text:
module NScool_ctrls_io
    use NScool_def
    include 'NScool_controls.inc'

    namelist /controls/ &
        load_model_file, &
        model_file, &
        write_interval_for_terminal, &
        write_interval_for_terminal_header, &
        write_interval_for_history, &
        write_interval_for_profile, &
        starting_number_for_profile, &
        suppress_first_step_output, &
        output_directory, &
        which_solver, &
        maximum_number_of_models, &
        maximum_timestep, &
        integration_tolerance, &
        min_lg_temperature_integration, &
        max_lg_temperature_integration, &
        use_other_set_Qimp, &
        use_other_sf_critical_temperatures, &
        extra_real_controls, &
        extra_integer_controls, &
        extra_logical_controls, &
        fix_core_temperature, &
        core_temperature, &
        make_inner_boundary_insulating, &
        fix_atmosphere_temperature_when_accreting, &
        atmosphere_temperature_when_accreting, &
        load_epochs, &
        epoch_datafile, &
        epoch_time_scale, &
        epoch_Mdot_scale, &
        number_epochs, &
        basic_epoch_Mdots, &
        basic_epoch_boundaries, &
        core_mass, &
        core_radius, &
        lgPcrust_bot, &
        lgPcrust_top, &
        target_resolution_lnP,  &
        lgP_min_heating_outer, &
        lgP_max_heating_outer, &
        Q_heating_outer, &
        lgP_min_heating_inner, &
        lgP_max_heating_inner, &
        Q_heating_inner, &
        turn_on_extra_heating, &
        lgP_min_heating_shallow, &
        lgP_max_heating_shallow, &
        Q_heating_shallow, &
        use_other_set_heating, &
        which_proton_1S0_gap, &
        which_neutron_1S0_gap, &
        which_neutron_3P2_gap, &
        scale_sf_critical_temperatures, &
        use_pcy_for_ee_scattering, &
        use_page_for_eQ_scattering, &
        use_neutron_conductivity, &
        use_superfluid_phonon_conductivity, &
        rad_full_on_lgrho, &
        rad_full_off_lgrho, &
        eos_gamma_melt_pt, &
        eos_rsi_melt_pt, &
        eos_nuclide_abundance_threshold, &
        eos_pasta_transition_in_fm3, &
        eos_cluster_transition_in_fm3, &
        use_core_nu_bremsstrahlung, &
        use_core_nu_mUrca, &
        use_core_nu_dUrca, &
        use_core_nu_PBF, &
        use_crust_nu_pair, &
        use_crust_nu_photo, &
        use_crust_nu_plasma, &
        use_crust_nu_bremsstrahlung, &
        use_crust_nu_pbf, &
        turn_on_shell_Urca, &
        shell_Urca_luminosity_coeff, &
        lgP_shell_Urca, &
        lg_atm_light_element_column, &
        atm_model, &
        crust_reference_temperature, &
        crust_composition, &
        fix_Qimp, &
        Qimp

contains
    subroutine do_one_setup(id,inlist,ierr)
        integer, intent(in) :: id
        character(len=*), intent(in) :: inlist
        integer, intent(out) :: ierr
        type(NScool_info), pointer :: s

        call get_NScool_info_ptr(id,s,ierr)
        if (ierr /= 0) return
        call set_default_controls
        call read_controls(id,inlist,ierr)
        call store_controls(s, ierr)
    end subroutine do_one_setup

    subroutine read_controls(id,filename,ierr)
        use exceptions_lib
        integer, intent(in) :: id
        character(len=*), intent(in) :: filename
        integer, intent(out) :: ierr
        type(NScool_info), pointer :: s
        integer :: iounit
        type(assertion) :: open_namelist=assertion(scope='read_controls')
        type(assertion) :: read_namelist=assertion(scope='read_controls')

        call open_namelist% set_message('failed to open '//trim(filename))
        call read_namelist% set_message('failed while reading '//trim(filename))

        ierr = 0
        call get_NScool_info_ptr(id,s,ierr)
        if (ierr /= 0) return

        if (len_trim(filename) > 0) then
            open (newunit=iounit,file=trim(filename),  &
            & action='read', delim='quote', status='old', iostat=ierr)
            call open_namelist% assert(ierr==0)
            read(iounit,nml=controls,iostat=ierr)
            close(iounit)
            call read_namelist% assert(ierr == 0)
        end if
    end subroutine read_controls

    subroutine set_default_controls()
        include 'controls.defaults'
    end subroutine set_default_controls

    subroutine store_controls(s,ierr)
        use math_lib
        use exceptions_lib
        use constants_def, only : Msun, julian_day
        use num_lib, only : solver_option
        use storage, only: allocate_NScool_epoch_arrays
        use NScool_epochs, only: do_load_epochs
        type(NScool_info), pointer :: s
        integer, intent(out) :: ierr
        type(failure) :: epochs_failure=failure(scope='store_controls')

        ierr = 0

        s% load_model_file = load_model_file
        s% model_file = model_file
        s% write_interval_for_terminal = write_interval_for_terminal
        s% write_interval_for_terminal_header = &
        &   write_interval_for_terminal_header
        s% write_interval_for_history = write_interval_for_history
        s% write_interval_for_profile = write_interval_for_profile
        s% starting_number_for_profile = starting_number_for_profile
        s% suppress_first_step_output = suppress_first_step_output
        s% output_directory = output_directory
        s% which_solver = trim(which_solver)
        s% base_profile_filename = trim(s% output_directory)//'/profile'
        s% history_filename = trim(s% output_directory)//'/history.data'
        s% profile_manifest_filename = trim(s% output_directory)//'/profiles'

        s% maximum_number_of_models = maximum_number_of_models
        s% maximum_timestep = maximum_timestep*julian_day
        s% integration_tolerance = integration_tolerance
        s% min_lg_temperature_integration = min_lg_temperature_integration
        s% max_lg_temperature_integration = max_lg_temperature_integration

        s% use_other_set_Qimp = use_other_set_Qimp
        s% use_other_sf_critical_temperatures = use_other_sf_critical_temperatures
        s% extra_real_controls = extra_real_controls
        s% extra_integer_controls = extra_integer_controls
        s% extra_logical_controls = extra_logical_controls

        s% fix_core_temperature = fix_core_temperature
        s% core_temperature = core_temperature
        s% make_inner_boundary_insulating = make_inner_boundary_insulating
        s% fix_atmosphere_temperature_when_accreting = fix_atmosphere_temperature_when_accreting
        s% atmosphere_temperature_when_accreting = atmosphere_temperature_when_accreting

        s% Mcore = core_mass
        s% Rcore = core_radius
        s% Psurf = exp10(lgPcrust_top)
        s% Pcore = exp10(lgPcrust_bot)
        s% target_resolution_lnP = target_resolution_lnP
        s% Tcore = core_temperature
        s% lgP_min_heating_outer = lgP_min_heating_outer
        s% lgP_max_heating_outer = lgP_max_heating_outer
        s% Q_heating_outer = Q_heating_outer
        s% lgP_min_heating_inner = lgP_min_heating_inner
        s% lgP_max_heating_inner = lgP_max_heating_inner
        s% Q_heating_inner = Q_heating_inner
        s% turn_on_extra_heating = turn_on_extra_heating
        s% lgP_min_heating_shallow = lgP_min_heating_shallow
        s% lgP_max_heating_shallow = lgP_max_heating_shallow
        s% Q_heating_shallow = Q_heating_shallow
        s% use_other_set_heating = use_other_set_heating

        s% which_proton_1S0_gap = which_proton_1S0_gap
        s% which_neutron_1S0_gap = which_neutron_1S0_gap
        s% which_neutron_3P2_gap = which_neutron_3P2_gap
        s% scale_sf_critical_temperatures = scale_sf_critical_temperatures

        s% use_pcy_for_ee_scattering = use_pcy_for_ee_scattering
        s% use_page_for_eQ_scattering = use_page_for_eQ_scattering

        s% use_neutron_conductivity = use_neutron_conductivity
        s% use_superfluid_phonon_conductivity = &
        &    use_superfluid_phonon_conductivity
        ! and densities for turning on/off radiative opacity
        s% rad_full_on_lgrho = rad_full_on_lgrho
        s% rad_full_off_lgrho = rad_full_off_lgrho

        s% eos_gamma_melt_pt = eos_gamma_melt_pt
        s% eos_rsi_melt_pt = eos_rsi_melt_pt
        s% eos_nuclide_abundance_threshold = eos_nuclide_abundance_threshold
        s% eos_pasta_transition_in_fm3 = eos_pasta_transition_in_fm3
        s% eos_cluster_transition_in_fm3 = eos_cluster_transition_in_fm3

        s% use_core_nu_bremsstrahlung = use_core_nu_bremsstrahlung
        s% use_core_nu_mUrca = use_core_nu_mUrca
        s% use_core_nu_dUrca = use_core_nu_dUrca
        s% use_core_nu_PBF = use_core_nu_PBF
        s% use_crust_nu_pair = use_crust_nu_pair
        s% use_crust_nu_photo = use_crust_nu_photo
        s% use_crust_nu_plasma = use_crust_nu_plasma
        s% use_crust_nu_bremsstrahlung = use_crust_nu_bremsstrahlung
        s% use_crust_nu_pbf = use_crust_nu_pbf

        s% turn_on_shell_Urca = turn_on_shell_Urca
        s% shell_Urca_luminosity_coeff = shell_Urca_luminosity_coeff
        s% lgP_shell_Urca = lgP_shell_Urca

        s% lg_atm_light_element_column = lg_atm_light_element_column
        s% atm_model = atm_model
        s% crust_reference_temperature = crust_reference_temperature
        s% crust_composition = crust_composition
        s% fix_Qimp = fix_Qimp
        s% Qimp = Qimp

        ! epochs and mass accretion rates
        s% load_epochs = load_epochs
        s% epoch_datafile = epoch_datafile
        s% epoch_time_scale = epoch_time_scale
        s% epoch_Mdot_scale = epoch_Mdot_scale
        if (s% load_epochs) then
            call do_load_epochs(s, ierr)
            if (epochs_failure% raised(ierr,'loading epochs')) return
        else
            s% number_epochs = number_epochs
            call allocate_NScool_epoch_arrays(s, ierr)
            if (epochs_failure% raised(ierr,'allocating epochs')) return
            s% epoch_Mdots(1:number_epochs) = &
            &   basic_epoch_Mdots(1:number_epochs) * s% epoch_Mdot_scale
            s% epoch_boundaries(0:number_epochs) = &
            &   basic_epoch_boundaries(0:number_epochs) *  &
            &   s% epoch_time_scale*julian_day
        end if
   end subroutine store_controls

   subroutine write_controls(io,ierr)
       integer, intent(in) :: io
       integer, intent(out) :: ierr
       write(io,nml=controls,iostat=ierr)
   end subroutine write_controls

end module NScool_ctrls_io


text:
/**
 *
 */
package uk.ac.lkl.client;

import com.google.gwt.user.client.ui.Widget;

/**
 * Used to provide a programmatic hook to micro behaviour editor
 *
 * @author Ken Kahn
 *
 */

public interface MicroBehaviourEditorCommand {

    public void execute(Widget widget);

}


text:
These values indicate P and I Gains of Velocity Control Mode. The I Gain includes sampling time. Velocity P Gain of DYNAMIXEL's internal controller is abbreviated to KVP and Velocity I Gain is abbreviated to KVI.

|Gain Value Range|
| :---: |
|0 ~ 32,767|

![](/assets/images/dxl/pro/pro_velocity_controller.png)

**NOTE** : KPA stands for Anti-windup Gain that cannot be modified by users. For more details about the PID controller, please refer to the [PID Controller at wikipedia](http://en.wikipedia.org/wiki/PID_controller).
{: .notice}


text:
package com.adamg.materialtemplate.cloud.module;

import android.content.Context;
import android.util.Log;

import com.squareup.okhttp.Cache;
import com.squareup.okhttp.OkHttpClient;

import java.io.File;
import java.io.IOException;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;

/**
 * Module that provides the OkHttp module for injection. It will create it with a default cache size and
 * default the rest of the set up to the Retrofit API client for a better control.
 *
 * @author Adam Greenberg
 * @version 1 on 6/27/15
 *          All code under The MIT License (MIT) unless otherwise noted.
 */
@Module(
        includes = RestApiModule.class,
        complete = false,
        library = true
)
public class OkHttpModule {

    private static final String TAG = OkHttpModule.class.getSimpleName();

    /**
     * Set the disk cache to an arbitrary size of 10 MB
     */
    private static final int DISK_CACHE_SIZE = 10 * 1024 * 1024;

    /**
     * Module that provides the set up for the OkHttp client.
     *
     * @param ctx a reference to the Application's {@link Context}
     * @return the instance of the OkHttp Client used as the transport layer for API calls
     */
    @Provides
    @Singleton
    OkHttpClient provideOkHttpClient(@CloudLibModule.ClientApplication Context ctx) {
        return createOkHttpClient(ctx);
    }

    /**
     * Creates a default OkHttp client with a disk cache of 10 MB
     *
     * @param ctx a reference to the Client's {@link Context}
     * @return the instance of the OkHttp Client used as the transport layer for API calls
     */
    static OkHttpClient createOkHttpClient(final Context ctx) {
        OkHttpClient client = new OkHttpClient();

        // Install an HTTP cache in the application cache directory.
        try {
            final File cacheDir = new File(ctx.getCacheDir(), "https");
            final Cache cache = new Cache(cacheDir, DISK_CACHE_SIZE);
            client.setCache(cache);
        } catch (final IOException e) {
            // Log the error
            Log.e(TAG, "Unable to install disk cache." + Log.getStackTraceString(e));
        }

        return client;
    }
}


text:
nostrum
=======

An open source curing and combat framework for Aetolia, the Midnight Age


text:
using System;
using System.Collections.Generic;
using System.Reflection;
using Newtonsoft.Json.Utilities;
using System.Collections;

namespace Newtonsoft.Json.Serialization
{
  /// <summary>
  /// Contract details for a <see cref="Type"/> used by the <see cref="JsonSerializer"/>.
  /// </summary>
  public class JsonDictionaryContract : JsonContract
  {
    /// <summary>
    /// Gets or sets the property name resolver.
    /// </summary>
    /// <value>The property name resolver.</value>
    public Func<string, string> PropertyNameResolver { get; set; }

    internal Type DictionaryKeyType { get; private set; }
    internal Type DictionaryValueType { get; private set; }

    private readonly bool _isDictionaryValueTypeNullableType;
    private readonly Type _genericCollectionDefinitionType;
    private Type _genericWrapperType;
    private MethodCall<object, object> _genericWrapperCreator;

    /// <summary>
    /// Initializes a new instance of the <see cref="JsonDictionaryContract"/> class.
    /// </summary>
    /// <param name="underlyingType">The underlying type for the contract.</param>
    public JsonDictionaryContract(Type underlyingType)
      : base(underlyingType)
    {
      Type keyType;
      Type valueType;
      if (ReflectionUtils.ImplementsGenericDefinition(underlyingType, typeof(IDictionary<,>), out _genericCollectionDefinitionType))
      {
        keyType = _genericCollectionDefinitionType.GetGenericArguments()[0];
        valueType = _genericCollectionDefinitionType.GetGenericArguments()[1];
      }
      else
      {
        ReflectionUtils.GetDictionaryKeyValueTypes(UnderlyingType, out keyType, out valueType);
      }

      DictionaryKeyType = keyType;
      DictionaryValueType = valueType;

      if (DictionaryValueType != null)
        _isDictionaryValueTypeNullableType = ReflectionUtils.IsNullableType(DictionaryValueType);

      if (IsTypeGenericDictionaryInterface(UnderlyingType))
      {
        CreatedType = ReflectionUtils.MakeGenericType(typeof(Dictionary<,>), keyType, valueType);
      }
      else if (UnderlyingType == typeof(IDictionary))
      {
        CreatedType = typeof (Dictionary<object, object>);
      }
    }

    internal IWrappedDictionary CreateWrapper(object dictionary)
    {
      if (dictionary is IDictionary && (DictionaryValueType == null || !_isDictionaryValueTypeNullableType))
        return new DictionaryWrapper<object, object>((IDictionary)dictionary);

      if (_genericWrapperType == null)
      {
        _genericWrapperType = ReflectionUtils.MakeGenericType(typeof(DictionaryWrapper<,>), DictionaryKeyType, DictionaryValueType);

        ConstructorInfo genericWrapperConstructor = _genericWrapperType.GetConstructor(new[] { _genericCollectionDefinitionType });
        _genericWrapperCreator = JsonTypeReflector.ReflectionDelegateFactory.CreateMethodCall<object>(genericWrapperConstructor);
      }

      return (IWrappedDictionary)_genericWrapperCreator(null, dictionary);
    }

    private bool IsTypeGenericDictionaryInterface(Type type)
    {
      if (!type.IsGenericType)
        return false;

      Type genericDefinition = type.GetGenericTypeDefinition();

      return (genericDefinition == typeof(IDictionary<,>));
    }
  }
}
#endif


text:
namespace GetF0 {

GetF0Stream::GetF0Stream()
    : m_buffer(nullptr), m_eof(false)
{
}

GetF0Stream::~GetF0Stream()
{
  if (m_buffer != nullptr)
    delete [] m_buffer;
}

void GetF0Stream::init(SampleFrequency sampleFrequency)
{
  GetF0::init(sampleFrequency);

  m_buffer = new Sample[streamBufferSize()];

  // If this isn't true we can have out of bounds array access.
  THROW_ERROR(streamBufferSize() < streamOverlapSize(), LogicError,
              "streamBufferSize() needs to be larger than streamOverlapSize()");
}

long GetF0Stream::read_samples(Sample** buffer, long num_records)
{
  THROW_ERROR(streamBufferSize() != num_records, LogicError,
              "not implemented: we can only read streamBufferSize");

  THROW_ERROR(m_eof, LogicError, "still reading after EOF");

  auto bytesFromStream = read_stream_samples(m_buffer, num_records);

  if (bytesFromStream != num_records) {
    m_eof = true;
  }

  *buffer = m_buffer;
  return bytesFromStream;
}

long GetF0Stream::read_samples_overlap(Sample** buffer, long num_records,
                                       long step)
{
  THROW_ERROR(streamBufferSize() != num_records || streamOverlapSize() != step,
              LogicError,
              "not implemented: we can only read streamBufferSize and overlap "
              "streamOverlapSize");  // TODO not sure if we need to be so
                                     // strict, have to
                                     // think about it

  THROW_ERROR(m_eof, LogicError, "still reading after EOF");

  // TODO assert if we didn't read_samples yet

  auto newSamples = streamOverlapSize();
  auto oldSamples = streamBufferSize() - streamOverlapSize();

  std::memmove(m_buffer, m_buffer + newSamples, oldSamples * sizeof(Sample));

  auto actualNewSamples = read_stream_samples(m_buffer + oldSamples, newSamples);
  if (actualNewSamples != newSamples) {
    m_eof = true;
  }

  *buffer = m_buffer;
  return oldSamples + actualNewSamples;
}

long GetF0Stream::read_stream_samples(Sample* buffer, long num_records)
{
  short tmpBuf[num_records];
  auto length = read_stream_samples(tmpBuf, num_records);
  for (int i = 0; i < length; ++i) {
    buffer[i] = static_cast<Sample>(tmpBuf[i]);
  }
  return length;
}

} // namespace GetF0


text:
<?php
namespace DAErp\Service\Order\Service;

use DACore\Service\AbstractCrudService;

class Service extends AbstractCrudService
{

}