text:
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<!--
 Copyright (c) 2012 - 2014 Ngewi Fet <ngewif@gmail.com>

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
  <string name="title_create_account">Crea un compte</string>
  <string name="title_edit_account">Edita el compte</string>
  <string name="info_details">Informació</string>
  <string name="menu_export">Exporta…</string>
  <string name="description_add_transaction_icon">Afegeix un assentament nou al compte</string>
  <string name="label_no_accounts">No accounts to display</string>
  <string name="label_account_name">Nom del compte</string>
  <string name="btn_cancel">Cancel·la</string>
  <string name="btn_save">Desa</string>
  <string name="label_passcode">Introdueix la contrasenya</string>
  <string name="toast_wrong_passcode">Wrong passcode, please try again</string>
  <string name="toast_passcode_set">Passcode set</string>
  <string name="label_confirm_passcode">Confirmeu la contrasenya</string>
  <string name="toast_invalid_passcode_confirmation">Invalid passcode confirmation. Please try again</string>
  <string name="label_transaction_name">Descripció</string>
  <string name="label_transaction_amount">Import</string>
  <string name="title_add_transaction">Transacció Nova</string>
  <string name="label_no_transactions">No transactions to display</string>
  <string name="label_timeanddate">DATE & TIME</string>
  <string name="label_account">Compte</string>
  <string name="label_debit">DÈBIT</string>
  <string name="label_credit">CRÈDIT</string>
  <string name="title_accounts">Comptes</string>
  <string name="title_transactions">Assentaments</string>
  <string name="menu_delete">Suprimeix</string>
  <string name="alert_dialog_ok_delete">Suprimeix</string>
  <string name="alert_dialog_cancel">Cancel·la</string>
  <string name="toast_account_deleted">Account deleted</string>
  <string name="title_confirm_delete">Confirm delete</string>
  <string name="delete_account_confirmation_message">All transactions in this account will also be deleted</string>
  <string name="title_edit_transaction">Edita l\'assentament</string>
  <string name="label_transaction_description">Afegiu una nota</string>
  <string name="menu_move">MOU</string>
  <string name="title_selected">%1$d selected</string>
  <string name="label_account_balance">Saldo:</string>
  <string name="label_export_destination">Exporta a:</string>
  <string name="title_export_dialog">Exporta els assentaments</string>
  <string name="option_export_all_transactions">Exporta tots els assentaments</string>
  <string name="hint_export_choice">By default, only new transactions since last export will be exported. Check this option to export all transactions</string>
  <string name="toast_export_error">Error exporting %1$s file</string>
  <string name="btn_export">Exporta</string>
  <string name="option_delete_after_export">Suprimeix després d\'exportar</string>
  <string name="hint_delete_after_export">All exported transactions will be deleted when exporting is completed</string>
  <string name="title_settings">Preferències</string>
  <string-array name="export_destinations">
    <item>Targeta SD</item>
    <item>DropBox</item>
    <item>Google Drive</item>
    <item>Envia a…</item>
  </string-array>
  <string name="btn_move">Mou</string>
  <string name="title_move_transactions">Move %1$d transaction(s)</string>
  <string name="label_move_destination">Compte destí</string>
  <string name="permission_access_sdcard">Access SD Card</string>
  <string name="toast_incompatible_currency">Cannot move transactions.\nThe destination account uses a different currency from origin account</string>
  <string name="header_general_settings">General</string>
  <string name="header_about_gnucash">Quant a</string>
  <string name="title_choose_currency">Trieu la moneda per defecte</string>
  <string name="title_default_currency">Moneda per defecte</string>
  <string name="summary_default_currency">Default currency to assign to new accounts</string>
  <string name="label_permission_record_transactions">Enables recording transactions in GnuCash for Android</string>
  <string name="label_permission_create_accounts">Enables creation of accounts in GnuCash for Android</string>
  <string name="label_permission_group">Your GnuCash data</string>
  <string name="description_permission_group">Read and modify GnuCash data</string>
  <string name="label_permission_record_transaction">Record transactions in GnuCash</string>
  <string name="label_permission_create_account">Create accounts in GnuCash</string>
  <string name="label_display_account">Display account</string>
  <string name="btn_create_accounts">Crea els comptes</string>
  <string name="title_default_accounts">Seleccioneu els comptes a crear</string>
  <string-array name="currency_names">
    <item>Afghani</item>
    <item>Algerian Dinar</item>
    <item>Argentine Peso</item>
    <item>Armenian Dram</item>
    <item>Aruban Florin</item>
    <item>Australian Dollar</item>
    <item>Azerbaijanian Manat</item>
    <item>Bahamian Dollar</item>
    <item>Bahraini Dinar</item>
    <item>Baht</item>
    <item>Balboa</item>
    <item>Barbados Dollar</item>
    <item>Belarussian Ruble</item>
    <item>Belize Dollar</item>
    <item>Bermudian Dollar</item>
    <item>Bolivar Fuerte</item>
    <item>Boliviano</item>
    <item>Brazilian Real</item>
    <item>Brunei Dollar</item>
    <item>Bulgarian Lev</item>
    <item>Burundi Franc</item>
    <item>Canadian Dollar</item>
    <item>Cape Verde Escudo</item>
    <item>Cayman Islands Dollar</item>
    <item>CFA Franc BCEAO</item>
    <item>CFA Franc BEAC</item>
    <item>CFP Franc</item>
    <item>Chilean Peso</item>
    <item>Testing currency</item>
    <item>Colombian Peso</item>
    <item>Comoro Franc</item>
    <item>Congolese Franc</item>
    <item>Convertible Mark</item>
    <item>Cordoba Oro</item>
    <item>Costa Rican Colon</item>
    <item>Croatian Kuna</item>
    <item>Cuban Convertible Peso</item>
    <item>Cuban Peso</item>
    <item>Czech Koruna</item>
    <item>Dalasi</item>
    <item>Danish Krone</item>
    <item>Denar</item>
    <item>Djibouti Franc</item>
    <item>Dobra</item>
    <item>Dominican Peso</item>
    <item>Dong</item>
    <item>East Caribbean Dollar</item>
    <item>Egyptian Pound</item>
    <item>El Salvador Colon</item>
    <item>Ethiopian Birr</item>
    <item>Euro</item>
    <item>Falkland Islands Pound</item>
    <item>Fiji Dollar</item>
    <item>Forint</item>
    <item>Ghana Cedi</item>
    <item>Gibraltar Pound</item>
    <item>Gold</item>
    <item>Gourde</item>
    <item>Guarani</item>
    <item>Guinea Franc</item>
    <item>Guyana Dollar</item>
    <item>Hong Kong Dollar</item>
    <item>Hryvnia</item>
    <item>Iceland Krona</item>
    <item>Indian Rupee</item>
    <item>Iranian Rial</item>
    <item>Iraqi Dinar</item>
    <item>Jamaican Dollar</item>
    <item>Jordanian Dinar</item>
    <item>Kenyan Shilling</item>
    <item>Kina</item>
    <item>Kip</item>
    <item>Kuwaiti Dinar</item>
    <item>Kwacha</item>
    <item>Kwanza</item>
    <item>Kyat</item>
    <item>Lari</item>
    <item>Latvian Lats</item>
    <item>Lebanese Pound</item>
    <item>Lek</item>
    <item>Lempira</item>
    <item>Leone</item>
    <item>Liberian Dollar</item>
    <item>Libyan Dinar</item>
    <item>Lilangeni</item>
    <item>Lithuanian Litas</item>
    <item>Loti</item>
    <item>Malagasy Ariary</item>
    <item>Malaysian Ringgit</item>
    <item>Mauritius Rupee</item>
    <item>Mexican Peso</item>
    <item>Mexican Unidad de Inversion (UDI)</item>
    <item>Moldovan Leu</item>
    <item>Moroccan Dirham</item>
    <item>Mozambique Metical</item>
    <item>Mvdol</item>
    <item>Naira</item>
    <item>Nakfa</item>
    <item>Namibia Dollar</item>
    <item>Nepalese Rupee</item>
    <item>Netherlands Antillean Guilder</item>
    <item>New Israeli Sheqel</item>
    <item>New Romanian Leu</item>
    <item>New Taiwan Dollar</item>
    <item>New Zealand Dollar</item>
    <item>Ngultrum</item>
    <item>North Korean Won</item>
    <item>Norwegian Krone</item>
    <item>Nuevo Sol</item>
    <item>Ouguiya</item>
    <item>Pa'anga</item>
    <item>Pakistan Rupee</item>
    <item>Palladium</item>
    <item>Pataca</item>
    <item>Philippine Peso</item>
    <item>Platinum</item>
    <item>Pound Sterling</item>
    <item>Pula</item>
    <item>Qatari Rial</item>
    <item>Quetzal</item>
    <item>Rand</item>
    <item>Rial Omani</item>
    <item>Riel</item>
    <item>Rufiyaa</item>
    <item>Rupiah</item>
    <item>Russian Ruble</item>
    <item>Rwanda Franc</item>
    <item>Saint Helena Pound</item>
    <item>Saudi Riyal</item>
    <item>SDR (Special Drawing Right)</item>
    <item>Serbian Dinar</item>
    <item>Seychelles Rupee</item>
    <item>Silver</item>
    <item>Singapore Dollar</item>
    <item>Solomon Islands Dollar</item>
    <item>Som</item>
    <item>Somali Shilling</item>
    <item>Somoni</item>
    <item>South Sudanese Pound</item>
    <item>Sri Lanka Rupee</item>
    <item>Sucre</item>
    <item>Sudanese Pound</item>
    <item>Surinam Dollar</item>
    <item>Swedish Krona</item>
    <item>Swiss Franc</item>
    <item>Syrian Pound</item>
    <item>Taka</item>
    <item>Tala</item>
    <item>Tanzanian Shilling</item>
    <item>Tenge</item>
    <item>No currency</item>
    <item>Trinidad and Tobago Dollar</item>
    <item>Tugrik</item>
    <item>Tunisian Dinar</item>
    <item>Turkish Lira</item>
    <item>Turkmenistan New Manat</item>
    <item>UAE Dirham</item>
    <item>Uganda Shilling</item>
    <item>UIC-Franc</item>
    <item>Unidad de Valor Real</item>
    <item>Unidades de fomento</item>
    <item>Uruguay Peso en Unidades Indexadas (URUIURUI)</item>
    <item>Uruguayan peso</item>
    <item>US Dollar</item>
    <item>Uzbekistan Sum</item>
    <item>Vatu</item>
    <item>WIR Euro</item>
    <item>WIR Franc</item>
    <item>Won</item>
    <item>Yemeni Rial</item>
    <item>Yen</item>
    <item>Yuan Renminbi</item>
    <item>Zambian Kwacha</item>
    <item>Zimbabwe Dollar</item>
    <item>Zloty</item>
  </string-array>
  <string name="error_no_accounts">No accounts exist in GnuCash.\nCreate an account before adding a widget</string>
  <string name="title_build_version">Build version</string>
  <string name="title_license">Llicència</string>
  <string name="summary_licence_details">Apache License v2.0. Click for details</string>
  <string name="title_general_prefs">Preferències generals</string>
  <string name="label_widget_configuration">Seleccioneu un compte</string>
  <string name="toast_no_transactions_to_export">There are no transactions available to export</string>
  <string name="header_passcode_settings">Contrasenya</string>
  <string name="title_passcode_preferences">PreferèncIes de contrasenya</string>
  <string name="title_passcode_enabled">Contrasenya activada</string>
  <string name="title_passcode_disabled">Contrasenya desactivada</string>
  <string name="title_change_passcode">Canvia la contrasenya</string>
  <string name="title_about_gnucash">Quant a GnuCash</string>
  <string name="summary_about_gnucash">A mobile finance management and expense-tracker designed for Android</string>
  <string name="title_about">Quant a</string>
  <string name="toast_format_exported_to">%1$s file exported to:\n</string>
  <string name="title_export_email">GnuCash Android %1$s export</string>
  <string name="description_export_email">GnuCash Android Export from </string>
  <string name="header_transaction_settings">Assentaments</string>
  <string name="title_transaction_preferences">Preferències d\'assentaments</string>
  <string name="title_account_preferences">Preferències de comptes</string>
  <string name="title_default_transaction_type">Tipus d\'assentament per defecte</string>
  <string name="summary_default_transaction_type">The type of transaction to use by default, CREDIT or DEBIT</string>
  <string-array name="transaction_types">
    <item>CRÈDIT</item>
    <item>DÈBIT</item>
  </string-array>
  <string name="msg_delete_all_transactions_confirmation">Are you sure you want to delete ALL transactions?</string>
  <string name="msg_delete_transaction_confirmation">Are you sure you want to delete this transaction?</string>
  <string name="title_export_preference_category">Exportació</string>
  <string name="title_export_all_transactions">Exporta tots els assentaments</string>
  <string name="title_always_delete_exported_transactions">Suprimeix els assentaments exportats</string>
  <string name="title_default_export_email">Default export email</string>
  <string name="summary_default_export_email">The default email address to send exports to. You can still change this when you export.</string>
  <string name="label_double_entry_account">Compte d\'origen</string>
  <string name="summary_use_double_entry">All transactions will be a transfer from one account to another</string>
  <string name="title_use_double_entry">Activate Double Entry</string>
  <string name="account_balance">Balanç</string>
  <string name="toast_no_account_name_entered">Enter an account name to create an account</string>
  <string name="label_account_currency">Moneda</string>
  <string name="label_parent_account">Compte pare</string>
  <string name="title_xml_ofx_header">Use XML OFX header</string>
  <string name="summary_xml_ofx_header">Enable this option when exporting to third-party application other than GnuCash for desktop</string>
  <string name="title_whats_new">Novetats</string>
  <string name="whats_new">
        - New Material app design \n
        - Multi-currency transactions\n
        - Calculator to transaction amounts\n
        - Better reporting options\n
        - New help & feedback section\n
        - Multiple bug fixes and improvements\n
	</string>
  <string name="label_dismiss">Dismiss</string>
  <string name="toast_transanction_amount_required">Introduïu una quantitat per desar l\'assentament</string>
  <string name="toast_error_edit_multi_currency_transaction">Multi-currency transactions cannot be modified</string>
  <string name="menu_import_accounts">Importa comptes de GnuCash</string>
  <string name="btn_import_accounts">Importa els comptes</string>
  <string name="toast_error_importing_accounts">An error occurred while importing the GnuCash accounts</string>
  <string name="toast_success_importing_accounts">GnuCash Accounts successfully imported</string>
  <string name="summary_import_accounts">Import account structure exported from GnuCash desktop</string>
  <string name="title_import_accounts">Importa XML de GnuCash</string>
  <string name="summary_delete_all_accounts">Delete all accounts in the database. All transactions will be deleted as
        well.
    </string>
  <string name="title_delete_all_accounts">Suprimeix tots els comptes</string>
  <string name="header_account_settings">Comptes</string>
  <string name="toast_all_accounts_deleted">All accounts have been successfully deleted</string>
  <string name="confirm_delete_all_accounts">Are you sure you want to delete all accounts and transactions?\n\nThis
        operation cannot be undone!
    </string>
  <string name="label_account_type">Tipus de compte</string>
  <string name="summary_delete_all_transactions">All transactions in all accounts will be deleted!</string>
  <string name="title_delete_all_transactions">Suprimeix tots els assentaments</string>
  <string name="toast_all_transactions_deleted">All transactions successfully deleted!</string>
  <string name="title_progress_importing_accounts">Importing accounts</string>
  <string name="toast_tap_again_to_confirm_delete">Tap again to confirm. ALL entries will be deleted!!</string>
  <string name="section_header_transactions">Assentaments</string>
  <string name="section_header_subaccounts">Subcomptes</string>
  <string name="menu_search_accounts">Cerca</string>
  <string name="title_default_export_format">Format d\'exportació per defecte</string>
  <string name="summary_default_export_format">File format to use by default when exporting transactions</string>
  <string name="menu_export_transactions">Exporta els assentaments…</string>
  <string name="label_recurring_transaction">Periodicitat</string>
  <string name="imbalance_account_name">Desequilibri</string>
  <string name="title_progress_exporting_transactions">Exporting transactions</string>
  <string name="label_no_recurring_transactions">No recurring transactions to display.</string>
  <string name="toast_recurring_transaction_deleted">Successfully deleted recurring transaction</string>
  <string name="label_placeholder_account">Compte contenidor</string>
  <string name="label_default_transfer_account">Compte d\'origen per defecte</string>
  <plurals name="label_sub_accounts">
    <item quantity="one">%d sub-account</item>
    <item quantity="other">%d sub-accounts</item>
  </plurals>
  <string-array name="account_type_entry_values">
    <item>EFECTIU</item>
    <item>BANC</item>
    <item>TARGETA DE CRÈDIT</item>
    <item>ACTIU</item>
    <item>PASSIU</item>
    <item>INGRESSOS</item>
    <item>DESPESES</item>
    <item>PAYABLE</item>
    <item>RECEIVABLE</item>
    <item>EQUITY</item>
    <item>MONEDA</item>
    <item>STOCK</item>
    <item>MUTUAL FUND</item>
    <item>TRADING</item>
  </string-array>
  <string-array name="export_formats">
    <item>QIF</item>
    <item>OFX</item>
    <item>XML</item>
  </string-array>
  <string name="color_picker_default_title">Seleccioneu un color</string>
  <string name="label_account_color_and_type">Color del compte i tipus</string>
  <string name="label_delete_sub_accounts">Suprimeix els subcomptes</string>
  <string name="title_recent_accounts">Recents</string>
  <string name="title_favorite_accounts">Preferits</string>
  <string name="title_all_accounts">Tots</string>
  <string name="summary_create_default_accounts">Creates default GnuCash commonly-used account structure</string>
  <string name="title_create_default_accounts">Create default accounts</string>
  <string name="msg_confirm_create_default_accounts_setting">All existing accounts and transactions on the device will be deleted.\n\nAre you sure you want to proceed?</string>
  <string name="menu_scheduled_transactions">Assentaments periòdics</string>
  <string name="msg_confirm_create_default_accounts_first_run">Welcome to GnuCash Android! \nYou can either create
        a hierarchy of commonly-used accounts, or import your own GnuCash account structure. \n\nBoth options are also
        available in app Settings so you can decide later.
    </string>
  <string name="title_scheduled_transactions">Assentaments</string>
  <string name="title_select_export_destination">Select destination for export</string>
  <string name="hint_split_memo">Memo</string>
  <string name="label_spend">Spend</string>
  <string name="label_receive">Receive</string>
  <string name="label_withdrawal">Withdrawal</string>
  <string name="label_deposit">Deposit</string>
  <string name="label_payment">Pagament</string>
  <string name="label_charge">Charge</string>
  <string name="label_decrease">Decrease</string>
  <string name="label_increase">Increase</string>
  <string name="label_income">Income</string>
  <string name="label_rebate">Rebate</string>
  <string name="label_expense">Expense</string>
  <string name="label_bill">Bill</string>
  <string name="label_invoice">Invoice</string>
  <string name="label_buy">Buy</string>
  <string name="label_sell">Sell</string>
  <string name="label_repeats">Repeats</string>
  <string name="toast_no_recent_backup">No recent backup found</string>
  <string name="account_name_opening_balances">Opening Balances</string>
  <string name="account_name_equity">Equity</string>
  <string name="summary_save_opening_balances">Enable to save the current account balance (before deleting transactions) as new opening balance after deleting transactions
    </string>
  <string name="title_save_opening_balances">Save account opening balances</string>
  <string name="export_warning_ofx">OFX does not support double-entry transactions</string>
  <string name="export_warning_qif">Generates separate QIF files per currency</string>
  <string name="title_transaction_splits">Desglossament de l\'assentament</string>
  <string name="label_imbalance">Desequilibri:</string>
  <string name="btn_add_split">Afegeix desglós</string>
  <string name="menu_title_favorite">Favorite</string>
  <string name="drawer_open">Navigation drawer opened</string>
  <string name="drawer_close">Navigation drawer closed</string>
  <string name="title_reports">Informes</string>
  <string name="title_pie_chart">Pie Chart</string>
  <string name="title_line_chart">Line Chart</string>
  <string name="title_bar_chart">Bar Chart</string>
  <string name="title_report_prefs">Preferències d\'informes</string>
  <string name="label_report_currency">Selecciona una moneda</string>
  <string name="title_use_account_color">Account color in reports</string>
  <string name="summary_use_account_color">Use account color in the bar/pie chart</string>
  <string name="header_report_settings">Informes</string>
  <string name="menu_order_by_size">Ordena per mida</string>
  <string name="menu_toggle_legend">Mostra la llegenda</string>
  <string name="menu_toggle_labels">Mostra les etiquetes</string>
  <string name="menu_toggle_percentage_mode">Mostra el percentatge</string>
  <string name="menu_toggle_average_lines">Show average lines</string>
  <string name="menu_group_smaller_slices">Group Smaller Slices</string>
  <string name="label_chart_no_data">No chart data available</string>
  <string name="label_chart_overall">Overall</string>
  <string name="label_chart_total">Total</string>
  <string name="label_other_slice">Other</string>
  <string name="toast_chart_percentage_mode_total">The percentage of selected value calculated from the total amount</string>
  <string name="toast_chart_percentage_mode_current_bar">The percentage of selected value calculated from the current stacked bar amount</string>
  <string name="label_save_template">Desa com a plantilla</string>
  <string name="label_delete_account_transactions_description">This account contains transactions. \nWhat would you like to do with these transactions</string>
  <string name="label_delete_account_subaccounts_description">This account contains sub-accounts. \nWhat would you like to do with these sub-accounts</string>
  <string name="label_delete_transactions">Suprimir els assentaments</string>
  <string name="toast_disable_double_entry_to_save_transaction">Create and specify a transfer account OR disable double-entry in settings to save the transaction</string>
  <string name="label_tap_to_create_schedule">Tap to create schedule</string>
  <string name="title_restore_backup">Restore Backup…</string>
  <string name="header_backup_and_export_settings">Backup & export</string>
  <string name="title_dropbox_sync_preference">DropBox Sync</string>
  <string name="title_backup_preference_category">Còpia de seguretat</string>
  <string name="summary_dropbox_sync">Enable to sync to DropBox</string>
  <string name="title_select_gnucash_xml_file">Select GnuCash XML file</string>
  <string name="title_backup_prefs">Preferències de còpia de seguretat</string>
  <string name="title_create_backup_pref">Create Backup</string>
  <string name="summary_create_backup_pref">By default backups are saved to the SDCARD</string>
  <string name="summary_restore_backup_pref">Select a specific backup to restore</string>
  <string name="toast_backup_successful">Backup successful</string>
  <string name="toast_backup_failed">Backup failed</string>
  <string name="export_warning_xml">Exports all accounts and transactions</string>
  <string name="title_google_drive_sync_pref">Google Drive Sync</string>
  <string name="summary_google_drive_sync">Enable to sync to Google Drive</string>
  <string name="toast_install_file_manager">Install a file manager to select files</string>
  <string name="title_select_backup_to_restore">Select backup to restore</string>
  <string name="nav_menu_favorites">Preferits</string>
  <string name="nav_menu_open">Obre…</string>
  <string name="nav_menu_reports">Informes</string>
  <string name="nav_menu_scheduled_transactions">Assentaments periòdics</string>
  <string name="nav_menu_export">Exporta…</string>
  <string name="nav_menu_settings">Preferències</string>
  <plurals name="label_every_x_days">
    <item quantity="one">Daily</item>
    <item quantity="other">Every %d days</item>
  </plurals>
  <plurals name="label_every_x_weeks">
    <item quantity="one">Weekly</item>
    <item quantity="other">Every %d weeks</item>
  </plurals>
  <plurals name="label_every_x_months">
    <item quantity="one">Monthly</item>
    <item quantity="other">Every %d months</item>
  </plurals>
  <plurals name="label_every_x_years">
    <item quantity="one">Yearly</item>
    <item quantity="other">Every %d years</item>
  </plurals>
  <string name="title_enable_crashlytics">Enable Crash Logging</string>
  <string name="msg_enable_crashlytics">Automatically send information about app malfunction to the developers.</string>
  <string name="label_export_format"> Format</string>
  <string name="toast_backup_folder_not_found">Backup folder cannot be found. Make sure the SD Card is mounted!</string>
  <string name="label_old_passcode">Introduiu la contrasenya antiga</string>
  <string name="label_new_passcode">Introduiu la contrasenya nova</string>
  <string name="nav_menu_scheduled_backups">Exportacions periòdiques</string>
  <string name="title_scheduled_exports">Exportacions</string>
  <string name="label_no_scheduled_exports_to_display">No scheduled exports to display</string>
  <string name="title_create_export_schedule">Crea una exportació periòdica</string>
  <string name="toast_exported_to">Exported to: %1$s</string>
  <string name="toast_legend_too_long">The legend is too long</string>
  <string name="hint_account_description">Descripció del compte</string>
  <string name="label_no_recent_accounts">No recent accounts</string>
  <string name="label_no_favorite_accounts">No favorite accounts</string>
  <string name="nav_menu_scheduled_actions">Accions periòdiques</string>
  <string name="label_scheduled_action_ended">"Ended, last executed on %1$s"</string>
  <string name="label_select_bar_to_view_details">Select a bar to view details</string>
  <string name="btn_wizard_next">Següent</string>
  <string name="btn_wizard_finish">Done</string>
  <string name="wizard_title_default_currency">Moneda per defecte</string>
  <string name="wizard_title_account_setup">Account Setup</string>
  <string name="wizard_title_select_currency">Seleccioneu una moneda</string>
  <string name="wizard_title_feedback_options">Feedback Options</string>
  <string name="wizard_option_create_default_accounts">Crea els comptes per defecte</string>
  <string name="wizard_option_import_my_accounts">Importa els meus comptes</string>
  <string name="wizard_option_let_me_handle_it">Let me handle it</string>
  <string name="wizard_option_currency_other">Other…</string>
  <string name="wizard_option_auto_send_crash_reports">Automatically send crash reports</string>
  <string name="wizard_option_disable_crash_reports">Disable crash reports</string>
  <string name="wizard_btn_back">Enrere</string>
  <string name="title_setup_gnucash">Setup GnuCash</string>
  <string name="wizard_title_welcome_to_gnucash">Benvingut a GnuCash</string>
  <string name="msg_wizard_welcome_page">Before you dive in, \nlet\'s setup a few things first\n\nTo continue, press Next</string>
  <string name="title_split_editor">Editor de desglossament</string>
  <string name="toast_error_check_split_amounts">Check that all splits have valid amounts before saving!</string>
  <string name="label_error_invalid_expression">Invalid expression!</string>
  <string name="toast_scheduled_recurring_transaction">Scheduled recurring transaction</string>
  <string name="error_exchange_rate_required">An exchange rate is required</string>
  <string name="error_converted_amount_required">The converted amount is required</string>
  <string name="title_transfer_funds">Transfer Funds</string>
  <string name="nav_menu_help"><![CDATA[Help & Feedback]]></string>
  <string name="label_select_pie_slice_to_see_details">Select a slice to see details</string>
  <string name="label_report_period">Període:</string>
  <string name="label_convert_from">From:</string>
  <string name="label_convert_to">To:</string>
  <string name="msg_provide_exchange_rate">Provide either the converted amount or exchange rate in order to transfer funds</string>
  <string name="hint_exchange_rate">Exchange rate</string>
  <string name="btn_fetch_quote">Fetch quote</string>
  <string name="hint_converted_amount">Quantitat convertida</string>
  <string name="title_report_sheet">Sheet</string>
  <string name="label_last_3_months_expenses">Expenses for last 3 months</string>
  <string name="label_total_assets">Total Assets</string>
  <string name="label_total_liabilities">Total Liabilities</string>
  <string name="label_net_worth">Net Worth</string>
  <string name="label_assets">Actiu</string>
  <string name="label_liabilities">Passiu</string>
  <string name="label_equity">Equity</string>
  <string name="label_total_liabilities_and_equity"><![CDATA[Total Liabilites & Equity]]></string>
  <string name="label_move_to">Mou a:</string>
  <string name="menu_group_by">Agrupa per</string>
  <string name="menu_group_by_month">Mes</string>
  <string name="menu_group_by_quarter">Quarter</string>
  <string name="menu_group_by_year">Any</string>
  <string name="title_balance_sheet_report">Balance Sheet</string>
  <string name="label_balance_sheet_total">Total:</string>
  <string name="title_google_plus_community">Google+ Community</string>
  <string name="title_translate_gnucash">Traduiu el GnuCash</string>
  <string name="summary_google_plus">Share ideas, discuss changes or report problems</string>
  <string name="summary_translate_gnucash">Translate or proof-read on CrowdIn</string>
  <string name="toast_no_compatible_apps_to_receive_export">No compatible apps to receive the exported transactions!</string>
  <string name="menu_move_transaction">Move...</string>
  <string name="menu_duplicate_transaction">Duplicate</string>
  <string-array name="report_time_range">
    <item>Mes actual</item>
    <item>Últims 3 mesos</item>
    <item>Últims 6 mesos</item>
    <item>Últims 12 mesos</item>
    <item>All time</item>
    <item>Custom range…</item>
  </string-array>
</resources>


text:
package org.apache.cassandra.service;

import java.util.ArrayList;
import java.util.List;

import io.netty.util.concurrent.FastThreadLocal;
import org.apache.cassandra.concurrent.ExecutorLocal;
import org.apache.cassandra.utils.FBUtilities;

public class ClientWarn implements ExecutorLocal<ClientWarn.State>
{
    private static final String TRUNCATED = " [truncated]";
    private static final FastThreadLocal<State> warnLocal = new FastThreadLocal<>();
    public static ClientWarn instance = new ClientWarn();

    private ClientWarn()
    {
    }

    public State get()
    {
        return warnLocal.get();
    }

    public void set(State value)
    {
        warnLocal.set(value);
    }

    public void warn(String text)
    {
        State state = warnLocal.get();
        if (state != null)
            state.add(text);
    }

    public void captureWarnings()
    {
        warnLocal.set(new State());
    }

    public List<String> getWarnings()
    {
        State state = warnLocal.get();
        if (state == null || state.warnings.isEmpty())
            return null;
        return state.warnings;
    }

    public void resetWarnings()
    {
        warnLocal.remove();
    }

    public static class State
    {
        private final List<String> warnings = new ArrayList<>();

        private void add(String warning)
        {
            if (warnings.size() < FBUtilities.MAX_UNSIGNED_SHORT)
                warnings.add(maybeTruncate(warning));
        }

        private static String maybeTruncate(String warning)
        {
            return warning.length() > FBUtilities.MAX_UNSIGNED_SHORT
                   ? warning.substring(0, FBUtilities.MAX_UNSIGNED_SHORT - TRUNCATED.length()) + TRUNCATED
                   : warning;
        }

    }
}

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Input;
using Xceed.Wpf.Toolkit.Core.Utilities;

namespace Xceed.Wpf.Toolkit
{
  [TemplatePart( Name = PART_ResizeThumb, Type = typeof( Thumb ) )]
  public class MultiLineTextEditor : ContentControl
  {
    private const string PART_ResizeThumb = "PART_ResizeThumb";

    #region Members

    Thumb _resizeThumb;

    #endregion //Members

    #region Properties

    #region DropDownHeight
    public static readonly DependencyProperty DropDownHeightProperty = DependencyProperty.Register( "DropDownHeight", typeof( double ), typeof( MultiLineTextEditor ), new UIPropertyMetadata( 150.0 ) );
    public double DropDownHeight
    {
      get
      {
        return ( double )GetValue( DropDownHeightProperty );
      }
      set
      {
        SetValue( DropDownHeightProperty, value );
      }
    }
    #endregion DropDownHeight

    #region DropDownWidth
    public static readonly DependencyProperty DropDownWidthProperty = DependencyProperty.Register( "DropDownWidth", typeof( double ), typeof( MultiLineTextEditor ), new UIPropertyMetadata( 200.0 ) );
    public double DropDownWidth
    {
      get
      {
        return ( double )GetValue( DropDownWidthProperty );
      }
      set
      {
        SetValue( DropDownWidthProperty, value );
      }
    }
    #endregion DropDownWidth

    #region IsOpen

    public static readonly DependencyProperty IsOpenProperty = DependencyProperty.Register( "IsOpen", typeof( bool ), typeof( MultiLineTextEditor ), new UIPropertyMetadata( false, OnIsOpenChanged ) );
    public bool IsOpen
    {
      get
      {
        return ( bool )GetValue( IsOpenProperty );
      }
      set
      {
        SetValue( IsOpenProperty, value );
      }
    }

    private static void OnIsOpenChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
    {
      MultiLineTextEditor multiLineTextEditor = o as MultiLineTextEditor;
      if( multiLineTextEditor != null )
        multiLineTextEditor.OnIsOpenChanged( ( bool )e.OldValue, ( bool )e.NewValue );
    }

    protected virtual void OnIsOpenChanged( bool oldValue, bool newValue )
    {

    }

    #endregion //IsOpen

    #region IsSpellCheckEnabled
    public static readonly DependencyProperty IsSpellCheckEnabledProperty = DependencyProperty.Register( "IsSpellCheckEnabled", typeof( bool ), typeof( MultiLineTextEditor ), new UIPropertyMetadata( false ) );
    public bool IsSpellCheckEnabled
    {
      get
      {
        return ( bool )GetValue( IsSpellCheckEnabledProperty );
      }
      set
      {
        SetValue( IsSpellCheckEnabledProperty, value );
      }
    }
    #endregion IsSpellCheckEnabled

    #region IsReadOnly
    public static readonly DependencyProperty IsReadOnlyProperty = DependencyProperty.Register( "IsReadOnly", typeof( bool ), typeof( MultiLineTextEditor ), new UIPropertyMetadata( false ) );
    public bool IsReadOnly
    {
      get
      {
        return ( bool )GetValue( IsReadOnlyProperty );
      }
      set
      {
        SetValue( IsReadOnlyProperty, value );
      }
    }
    #endregion IsReadOnly

    #region Text

    public static readonly DependencyProperty TextProperty = DependencyProperty.Register( "Text", typeof( string ), typeof( MultiLineTextEditor ), new FrameworkPropertyMetadata( String.Empty, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnTextChanged ) );
    public string Text
    {
      get
      {
        return ( string )GetValue( TextProperty );
      }
      set
      {
        SetValue( TextProperty, value );
      }
    }

    private static void OnTextChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
    {
      MultiLineTextEditor textEditor = o as MultiLineTextEditor;
      if( textEditor != null )
        textEditor.OnTextChanged( ( string )e.OldValue, ( string )e.NewValue );
    }

    protected virtual void OnTextChanged( string oldValue, string newValue )
    {

    }

    #endregion //Text

    #region TextAlignment
    public static readonly DependencyProperty TextAlignmentProperty = DependencyProperty.Register( "TextAlignment", typeof( TextAlignment ), typeof( MultiLineTextEditor ), new UIPropertyMetadata( TextAlignment.Left ) );
    public TextAlignment TextAlignment
    {
      get
      {
        return ( TextAlignment )GetValue( TextAlignmentProperty );
      }
      set
      {
        SetValue( TextAlignmentProperty, value );
      }
    }
    #endregion TextAlignment

    #region TextWrapping
    public static readonly DependencyProperty TextWrappingProperty = DependencyProperty.Register( "TextWrapping", typeof( TextWrapping ), typeof( MultiLineTextEditor ), new UIPropertyMetadata( TextWrapping.NoWrap ) );
    public TextWrapping TextWrapping
    {
      get
      {
        return ( TextWrapping )GetValue( TextWrappingProperty );
      }
      set
      {
        SetValue( TextWrappingProperty, value );
      }
    }
    #endregion TextWrapping

    #endregion //Properties

    #region Constructors

    static MultiLineTextEditor()
    {
      DefaultStyleKeyProperty.OverrideMetadata( typeof( MultiLineTextEditor ), new FrameworkPropertyMetadata( typeof( MultiLineTextEditor ) ) );
    }

    public MultiLineTextEditor()
    {
      Keyboard.AddKeyDownHandler( this, OnKeyDown );
      Mouse.AddPreviewMouseDownOutsideCapturedElementHandler( this, OnMouseDownOutsideCapturedElement );
    }

    #endregion //Constructors

    #region Bass Class Overrides

    public override void OnApplyTemplate()
    {
      base.OnApplyTemplate();

      if( _resizeThumb != null )
        _resizeThumb.DragDelta -= ResizeThumb_DragDelta;

      _resizeThumb = GetTemplateChild( PART_ResizeThumb ) as Thumb;

      if( _resizeThumb != null )
        _resizeThumb.DragDelta += ResizeThumb_DragDelta;
    }

    #endregion //Bass Class Overrides

    #region Event Handlers

    private void OnKeyDown( object sender, KeyEventArgs e )
    {
      if( !IsOpen )
      {
        if( KeyboardUtilities.IsKeyModifyingPopupState( e ) )
        {
          IsOpen = true;
          e.Handled = true;
        }
      }
      else
      {
        if( KeyboardUtilities.IsKeyModifyingPopupState( e )
          || ( e.Key == Key.Escape )
          || ( e.Key == Key.Tab ) )
        {
          CloseEditor();
          e.Handled = true;
        }
      }
    }

    private void OnMouseDownOutsideCapturedElement( object sender, MouseButtonEventArgs e )
    {
      CloseEditor();
    }

    void ResizeThumb_DragDelta( object sender, DragDeltaEventArgs e )
    {
      double yadjust = DropDownHeight + e.VerticalChange;
      double xadjust = DropDownWidth + e.HorizontalChange;

      if( ( xadjust >= 0 ) && ( yadjust >= 0 ) )
      {
        DropDownWidth = xadjust;
        DropDownHeight = yadjust;
      }
    }

    #endregion //Event Handlers

    #region Methods

    private void CloseEditor()
    {
      if( IsOpen )
        IsOpen = false;
      ReleaseMouseCapture();
    }

    #endregion //Methods
  }
}


text:
require 'rails'

module RwDepotTheme
  module Generators
    class InstallGenerator < ::Rails::Generators::Base
      source_root File.expand_path("../../../../../app/views", __FILE__)

      desc "This generator will create all the views for the depot front-end"

      def copy_layout
        say_status("copying", "Application Layout", :green)
        remove_file("app/views/layouts/application.html.erb")
        copy_file("application.html.erb", "app/views/layouts/application.html.erb")
      end

      def add_asset_loads
        say_status("inserting", "Asset load paths", :green)
        append_file("app/assets/javascripts/application.js", "//= require depot")
        inject_into_file("app/assets/stylesheets/application.css", :before => '*/') do
          " *= require depot\n"
        end
      end
    end
  end
end


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

namespace Platform.Support.Net.Download
{
    public class DownloadSummary
    {
        public DownloadSummary() : this(null, 0L, 0.0, TimeSpan.Zero)
        {
        }

        public DownloadSummary(long downloadSize, double bitRate, TimeSpan downloadTime) : this(null, downloadSize, bitRate, downloadTime)
        {
        }

        public DownloadSummary(string downloadEngine, long downloadSize, double bitRate, TimeSpan downloadTime)
        {
            this.DownloadEngine = downloadEngine;
            this.DownloadedSize = downloadSize;
            this.BitRate = bitRate;
            this.DownloadTime = downloadTime;
            this.ProxyResolution = null;
            this.FinalUri = null;
        }

        public long DownloadedSize { get; internal set; }

        public double BitRate { get; internal set; }

        public TimeSpan DownloadTime { get; internal set; }

        public string DownloadEngine { get; internal set; }

        public string ProxyResolution { get; internal set; }

        public string FinalUri { get; internal set; }
    }
}


text:
namespace data_use_measurement {

// static
const void* ChromeDataUseAscriber::DataUseRecorderEntryAsUserData::
    kUserDataKey = static_cast<void*>(
        &ChromeDataUseAscriber::DataUseRecorderEntryAsUserData::kUserDataKey);

ChromeDataUseAscriber::DataUseRecorderEntryAsUserData::
    DataUseRecorderEntryAsUserData(DataUseRecorderEntry entry)
    : entry_(entry) {}

ChromeDataUseAscriber::DataUseRecorderEntryAsUserData::
    ~DataUseRecorderEntryAsUserData() {}

ChromeDataUseAscriber::ChromeDataUseAscriber() {
  DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
}

ChromeDataUseAscriber::~ChromeDataUseAscriber() {
  DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
  DCHECK(subframe_to_mainframe_map_.empty());
  DCHECK(data_use_recorders_.empty());
}

ChromeDataUseRecorder* ChromeDataUseAscriber::GetOrCreateDataUseRecorder(
    net::URLRequest* request) {
  DataUseRecorderEntry entry = GetOrCreateDataUseRecorderEntry(request);
  return entry == data_use_recorders_.end() ? nullptr : &(*entry);
}

ChromeDataUseRecorder* ChromeDataUseAscriber::GetDataUseRecorder(
    const net::URLRequest& request) {
  DCHECK_CURRENTLY_ON(content::BrowserThread::IO);

  // TODO(ryansturm): Handle PlzNavigate (http://crbug/664233).
  if (content::IsBrowserSideNavigationEnabled())
    return nullptr;

  // If a DataUseRecorder has already been set as user data, then return that.
  auto user_data = static_cast<DataUseRecorderEntryAsUserData*>(
      request.GetUserData(DataUseRecorderEntryAsUserData::kUserDataKey));
  return user_data ? &(*user_data->recorder_entry()) : nullptr;
}

ChromeDataUseAscriber::DataUseRecorderEntry
ChromeDataUseAscriber::GetOrCreateDataUseRecorderEntry(
    net::URLRequest* request) {
  DCHECK_CURRENTLY_ON(content::BrowserThread::IO);

  // TODO(ryansturm): Handle PlzNavigate (http://crbug/664233).
  if (content::IsBrowserSideNavigationEnabled())
    return data_use_recorders_.end();

  // If a DataUseRecorder has already been set as user data, then return that.
  auto user_data = static_cast<DataUseRecorderEntryAsUserData*>(
      request->GetUserData(DataUseRecorderEntryAsUserData::kUserDataKey));
  if (user_data)
    return user_data->recorder_entry();

  // If request is associated with a ChromeService, create a new
  // DataUseRecorder for it. There is no reason to aggregate URLRequests
  // from ChromeServices into the same DataUseRecorder instance.
  DataUseUserData* service = static_cast<DataUseUserData*>(
      request->GetUserData(DataUseUserData::kUserDataKey));
  if (service) {
    DataUseRecorderEntry entry = CreateNewDataUseRecorder(request);

    entry->data_use().set_description(
        DataUseUserData::GetServiceNameAsString(service->service_name()));
    return entry;
  }

  int render_process_id = -1;
  int render_frame_id = -1;
  bool has_valid_frame = content::ResourceRequestInfo::GetRenderFrameForRequest(
      request, &render_process_id, &render_frame_id);
  if (has_valid_frame &&
      render_frame_id != SpecialRoutingIDs::MSG_ROUTING_NONE) {
    DCHECK(render_process_id >= 0 || render_frame_id >= 0);

    // Browser tests may not set up DataUseWebContentsObservers in which case
    // this class never sees navigation and frame events so DataUseRecorders
    // will never be destroyed. To avoid this, we ignore requests whose
    // render frames don't have a record. However, this can also be caused by
    // URLRequests racing the frame create events.
    // TODO(kundaji): Add UMA.
    RenderFrameHostID frame_key(render_process_id, render_frame_id);
    auto main_frame_key_iter = subframe_to_mainframe_map_.find(frame_key);
    if (main_frame_key_iter == subframe_to_mainframe_map_.end()) {
      return data_use_recorders_.end();
    }
    auto frame_iter =
        main_render_frame_data_use_map_.find(main_frame_key_iter->second);
    if (frame_iter == main_render_frame_data_use_map_.end()) {
      return data_use_recorders_.end();
    }

    const content::ResourceRequestInfo* request_info =
        content::ResourceRequestInfo::ForRequest(request);
    content::ResourceType resource_type =
        request_info ? request_info->GetResourceType()
                     : content::RESOURCE_TYPE_LAST_TYPE;

    if (resource_type == content::RESOURCE_TYPE_MAIN_FRAME) {
      content::GlobalRequestID navigation_key =
          request_info->GetGlobalRequestID();

      DataUseRecorderEntry new_entry = CreateNewDataUseRecorder(request);
      new_entry->set_main_frame_request_id(navigation_key);
      pending_navigation_data_use_map_.insert(
          std::make_pair(navigation_key, new_entry));

      return new_entry;
    }

    DCHECK(frame_iter != main_render_frame_data_use_map_.end());
    auto entry = frame_iter->second;
    request->SetUserData(DataUseRecorderEntryAsUserData::kUserDataKey,
                         new DataUseRecorderEntryAsUserData(entry));
    entry->AddPendingURLRequest(request);
    return entry;
  }

  // Create a new DataUseRecorder for all other requests.
  DataUseRecorderEntry entry = CreateNewDataUseRecorder(request);
  DataUse& data_use = entry->data_use();
  data_use.set_url(request->url());
  return entry;
}

void ChromeDataUseAscriber::OnUrlRequestDestroyed(net::URLRequest* request) {
  DCHECK_CURRENTLY_ON(content::BrowserThread::IO);

  DataUseRecorderEntry entry = GetOrCreateDataUseRecorderEntry(request);

  if (entry == data_use_recorders_.end())
    return;

  DataUseRecorder* recorder = &(*entry);

  RenderFrameHostID frame_key = entry->main_frame_id();
  auto frame_iter = main_render_frame_data_use_map_.find(frame_key);
  bool is_in_render_frame_map =
      frame_iter != main_render_frame_data_use_map_.end() &&
      frame_iter->second->HasPendingURLRequest(request);

  const content::ResourceRequestInfo* request_info =
      content::ResourceRequestInfo::ForRequest(request);
  content::ResourceType resource_type = request_info
                                            ? request_info->GetResourceType()
                                            : content::RESOURCE_TYPE_LAST_TYPE;

  bool is_in_pending_navigation_map = false;
  if (request_info && resource_type == content::RESOURCE_TYPE_MAIN_FRAME) {
    auto navigation_iter = pending_navigation_data_use_map_.find(
        entry->main_frame_request_id());
    is_in_pending_navigation_map =
        navigation_iter != pending_navigation_data_use_map_.end();

    // If request was not successful, then NavigationHandle in
    // DidFinishMainFrameNavigation will not have GlobalRequestID. So we erase
    // the DataUseRecorderEntry here.
    if (is_in_pending_navigation_map && !request->status().is_success()) {
      pending_navigation_data_use_map_.erase(navigation_iter);
      is_in_pending_navigation_map = false;
    }
  }

  DataUseAscriber::OnUrlRequestDestroyed(request);
  request->RemoveUserData(DataUseRecorderEntryAsUserData::kUserDataKey);

  if (recorder->IsDataUseComplete() && !is_in_render_frame_map &&
      !is_in_pending_navigation_map) {
    OnDataUseCompleted(entry);
    data_use_recorders_.erase(entry);
  }
}

void ChromeDataUseAscriber::RenderFrameCreated(int render_process_id,
                                               int render_frame_id,
                                               int main_render_process_id,
                                               int main_render_frame_id) {
  DCHECK_CURRENTLY_ON(content::BrowserThread::IO);

  if (content::IsBrowserSideNavigationEnabled())
    return;

  if (main_render_process_id != -1 && main_render_frame_id != -1) {
    // Create an entry in |subframe_to_mainframe_map_| for this frame mapped to
    // it's parent frame.
    subframe_to_mainframe_map_.insert(std::make_pair(
        RenderFrameHostID(render_process_id, render_frame_id),
        RenderFrameHostID(main_render_process_id, main_render_frame_id)));
  } else {
    subframe_to_mainframe_map_.insert(
        std::make_pair(RenderFrameHostID(render_process_id, render_frame_id),
                       RenderFrameHostID(render_process_id, render_frame_id)));
    auto frame_iter = main_render_frame_data_use_map_.find(
        RenderFrameHostID(render_process_id, render_frame_id));
    DCHECK(frame_iter == main_render_frame_data_use_map_.end());
    DataUseRecorderEntry entry = CreateNewDataUseRecorder(nullptr);
    entry->set_main_frame_id(
        RenderFrameHostID(render_process_id, render_frame_id));
    main_render_frame_data_use_map_.insert(std::make_pair(
        RenderFrameHostID(render_process_id, render_frame_id), entry));
  }
}

void ChromeDataUseAscriber::RenderFrameDeleted(int render_process_id,
                                               int render_frame_id,
                                               int main_render_process_id,
                                               int main_render_frame_id) {
  DCHECK_CURRENTLY_ON(content::BrowserThread::IO);

  if (content::IsBrowserSideNavigationEnabled())
    return;

  RenderFrameHostID key(render_process_id, render_frame_id);

  if (main_render_process_id == -1 && main_render_frame_id == -1) {
    auto frame_iter = main_render_frame_data_use_map_.find(key);
    DataUseRecorderEntry entry = frame_iter->second;
    if (entry->IsDataUseComplete()) {
      OnDataUseCompleted(entry);
      data_use_recorders_.erase(entry);
    }
    main_render_frame_data_use_map_.erase(frame_iter);
  }
  subframe_to_mainframe_map_.erase(key);
  visible_main_render_frames_.erase(key);
}

void ChromeDataUseAscriber::DidStartMainFrameNavigation(
    GURL gurl,
    int render_process_id,
    int render_frame_id,
    void* navigation_handle) {
  DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
}

void ChromeDataUseAscriber::ReadyToCommitMainFrameNavigation(
    GURL gurl,
    content::GlobalRequestID global_request_id,
    int render_process_id,
    int render_frame_id,
    bool is_same_page_navigation,
    void* navigation_handle) {
  DCHECK_CURRENTLY_ON(content::BrowserThread::IO);

  // Find the DataUseRecorderEntry the frame is associated with
  auto frame_it = main_render_frame_data_use_map_.find(
      RenderFrameHostID(render_process_id, render_frame_id));

  // Find the pending navigation entry.
  auto navigation_iter =
      pending_navigation_data_use_map_.find(global_request_id);
  // We might not find a navigation entry since the pending navigation may not
  // have caused any HTTP or HTTPS URLRequests to be made.
  if (navigation_iter == pending_navigation_data_use_map_.end()) {
    // No pending navigation entry to worry about. However, the old frame entry
    // must be removed from frame map, and possibly marked complete and deleted.
    if (frame_it != main_render_frame_data_use_map_.end()) {
      DataUseRecorderEntry old_frame_entry = frame_it->second;
      main_render_frame_data_use_map_.erase(frame_it);
      if (old_frame_entry->IsDataUseComplete()) {
        OnDataUseCompleted(old_frame_entry);
        data_use_recorders_.erase(old_frame_entry);
      }

      // Add a new recorder to the render frame map to replace the deleted one.
      DataUseRecorderEntry entry = data_use_recorders_.emplace(
          data_use_recorders_.end());
      std::pair<int, int> frame_key =
          RenderFrameHostID(render_process_id, render_frame_id);
      entry->set_main_frame_id(frame_key);
      main_render_frame_data_use_map_.insert(std::make_pair(frame_key, entry));
    }
    return;
  }

  DataUseRecorderEntry entry = navigation_iter->second;
  pending_navigation_data_use_map_.erase(navigation_iter);
  entry->set_main_frame_id(
      RenderFrameHostID(render_process_id, render_frame_id));

  // If the frame has already been deleted then mark this navigation as having
  // completed its data use.
  if (frame_it == main_render_frame_data_use_map_.end()) {
    if (entry->IsDataUseComplete()) {
      OnDataUseCompleted(entry);
      data_use_recorders_.erase(entry);
    }
    return;
  }
  DataUseRecorderEntry old_frame_entry = frame_it->second;
  if (is_same_page_navigation) {
    old_frame_entry->MergeFrom(&(*entry));

    for (auto request : entry->pending_url_requests()) {
      request->RemoveUserData(DataUseRecorderEntryAsUserData::kUserDataKey);
      request->SetUserData(DataUseRecorderEntryAsUserData::kUserDataKey,
                           new DataUseRecorderEntryAsUserData(old_frame_entry));
      old_frame_entry->AddPendingURLRequest(request);
    }

    entry->RemoveAllPendingURLRequests();

    data_use_recorders_.erase(entry);
  } else {
    // Navigation is not same page, so remove old entry from
    // |main_render_frame_data_use_map_|, possibly marking it complete.
    main_render_frame_data_use_map_.erase(frame_it);
    if (old_frame_entry->IsDataUseComplete()) {
      OnDataUseCompleted(old_frame_entry);
      data_use_recorders_.erase(old_frame_entry);

      if (visible_main_render_frames_.find(
              RenderFrameHostID(render_process_id, render_frame_id)) !=
          visible_main_render_frames_.end()) {
        entry->set_is_visible(true);
      }
    }

    DataUse& data_use = entry->data_use();

    DCHECK(!data_use.url().is_valid() || data_use.url() == gurl)
        << "is valid: " << data_use.url().is_valid()
        << "; data_use.url(): " << data_use.url().spec()
        << "; gurl: " << gurl.spec();
    if (!data_use.url().is_valid()) {
      data_use.set_url(gurl);
    }

    main_render_frame_data_use_map_.insert(std::make_pair(
        RenderFrameHostID(render_process_id, render_frame_id), entry));
  }
}

void ChromeDataUseAscriber::OnDataUseCompleted(DataUseRecorderEntry entry) {
  // TODO(ryansturm): Notify observers that data use is complete.
}

std::unique_ptr<URLRequestClassifier>
ChromeDataUseAscriber::CreateURLRequestClassifier() const {
  return base::MakeUnique<ContentURLRequestClassifier>();
}

ChromeDataUseAscriber::DataUseRecorderEntry
ChromeDataUseAscriber::CreateNewDataUseRecorder(net::URLRequest* request) {
  DataUseRecorderEntry entry = data_use_recorders_.emplace(
      data_use_recorders_.end());
  if (request) {
    entry->AddPendingURLRequest(request);
    request->SetUserData(DataUseRecorderEntryAsUserData::kUserDataKey,
                         new DataUseRecorderEntryAsUserData(entry));
  }
  return entry;
}

void ChromeDataUseAscriber::WasShownOrHidden(int main_render_process_id,
                                             int main_render_frame_id,
                                             bool visible) {
  RenderFrameHostID main_render_frame_host_id(main_render_process_id,
                                              main_render_frame_id);

  auto frame_iter =
      main_render_frame_data_use_map_.find(main_render_frame_host_id);
  if (frame_iter != main_render_frame_data_use_map_.end())
    frame_iter->second->set_is_visible(visible);

  if (visible) {
    visible_main_render_frames_.insert(main_render_frame_host_id);
  } else {
    visible_main_render_frames_.erase(main_render_frame_host_id);
  }
}

void ChromeDataUseAscriber::RenderFrameHostChanged(int old_render_process_id,
                                                   int old_render_frame_id,
                                                   int new_render_process_id,
                                                   int new_render_frame_id) {
  if (visible_main_render_frames_.find(
          RenderFrameHostID(old_render_process_id, old_render_frame_id)) !=
      visible_main_render_frames_.end()) {
    WasShownOrHidden(new_render_process_id, new_render_frame_id, true);
  }
}

}  // namespace data_use_measurement


text:
package com.njfsoft_utils.camcapture;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;

import java.util.Collection;

/**
 * This class handles all the messaging which comprises the state machine for
 * capture.
 *
 * @author dswitkin@google.com (Daniel Switkin)
 */
public final class DecoderActivityHandler extends Handler {

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

    IDecoderActivity activity;

    CameraManager cameraManager;
    State state;

    enum State {
        PREVIEW, SUCCESS, DONE
    }

    public DecoderActivityHandler(IDecoderActivity activity, String characterSet, CameraManager cameraManager) {
        this.activity = activity;

        state = State.SUCCESS;

        // Start ourselves capturing previews and decoding.
        this.cameraManager = cameraManager;
        cameraManager.startPreview();

    }

    @Override
    public void handleMessage(Message message) {

       	  System.out.println("handleMessage: ");
        switch (message.what) {

          }

    }

    public void quitSynchronously() {
        state = State.DONE;

        cameraManager.stopPreview();

    }

    void restartPreviewAndDecode() {
             activity.getViewfinder().drawViewfinder();
    }
}


text:
package org.uberfire.client.workbench;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;

@ApplicationScoped
public class WorkbenchLayoutInfoImpl implements WorkbenchLayoutInfo {

    @Inject
    private WorkbenchLayoutImpl workbenchLayout;

    @Override
    public int getHeaderHeight() {

        return workbenchLayout.getHeaderPanel().getBoundingClientRect().getHeight().intValue();
    }
}


text:
package org.scala_tools.javautils.j2s

import java.util.Set
import scala.collection.mutable.{Set => SMutableSet}

trait JMutableSetWrapper[T] extends SMutableSet[T] with JSetWrapper[T] {
  type Wrapped <: Set[T]

  override def +=(elem: T): Unit =
    underlying.add(elem)
  override def -=(elem: T): Unit =
    underlying.remove(elem)
}


text:
package nl.tudelft.pds.granula.modeller.rule.derivation;

import nl.tudelft.pds.granula.archiver.entity.info.BasicInfo;
import nl.tudelft.pds.granula.archiver.entity.info.Info;
import nl.tudelft.pds.granula.archiver.entity.info.RecordSource;
import nl.tudelft.pds.granula.archiver.entity.info.Source;
import nl.tudelft.pds.granula.archiver.entity.operation.Operation;
import nl.tudelft.pds.granula.archiver.source.record.Record;
import nl.tudelft.pds.granula.archiver.source.record.RecordInfo;

import java.util.ArrayList;
import java.util.List;

public class RecordInfoDerivation extends DerivationRule {

    String infoName;
    String description;
    String recordInfoName;

    public RecordInfoDerivation(int level, String infoName) {
        super(level);
        this.infoName = infoName;
        this.recordInfoName = infoName;
    }

    public RecordInfoDerivation(int level, String recordInfoName, String infoName) {
        super(level);
        this.infoName = infoName;
        this.recordInfoName = recordInfoName;
    }

    @Override
    public boolean execute() {
        Operation operation = (Operation) entity;
        Record record = operation.getRecord(recordInfoName);
        BasicInfo info = new BasicInfo(infoName);
        List<Source> sources = new ArrayList<>();
        sources.add(new RecordSource(record.getAttr(RecordInfo.InfoName), record));
        info.addInfo(record.getAttr(RecordInfo.InfoValue), sources);
        info.setDescription("The information is extracted directed from its source record.");
        if(description != null) {
            info.setDescription(description);
        }
        operation.addInfo(info);
        return  true;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}


text:
import sopel
from random import choice
import datetime
import requests
import re

shrugs = [u"乁( ⁰͡ Ĺ̯ ⁰͡ ) ㄏ",
          u"¯\_(ツ)_/¯",
          u"¯\(º_o)/¯",
          u"┐(ツ)┌",
          u"¯\_( ͠° ͟ʖ °͠ )_/¯",
          u"ʅ(°_°)ʃ",
          u"┐(°,ʖ°)┌",
          u"¯\_(⌣̯̀ ⌣́)_/¯",
          u"¯\_(°ᴥ°)_/¯",
          u"¯\_(ツ)_/¯",
          u"¯\(º_o)/¯",
          u"┐(ツ)┌"]

@sopel.module.commands('quakecon')
def quakecon(bot, trigger):
    now = datetime.datetime.now()
    qcon = datetime.datetime(2017, 8, 24, 10)
    delta = qcon - now
    if delta.days < 6:
        hours, remainder = divmod(delta.seconds, 3600)
        minutes, seconds = divmod(remainder, 60)
        output = "{days} days, {hours} hours, {minutes} minutes, and {seconds} seconds until QuakeCon!".format(days=delta.days, hours=hours, minutes=minutes, seconds=seconds)
    else:
        output = "%s days until QuakeCon!" % delta.days
    bot.say(output)

@sopel.module.commands('blizzcon')
def blizzcon(bot, trigger):
    now = datetime.datetime.now()
    bcon = datetime.datetime(2017, 11, 3, 0)
    delta = bcon - now
    if delta.days < 7:
        hours, remainder = divmod(delta.seconds, 3600)
        minutes, seconds = divmod(remainder, 60)
        output = "{days} days, {hours} hours, {minutes} minutes, and {seconds} seconds until BlizzCon!".format(days=delta.days, hours=hours, minutes=minutes, seconds=seconds)
    else:
        output = "%s days until BlizzCon!" % delta.days
    bot.say(output)

@sopel.module.commands('zen')
def zen(bot, trigger):
    bot.say(requests.get("https://api.github.com/zen").text)

@sopel.module.commands('nfact')
def nfact(bot, trigger):
    bot.say(requests.get("http://numbersapi.com/random").text)

@sopel.module.commands('42')
def fourtytwo(bot, trigger):
    bot.say(requests.get("http://numbersapi.com/42").text)

@sopel.module.commands('tfact')
def today(bot, trigger):
    month = datetime.datetime.now().month
    day = datetime.datetime.now().day
    bot.say(requests.get("http://numbersapi.com/%s/%s/date" % (month, day)).text)

@sopel.module.commands("lenny")
def lenny(bot, trigger):
    bot.say(u"( ͡° ͜ʖ ͡°)")

@sopel.module.commands("shrug")
def rand_shrug(bot, trigger):
    bot.say(u"%s" % (choice(shrugs)))

@sopel.module.commands("wowalert")
def wowalert(bot, trigger):
    result = requests.get("http://status.wow-europe.com/en/alert").text
    pattern = re.compile('<.*?>')
    result = re.sub(pattern, '', result)
    bot.say(result)

@sopel.module.commands("free")
def free_software(bot, trigger):
    bot.say("https://p.hs.vc/u/free_software.gif")

@sopel.module.rule(r'(^|.+)4me(.+|$)')
def for_you(bot, trigger):
    bot.say("4u!")

@sopel.module.rule(r'(^|.+)airhorn(.+|$)')
def airhorn(bot, trigger):
    bot.action(' *airhorn.wav*')

@sopel.module.rule(r'(^|.+)hackes(.+|$)')
def hackes2(bot, trigger):
    bot.say("THIS CHANNEL HAS BEEN HACKES!!!! ALL USERNAME THAT STAYED HERE FOR MORE THEN 300 SECONDS WILL AUTOMATICALLY RECEIVE A VT7.83 MICRO BUG THAT WILL DISABLE YOUR WINDOW SYSTEM EXCEPT WINDOW XP V1.03")

@sopel.module.commands("invasion","invasions")
def invasion(bot, trigger):
    bot.say("https://wow.gameinfo.io/invasions")

@sopel.module.commands('rd')
def reverseDict(bot, trigger):
    word = trigger.group(2)
    if not word:
        bot.say("syntx: .rd <definition/description>")
    else:
        result = requests.get("http://api.datamuse.com/words", params={"rd": word}).json()
    if result:
        reply = "Possible words matching '%s': %s" % (word, ", ".join(w["word"] for w in result[0:5]))
        bot.say(reply)

@sopel.module.commands('askreddit', 'asscredit')
def ask(bot, trigger):
    header = {"User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.2228.0 Safari/537.36"}
    bot.say(choice(requests.get("http://www.reddit.com/r/askreddit.json?limit=100", headers=header).json()["data"]["children"])["data"]["title"])

@sopel.module.commands('shower')
def shower(bot, trigger):
    header = {"User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.2228.0 Safari/537.36"}
    bot.say(choice(requests.get("http://www.reddit.com/r/showerthoughts.json?limit=100", headers=header).json()["data"]["children"])["data"]["title"])

@sopel.module.commands('5050')
def fifty(bot, trigger):
    header = {"User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.2228.0 Safari/537.36"}
    pick = choice(requests.get("http://www.reddit.com/r/fiftyfifty.json?limit=100", headers=header).json()["data"]["children"])["data"]
    bot.say("%s - %s" % (pick["title"], pick["url"]))

@sopel.module.commands('til', 'todayilearned')
def til(bot, trigger):
    header = {"User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.2228.0 Safari/537.36"}
    pick = choice(requests.get("http://www.reddit.com/r/todayilearned.json?limit=100", headers=header).json()["data"]["children"])["data"]
    bot.say("%s" % (pick["title"]))

@sopel.module.commands('kadse', 'kazachstan', 'c@', 'cat')
def kadse(bot, trigger):
    header = {"User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.2228.0 Safari/537.36"}
    pick = choice(requests.get("http://www.reddit.com/r/catgifs.json?limit=100", headers=header).json()["data"]["children"])["data"]
    bot.say("%s" % (pick["url"]))

@sopel.module.commands('livestreamfail', 'lsf', 'fail')
def lsf(bot, trigger):
    header = {"User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.2228.0 Safari/537.36"}
    pick = choice(requests.get("http://www.reddit.com/r/LiveStreamFail.json?limit=100", headers=header).json()["data"]["children"])["data"]
    bot.say("%s" % (pick["url"]))

@sopel.module.commands('aw', 'aww')
def aww(bot, trigger):
    header = {"User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.2228.0 Safari/537.36"}
    pick = choice(requests.get("http://www.reddit.com/r/aww.json?limit=100", headers=header).json()["data"]["children"])["data"]
    bot.say("%s" % (pick["url"]))

@sopel.module.commands('tifu')
def tifu(bot, trigger):
    header = {"User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.2228.0 Safari/537.36"}
    pick = choice(requests.get("http://www.reddit.com/r/tifu.json?limit=100", headers=header).json()["data"]["children"])["data"]
    bot.say("%s - %s" % (pick["title"], pick["url"]))

@sopel.module.commands('rather','wyr')
def rather(bot, trigger):
    header = {"User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.2228.0 Safari/537.36"}
    pick = choice(requests.get("http://www.reddit.com/r/wouldyourather.json?limit=100", headers=header).json()["data"]["children"])["data"]["title"]
    bot.say("%s - %s" % (pick["title"], pick["url"]))

@sopel.module.commands('hmf','fries','pommes','holdmyfries')
def hmf(bot, trigger):
    header = {"User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.2228.0 Safari/537.36"}
    pick = choice(requests.get("http://www.reddit.com/r/holdmyfries.json?limit=100", headers=header).json()["data"]["children"])["data"]
    bot.say("%s - %s" % (pick["title"], pick["url"]))

@sopel.module.commands('DOOM')
def DOOM(bot, trigger):
    header = {"User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.2228.0 Safari/537.36"}
    bot.say(choice(requests.get("http://www.reddit.com/r/MFDOOM_txt.json?limit=100", headers=header).json()["data"]["children"])["data"]["title"])

@sopel.module.commands('jpg','jpeg')
def jpg(bot, trigger):
    bot.say("Do I look like I know what a JPEG is? https://youtu.be/QEzhxP-pdos")

@sopel.module.commands('fap','fapathon')
def fap(bot, trigger):
    bot.say("https://i.imgur.com/9ciSNye.gifv")

@sopel.module.commands('hexspeak1','hexspeak')
def hexspeak1(bot, trigger):
    raw = requests.get("https://raw.githubusercontent.com/phixion/hexspeak/master/hex1.txt")
    bot.say(choice(raw.text.split('\n')).split(" ")[-1])

@sopel.module.commands('hexham')
def hexham(bot, trigger):
    bot.say("the fucking command for weather is .wea")

@sopel.module.commands('lewd','sfw','nsfw') #see https://github.com/dasu/syrup-sopel-modules/
def lewd(bot,trigger):
    url = 'https://westcentralus.api.cognitive.microsoft.com/vision/v1.0/analyze'
    headers = {'Ocp-Apim-Subscription-Key': 'CHANGE_ME'} #requires microsoft computer vision api key
    params = {'visualFeatures':'Adult'}
    if trigger.group(2):
        data = {'url': trigger.group(2)}
        req = requests.post(url, headers=headers, params=params, json=data)
        js = req.json()
        if js['adult']['isAdultContent']:
            bot.say("[NSFW] wow lewd... lewd score: %.3f/1.00"%js['adult']['adultScore'])
        else:
            bot.say("phew safe... lewd score: %.3f/1.00"%js['adult']['adultScore'])

@sopel.module.commands('wit')
def wittest(bot,trigger):
    line = trigger.group(2)
    res = requests.get("https://api.wit.ai/message?v=CHANGE_ME&q={}".format(requests.utils.quote(line)), headers = {'Authorization':'CHANGE_ME'}).json() #requires wit.ai api key, and some training.
    try:
        x = res['entities']['datetime'][0]['value']
    except:
        x = res['entities']['datetime'][0]['to']['value']
    bot.say(x)


text:
module PROIEL
  module Converter
    class CoNLLU

      OBLIQUENESS_HIERARCHY = ['nsubj', 'obj', 'iobj', 'obl', 'advmod', 'csubj', 'xcomp', 'ccomp', 'advcl']

      RELATION_MAPPING = {
        'adnom' => 'dep',
        'adv' =>  [['advcl', lambda(&:clausal?) ],
                   ['advmod', lambda { |x| x.adverb? or x.preposition? } ],
                   ['advmod', lambda(&:adjectival?) ], # adjective for adverb
                   ['obl', lambda(&:nominal?) ],
                   ['advmod', lambda { |x| true } ],
                  ],
        'ag' => 'obl:agent', # add :agent" once defined
        'apos' => [['flat:name', lambda { |x| x.proper_noun? and x.head and x.head.proper_noun? } ],
                   ['appos', lambda { |x| (x.nominal? or x.adjectival?) and x.head and x.head.nominal? } ],
                   ['acl', lambda { |x| x.clausal? and x.head and x.head.nominal? } ],  # add :relcl ?
                   # what to do about sentential appositions?
                   ['advcl', lambda(&:clausal?) ],
                   ['appos', lambda { |x| true } ],
                  ],
        'arg' => 'dep',
        'atr' => [['nummod', lambda(&:cardinal?) ],
                  ['det', lambda { |x| x.pronominal? and !(!x.genitive? and x.head and x.head.genitive?) } ], #TODO check
                  ['nmod', lambda(&:nominal?) ],
                  ['acl', lambda { |x| x.clausal? } ],  # add :relcl?
                  ['advmod', lambda { |x| x.head and x.head.clausal? } ],
                  ['amod', lambda { |x| true } ], #default
                 ],
        'aux' => [['det', lambda(&:determiner?) ],
                  ['aux:pass', lambda { |x| x.clausal? and x.head.passive?  } ],
                  ['aux', lambda(&:clausal?) ], #v2 probably want the modal particle an to go here too in
                  ['advmod', lambda(&:negation?) ],
                  ['discourse', lambda { |x| x.particle? or x.interjection? } ],
                  # include subjunctions that are aux here; (root sentences with subjunction)
                  ['advmod', lambda { |x| x.adjectival? or x.adverb? or x.subjunction? } ],
                  ['cc', lambda(&:conjunction?) ],
                  ['flat:foreign', lambda(&:foreign?) ],
                  # We need some more distinctions to get Gothic and Armenian. Introduce language in the treebank? (Read from xml)
                  ['mark', lambda { |x| ['R-'].include? x.part_of_speech  } ], #'R-' as infinitive marker in Gothic
                  ['aux', lambda { |x| ['Pk' ].include? x.part_of_speech  } ], #reflexive as valency reducer
                  ['amod', lambda { |x| x.preposition? } ], # Armenian DOM
                  ['fixed', lambda { |x| ['Px', 'Pr'].include? x.part_of_speech } ], # NB there are a lot of bogus annotations with 'Px'

                  # MISANNOTATION  IF A NOUN or a 'Pi' or a 'Pp' or a 'Ps'
                 ],
        'comp' => [['csubj:pass', lambda { |x| x.head and x.head.passive? } ],
                   ['csubj', lambda { |x| x.head and x.head.copula? } ],
                   ['ccomp', lambda { |x| true } ],
                  ],
        'expl' => 'expl',
        'narg' => [['acl', lambda(&:clausal?) ],
                   ['nmod', lambda(&:nominal?) ],
                   ['nmod', lambda(&:adjectival?) ], # nominaliezed in this function
                   ['nmod', lambda { |x| true } ],
                  ],
        'nonsub' => 'dep',
        'obj' => 'obj:dir',
        'obl' => [# normally a preposition will be subordinate to its noun, this captures adverbial use of prepositions
                  ['advmod', lambda { |x| x.adverb? or x.preposition? } ],
                  ['obl', lambda { |x| x.has_preposition? } ],
                  ['iobj', lambda(&:nominal?) ],# if nominal (NB check for presence of article!) TODO: should be "obj" if the verb is monovalent (even by elision)
                  ['iobj', lambda(&:adjectival?) ], # OBL adjectives are nominalized
                  ['advcl', lambda(&:clausal?) ], # this seems to happen with ad libros legendos etc. but check closer!
                  ['iobj', lambda { |x| true } ],
                 ],
        'parpred' => 'parataxis',
        'part' => 'nmod',
        'per' => 'dep',
        'pid' => ['ERROR', lambda { |x| raise 'Remaining pid edge!' } ],
        'pred' => [['root', lambda(&:root?) ],
                   ['ERROR', lambda { |x| raise "#{x.to_n} (head_id #{x.head_id}) is not a root!" }],
                  ],
        'rel' => 'acl', # add :relcl?
        'sub' => [['nsubj:pass', lambda { |x| x.head and x.head.passive? } ],
                  ['nsubj', lambda { |x| true }],
                 ],
        'voc' => 'vocative',
        'xadv' => [['advcl', lambda(&:clausal?)], #add :contr ?
                   ['advmod', lambda { |x| true } ], # add :contr ?
                  ],
        'xobj' => 'xcomp', # copula cases have already been taken care of
        'xsub' => 'xsub',
      }
    end
  end
end


text:
Jaysus::Local.store_dir = File.expand_path("~/.kalipso")
Jaysus::Local.store_dir.mkpath unless Jaysus::Local.store_dir.exist?

token_path = Jaysus::Local.store_dir.join('token')

if token_path.exist?
  token = token_path.read
else
  email = ask("Enter your email:  ") { |q| q.echo = true }
  password = ask("Enter your password:  ") { |q| q.echo = "*" }
  token = ActiveSupport::JSON.decode(RestClient.get("http://#{CGI.escape(email)}:#{CGI.escape(password)}@oncalypso.com/api/v1/users.json"))['token']
  token_path.open('w') do |file|
    file.write token
  end
end

Jaysus::Remote.base_url = "http://#{token}:x@oncalypso.com/api/v1"

if !Jaysus::Local.store_dir.join('keys').exist?
  key_dir = Jaysus::Local.store_dir.join('keys')
  key_dir.mkpath unless key_dir.exist?
  key_path = key_dir.join('id_rsa')
  public_key_path = key_dir.join('id_rsa.pub')
  puts "generating and uploading public key"
  `ssh-keygen -N '' -t rsa -f #{key_path.to_s.strip}`
  Kalipso::PublicKey::Remote.create(:key => public_key_path.read)
end


text:
/**
 * Created by CristoH on 25/03/2016.
 */

///////////////////////
//SubsManager /////////
///////////////////////

Subsman = new SubsManager();

////////////////////
//Configure/////////
////////////////////

Router.configure({
    loadingTemplate: 'loading',
    layoutTemplate: 'mainLayout',
    notFoundTemplate: 'notFound',
    progressSpinner : false,
    waitOn: function() {
        if(Meteor.user()){
            return [
                Subsman.subscribe('notifications'),
                Subsman.subscribe('userProfileInfo', Meteor.userId())
            ];
        }
    }
});

Router.route('/verify-email/:_token', {
    action: function(){
        Accounts.verifyEmail( this.params._token, function( error ){
            Router.go('postsList');
            Bert.alert('Email verificado! Gracias!','success','growl-top-right');
        });
    }
});

////////////////////
//Map///////////////
////////////////////

Router.map(function(){

    /////////////////////////////////////////////////////////////
    //////////////////// Posts - Main Layout  ///////////////////
    /////////////////////////////////////////////////////////////

    this.route('postsList',{
        path: '/',
        layoutTemplate: 'mainLayout',
        fastRender: true,
        loadingTemplate: 'loadingEmpty'
    });

    this.route('postsTrending',{
        template: 'postsList',
        path: '/trending',
        layoutTemplate: 'mainLayout',
        loadingTemplate: 'loadingEmpty',
        fastRender: true
    });

    this.route('postsTrendingComments',{
        template: 'postsList',
        path: '/trending-comments',
        layoutTemplate: 'mainLayout',
        loadingTemplate: 'loadingEmpty',
        fastRender: true
    });

    this.route('postsTrendingLikes',{
        template: 'postsList',
        path: '/trending-likes',
        layoutTemplate: 'mainLayout',
        loadingTemplate: 'loadingEmpty',
        fastRender: true
    });

    this.route('postPage', {
        path: '/posts/:_id/:slug',
        layoutTemplate: 'mainLayout',
        fastRender: true
    });

    this.route('postEdit', {
        path: '/posts/:_id/:slug/edit',
        layoutTemplate: 'mainLayout'
    });

    this.route('postSubmit', {
        path: '/submit',
        layoutTemplate: 'mainLayout'
    });

    this.route('postsUserFollowing', {
        path: '/posts/following',
        layoutTemplate: 'mainLayout',
        fastRender: true
    });

    this.route('userAllNotifications',{
        path: '/notifications',
        template: 'allNotifications',
        layoutTemplate: 'mainLayout'
    });

    //////////////////////////////////////////////////////////////
    //////////////////// User Profile Layout /////////////////////
    //////////////////////////////////////////////////////////////

    this.route('userProfile',{
        template: 'userProfilePosts',
        loadingTemplate: 'loadingEmpty',
        path: '/profile/:userId',
        layoutTemplate: 'userProfileLayout'
    });

    this.route('userProfileEdit',{
        path: '/profile/:userId/edit',
        loadingTemplate: 'loadingProfile',
        layoutTemplate: 'userProfileLayout',
        fastRender: true
    });

    this.route('userProfileFollowers',{
        path: '/profile/:userId/followers',
        loadingTemplate: 'loadingProfile',
        layoutTemplate: 'userProfileLayout',
        fastRender: true
    });

    this.route('userProfileFollowing',{
        path: '/profile/:userId/following',
        loadingTemplate: 'loadingProfile',
        layoutTemplate: 'userProfileLayout',
        fastRender: true
    });

    this.route('userDifference',{
        path: '/profile/:userId/difference',
        loadingTemplate: 'loadingProfile',
        layoutTemplate: 'userProfileLayout',
        fastRender: true
    });

    /////////////////////////////////////////////////
    //////////////////// Access /////////////////////
    /////////////////////////////////////////////////

    this.route('signUp',{
        path: '/register',
        layoutTemplate: 'authenticationLayout',
        progress : false
    });

    this.route('signIn',{
        path: '/login',
        layoutTemplate: 'authenticationLayout',
        progress : false
    });

    this.route('forgotPassword',{
        path: '/forgot-password',
        layoutTemplate: 'authenticationLayout',
        progress: false
    });

    this.route('resetPassword',{
        path: '/reset-password/:token',
        layoutTemplate: 'authenticationLayout',
        progress: false
    });

    this.route('emailNotVerified',{
        template: 'emailNotVerified',
        path: '/email-not-verified',
        layoutTemplate: 'mainLayout',
        progress : false,
        onAfterAction: function(){
            if(Meteor.user().emails[0].verified){
                history.back();
            }
        }
    });

    this.route('accessDenied',{
        template: 'accessDenied',
        path: '/access-denied',
        layoutTemplate: 'mainLayout',
        progress : false,
        onAfterAction: function(){
            if(Meteor.user()){
                if (Meteor.loggingIn()) {
                    this.render(this.loadingTemplate);
                } else {
                    history.back();
                }
            }
        }
    });

    this.route('notFound',{
        template: 'notFound',
        path: '/four-oh-four',
        layoutTemplate: 'mainLayout',
        progress : false
    });

});

////////////////////
//Functions/////////
////////////////////

//El usuario debe estar logueado
var requireLogin = function() {
    if (! Meteor.user()) {
        if (Meteor.loggingIn()) {
            this.render(this.loadingTemplate);
        } else {
            this.redirect('accessDenied');
        }
    } else {
        this.next();
    }
};

//El usuario debe verificar el email
var emailVerified = function(){

    if(Meteor.user().emails){
        if(!Meteor.user().emails[0].verified) {
            this.redirect('emailNotVerified');
        }else{
            this.next();
        }
    }else{
        this.next();
    }

};

//Al usuario le pertenece el post
var ownsPost = function(){

    var postId = this.params._id;
    var postExists = Posts.findOne({userId: Meteor.userId(), _id: postId});
    if(postExists){
        this.next();
    }else{
        this.redirect('notFound');
    }

};

var noCurrentUser = function(){
    if(!Meteor.user()){
        this.next();
    }else {
        this.redirect('postsList');
    }
};

////////////////////
//onBeforeActions///
////////////////////

//OnBeforeAction

Router.onBeforeAction(requireLogin, {only:
    [
        'postPage',
        'postSubmit',
        'postEdit',
        'postsUserFollowing',
        'userProfile',
        'userProfileFollowers',
        'userProfileFollowing',
        'userAllNotifications'
    ]
});

Router.onBeforeAction(emailVerified, {only:
    [
        'postPage',
        'postSubmit',
        'postEdit',
        'userProfile',
        'userProfileFollowers',
        'userProfileFollowing',
        'userAllNotifications'
    ]
});

Router.onBeforeAction(ownsPost, {only: 'postEdit'});

Router.onBeforeAction(noCurrentUser, {only: ['signIn','signUp']});
//Router.onBeforeAction('dataNotFound');


text:
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/FuzzyWuzzie/haxe-Ajax/blob/master/LICENSE)

A simple library for firing promise-based 'ajax' requests (useful when interacting with REST APIs).

## Examples

### Loading Data

```haxe
// fire the ajax request
// using GET, to /test
Ajax.request(
    HTTPMethod.GET,
    '/test'
).then(function(res:Response) {
    // alert the user of the response
    Browser.console.log(res.response);
}).catchError(function(err:Dynamic) {
    // if an error comes up, report it!
    Browser.console.error(err);
});
```

### Live Sample

A [live sample](http://FuzzyWuzzie.github.io/haxe-Ajax/) is available which loads data from the server asynchronously.

[1]: https://github.com/nodeca/pako


text:
import { Intent } from '@blueprintjs/core';
import { IconNames } from '@blueprintjs/icons';
import axios from 'axios';
import classNames from 'classnames';
import React from 'react';
import { HashRouter, Route, Switch } from 'react-router-dom';

import { ExternalLink, HeaderActiveTab, HeaderBar, Loader } from './components';
import { AppToaster } from './singletons/toaster';
import { localStorageGet, LocalStorageKeys, QueryManager } from './utils';
import { DRUID_DOCS_API, DRUID_DOCS_SQL } from './variables';
import {
  DatasourcesView,
  HomeView,
  LoadDataView,
  LookupsView,
  QueryView,
  SegmentsView,
  ServersView,
  TasksView,
} from './views';

import './console-application.scss';

type Capabilities = 'working-with-sql' | 'working-without-sql' | 'broken';

export interface ConsoleApplicationProps {
  hideLegacy: boolean;
  exampleManifestsUrl?: string;
}

export interface ConsoleApplicationState {
  noSqlMode: boolean;
  capabilitiesLoading: boolean;
}

export class ConsoleApplication extends React.PureComponent<
  ConsoleApplicationProps,
  ConsoleApplicationState
> {
  static STATUS_TIMEOUT = 2000;

  private capabilitiesQueryManager: QueryManager<null, Capabilities>;

  static async discoverCapabilities(): Promise<Capabilities> {
    const capabilitiesOverride = localStorageGet(LocalStorageKeys.CAPABILITIES_OVERRIDE);
    if (capabilitiesOverride) return capabilitiesOverride as Capabilities;

    try {
      await axios.post(
        '/druid/v2/sql',
        { query: 'SELECT 1337', context: { timeout: ConsoleApplication.STATUS_TIMEOUT } },
        { timeout: ConsoleApplication.STATUS_TIMEOUT },
      );
    } catch (e) {
      const { response } = e;
      if (response.status !== 405 || response.statusText !== 'Method Not Allowed') {
        return 'working-with-sql'; // other failure
      }
      try {
        await axios.get('/status', { timeout: ConsoleApplication.STATUS_TIMEOUT });
      } catch (e) {
        return 'broken'; // total failure
      }
      // Status works but SQL 405s => the SQL endpoint is disabled
      return 'working-without-sql';
    }
    return 'working-with-sql';
  }

  static shownNotifications(capabilities: string) {
    let message: JSX.Element = <></>;

    if (capabilities === 'working-without-sql') {
      message = (
        <>
          It appears that the SQL endpoint is disabled. The console will fall back to{' '}
          <ExternalLink href={DRUID_DOCS_API}>native Druid APIs</ExternalLink> and will be limited
          in functionality. Look at <ExternalLink href={DRUID_DOCS_SQL}>the SQL docs</ExternalLink>{' '}
          to enable the SQL endpoint.
        </>
      );
    } else if (capabilities === 'broken') {
      message = (
        <>It appears that the Druid is not responding. Data cannot be retrieved right now</>
      );
    }

    AppToaster.show({
      icon: IconNames.ERROR,
      intent: Intent.DANGER,
      timeout: 120000,
      message: message,
    });
  }

  private supervisorId?: string;
  private taskId?: string;
  private openDialog?: string;
  private datasource?: string;
  private onlyUnavailable?: boolean;
  private initQuery?: string;
  private middleManager?: string;

  constructor(props: ConsoleApplicationProps, context: any) {
    super(props, context);
    this.state = {
      noSqlMode: false,
      capabilitiesLoading: true,
    };

    this.capabilitiesQueryManager = new QueryManager({
      processQuery: async () => {
        const capabilities = await ConsoleApplication.discoverCapabilities();
        if (capabilities !== 'working-with-sql') {
          ConsoleApplication.shownNotifications(capabilities);
        }
        return capabilities;
      },
      onStateChange: ({ result, loading }) => {
        this.setState({
          noSqlMode: result !== 'working-with-sql',
          capabilitiesLoading: loading,
        });
      },
    });
  }

  componentDidMount(): void {
    this.capabilitiesQueryManager.runQuery(null);
  }

  componentWillUnmount(): void {
    this.capabilitiesQueryManager.terminate();
  }

  private resetInitialsWithDelay() {
    setTimeout(() => {
      this.taskId = undefined;
      this.supervisorId = undefined;
      this.openDialog = undefined;
      this.datasource = undefined;
      this.onlyUnavailable = undefined;
      this.initQuery = undefined;
      this.middleManager = undefined;
    }, 50);
  }

  private goToLoadData = (supervisorId?: string, taskId?: string) => {
    if (taskId) this.taskId = taskId;
    if (supervisorId) this.supervisorId = supervisorId;
    window.location.hash = 'load-data';
    this.resetInitialsWithDelay();
  };

  private goToDatasources = (datasource: string) => {
    this.datasource = datasource;
    window.location.hash = 'datasources';
    this.resetInitialsWithDelay();
  };

  private goToSegments = (datasource: string, onlyUnavailable = false) => {
    this.datasource = datasource;
    this.onlyUnavailable = onlyUnavailable;
    window.location.hash = 'segments';
    this.resetInitialsWithDelay();
  };

  private goToTaskWithTaskId = (taskId?: string, openDialog?: string) => {
    this.taskId = taskId;
    if (openDialog) this.openDialog = openDialog;
    window.location.hash = 'tasks';
    this.resetInitialsWithDelay();
  };

  private goToTaskWithDatasource = (datasource?: string, openDialog?: string) => {
    this.datasource = datasource;
    if (openDialog) this.openDialog = openDialog;
    window.location.hash = 'tasks';
    this.resetInitialsWithDelay();
  };

  private goToMiddleManager = (middleManager: string) => {
    this.middleManager = middleManager;
    window.location.hash = 'servers';
    this.resetInitialsWithDelay();
  };

  private goToQuery = (initQuery: string) => {
    this.initQuery = initQuery;
    window.location.hash = 'query';
    this.resetInitialsWithDelay();
  };

  private wrapInViewContainer = (
    active: HeaderActiveTab,
    el: JSX.Element,
    classType: 'normal' | 'narrow-pad' = 'normal',
  ) => {
    const { hideLegacy } = this.props;

    return (
      <>
        <HeaderBar active={active} hideLegacy={hideLegacy} />

{el}

      </>
    );
  };

  private wrappedHomeView = () => {
    const { noSqlMode } = this.state;
    return this.wrapInViewContainer(null, <HomeView noSqlMode={noSqlMode} />);
  };

  private wrappedLoadDataView = () => {
    const { exampleManifestsUrl } = this.props;

    return this.wrapInViewContainer(
      'load-data',
      <LoadDataView
        initSupervisorId={this.supervisorId}
        initTaskId={this.taskId}
        exampleManifestsUrl={exampleManifestsUrl}
        goToTask={this.goToTaskWithTaskId}
      />,
      'narrow-pad',
    );
  };

  private wrappedQueryView = () => {
    return this.wrapInViewContainer('query', <QueryView initQuery={this.initQuery} />);
  };

  private wrappedDatasourcesView = () => {
    const { noSqlMode } = this.state;
    return this.wrapInViewContainer(
      'datasources',
      <DatasourcesView
        initDatasource={this.datasource}
        goToQuery={this.goToQuery}
        goToTask={this.goToTaskWithDatasource}
        goToSegments={this.goToSegments}
        noSqlMode={noSqlMode}
      />,
    );
  };

  private wrappedSegmentsView = () => {
    const { noSqlMode } = this.state;
    return this.wrapInViewContainer(
      'segments',
      <SegmentsView
        datasource={this.datasource}
        onlyUnavailable={this.onlyUnavailable}
        goToQuery={this.goToQuery}
        noSqlMode={noSqlMode}
      />,
    );
  };

  private wrappedTasksView = () => {
    const { noSqlMode } = this.state;
    return this.wrapInViewContainer(
      'tasks',
      <TasksView
        taskId={this.taskId}
        datasourceId={this.datasource}
        openDialog={this.openDialog}
        goToDatasource={this.goToDatasources}
        goToQuery={this.goToQuery}
        goToMiddleManager={this.goToMiddleManager}
        goToLoadData={this.goToLoadData}
        noSqlMode={noSqlMode}
      />,
    );
  };

  private wrappedServersView = () => {
    const { noSqlMode } = this.state;
    return this.wrapInViewContainer(
      'servers',
      <ServersView
        middleManager={this.middleManager}
        goToQuery={this.goToQuery}
        goToTask={this.goToTaskWithTaskId}
        noSqlMode={noSqlMode}
      />,
    );
  };

  private wrappedLookupsView = () => {
    return this.wrapInViewContainer('lookups', <LookupsView />);
  };

  render(): JSX.Element {
    const { capabilitiesLoading } = this.state;

    if (capabilitiesLoading) {
      return (

          <Loader loadingText="" loading={capabilitiesLoading} />

      );
    }

    return (
      <HashRouter hashType="noslash">

          <Switch>
            <Route path="/load-data" component={this.wrappedLoadDataView} />
            <Route path="/query" component={this.wrappedQueryView} />

            <Route path="/datasources" component={this.wrappedDatasourcesView} />
            <Route path="/segments" component={this.wrappedSegmentsView} />
            <Route path="/tasks" component={this.wrappedTasksView} />
            <Route path="/servers" component={this.wrappedServersView} />

            <Route path="/lookups" component={this.wrappedLookupsView} />
            <Route component={this.wrappedHomeView} />
          </Switch>

      </HashRouter>
    );
  }
}


text:
<?php
use yii\helpers\Url;

return [
    [
        'class' => 'kartik\grid\CheckboxColumn',
        'width' => '20px',
    ],
    [
        'class' => 'kartik\grid\SerialColumn',
        'width' => '30px',
    ],

    [
        'class'=>'\kartik\grid\DataColumn',
        'label'=> 'Mes Desbloqueado',
        'attribute'=>'obtenerMes',
    ],

    [
        'class' => 'kartik\grid\ActionColumn',
        'dropdown' => false,
        'template' => '{delete}',
        'vAlign'=>'middle',
        'urlCreator' => function($action, $model, $key, $index) {
                return Url::to([$action,'id'=>$key]);
        },
        'viewOptions'=>['role'=>'modal-remote','title'=>'View','data-toggle'=>'tooltip'],
        'updateOptions'=>['role'=>'modal-remote','title'=>'Update', 'data-toggle'=>'tooltip'],
        'deleteOptions'=>['role'=>'modal-remote','title'=>'Delete',
                          'data-confirm'=>false, 'data-method'=>false,// for overide yii data api
                          'data-request-method'=>'post',
                          'data-toggle'=>'tooltip',
                          'data-confirm-title'=>'Are you sure?',
                          'data-confirm-message'=>'Are you sure want to delete this item'],
    ],

];


text:
import { Injectable } from '@angular/core';
import { CookieService } from 'ngx-cookie';
import { UserModel } from './auth.model';

@Injectable()
export class SessionService {
  private key = 'Token';
  private user: UserModel = new UserModel(null, '', '', '', '', null);

  constructor(private cookieService: CookieService) {

  }

  get token() {
    return this.cookieService.get(this.key);
  }

  set token(value: string) {
    this.cookieService.put(this.key, value);
  }

  get currentUser() {
    return this.user;
  }

  set currentUser(value) {
    this.user = value;
  }

}


text:
package ip.cl.clipapp.service.impl;

import org.junit.Test;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;

public class ClipEncoderServiceImplTest {

    private ClipEncoderServiceImpl clipEncoderServiceImpl = new ClipEncoderServiceImpl();

    @Test
    public void can_decode() {
        assertThat(clipEncoderServiceImpl.decode("Q"), equalTo(42));
        assertThat(clipEncoderServiceImpl.decode("vJ"), equalTo(1337));
    }

    @Test(expected = IllegalArgumentException.class)
    public void when_decode_null_string__should_throw_iae() {
        clipEncoderServiceImpl.decode(null);
    }

    @Test(expected = IllegalArgumentException.class)
    public void when_decode_empty_string__should_throw_iae() {
        clipEncoderServiceImpl.decode("");
    }

    @Test
    public void can_encode() {
        assertThat(clipEncoderServiceImpl.encode(42), equalTo("Q"));
        assertThat(clipEncoderServiceImpl.encode(1337), equalTo("vJ"));
    }

    @Test(expected = IllegalArgumentException.class)
    public void when_encode_zero_value__should_throw_iae() {
        clipEncoderServiceImpl.encode(0);
    }

    @Test(expected = IllegalArgumentException.class)
    public void when_encode_negative_value__should_throw_iae() {
        clipEncoderServiceImpl.encode(-12345);
    }
}