repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
lambdal/envois | envois/__init__.py | 313 | #!/usr/bin/env python
"""Automated invoicing by Lambda Labs, Inc."""
__version__ = "0.0.2"
__author__ = [
"Stephen A. Balaban <stephen@stephenbalaban.com>",
"Mek <michael.karpeles@gmail.com>",
"Roy I. Blankman <riblankman@gmail.com>"
]
__license__ = "public domain"
__contributors__ = "see AUTHORS"
| mit |
globaltoken/globaltoken | src/qt/bitcoinstrings.cpp | 31091 |
#include <QtGlobal>
// Automatically generated by extract_strings_qt.py
#ifdef __GNUC__
#define UNUSED __attribute__((unused))
#else
#define UNUSED
#endif
static const char UNUSED *bitcoin_strings[] = {
QT_TRANSLATE_NOOP("bitcoin-core", "Bitcoin Core"),
QT_TRANSLATE_NOOP("bitcoin-core", "Globaltoken Core"),
QT_TRANSLATE_NOOP("bitcoin-core", "The %s developers"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"(1 = keep tx meta data e.g. account owner and payment request information, 2 "
"= drop tx meta data)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"-maxtxfee is set very high! Fees this large could be paid on a single "
"transaction."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"A fee rate (in %s/kB) that will be used when fee estimation has insufficient "
"data (default: %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Accept relayed transactions received from whitelisted peers even when not "
"relaying transactions (default: %d)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Add a node to connect to and attempt to keep the connection open (see the "
"`addnode` RPC command help for more info)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Allow JSON-RPC connections from specified source. Valid for <ip> are a "
"single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or "
"a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Bind to given address and always listen on it. Use [host]:port notation for "
"IPv6"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Bind to given address and whitelist peers connecting to it. Use [host]:port "
"notation for IPv6"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Bind to given address to listen for JSON-RPC connections. This option is "
"ignored unless -rpcallowip is also passed. Port is optional and overrides -"
"rpcport. Use [host]:port notation for IPv6. This option can be specified "
"multiple times (default: 127.0.0.1 and ::1 i.e., localhost, or if -"
"rpcallowip has been specified, 0.0.0.0 and :: i.e., all addresses)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Cannot obtain a lock on data directory %s. %s is probably already running."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Cannot provide specific connections and have addrman find outgoing "
"connections at the same."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Connect only to the specified node(s); -connect=0 disables automatic "
"connections (the rules for this peer are the same as for -addnode)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Create new files with system default permissions, instead of umask 077 (only "
"effective with disabled wallet functionality)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Delete all wallet transactions and only recover those parts of the "
"blockchain through -rescan on startup"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Disable all Globaltoken specific functionality (Masternodes, "
"InstantSend) (0-1, default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Discover own IP addresses (default: 1 when listening and no -externalip or -"
"proxy)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Distributed under the MIT software license, see the accompanying file %s or "
"%s"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Do not keep transactions in the mempool longer than <n> hours (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Enable InstantSend, show confirmations for locked transactions (0-1, "
"default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Equivalent bytes per sigop in transactions for relay and mining (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Error loading %s: You can't enable HD on an already existing non-HD wallet"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Error loading wallet %s. -wallet parameter must only specify a filename (not "
"a path)."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Error reading %s! All keys read correctly, but transaction data or address "
"book entries might be missing or incorrect."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Error: Listening for incoming connections failed (listen returned error %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Exclude debugging information for a category. Can be used in conjunction "
"with -debug=1 to output debug logs for all categories except one or more "
"specified categories."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Execute command when a relevant alert is received or we see a really long "
"fork (%s in cmd is replaced by message)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Execute command when a wallet InstantSend transaction is successfully locked "
"(%s in cmd is replaced by TxID)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Execute command when a wallet transaction changes (%s in cmd is replaced by "
"TxID)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Execute command when the best block changes (%s in cmd is replaced by block "
"hash)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Extra transactions to keep in memory for compact block reconstructions "
"(default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Fees (in %s/kB) smaller than this are considered zero fee for relaying, "
"mining and transaction creation (default: %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Fees (in %s/kB) smaller than this are considered zero fee for transaction "
"creation (default: %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Force relay of transactions from whitelisted peers even if they violate "
"local relay policy (default: %d)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"How thorough the block verification of -checkblocks is (0-4, default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"If <category> is not supplied or if <category> = 1, output all debugging "
"information."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"If paytxfee is not set, include enough fee so transactions begin "
"confirmation on average within n blocks (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"If this block is in the chain assume that it and its ancestors are valid and "
"potentially skip their script verification (0 to verify all, default: %s, "
"testnet: %s)"),
QT_TRANSLATE_NOOP("the-core", ""
"InstantSend doesn't support sending values that high yet. Transactions are "
"currently limited to %1 GLT."),
QT_TRANSLATE_NOOP("the-core", ""
"InstantSend requires inputs with at least %d confirmations, you might need "
"to wait a few minutes and try again."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Invalid amount for -maxtxfee=<amount>: '%s' (must be at least the minrelay "
"fee of %s to prevent stuck transactions)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Maintain a full transaction index, used by the getrawtransaction rpc call "
"(default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Maximum allowed median peer time offset adjustment. Local perspective of "
"time may be influenced by peers forward or backward by this amount. "
"(default: %u seconds)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Maximum size of data in data carrier transactions we relay and mine "
"(default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Maximum total fees (in %s) to use in a single wallet transaction or raw "
"transaction; setting this too low may abort large transactions (default: %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Number of seconds to keep misbehaving peers from reconnecting (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Output debugging information (default: %u, supplying <category> is optional)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Override spork address. Only useful for regtest. Using this on "
"mainnet or testnet will ban you."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Please check that your computer's date and time are correct! If your clock "
"is wrong, %s will not work properly."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Please contribute if you find %s useful. Visit %s for further information "
"about the software."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Prune configured below the minimum of %d MiB. Please use a higher number."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Prune: last wallet synchronisation goes beyond pruned data. You need to -"
"reindex (download the whole blockchain again in case of pruned node)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Query for peer addresses via DNS lookup, if low on addresses (default: 1 "
"unless -connect used)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Randomize credentials for every proxy connection. This enables Tor stream "
"isolation (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Reduce storage requirements by enabling pruning (deleting) of old blocks. "
"This allows the pruneblockchain RPC to be called to delete specific blocks, "
"and enables automatic pruning of old blocks if a target size in MiB is "
"provided. This mode is incompatible with -txindex and -rescan. Warning: "
"Reverting this setting requires re-downloading the entire blockchain. "
"(default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, >%u "
"= automatically prune block files to stay under the specified target size in "
"MiB)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Rescans are not possible in pruned mode. You will need to use -reindex which "
"will download the whole blockchain again."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Set lowest fee rate (in %s/kB) for transactions to be included in block "
"creation. (default: %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Set maximum BIP141 block weight to this * 4. Deprecated, use blockmaxweight"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Set the number of script verification threads (%u to %d, 0 = auto, <0 = "
"leave that many cores free, default: %d)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Sets the serialization of raw transaction or block hex returned in non-"
"verbose mode, non-segwit(0) or segwit(1) (default: %d)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Specify directory to hold wallets (default: <datadir>/wallets if it exists, "
"otherwise <datadir>)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Specify location of debug log file: this can be an absolute path or a path "
"relative to the data directory (default: %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Support filtering of blocks and transaction with bloom filters (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"The block database contains a block which appears to be from the future. "
"This may be due to your computer's date and time being set incorrectly. Only "
"rebuild the block database if you are sure that your computer's date and "
"time are correct"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"The fee rate (in %s/kB) that indicates your tolerance for discarding change "
"by adding it to the fee (default: %s). Note: An output is discarded if it is "
"dust at this rate, but we will always discard up to the dust relay fee and a "
"discard fee above that is limited by the fee estimate for the longest target"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"The transaction amount is too small to send after the fee has been deducted"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"This is a pre-release test build - use at your own risk - do not use for "
"mining or merchant applications"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"This is the transaction fee you may discard if change is smaller than dust "
"at this level"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"This is the transaction fee you may pay when fee estimates are not available."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"This product includes software developed by the OpenSSL Project for use in "
"the OpenSSL Toolkit %s and cryptographic software written by Eric Young and "
"UPnP software written by Thomas Bernard."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Total length of network version string (%i) exceeds maximum length (%i). "
"Reduce the number or size of uacomments."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Tries to keep outbound traffic under the given target (in MiB per 24h), 0 = "
"no limit (default: %d)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Unable to replay blocks. You will need to rebuild the database using -"
"reindex-chainstate."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Unable to rewind the database to a pre-fork state. You will need to "
"redownload the blockchain"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Unsupported argument -socks found. Setting SOCKS version isn't possible "
"anymore, only SOCKS5 proxies are supported."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Unsupported argument -whitelistalwaysrelay ignored, use -whitelistrelay and/"
"or -whitelistforcerelay."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Use UPnP to map the listening port (default: 1 when listening and no -proxy)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: "
"%s)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Username and hashed password for JSON-RPC connections. The field <userpw> "
"comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical python script is "
"included in share/rpcuser. The client then connects normally using the "
"rpcuser=<USERNAME>/rpcpassword=<PASSWORD> pair of arguments. This option can "
"be specified multiple times"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Wallet will not create transactions that violate mempool chain limits "
"(default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Warning: At least %d of %d masternodes are running on a newer software "
"version. Please check latest releases, you might need to update too."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Warning: Every masternode (out of %d known ones) is running on a newer "
"software version. Please check latest releases, it's very likely that you "
"missed a major/critical update."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Warning: The network does not appear to fully agree! Some miners appear to "
"be experiencing issues."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Warning: Unknown block versions being mined! It's possible unknown rules are "
"in effect"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Warning: Wallet file corrupt, data salvaged! Original %s saved as %s in %s; "
"if your balance or transactions are incorrect you should restore from a "
"backup."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Warning: We do not appear to fully agree with our peers! You may need to "
"upgrade, or other nodes may need to upgrade."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Whether to save the mempool on shutdown and load on restart (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or CIDR "
"notated network (e.g. 1.2.3.0/24). Can be specified multiple times."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Whitelisted peers cannot be DoS banned and their transactions are always "
"relayed, even if they are already in the mempool, useful e.g. for a gateway"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"You must specify a masternodeprivkey in the configuration. Please see "
"documentation for help."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"You need to rebuild the database using -reindex to go back to unpruned "
"mode. This will redownload the entire blockchain"),
QT_TRANSLATE_NOOP("bitcoin-core", "%d of last 100 blocks have unexpected version"),
QT_TRANSLATE_NOOP("bitcoin-core", "%s corrupt, salvage failed"),
QT_TRANSLATE_NOOP("bitcoin-core", "%s is set very high!"),
QT_TRANSLATE_NOOP("bitcoin-core", "(default: %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", "(default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "-maxmempool must be at least %d MB"),
QT_TRANSLATE_NOOP("bitcoin-core", "<category> can be:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Accept command line and JSON-RPC commands"),
QT_TRANSLATE_NOOP("bitcoin-core", "Accept connections from outside (default: 1 if no -proxy or -connect)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Accept public REST requests (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Allow DNS lookups for -addnode, -seednode and -connect"),
QT_TRANSLATE_NOOP("bitcoin-core", "Always query for peer addresses via DNS lookup (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Append comment to the user agent string"),
QT_TRANSLATE_NOOP("bitcoin-core", "Attempt to recover private keys from a corrupt wallet on startup"),
QT_TRANSLATE_NOOP("bitcoin-core", "Automatically create Tor hidden service (default: %d)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Block creation options:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Can't find random Masternode."),
QT_TRANSLATE_NOOP("bitcoin-core", "Cannot downgrade wallet"),
QT_TRANSLATE_NOOP("bitcoin-core", "Cannot resolve -%s address: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Chain selection options:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Change index out of range"),
QT_TRANSLATE_NOOP("bitcoin-core", "Connect through SOCKS5 proxy"),
QT_TRANSLATE_NOOP("bitcoin-core", "Connect to a node to retrieve peer addresses, and disconnect"),
QT_TRANSLATE_NOOP("bitcoin-core", "Connection options:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Copyright (C) %i-%i"),
QT_TRANSLATE_NOOP("bitcoin-core", "Corrupted block database detected"),
QT_TRANSLATE_NOOP("bitcoin-core", "Could not parse masternode.conf"),
QT_TRANSLATE_NOOP("bitcoin-core", "Debugging/Testing options:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Do not load the wallet and disable wallet RPC calls"),
QT_TRANSLATE_NOOP("bitcoin-core", "Do you want to rebuild the block database now?"),
QT_TRANSLATE_NOOP("bitcoin-core", "Done loading"),
QT_TRANSLATE_NOOP("bitcoin-core", "Enable publish hash block in <address>"),
QT_TRANSLATE_NOOP("bitcoin-core", "Enable publish hash transaction (locked via InstantSend) in <address>"),
QT_TRANSLATE_NOOP("bitcoin-core", "Enable publish hash transaction in <address>"),
QT_TRANSLATE_NOOP("bitcoin-core", "Enable publish raw block in <address>"),
QT_TRANSLATE_NOOP("bitcoin-core", "Enable publish raw transaction (locked via InstantSend) in <address>"),
QT_TRANSLATE_NOOP("bitcoin-core", "Enable publish raw transaction in <address>"),
QT_TRANSLATE_NOOP("bitcoin-core", "Enable the client to act as a masternode (0-1, default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Enable transaction replacement in the memory pool (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error creating %s: You can't create non-HD wallets with this version."),
QT_TRANSLATE_NOOP("bitcoin-core", "Error initializing block database"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error initializing wallet database environment %s!"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error loading %s"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error loading %s: Wallet corrupted"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error loading %s: Wallet requires newer version of %s"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error loading %s: You can't disable HD on an already existing HD wallet"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error loading block database"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet %s. -wallet filename must be a regular file."),
QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet %s. Duplicate -wallet filename specified."),
QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet %s. Invalid characters in -wallet filename."),
QT_TRANSLATE_NOOP("bitcoin-core", "Error opening block database"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error reading from database, shutting down."),
QT_TRANSLATE_NOOP("bitcoin-core", "Error upgrading chainstate database"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error: A fatal internal error occurred, see debug.log for details"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error: Disk space is low!"),
QT_TRANSLATE_NOOP("bitcoin-core", "Failed to listen on any port. Use -listen=0 if you want this."),
QT_TRANSLATE_NOOP("bitcoin-core", "Failed to rescan the wallet during initialization"),
QT_TRANSLATE_NOOP("bitcoin-core", "Failed to load masternode cache from"),
QT_TRANSLATE_NOOP("bitcoin-core", "Failed to load masternode payments cache from"),
QT_TRANSLATE_NOOP("bitcoin-core", "Fee (in %s/kB) to add to transactions you send (default: %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", "How many blocks to check at startup (default: %u, 0 = all)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Importing..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Imports blocks from external blk000??.dat file on startup"),
QT_TRANSLATE_NOOP("bitcoin-core", "Include IP addresses in debug output (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Incorrect or no genesis block found. Wrong datadir for network?"),
QT_TRANSLATE_NOOP("bitcoin-core", "Information"),
QT_TRANSLATE_NOOP("bitcoin-core", "Initialization sanity check failed. %s is shutting down."),
QT_TRANSLATE_NOOP("bitcoin-core", "InstantSend options:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Insufficient funds"),
QT_TRANSLATE_NOOP("bitcoin-core", "Invalid -onion address or hostname: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Invalid -proxy address or hostname: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -%s=<amount>: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -discardfee=<amount>: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -fallbackfee=<amount>: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -paytxfee=<amount>: '%s' (must be at least %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Invalid masternodeprivkey. Please see documenation."),
QT_TRANSLATE_NOOP("bitcoin-core", "Invalid netmask specified in -whitelist: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Invalid port detected in masternode.conf"),
QT_TRANSLATE_NOOP("bitcoin-core", "Invalid spork address specified with -sporkaddr"),
QT_TRANSLATE_NOOP("bitcoin-core", "Keep at most <n> unconnectable transactions in memory (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Keep the transaction memory pool below <n> megabytes (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Keypool ran out, please call keypoolrefill first"),
QT_TRANSLATE_NOOP("bitcoin-core", "Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Listen for connections on <port> (default: %u or testnet: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Loading P2P addresses..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Loading banlist..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Loading block index..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Loading masternode cache..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Loading masternode payment cache..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Loading wallet..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Location of the auth cookie (default: data dir)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Lock masternodes from masternode configuration file (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Maintain at most <n> connections to peers (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Make the wallet broadcast transactions"),
QT_TRANSLATE_NOOP("bitcoin-core", "Masternode cache is empty, skipping payments cache..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Masternode options:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Masternode queue is full."),
QT_TRANSLATE_NOOP("bitcoin-core", "Masternode:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Maximum per-connection receive buffer, <n>*1000 bytes (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Maximum per-connection send buffer, <n>*1000 bytes (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Need to specify a port with -whitebind: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "No Masternodes detected."),
QT_TRANSLATE_NOOP("bitcoin-core", "No compatible Masternode found."),
QT_TRANSLATE_NOOP("bitcoin-core", "Node relay options:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Not enough file descriptors available."),
QT_TRANSLATE_NOOP("bitcoin-core", "Not in the Masternode list."),
QT_TRANSLATE_NOOP("bitcoin-core", "Only connect to nodes in network <net> (ipv4, ipv6 or onion)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Options:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Password for JSON-RPC connections"),
QT_TRANSLATE_NOOP("bitcoin-core", "Prepend debug output with timestamp (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Print this help message and exit"),
QT_TRANSLATE_NOOP("bitcoin-core", "Print version and exit"),
QT_TRANSLATE_NOOP("bitcoin-core", "Prune cannot be configured with a negative value."),
QT_TRANSLATE_NOOP("bitcoin-core", "Prune mode is incompatible with -txindex."),
QT_TRANSLATE_NOOP("bitcoin-core", "Pruning blockstore..."),
QT_TRANSLATE_NOOP("bitcoin-core", "RPC server options:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Rebuild chain state and block index from the blk*.dat files on disk"),
QT_TRANSLATE_NOOP("bitcoin-core", "Rebuild chain state from the currently indexed blocks"),
QT_TRANSLATE_NOOP("bitcoin-core", "Reducing -maxconnections from %d to %d, because of system limitations."),
QT_TRANSLATE_NOOP("bitcoin-core", "Relay and mine data carrier transactions (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Relay non-P2SH multisig (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Replaying blocks..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Rescan the block chain for missing wallet transactions on startup"),
QT_TRANSLATE_NOOP("bitcoin-core", "Rescanning..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Rewinding blocks..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Run in the background as a daemon and accept commands"),
QT_TRANSLATE_NOOP("bitcoin-core", "Send trace/debug info to console instead of debug.log file"),
QT_TRANSLATE_NOOP("bitcoin-core", "Send transactions with full-RBF opt-in enabled (RPC only, default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Set database cache size in megabytes (%d to %d, default: %d)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Set key pool size to <n> (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Set maximum BIP141 block weight (default: %d)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Set the masternode private key"),
QT_TRANSLATE_NOOP("bitcoin-core", "Set the number of threads to service RPC calls (default: %d)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Show all debugging options (usage: --help -help-debug)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Shrink debug.log file on client startup (default: 1 when no -debug)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Signing transaction failed"),
QT_TRANSLATE_NOOP("bitcoin-core", "Specified -walletdir \"%s\" does not exist"),
QT_TRANSLATE_NOOP("bitcoin-core", "Specified -walletdir \"%s\" is a relative path"),
QT_TRANSLATE_NOOP("bitcoin-core", "Specified -walletdir \"%s\" is not a directory"),
QT_TRANSLATE_NOOP("bitcoin-core", "Specify configuration file (default: %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Specify connection timeout in milliseconds (minimum: 1, default: %d)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Specify data directory"),
QT_TRANSLATE_NOOP("bitcoin-core", "Specify masternode configuration file (default: %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Specify pid file (default: %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Specify wallet file (within data directory)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Specify your own public address"),
QT_TRANSLATE_NOOP("bitcoin-core", "Spend unconfirmed change when sending transactions (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Starting network threads..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Submitted following entries to masternode: %u / %d"),
QT_TRANSLATE_NOOP("bitcoin-core", "Submitted to masternode, waiting for more entries ( %u / %d ) %s"),
QT_TRANSLATE_NOOP("bitcoin-core", "Submitted to masternode, waiting in queue %s"),
QT_TRANSLATE_NOOP("bitcoin-core", "Synchronizing masternode payments..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Synchronizing masternodes..."),
QT_TRANSLATE_NOOP("bitcoin-core", "The source code is available from %s."),
QT_TRANSLATE_NOOP("bitcoin-core", "The transaction amount is too small to pay the fee"),
QT_TRANSLATE_NOOP("bitcoin-core", "The wallet will avoid paying less than the minimum relay fee."),
QT_TRANSLATE_NOOP("bitcoin-core", "This is experimental software."),
QT_TRANSLATE_NOOP("bitcoin-core", "This is not a Masternode."),
QT_TRANSLATE_NOOP("bitcoin-core", "This is the minimum transaction fee you pay on every transaction."),
QT_TRANSLATE_NOOP("bitcoin-core", "This is the transaction fee you will pay if you send a transaction."),
QT_TRANSLATE_NOOP("bitcoin-core", "Threshold for disconnecting misbehaving peers (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Tor control port password (default: empty)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Tor control port to use if onion listening enabled (default: %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Transaction amount too small"),
QT_TRANSLATE_NOOP("bitcoin-core", "Transaction amounts must not be negative"),
QT_TRANSLATE_NOOP("bitcoin-core", "Transaction fee and change calculation failed"),
QT_TRANSLATE_NOOP("bitcoin-core", "Transaction has too long of a mempool chain"),
QT_TRANSLATE_NOOP("bitcoin-core", "Transaction must have at least one recipient"),
QT_TRANSLATE_NOOP("bitcoin-core", "Transaction too large for fee policy"),
QT_TRANSLATE_NOOP("bitcoin-core", "Transaction too large"),
QT_TRANSLATE_NOOP("bitcoin-core", "Unable to bind to %s on this computer (bind returned error %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Unable to bind to %s on this computer. %s is probably already running."),
QT_TRANSLATE_NOOP("bitcoin-core", "Unable to generate initial keys"),
QT_TRANSLATE_NOOP("bitcoin-core", "Unable to sign spork message, wrong key?"),
QT_TRANSLATE_NOOP("bitcoin-core", "Unable to start HTTP server. See debug log for details."),
QT_TRANSLATE_NOOP("bitcoin-core", "Unknown network specified in -onlynet: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Unsupported argument -benchmark ignored, use -debug=bench."),
QT_TRANSLATE_NOOP("bitcoin-core", "Unsupported argument -debugnet ignored, use -debug=net."),
QT_TRANSLATE_NOOP("bitcoin-core", "Unsupported argument -tor found, use -onion."),
QT_TRANSLATE_NOOP("bitcoin-core", "Unsupported logging category %s=%s."),
QT_TRANSLATE_NOOP("bitcoin-core", "Upgrade wallet to latest format on startup"),
QT_TRANSLATE_NOOP("bitcoin-core", "Upgrading UTXO database"),
QT_TRANSLATE_NOOP("bitcoin-core", "Use UPnP to map the listening port (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Use the test chain"),
QT_TRANSLATE_NOOP("bitcoin-core", "User Agent comment (%s) contains unsafe characters."),
QT_TRANSLATE_NOOP("bitcoin-core", "Username for JSON-RPC connections"),
QT_TRANSLATE_NOOP("bitcoin-core", "Verifying blocks..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Verifying wallet(s)..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Wallet %s resides outside wallet directory %s"),
QT_TRANSLATE_NOOP("bitcoin-core", "Wallet debugging/testing options:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Wallet needed to be rewritten: restart %s to complete"),
QT_TRANSLATE_NOOP("bitcoin-core", "Wallet options:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Warning"),
QT_TRANSLATE_NOOP("bitcoin-core", "Warning: unknown new rules activated (versionbit %i)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Whether to operate in a blocks only mode (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "You need to rebuild the database using -reindex to change -txindex"),
QT_TRANSLATE_NOOP("bitcoin-core", "Zapping all transactions from wallet..."),
QT_TRANSLATE_NOOP("bitcoin-core", "ZeroMQ notification options:"),
};
| mit |
NetOfficeFw/NetOffice | Source/MSProject/Enums/PjCalendarBarType.cs | 941 | using System;
using NetOffice;
using NetOffice.Attributes;
namespace NetOffice.MSProjectApi.Enums
{
/// <summary>
/// SupportByVersion MSProject 11, 12, 14
/// </summary>
///<remarks> MSDN Online Documentation: http://msdn.microsoft.com/en-us/en-us/library/office/ff864558(v=office.14).aspx </remarks>
[SupportByVersion("MSProject", 11,12,14)]
[EntityType(EntityType.IsEnum)]
public enum PjCalendarBarType
{
/// <summary>
/// SupportByVersion MSProject 11, 12, 14
/// </summary>
/// <remarks>0</remarks>
[SupportByVersion("MSProject", 11,12,14)]
pjNormalBar = 0,
/// <summary>
/// SupportByVersion MSProject 11, 12, 14
/// </summary>
/// <remarks>1</remarks>
[SupportByVersion("MSProject", 11,12,14)]
pjLineBar = 1,
/// <summary>
/// SupportByVersion MSProject 11, 12, 14
/// </summary>
/// <remarks>2</remarks>
[SupportByVersion("MSProject", 11,12,14)]
pjNoBar = 2
}
} | mit |
dalevross/scrabtourneyasst | gameresults_bingos.php | 5756 | <?php
include_once 'config.php';
require_once 'XML/Unserializer.php';
if (isset($_GET["gid"]) && isset($_GET["game"]) )
{
$gid=$_GET["gid"];
$game=$_GET["game"];
if(filter_var($gid,FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>"/^\d+$/")))
&&
filter_var($game,FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>"/^(wordscraper|lexulous)$/"))))
{
$curl_data = "action=gameinfo&gid=" . $gid;
if(isset($_GET["pid"]) && isset($_GET["password"]) )
{
$pid=$_GET["pid"];
$password=$_GET["password"];
if(filter_var($pid,FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>"/^\d$/")))
&&
filter_var($password,FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>"/^\w+$/"))))
{
$curl_data = $curl_data . "&pid=" . $pid . "&password=" . $password . "&showGameOver=1";
}
else
{
$curl_data = $curl_data . "&pid=1";
}
}
else
{
$curl_data = $curl_data . "&pid=1";
}
//$url = "http://74.54.87.124/" . (($game=="lexulous")?"lexulous":"wordscraper/engine") . "/xmlv3.php";
$url = (($game=="lexulous")?"http://aws.rjs.in/fblexulous/engine":"http://aws.rjs.in/wordscraper/engine") . "/xmlv3.php";
try{
$response = get_web_page($url,$curl_data);
} catch (Exception $e) {
echo 'Caught exception: ' . $e->getMessage() . "\n";
}
//---header('Content-Type: text/xml');
//echo $response;
$options = array('complexType' => 'object');
$us = new XML_Unserializer($options);
$result = $us->unserialize($response, false);
$obj = $us->getUnserializedData();
$movescount = $obj->movesnode->cnt;
for ($i = 1; $i <= $movescount; $i++) {
$info = eval("return \$obj->movesnode->m" . $i . ";");
//<m1>1,p1,BEVY,15,r</m1>
list($index,$p,$word,$score,$huh) = explode(",",$info);
$moves[$i]['player']=$p;
$moves[$i]['word']=$word;
$moves[$i]['score']=$score;
}
$nodevals = $obj->boardnode->nodeval;
$tiles = explode("|",$nodevals);
foreach ($tiles as $vals) {
list($letter,$x,$y,$turn) = explode(",",$vals);
$moves[$turn]['letters'][]=$letter;
}
echo "<table style='border-style:solid;border-width:1px;border-color:brown;'><tr style='text-align:center;background-color:brown;color:white;'><th>Move</th><th>Player</th><th>Word</th><th>Score</th></tr>";
foreach ($moves as $t=>$inf)
{
if(count($inf['letters'])>=7)
{
$name = eval("return \$obj->gameinfo->" . $inf['player'] . ";");
echo "<tr><td>$t</td><td>$name</td><td>{$inf['word']}</td><td>{$inf['score']}</td></tr>";
}
}
echo "</table>";
//print_r($moves);
//var_dump(isset($obj->gameinfo->p3email));
//$gcount = $obj->gameinfo->;
$doc = new DomDocument('1.0','UTF-8');
// create root node
$root = $doc->createElement('xml');
$root = $doc->appendChild($root);
$gameinfo = $doc->createElement('gameinfo');
$gameinfo = $root->appendChild($gameinfo);
$players = $doc->createElement('players');
$players = $gameinfo->appendChild($players);
for ($i = 1; $i <= 4; $i++) {
$res = eval("return isset(\$obj->gameinfo->p" . $i . "email);");
if($res)
{
$winner = (eval("return \$obj->gameinfo->p" . $i . ";")==$obj->gameinfo->winner)?"yes":"no";
$player = $doc->createElement('player');
$player = $players->appendChild($player);
$child = $doc->createElement('pid');
$child = $player->appendChild($child);
$value = $doc->createTextNode('' . $i);
$value = $child->appendChild($value);
$child = $doc->createElement('pname');
$child = $player->appendChild($child);
$value = $doc->createTextNode(eval("return \$obj->gameinfo->p" . $i . ";"));
$value = $child->appendChild($value);
$child = $doc->createElement('pscore');
$child = $player->appendChild($child);
$value = $doc->createTextNode(eval("return \$obj->gameinfo->p" . $i . "score;"));
$value = $child->appendChild($value);
$child = $doc->createElement('winner');
$child = $player->appendChild($child);
$value = $doc->createTextNode($winner);
$value = $child->appendChild($value);
$child = $doc->createElement('pemail');
$child = $player->appendChild($child);
$value = $doc->createTextNode(eval("return \$obj->gameinfo->p" . $i . "email;"));
$value = $child->appendChild($value);
$child = $doc->createElement('pic');
$child = $player->appendChild($child);
$value = $doc->createTextNode('https://graph.facebook.com/' . eval("return \$obj->gameinfo->p" . $i . "email;") . '/picture');
$value = $child->appendChild($value);
$child = $doc->createElement('pracklen');
$child = $player->appendChild($child);
$value = $doc->createTextNode(eval("return \$obj->gameinfo->p" . $i . "racklen;"));
$value = $child->appendChild($value);
}
else
{
break;
}
}
$countval = $i - 1;
$dictionary = $doc->createElement('dictionary');
$dictionary = $gameinfo->appendChild($dictionary);
$value = $doc->createTextNode($obj->gameinfo->dictionary);
$value = $dictionary->appendChild($value);
$winner = $doc->createElement('winner');
$winner = $gameinfo->appendChild($winner);
$value = $doc->createTextNode($obj->gameinfo->winner);
$value = $winner->appendChild($value);
$count = $doc->createElement('count');
$count = $gameinfo->appendChild($count);
$value = $doc->createTextNode($countval);
$value = $count->appendChild($value);
// get completed xml document
$xml_string = $doc->saveXML();
//---echo $xml_string;
}
else
{
echo "Invalid gid or game";
}
}
else
{
echo "Invalid Request! What are you trying to do exactly?";
}
?> | mit |
postmanlabs/httpsnippet | src/targets/shell/curl.js | 2129 | /**
* @description
* HTTP code snippet generator for the Shell using cURL.
*
* @author
* @AhmadNassri
*
* for any questions or issues regarding the generated code snippet, please open an issue mentioning the author.
*/
'use strict'
var util = require('util')
var helpers = require('../../helpers/shell')
var CodeBuilder = require('../../helpers/code-builder')
module.exports = function (source, options) {
var opts = util._extend({
indent: ' ',
short: false
}, options)
var code = new CodeBuilder(opts.indent, opts.indent !== false ? ' \\\n' + opts.indent : ' ')
code.push('curl %s %s', opts.short ? '-X' : '--request', source.method)
.push(util.format('%s%s', opts.short ? '' : '--url ', helpers.quote(source.fullUrl)))
if (source.httpVersion === 'HTTP/1.0') {
code.push(opts.short ? '-0' : '--http1.0')
}
// construct headers
Object.keys(source.headersObj).sort().map(function (key) {
var header = util.format('%s: %s', key, source.headersObj[key])
code.push('%s %s', opts.short ? '-H' : '--header', helpers.quote(header))
})
if (source.allHeaders.cookie) {
code.push('%s %s', opts.short ? '-b' : '--cookie', helpers.quote(source.allHeaders.cookie))
}
// construct post params
switch (source.postData.mimeType) {
case 'multipart/form-data':
source.postData.params.map(function (param) {
var post = util.format('%s=%s', param.name, param.value)
if (param.fileName && !param.value) {
post = util.format('%s=@%s', param.name, param.fileName)
}
code.push('%s %s', opts.short ? '-F' : '--form', helpers.quote(post))
})
break
default:
// raw request body
if (source.postData.text) {
var postData = helpers.quote(source.postData.text);
code.push('%s %s', opts.short ? '-d' : '--data', options.escape ? helpers.escape(postData) : postData)
}
}
return code.join()
}
module.exports.info = {
key: 'curl',
title: 'cURL',
link: 'http://curl.haxx.se/',
description: 'cURL is a command line tool and library for transferring data with URL syntax'
}
| mit |
ic-labs/django-icekit | glamkit_collections/contrib/work_creator/plugins/film/api.py | 1353 | from rest_framework import serializers
from rest_framework import routers
from icekit.api.base_views import ModelViewSet
from ...api_serializers import MovingImageWork
from .models import Film as FilmModel, Format as FormatModel
VIEWNAME = 'api:film-api'
class Format(serializers.ModelSerializer):
class Meta:
model = FormatModel
fields = (
'title',
'slug',
)
class Film(MovingImageWork):
formats = Format(
many=True,
read_only=True,
)
class Meta:
model = FilmModel
fields = MovingImageWork.Meta.fields + (
# Relationships
'formats',
)
extra_kwargs = dict(MovingImageWork.Meta.extra_kwargs, **{
'url': {
'lookup_field': 'pk',
'view_name': '%s-detail' % VIEWNAME,
},
})
writable_related_fields = MovingImageWork.Meta.writable_related_fields
disable_unique_together_constraint_fields = \
MovingImageWork.Meta.disable_unique_together_constraint_fields
class APIViewSet(ModelViewSet):
"""
Film resource
"""
queryset = FilmModel.objects.all() \
.prefetch_related('creators', 'images')
serializer_class = Film
router = routers.DefaultRouter()
router.register('film', APIViewSet, VIEWNAME)
| mit |
onk/activerecord-quiet_schema_version | lib/activerecord/quiet_schema_version/schema_dumper/ar_5_0.rb | 297 | module Activerecord
module QuietSchemaVersion
module SchemaDumper
module AR50
def initialize(connection, options = {})
@connection = connection
@version = nil # <- monkeypatched this line
@options = options
end
end
end
end
end
| mit |
QuantumTechDevStudio/NewGameResRepository | remote_acess/project/Nameisundef/core/src/com/quantenpfad/mygame/controller/MenuController.java | 2627 | package com.quantenpfad.mygame.controller;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.InputProcessor;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.math.Rectangle;
import com.quantenpfad.mygame.MyGame;
import com.quantenpfad.mygame.Screens.MainMenuScreen;
import com.quantenpfad.mygame.Screens.MyScreen;
import com.quantenpfad.mygame.Screens.WorldScreen;
/**
* Created by Rodion on 08.07.2017.
*/
public class MenuController implements Controller{
private final MyGame game;
private MyScreen screen;
public MenuController(final MyGame game, MyScreen screen){
this.game = game;
this.screen = screen;
Gdx.input.setInputProcessor(this);
}
// Действие при нажатии на плей кнопку
private void playButtonAction(){
Screen worldScreen = new WorldScreen(game);
game.setScreen(worldScreen);
game.getCurrentScreens().add(worldScreen);
}
// Действие при нажатии на донат кнопку
private void donateButtonAction(){
Screen worldScreen = new WorldScreen(game);
game.setScreen(worldScreen);
game.getCurrentScreens().add(worldScreen);
}
@Override
public boolean touchDown(int screenX, int screenY, int pointer, int button) {
return false;
}
@Override
public boolean touchUp(int screenX, int screenY, int pointer, int button) {
int y = game.HEIGHT - screenY; //Переводит систему координат InputProcessor в систему координат SpriteBatch
if(screen.getUiElements().get("play_button").contains(screenX, y)){
playButtonAction();
}
if(screen.getUiElements().get("donate_button").contains(screenX, y)){
donateButtonAction();
}
return true;
}
@Override
public void dispose() {
Gdx.input.setInputProcessor(null);
}
@Override
public boolean keyDown(int keycode) {
return false;
}
@Override
public boolean keyUp(int keycode) {
return false;
}
@Override
public boolean keyTyped(char character) {
return false;
}
@Override
public boolean touchDragged(int screenX, int screenY, int pointer) {
return false;
}
@Override
public boolean mouseMoved(int screenX, int screenY) {
return false;
}
@Override
public boolean scrolled(int amount) {
return false;
}
}
| mit |
buermann/introspective_grape | spec/dummy/config/initializers/paperclip_adapter.rb | 374 | module Paperclip
class HashUploadedFileAdapter < AbstractAdapter
def initialize(target, args)
@tempfile, @content_type, @size = target['tempfile'], target['type'], target['tempfile'].size
@original_filename = target['filename']
end
end
end
#Paperclip.io_adapters.register Paperclip::HashUploadedFileAdapter do |target|
# target.kind_of? Hash
#end
| mit |
sinfin/folio | app/cells/folio/console/state_cell.rb | 3312 | # frozen_string_literal: true
class Folio::Console::StateCell < Folio::ConsoleCell
include SimpleForm::ActionViewExtensions::FormHelper
class_name "f-c-state", :small, :remote
def show
render if model.aasm_state.present?
end
def state
@state ||= model.aasm.state_object_for_name(model.aasm_state.to_sym)
end
def state_square_tag(s, color)
content_tag(:span, "", class: "f-c-state__state-square "\
"f-c-state__state-square--color-#{color} "\
"f-c-state__state-square--state-#{s.name} "\
"f-c-state__state-square--model-#{model.class.table_name}")
end
def state_square(s = nil)
s ||= state
color = s.options[:color].presence || "default"
state_square_tag(s, color)
end
def event_square(event)
s = target_state(event)
color = event.options[:color] || s.options[:color].presence || "default"
state_square_tag(s, color)
end
def states
@states ||= model.aasm.states.map do |state|
{
name: state.name,
human_name: state.human_name,
color: state.options.color.presence || "default",
}
end
end
def events
@events ||= model.aasm.events(permitted: true)
.reject { |e| e.options[:private] }
end
def form(&block)
opts = {
method: :post,
url: options[:url] || url_for([:event, :console, model]),
}
simple_form_for "", opts, &block
end
def target_state(event)
to = event.transitions.first.to
if to.is_a?(Array)
to = model.try(:previous_aasm_state).try(:to_sym) || to.first
end
model.aasm.state_object_for_name(to)
end
def active?
options[:active] != false
end
def confirm(event)
if event.options[:confirm]
event.options[:confirm].is_a?(String) ? event.options[:confirm] : t("folio.console.confirmation")
end
end
def remote_url_for(event)
controller.folio.event_console_api_aasm_path(klass: klass,
id: model.id,
aasm_event: event.name,
cell_options: {
active: options[:active],
remote: options[:remote],
small: options[:small],
})
end
def klass
@klass ||= model.class.to_s
end
def event_target_human_name(event)
to = event.transitions[0].to
state = event.state_machine.states.find { |s| s.name == to }
state ? state.human_name : to
end
def data_for_event(event)
{
"confirmation" => confirm(event),
"url" => remote_url_for(event),
"aasm-email-modal" => event.options[:email_modal],
"modal" => event.options[:modal],
"event-name" => event.name,
"event-target-human-name" => event_target_human_name(event),
"klass" => klass,
"id" => model.id,
"email" => model.try(:email),
"email-subject" => model.class.try(:aasm_email_default_subject, event),
"email-text" => model.class.try(:aasm_email_default_text, event),
}.compact
end
end
| mit |
zerbielli/avntSoldi | src/main/java/com/avnt/soldi/service/DiagnosticService.java | 1746 | package com.avnt.soldi.service;
import com.avnt.soldi.model.cheque.Diagnostic;
import com.avnt.soldi.model.repositories.DiagnosticRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* Class DiagnosticService is service, that handle DiagnosticController.
* Use @Autowired for connect to necessary repositories
*
* @version 1.1
* @author Dmitry
* @since 21.01.2016
*/
@Service
public class DiagnosticService {
@Autowired DiagnosticRepository diagnosticRepository;
/**
* Method addDiagnostic add diagnostic to DB with current DateTime
* @param chequeID is ID of cheque in database, in that client-side wants add a diagnostic comment
* @param diagnostic is data for Diagnostic.class, that was create on client-side
*/
@Modifying
@Transactional
public void addDiagnostic(Long chequeID, Diagnostic diagnostic) {
diagnosticRepository.save(diagnostic.withDateTime());
}
/**
* Method deleteDiagnostic delete diagnostic from DB
* @param chequeID is ID of cheque in database, in that client-side wants delete diagnostic comment
* @param diagnosticID is ID of diagnostic in database, that client-side wants to delete
*/
@Modifying
@Transactional
public void deleteDiagnostic(Long chequeID, Long diagnosticID) {
diagnosticRepository.delete(diagnosticID);
}
@Transactional(readOnly = true)
public List<Diagnostic> getDiagnostics(Long chequeID) {
return diagnosticRepository.findByChequeId(chequeID);
}
}
| mit |
eladnoor/equilibrator | pathway/__init__.py | 404 | from io import StringIO
from django.utils.text import slugify
from pathway.bounds import Bounds
from pathway.concs import ConcentrationConverter
from pathway.thermo_models import PathwayThermoModel
from pathway.max_min_driving_force import \
PathwayParseError, InvalidReactionFormula, UnbalancedReaction, \
ViolatesFirstLaw, ParsedPathway, ReactionMDFData, \
CompoundMDFData, PathwayMDFData | mit |
LeadPipeSoftware/LeadPipe.Net | src/LeadPipe.Net.Validation/PrintableCharacterAttribute.cs | 3077 | // --------------------------------------------------------------------------------------------------------------------
// Copyright (c) Lead Pipe Software. All rights reserved.
// Licensed under the MIT License. Please see the LICENSE file in the project root for full license information.
// --------------------------------------------------------------------------------------------------------------------
using LeadPipe.Net.Extensions;
using System;
using System.ComponentModel.DataAnnotations;
namespace LeadPipe.Net.Validation
{
/// <summary>
/// A custom data validation attribute that checks for printable ascii characters.
/// </summary>
public class PrintableCharacterAttribute : LeadPipeValidationAttribute
{
/// <summary>
/// Initializes a new instance of the <see cref="PrintableCharacterAttribute"/> class.
/// </summary>
/// <param name="ignoreIfConverted">if set to <c>true</c> [ignore if converted].</param>
public PrintableCharacterAttribute(bool ignoreIfConverted = false) : base(ignoreIfConverted)
{
}
/// <summary>
/// Validates the specified value with respect to the current validation attribute.
/// </summary>
/// <param name="value">
/// The value to validate.
/// </param>
/// <param name="validationContext">
/// The context information about the validation operation.
/// </param>
/// <returns>
/// An instance of the <see cref="T:System.ComponentModel.DataAnnotations.ValidationResult"/> class.
/// </returns>
protected override ValidationResult PerformCustomValidation(object value, ValidationContext validationContext)
{
if (value.IsNull())
{
return ValidationResult.Success;
}
string convertedValue;
if (validationContext.IsNull())
{
validationContext = new ValidationContext(value, null, null) { DisplayName = "The value" };
}
var memberNames = new[] { validationContext.MemberName };
try
{
convertedValue = Convert.ToString(value);
}
catch (FormatException)
{
this.ErrorMessage = validationContext.DisplayName.FormattedWith(ValidationMessages.ValueMustBeString);
return new ValidationResult(this.ErrorMessage);
}
if (!convertedValue.IsPrintableCharacter())
{
var englishAlphabetProvider = new EnglishAlphabetProvider();
string extendedCharacters = string.Join(string.Empty, englishAlphabetProvider.GetPrintableCharacters());
this.ErrorMessage = string.Format(ValidationMessages.CanOnlyContainPrintableCharacters, validationContext.DisplayName, extendedCharacters);
return new ValidationResult(this.ErrorMessage, memberNames);
}
return ValidationResult.Success;
}
}
} | mit |
codingsince1985/geo-golang | mapquest/open/geocoder.go | 2240 | // Package open is a geo-golang based MapRequest Open geocode/reverse geocode client
package open
import (
"fmt"
"strings"
"github.com/codingsince1985/geo-golang"
)
type (
baseURL string
geocodeResponse struct {
Results []struct {
Locations []struct {
LatLng struct {
Lat float64
Lng float64
}
PostalCode string
Street string
AdminArea6 string // neighbourhood
AdminArea5 string // city
AdminArea4 string // county
AdminArea3 string // state
AdminArea1 string // country (ISO 3166-1 alpha-2 code)
}
}
}
)
// Geocoder constructs MapRequest Open geocoder
func Geocoder(key string, baseURLs ...string) geo.Geocoder {
return geo.HTTPGeocoder{
EndpointBuilder: baseURL(getURL(key, baseURLs...)),
ResponseParserFactory: func() geo.ResponseParser { return &geocodeResponse{} },
}
}
func getURL(key string, baseURLs ...string) string {
if len(baseURLs) > 0 {
return baseURLs[0]
}
return "http://open.mapquestapi.com/geocoding/v1/*?key=" + key + "&location="
}
func (b baseURL) GeocodeURL(address string) string {
return strings.Replace(string(b), "*", "address", 1) + address
}
func (b baseURL) ReverseGeocodeURL(l geo.Location) string {
return strings.Replace(string(b), "*", "reverse", 1) + fmt.Sprintf("%f,%f", l.Lat, l.Lng)
}
func (r *geocodeResponse) Location() (*geo.Location, error) {
if len(r.Results) == 0 || len(r.Results[0].Locations) == 0 {
return nil, nil
}
loc := r.Results[0].Locations[0].LatLng
return &geo.Location{
Lat: loc.Lat,
Lng: loc.Lng,
}, nil
}
func (r *geocodeResponse) Address() (*geo.Address, error) {
if len(r.Results) == 0 || len(r.Results[0].Locations) == 0 {
return nil, nil
}
p := r.Results[0].Locations[0]
if p.Street == "" || p.AdminArea5 == "" {
return nil, nil
}
formattedAddress := p.Street + ", " + p.PostalCode + ", " + p.AdminArea5 + ", " + p.AdminArea3 + ", " + p.AdminArea1
return &geo.Address{
FormattedAddress: formattedAddress,
Street: p.Street,
Suburb: p.AdminArea6,
Postcode: p.PostalCode,
City: p.AdminArea5,
County: p.AdminArea4,
State: p.AdminArea3,
CountryCode: p.AdminArea1,
}, nil
}
| mit |
platypii/BASElineFlightComputer | app/src/main/java/com/platypii/baseline/views/laser/LaserActivity.java | 5585 | package com.platypii.baseline.views.laser;
import com.platypii.baseline.R;
import com.platypii.baseline.Services;
import com.platypii.baseline.databinding.ActivityLaserBinding;
import com.platypii.baseline.events.ChartFocusEvent;
import com.platypii.baseline.events.ProfileLayerEvent;
import com.platypii.baseline.lasers.rangefinder.RangefinderService;
import com.platypii.baseline.measurements.MLocation;
import com.platypii.baseline.util.Convert;
import com.platypii.baseline.views.BaseActivity;
import com.platypii.baseline.views.charts.layers.ChartLayer;
import com.platypii.baseline.views.charts.layers.ProfileLayer;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import com.google.firebase.analytics.FirebaseAnalytics;
import java.util.ArrayList;
import java.util.List;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
public class LaserActivity extends BaseActivity {
private static final String TAG = "LaserActivity";
private ActivityLaserBinding binding;
// TODO: remove static instance after debugging
public static FirebaseAnalytics firebaseAnalytics;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityLaserBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
// Only add laser panel on first create
if (savedInstanceState == null) {
// Load laser panel fragment
final LaserPanelFragment laserPanel = new LaserPanelFragment();
getSupportFragmentManager()
.beginTransaction()
.add(R.id.laserPanel, laserPanel)
.commit();
}
firebaseAnalytics = FirebaseAnalytics.getInstance(this);
}
@Override
public void onStart() {
super.onStart();
// Add all layers
for (ProfileLayer layer : Services.lasers.layers.layers) {
binding.flightProfile.addLayer(layer);
}
EventBus.getDefault().register(this);
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void addLayer(@NonNull ProfileLayerEvent.ProfileLayerAdded event) {
Log.i(TAG, "Adding profile layer " + event.layer);
binding.flightProfile.addLayer(event.layer);
binding.flightProfile.invalidate();
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void removeLayer(@NonNull ProfileLayerEvent.ProfileLayerRemoved event) {
Log.i(TAG, "Removing profile layer " + event.layer);
binding.flightProfile.removeLayer(event.layer);
binding.flightProfile.invalidate();
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void updateLayer(ProfileLayerEvent.ProfileLayerUpdated event) {
binding.flightProfile.invalidate();
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onTrackFocus(@NonNull ChartFocusEvent.TrackFocused event) {
binding.flightProfile.onChartFocus(event);
if (!event.track.isEmpty()) {
final MLocation start = event.track.get(0);
final double x = start.distanceTo(event.location);
final double y = event.location.altitude_gps - start.altitude_gps;
final String yStr = y < 0 ? Convert.distance(-y) + "↓" : Convert.distance(y) + "↑";
binding.flightProfileStats.setText(String.format("%s →\n%s", Convert.distance(x), yStr));
binding.flightProfileStats.setVisibility(View.VISIBLE);
} else {
binding.flightProfileStats.setText("");
binding.flightProfileStats.setVisibility(View.GONE);
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onLaserFocus(@NonNull ChartFocusEvent.LaserFocused event) {
binding.flightProfile.onChartFocus(event);
final double x = event.point.x;
final double y = event.point.y;
final String yStr = y < 0 ? Convert.distance(-y) + "↓" : Convert.distance(y) + "↑";
binding.flightProfileStats.setText(String.format("%s →\n%s", Convert.distance(x), yStr));
binding.flightProfileStats.setVisibility(View.VISIBLE);
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onUnFocus(@NonNull ChartFocusEvent.Unfocused event) {
binding.flightProfile.onChartFocus(event);
binding.flightProfileStats.setText("");
binding.flightProfileStats.setVisibility(View.GONE);
}
@Override
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == RangefinderService.ENABLE_BLUETOOTH_CODE) {
// Send activity result to fragment
final Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.laserPanel);
if (fragment != null) {
fragment.onActivityResult(requestCode, resultCode, data);
}
}
}
@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
// Remove all chart profile layers
final List<ChartLayer> layers = new ArrayList<>(binding.flightProfile.getPlot().layers);
for (ChartLayer layer : layers) {
binding.flightProfile.removeLayer(layer);
}
}
}
| mit |
angular/angular-cli-stress-test | src/app/components/comp-1479/comp-1479.component.spec.ts | 847 | /**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { Comp1479Component } from './comp-1479.component';
describe('Comp1479Component', () => {
let component: Comp1479Component;
let fixture: ComponentFixture<Comp1479Component>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ Comp1479Component ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(Comp1479Component);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
| mit |
AeonLucid/CHIP-8_Emulator | CHIP-8_Emulator/Chip/ChipConstants.cs | 903 | namespace CHIP_8_Emulator.Chip
{
internal static class ChipConstants
{
public static readonly byte[] Fontset = {
0xF0, 0x90, 0x90, 0x90, 0xF0, // 0
0x20, 0x60, 0x20, 0x20, 0x70, // 1
0xF0, 0x10, 0xF0, 0x80, 0xF0, // 2
0xF0, 0x10, 0xF0, 0x10, 0xF0, // 3
0x90, 0x90, 0xF0, 0x10, 0x10, // 4
0xF0, 0x80, 0xF0, 0x10, 0xF0, // 5
0xF0, 0x80, 0xF0, 0x90, 0xF0, // 6
0xF0, 0x10, 0x20, 0x40, 0x40, // 7
0xF0, 0x90, 0xF0, 0x90, 0xF0, // 8
0xF0, 0x90, 0xF0, 0x10, 0xF0, // 9
0xF0, 0x90, 0xF0, 0x90, 0x90, // A
0xE0, 0x90, 0xE0, 0x90, 0xE0, // B
0xF0, 0x80, 0x80, 0x80, 0xF0, // C
0xE0, 0x90, 0x90, 0x90, 0xE0, // D
0xF0, 0x80, 0xF0, 0x80, 0xF0, // E
0xF0, 0x80, 0xF0, 0x80, 0x80 // F
};
}
}
| mit |
ruby-bench/ruby-bench-suite | bundler/benchmarks/bm_bundle_outdated_rails.rb | 452 | require_relative 'support/benchmark_bundler.rb'
require 'bundler/cli'
Dir.mktmpdir do |dir|
Dir.chdir(dir) do
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', '5.0.0.rc1'
gem 'nokogiri', '1.6.7.0'
GEMFILE
system("bundle install --quiet")
system("bundle outdated --quiet")
Benchmark.do_benchmark('bundle outdated rails') do
system("bundle outdated --quiet")
end
end
end
| mit |
JaegerNote/JaegerNote | src/qt/locale/bitcoin_eu_ES.ts | 100113 | <?xml version="1.0" ?><!DOCTYPE TS><TS language="eu_ES" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About JaegerNote</source>
<translation>JaegerNote-i buruz</translation>
</message>
<message>
<location line="+39"/>
<source><b>JaegerNote</b> version</source>
<translation><b>JaegerNote</b> bertsioa</translation>
</message>
<message>
<location line="+57"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../aboutdialog.cpp" line="+14"/>
<source>Copyright</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The JaegerNote developers</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation>Helbide-liburua</translation>
</message>
<message>
<location line="+19"/>
<source>Double-click to edit address or label</source>
<translation>Klik bikoitza helbidea edo etiketa editatzeko</translation>
</message>
<message>
<location line="+27"/>
<source>Create a new address</source>
<translation>Sortu helbide berria</translation>
</message>
<message>
<location line="+14"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation>Kopiatu hautatutako helbidea sistemaren arbelera</translation>
</message>
<message>
<location line="-11"/>
<source>&New Address</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+63"/>
<source>These are your JaegerNote addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>&Copy Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Show &QR Code</source>
<translation>Erakutsi &QR kodea</translation>
</message>
<message>
<location line="+11"/>
<source>Sign a message to prove you own a JaegerNote address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Delete the currently selected address from the list</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Export the data in the current tab to a file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Export</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>Verify a message to ensure it was signed with a specified JaegerNote address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>&Delete</source>
<translation>&Ezabatu</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="-5"/>
<source>These are your JaegerNote addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Copy &Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>&Edit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send &Coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+260"/>
<source>Export Address Book Data</source>
<translation>Esportatu Helbide-liburuaren datuak</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Komaz bereizitako artxiboa (*.csv)</translation>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation>Errorea esportatzean</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>Ezin idatzi %1 artxiboan.</translation>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+144"/>
<source>Label</source>
<translation>Etiketa</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Helbidea</translation>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation>(etiketarik ez)</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation>Sartu pasahitza</translation>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation>Pasahitz berria</translation>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation>Errepikatu pasahitz berria</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="+33"/>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source>
<translation>Sartu zorrorako pasahitz berria.<br/> Mesedez erabili <b>gutxienez ausazko 10 karaktere</b>, edo <b>gutxienez zortzi hitz</b> pasahitza osatzeko.</translation>
</message>
<message>
<location line="+1"/>
<source>Encrypt wallet</source>
<translation>Enkriptatu zorroa</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>Eragiketa honek zorroaren pasahitza behar du zorroa desblokeatzeko.</translation>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation>Desblokeatu zorroa</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>Eragiketa honek zure zorroaren pasahitza behar du, zorroa desenkriptatzeko.</translation>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation>Desenkriptatu zorroa</translation>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation>Aldatu pasahitza</translation>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation>Sartu zorroaren pasahitz zaharra eta berria.</translation>
</message>
<message>
<location line="+46"/>
<source>Confirm wallet encryption</source>
<translation>Berretsi zorroaren enkriptazioa</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR LITECOINS</b>!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+100"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-130"/>
<location line="+58"/>
<source>Wallet encrypted</source>
<translation>Zorroa enkriptatuta</translation>
</message>
<message>
<location line="-56"/>
<source>JaegerNote will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your JaegerNotes from being stolen by malware infecting your computer.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+42"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation>Zorroaren enkriptazioak huts egin du</translation>
</message>
<message>
<location line="-54"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>Zorroaren enkriptazioak huts egin du barne-errore baten ondorioz. Zure zorroa ez da enkriptatu.</translation>
</message>
<message>
<location line="+7"/>
<location line="+48"/>
<source>The supplied passphrases do not match.</source>
<translation>Eman dituzun pasahitzak ez datoz bat.</translation>
</message>
<message>
<location line="-37"/>
<source>Wallet unlock failed</source>
<translation>Zorroaren desblokeoak huts egin du</translation>
</message>
<message>
<location line="+1"/>
<location line="+11"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation>Zorroa desenkriptatzeko sartutako pasahitza okerra da.</translation>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation>Zorroaren desenkriptazioak huts egin du</translation>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="+233"/>
<source>Sign &message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+280"/>
<source>Synchronizing with network...</source>
<translation>Sarearekin sinkronizatzen...</translation>
</message>
<message>
<location line="-349"/>
<source>&Overview</source>
<translation>&Gainbegiratu</translation>
</message>
<message>
<location line="+1"/>
<source>Show general overview of wallet</source>
<translation>Ikusi zorroaren begirada orokorra</translation>
</message>
<message>
<location line="+20"/>
<source>&Transactions</source>
<translation>&Transakzioak</translation>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation>Ikusi transakzioen historia</translation>
</message>
<message>
<location line="+7"/>
<source>Edit the list of stored addresses and labels</source>
<translation>Editatu gordetako helbide eta etiketen zerrenda</translation>
</message>
<message>
<location line="-14"/>
<source>Show the list of addresses for receiving payments</source>
<translation>Erakutsi ordainketak jasotzeko helbideen zerrenda</translation>
</message>
<message>
<location line="+31"/>
<source>E&xit</source>
<translation>Irten</translation>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation>Irten aplikaziotik</translation>
</message>
<message>
<location line="+4"/>
<source>Show information about JaegerNote</source>
<translation>Erakutsi JaegerNote-i buruzko informazioa</translation>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation>&Qt-ari buruz</translation>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation>Erakutsi JaegerNote-i buruzko informazioa</translation>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation>&Aukerak...</translation>
</message>
<message>
<location line="+6"/>
<source>&Encrypt Wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Backup Wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+285"/>
<source>Importing blocks from disk...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Reindexing blocks on disk...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-347"/>
<source>Send coins to a JaegerNote address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Modify configuration options for JaegerNote</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Backup wallet to another location</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation>Aldatu zorroa enkriptatzeko erabilitako pasahitza</translation>
</message>
<message>
<location line="+6"/>
<source>&Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-4"/>
<source>&Verify message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-165"/>
<location line="+530"/>
<source>JaegerNote</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-530"/>
<source>Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+101"/>
<source>&Send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Receive</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>&Addresses</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>&About JaegerNote</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show or hide the main Window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Encrypt the private keys that belong to your wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Sign messages with your JaegerNote addresses to prove you own them</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Verify messages to ensure they were signed with specified JaegerNote addresses</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>&File</source>
<translation>&Artxiboa</translation>
</message>
<message>
<location line="+7"/>
<source>&Settings</source>
<translation>&Ezarpenak</translation>
</message>
<message>
<location line="+6"/>
<source>&Help</source>
<translation>&Laguntza</translation>
</message>
<message>
<location line="+9"/>
<source>Tabs toolbar</source>
<translation>Fitxen tresna-barra</translation>
</message>
<message>
<location line="+17"/>
<location line="+10"/>
<source>[testnet]</source>
<translation>[testnet]</translation>
</message>
<message>
<location line="+47"/>
<source>JaegerNote client</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+141"/>
<source>%n active connection(s) to JaegerNote network</source>
<translation><numerusform>Konexio aktibo %n JaegerNote-en sarera</numerusform><numerusform>%n konexio aktibo JaegerNote-en sarera</numerusform></translation>
</message>
<message>
<location line="+22"/>
<source>No block source available...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Processed %1 blocks of transaction history.</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+20"/>
<source>%n hour(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n week(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>%1 behind</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Last received block was generated %1 ago.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Transactions after this will not yet be visible.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>Error</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+70"/>
<source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-140"/>
<source>Up to date</source>
<translation>Egunean</translation>
</message>
<message>
<location line="+31"/>
<source>Catching up...</source>
<translation>Eguneratzen...</translation>
</message>
<message>
<location line="+113"/>
<source>Confirm transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Sent transaction</source>
<translation>Bidalitako transakzioa</translation>
</message>
<message>
<location line="+0"/>
<source>Incoming transaction</source>
<translation>Sarrerako transakzioa</translation>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+33"/>
<location line="+23"/>
<source>URI handling</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-23"/>
<location line="+23"/>
<source>URI can not be parsed! This can be caused by an invalid JaegerNote address or malformed URI parameters.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation>Zorroa <b>enkriptatuta</b> eta <b>desblokeatuta</b> dago une honetan</translation>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation>Zorroa <b>enkriptatuta</b> eta <b>blokeatuta</b> dago une honetan</translation>
</message>
<message>
<location filename="../bitcoin.cpp" line="+111"/>
<source>A fatal error occurred. JaegerNote can no longer continue safely and will quit.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+104"/>
<source>Network Alert</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation>Editatu helbidea</translation>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation>&Etiketa</translation>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation>Helbide-liburuko sarrera honekin lotutako etiketa</translation>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation>&Helbidea</translation>
</message>
<message>
<location line="+10"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation>Helbide-liburuko sarrera honekin lotutako helbidea. Bidaltzeko helbideeta soilik alda daiteke.</translation>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+21"/>
<source>New receiving address</source>
<translation>Jasotzeko helbide berria</translation>
</message>
<message>
<location line="+4"/>
<source>New sending address</source>
<translation>Bidaltzeko helbide berria</translation>
</message>
<message>
<location line="+3"/>
<source>Edit receiving address</source>
<translation>Editatu jasotzeko helbidea</translation>
</message>
<message>
<location line="+4"/>
<source>Edit sending address</source>
<translation>Editatu bidaltzeko helbidea</translation>
</message>
<message>
<location line="+76"/>
<source>The entered address "%1" is already in the address book.</source>
<translation>Sartu berri den helbidea, "%1", helbide-liburuan dago jadanik.</translation>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid JaegerNote address.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation>Ezin desblokeatu zorroa.</translation>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation>Gako berriaren sorrerak huts egin du.</translation>
</message>
</context>
<context>
<name>GUIUtil::HelpMessageBox</name>
<message>
<location filename="../guiutil.cpp" line="+424"/>
<location line="+12"/>
<source>JaegerNote-Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-12"/>
<source>version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Usage:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>UI options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Start minimized</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show splash screen on startup (default: 1)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../forms/optionsdialog.ui" line="+14"/>
<source>Options</source>
<translation>Aukerak</translation>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Automatically start JaegerNote after logging in to the system.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Start JaegerNote on system login</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Reset all client options to default.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Reset Options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>&Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Automatically open the JaegerNote client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Map port using &UPnP</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Connect to the JaegerNote network through a SOCKS proxy (e.g. when connecting through Tor).</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS proxy:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Proxy &IP:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Port:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Port of the proxy (e.g. 9050)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>SOCKS &Version:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>SOCKS version of the proxy (e.g. 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+36"/>
<source>&Window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting JaegerNote.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Whether to show JaegerNote addresses in the transaction list or not.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Display addresses in transaction list</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+53"/>
<source>default</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+130"/>
<source>Confirm options reset</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Some settings may require a client restart to take effect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Do you want to proceed?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+42"/>
<location line="+9"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting JaegerNote.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>The supplied proxy address is invalid.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation>Inprimakia</translation>
</message>
<message>
<location line="+50"/>
<location line="+166"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the JaegerNote network after a connection is established, but this process has not completed yet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-124"/>
<source>Balance:</source>
<translation>Saldoa:</translation>
</message>
<message>
<location line="+29"/>
<source>Unconfirmed:</source>
<translation>Konfirmatu gabe:</translation>
</message>
<message>
<location line="-78"/>
<source>Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+107"/>
<source>Immature:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+46"/>
<source><b>Recent transactions</b></source>
<translation><b>Azken transakzioak</b></translation>
</message>
<message>
<location line="-101"/>
<source>Your current balance</source>
<translation>Zure uneko saldoa</translation>
</message>
<message>
<location line="+29"/>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source>
<translation>Oraindik konfirmatu gabe daudenez, uneko saldoab kontatu gabe dagoen transakzio kopurua</translation>
</message>
<message>
<location filename="../overviewpage.cpp" line="+116"/>
<location line="+1"/>
<source>out of sync</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>PaymentServer</name>
<message>
<location filename="../paymentserver.cpp" line="+107"/>
<source>Cannot start JaegerNote: click-to-pay handler</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="+14"/>
<source>QR Code Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>Request Payment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation>Kopurua</translation>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation>&Etiketa:</translation>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation>Mezua</translation>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation>Gorde honela...</translation>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="+62"/>
<source>Error encoding URI into QR Code.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>The entered amount is invalid, please check.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Save QR Code</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>PNG Images (*.png)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+23"/>
<location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+36"/>
<location line="+53"/>
<location line="+23"/>
<location line="+23"/>
<location filename="../rpcconsole.cpp" line="+339"/>
<source>N/A</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-217"/>
<source>Client version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Estimated total blocks</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Last block time</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Show the JaegerNote-Qt help message to get a list with possible JaegerNote command-line options.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-260"/>
<source>Build date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-104"/>
<source>JaegerNote - Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>JaegerNote Core</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+279"/>
<source>Debug log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Open the JaegerNote debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+102"/>
<source>Clear console</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../rpcconsole.cpp" line="-30"/>
<source>Welcome to the JaegerNote RPC console.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
<location filename="../sendcoinsdialog.cpp" line="+124"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation>Bidali txanponak</translation>
</message>
<message>
<location line="+50"/>
<source>Send to multiple recipients at once</source>
<translation>Bidali hainbat jasotzaileri batera</translation>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Remove all transaction fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>Balance:</source>
<translation>Saldoa:</translation>
</message>
<message>
<location line="+10"/>
<source>123.456 BTC</source>
<translation>123.456 BTC</translation>
</message>
<message>
<location line="+31"/>
<source>Confirm the send action</source>
<translation>Berretsi bidaltzeko ekintza</translation>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-59"/>
<source><b>%1</b> to %2 (%3)</source>
<translation><b>%1</b> honi: %2 (%3)</translation>
</message>
<message>
<location line="+5"/>
<source>Confirm send coins</source>
<translation>Berretsi txanponak bidaltzea</translation>
</message>
<message>
<location line="+1"/>
<source>Are you sure you want to send %1?</source>
<translation>Ziur zaude %1 bidali nahi duzula?</translation>
</message>
<message>
<location line="+0"/>
<source> and </source>
<translation>eta</translation>
</message>
<message>
<location line="+23"/>
<source>The recipient address is not valid, please recheck.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation>Ordaintzeko kopurua 0 baino handiagoa izan behar du.</translation>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: Transaction creation failed!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="+14"/>
<source>Form</source>
<translation>Inprimakia</translation>
</message>
<message>
<location line="+15"/>
<source>A&mount:</source>
<translation>K&opurua:</translation>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation>Ordaindu &honi:</translation>
</message>
<message>
<location line="+34"/>
<source>The address to send the payment to (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+60"/>
<location filename="../sendcoinsentry.cpp" line="+26"/>
<source>Enter a label for this address to add it to your address book</source>
<translation>Sartu etiketa bat helbide honetarako, eta gehitu zure helbide-liburuan</translation>
</message>
<message>
<location line="-78"/>
<source>&Label:</source>
<translation>&Etiketa:</translation>
</message>
<message>
<location line="+28"/>
<source>Choose address from address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="+7"/>
<source>Paste address from clipboard</source>
<translation>Itsatsi helbidea arbeletik</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+7"/>
<source>Remove this recipient</source>
<translation>Ezabatu jasotzaile hau</translation>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a JaegerNote address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation>Sartu Bitocin helbide bat (adb.: Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2) </translation>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="+14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>&Sign Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>The address to sign the message with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+213"/>
<source>Choose an address from the address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-203"/>
<location line="+213"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="-203"/>
<source>Paste address from clipboard</source>
<translation>Itsatsi helbidea arbeletik</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+12"/>
<source>Enter the message you want to sign here</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Copy the current signature to the system clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Sign the message to prove you own this JaegerNote address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Reset all sign message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-87"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>The address the message was signed with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified JaegerNote address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Verify &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Reset all verify message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a JaegerNote address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation>Sartu Bitocin helbide bat (adb.: Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2) </translation>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Enter JaegerNote signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<location line="+81"/>
<source>The entered address is invalid.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<location line="+8"/>
<location line="+73"/>
<location line="+8"/>
<source>Please check the address and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SplashScreen</name>
<message>
<location filename="../splashscreen.cpp" line="+22"/>
<source>The JaegerNote developers</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>[testnet]</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+20"/>
<source>Open until %1</source>
<translation>Zabalik %1 arte</translation>
</message>
<message>
<location line="+6"/>
<source>%1/offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation>%1/konfirmatu gabe</translation>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation>%1 konfirmazioak</translation>
</message>
<message>
<location line="+18"/>
<source>Status</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation>Data</translation>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<source>From</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<location line="+22"/>
<location line="+58"/>
<source>To</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-77"/>
<location line="+2"/>
<source>own address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Inputs</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Amount</source>
<translation>Kopurua</translation>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-209"/>
<source>, has not been successfully broadcast yet</source>
<translation>, ez da arrakastaz emititu oraindik</translation>
</message>
<message numerus="yes">
<location line="-35"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+70"/>
<source>unknown</source>
<translation>ezezaguna</translation>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.ui" line="+14"/>
<source>Transaction details</source>
<translation>Transakzioaren xehetasunak</translation>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation>Panel honek transakzioaren deskribapen xehea erakusten du</translation>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<location filename="../transactiontablemodel.cpp" line="+225"/>
<source>Date</source>
<translation>Data</translation>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation>Mota</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Helbidea</translation>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation>Kopurua</translation>
</message>
<message numerus="yes">
<location line="+57"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+3"/>
<source>Open until %1</source>
<translation>Zabalik %1 arte</translation>
</message>
<message>
<location line="+3"/>
<source>Offline (%1 confirmations)</source>
<translation>Offline (%1 konfirmazio)</translation>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed (%1 of %2 confirmations)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Confirmed (%1 confirmations)</source>
<translation>Konfirmatuta (%1 konfirmazio)</translation>
</message>
<message numerus="yes">
<location line="+8"/>
<source>Mined balance will be available when it matures in %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+5"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation>Bloke hau ez du beste inongo nodorik jaso, eta seguruenik ez da onartuko!</translation>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation>Sortua, baina ez onartua</translation>
</message>
<message>
<location line="+43"/>
<source>Received with</source>
<translation>Jasoa honekin: </translation>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation>Honi bidalia: </translation>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation>Ordainketa zeure buruari</translation>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation>Bildua</translation>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation>(n/a)</translation>
</message>
<message>
<location line="+199"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation>Transakzioaren egoera. Pasatu sagua gainetik konfirmazio kopurua ikusteko.</translation>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation>Transakzioa jasotako data eta ordua.</translation>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation>Transakzio mota.</translation>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation>Transakzioaren xede-helbidea.</translation>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation>Saldoan kendu edo gehitutako kopurua.</translation>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+52"/>
<location line="+16"/>
<source>All</source>
<translation>Denak</translation>
</message>
<message>
<location line="-15"/>
<source>Today</source>
<translation>Gaur</translation>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation>Aste honetan</translation>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation>Hil honetan</translation>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation>Azken hilean</translation>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation>Aurten</translation>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation>Muga...</translation>
</message>
<message>
<location line="+11"/>
<source>Received with</source>
<translation>Jasota honekin: </translation>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation>Hona bidalia: </translation>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation>Zeure buruari</translation>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation>Bildua</translation>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation>Beste</translation>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation>Sartu bilatzeko helbide edo etiketa</translation>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation>Kopuru minimoa</translation>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation>Kopiatu helbidea</translation>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation>Kopiatu etiketa</translation>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+139"/>
<source>Export Transaction Data</source>
<translation>Transakzioaren xehetasunak</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Komaz bereizitako artxiboa (*.csv)</translation>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation>Data</translation>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation>Mota</translation>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation>Etiketa</translation>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation>Helbidea</translation>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation>Kopurua</translation>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation>Errorea esportatzean</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>Ezin idatzi %1 artxiboan.</translation>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+193"/>
<source>Send Coins</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>WalletView</name>
<message>
<location filename="../walletview.cpp" line="+42"/>
<source>&Export</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Export the data in the current tab to a file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+193"/>
<source>Backup Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Wallet Data (*.dat)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Backup Failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Backup Successful</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The wallet data was successfully saved to the new location.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+94"/>
<source>JaegerNote version</source>
<translation>Botcoin bertsioa</translation>
</message>
<message>
<location line="+102"/>
<source>Usage:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-29"/>
<source>Send command to -server or JaegerNoted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-23"/>
<source>List commands</source>
<translation>Komandoen lista</translation>
</message>
<message>
<location line="-12"/>
<source>Get help for a command</source>
<translation>Laguntza komando batean</translation>
</message>
<message>
<location line="+24"/>
<source>Options:</source>
<translation>Aukerak</translation>
</message>
<message>
<location line="+24"/>
<source>Specify configuration file (default: JaegerNote.conf)</source>
<translation>Ezarpen fitxategia aukeratu (berezkoa: JaegerNote.conf)</translation>
</message>
<message>
<location line="+3"/>
<source>Specify pid file (default: JaegerNoted.pid)</source>
<translation>pid fitxategia aukeratu (berezkoa: JaegerNoted.pid)</translation>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-9"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-28"/>
<source>Listen for connections on <port> (default: 9333 or testnet: 19333)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-48"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<source>Specify your own public address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-134"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-29"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Listen for JSON-RPC connections on <port> (default: 9332 or testnet: 19332)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<source>Accept command line and JSON-RPC commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+76"/>
<source>Run in the background as a daemon and accept commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<source>Use the test network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-112"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-80"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=JaegerNoterpc
rpcpassword=%s
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %%s | mail -s "JaegerNote Alert" admin@foo.com
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Cannot obtain a lock on data directory %s. JaegerNote is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong JaegerNote will not work properly.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Block creation options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Connect only to the specified node(s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Corrupted block database detected</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Do you want to rebuild the block database now?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error initializing block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error initializing wallet database environment %s!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error loading block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error opening block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error: Disk space is low!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error: Wallet locked, unable to create transaction!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error: system error: </source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to read block info</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to read block</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to sync block index</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write block index</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write block info</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write block</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write file info</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write to coin database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write transaction index</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write undo data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Find peers using DNS lookup (default: 1 unless -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Generate coins (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>How many blocks to check at startup (default: 288, 0 = all)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>How thorough the block verification is (0-4, default: 3)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Not enough file descriptors available.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Rebuild block chain index from current blk000??.dat files</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Set the number of threads to service RPC calls (default: 4)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+26"/>
<source>Verifying blocks...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Verifying wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-69"/>
<source>Imports blocks from external blk000??.dat file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-76"/>
<source>Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+77"/>
<source>Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Invalid -tor address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -minrelaytxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -mintxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Maintain a full transaction index (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Only accept block chain matching built-in checkpoints (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Output extra debugging information. Implies all other -debug* options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Output extra network debugging information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Prepend debug output with timestamp</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>SSL options: (see the JaegerNote Wiki for SSL setup instructions)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send trace/debug info to debugger</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Signing transaction failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>System error: </source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Transaction amount too small</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transaction amounts must be positive</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transaction too large</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Username for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>You need to rebuild the databases using -reindex to change -txindex</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-50"/>
<source>Password for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-67"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+76"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-120"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+147"/>
<source>Upgrade wallet to latest format</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-21"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-12"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-26"/>
<source>Server certificate file (default: server.cert)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-151"/>
<source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+165"/>
<source>This help message</source>
<translation>Laguntza mezu hau</translation>
</message>
<message>
<location line="+6"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-91"/>
<source>Connect through socks proxy</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-10"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+55"/>
<source>Loading addresses...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-35"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat: Wallet requires newer version of JaegerNote</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+93"/>
<source>Wallet needed to be rewritten: restart JaegerNote to complete</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-95"/>
<source>Error loading wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Invalid -proxy address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+56"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Unknown -socks proxy version requested: %i</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-96"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Invalid amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-6"/>
<source>Insufficient funds</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Loading block index...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-57"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-25"/>
<source>Unable to bind to %s on this computer. JaegerNote is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+64"/>
<source>Fee per KB to add to transactions you send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Loading wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-52"/>
<source>Cannot downgrade wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Cannot write default address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+64"/>
<source>Rescanning...</source>
<translation>Birbilatzen...</translation>
</message>
<message>
<location line="-57"/>
<source>Done loading</source>
<translation>Zamaketa amaitua</translation>
</message>
<message>
<location line="+82"/>
<source>To use the %s option</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-74"/>
<source>Error</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-31"/>
<source>You must set rpcpassword=<password> in the configuration file:
%s
If the file does not exist, create it with owner-readable-only file permissions.</source>
<translation type="unfinished"/>
</message>
</context>
</TS> | mit |
or9/echelon-polymer | gulpfile.js | 2370 | const gulp = require("gulp");
const jshint = require("gulp-jshint");
const stylish = require("jshint-stylish");
const uglify = require("gulp-uglify");
const concat = require("gulp-concat");
const serve = require("gulp-serve");
const karma = require("gulp-karma");
const path = {
in: "app",
out: "dist",
test: "test",
bower: "components/bower_components"
};
const testFiles = [
path.out + "/**/*.js",
"!" + path.out + "/vendor/**/*",
path.test + "/spec/*.spec.js",
path.test + "/fixture/*.fixture.js"
];
gulp.task("jshint", function() {
"use strict";
return gulp.src(path.in + "**/*.js")
.pipe(jshint())
.pipe(jshint.reporter(stylish));
});
gulp.task("clean", function() {
"use strict";
return gulp.src(path.out, { read: false })
.pipe(clean());
});
gulp.task("copy", function() {
"use strict";
return gulp.src(path.in)
.pipe(gulp.dest(path.out));
});
gulp.task("minify", function() {
"use strict";
gulp.src([
path.out + "/**/*.js",
"!" + path.out + "/" + path.bower
])
.pipe(uglify(getUglifyOptions()))
.pipe(gulp.dest(path.out));
});
gulp.task("concat", function() {
gulp.src([path.out + "/scripts/**/*.js",
.pipe(concat({ path: "app.js", stat: { mode: 0666 }}))
//.pipe(concat("app.js"))
.pipe(gulp.dest(path.out));
// octet literals not allowed in strict mode, so added quotes
});
gulp.task("test", function() {
"use strict";
return gulp.src(testFiles)
.pipe(karma({
configFile: "karma.conf.js",
action: "run"
}))
.on("error", function errorHandler(err) {
// force gulp exit non 0
throw err;
});
});
gulp.task("serve", serve(path.out));
gulp.task("watch", function() {
"use strict";
karma.server.start({
configFile: "karma.conf.js",
autoWatch: true
});
gulp.watch(testFiles, ["jshint"]);
});
gulp.task("build", [
"clean",
"copy",
"minify",
"concat",
"test"
], function() {
"use strict";
// after build task
});
gulp.task("default", [
"clean",
"copy",
"jshint",
"minify",
"concat",
"serve"
], function afterDefault() {
"use strict";
gulp.src(testFiles)
.pipe(karma({
configFile: "karma.conf.js",
action: "watch"
}));
});
function getUglifyOptions() {
"use strict";
return {
output: {
beautify: true,
width: 240,
max_line_len: 240,
//ie_proof: false,
source_map: path.out
},
preserveComments: "some"
};
}
| mit |
ponydevs/MLPVC-RR | app/TMDBHelper.php | 3044 | <?php
namespace App;
use App\Models\Show;
use Doctrine\Common\Cache\RedisCache;
use RuntimeException;
use Tmdb\ApiToken;
use Tmdb\Client;
use Tmdb\Exception\TmdbApiException;
use Tmdb\Helper\ImageHelper;
use Tmdb\Repository\ConfigurationRepository;
class TMDBHelper {
public const SHOW_NAME = 'My Little Pony: Friendship Is Magic';
public const SHOW_ID_CACHE_KEY = 'tmdb_show_id';
public const REQUIRED_MESSAGE = 'This product uses the TMDb API but is not endorsed or certified by TMDb.';
/**
* @var Client|null
*/
private static $client;
public static function apiKeyConfigured():bool {
return !empty(CoreUtils::env('TMDB_API_KEY'));
}
public static function getClient():Client {
if (!self::apiKeyConfigured())
throw new RuntimeException(__METHOD__.' called without a configured TMDb API key');
if (self::$client === null){
$token = new ApiToken(CoreUtils::env('TMDB_API_KEY'));
$cache_handler = new RedisCache();
$cache_handler->setRedis(RedisHelper::getInstance());
self::$client = new Client($token, [
'cache' => ['handler' => $cache_handler],
]);
}
return self::$client;
}
/**
* @param Client $client
*
* @return int
* @throws RuntimeException
*/
public static function getShowId(Client $client = null):int {
if ($client === null)
$client = self::getClient();
$cached_id = RedisHelper::get(self::SHOW_ID_CACHE_KEY);
if (empty($cached_id)){
$shows = $client->getSearchApi()->searchTv(self::SHOW_NAME);
if (empty($shows['results'][0]) || $shows['results'][0]['name'] !== self::SHOW_NAME)
throw new RuntimeException("Could not find MLP:FiM on TMDB, query results:\n".var_export($shows, true));
$cached_id = (int)$shows['results'][0]['id'];
RedisHelper::set(self::SHOW_ID_CACHE_KEY, $cached_id, null);
}
return $cached_id;
}
public static function getEpisodes(Client $client, Show $ep):array {
$parts = $ep->parts;
$eps = [];
for ($i = 0; $i < $parts; $i++){
$data = self::getEpisode($client, $ep->season, $ep->episode + $i);
if ($data !== null)
$eps[] = $data;
}
return $eps;
}
public static function getEpisode(Client $client, int $season, int $episode):?array {
try {
$ep_data = $client->getTvEpisodeApi()->getEpisode(self::getShowId($client), $season, $episode);
}
catch (TmdbApiException $e){
$response = $e->getResponse();
if ($response && $response->getCode() === 404)
return null;
}
if (empty($ep_data))
throw new RuntimeException("Could not find S{$season}E{$episode} on TMDB, query results:\n".var_export($ep_data, true));
return empty($ep_data['overview']) ? null : $ep_data;
}
public static function getImageUrl(Client $client, string $path):string {
$conf_rep = new ConfigurationRepository($client);
$config = $conf_rep->load();
$helper = new ImageHelper($config);
return 'https://'.$helper->getUrl($path, 'w300');
}
}
| mit |
sbuberl/fSQL | src/Queries/AlterTableActions/DropIdentity.php | 860 | <?php
namespace FSQL\Queries\AlterTableActions;
use FSQL\Environment;
class DropIdentity extends BaseAction
{
private $tableName;
private $columnName;
public function __construct(Environment $environment, array $tableName, $columnName)
{
parent:: __construct($environment);
$this->tableName = $tableName;
$this->columnName = $columnName;
}
public function execute()
{
$table = $this->environment->find_table($this->tableName);
if ($table === false) {
return false;
}
$columns = $table->getColumns();
$column = $columns[$this->columnName];
if (!$column['auto']) {
return $this->environment->set_error("Column {$this->columnName} is not an identity column");
}
$table->dropIdentity();
return true;
}
}
| mit |
mrpotatoes/computer-science-in-javascript | src/streams/stream-handbook/example/writable.js | 407 | var Stream = require('stream');
var s = new Stream;
s.writable = true;
var bytes = 0;
s.write = function (buf) {
bytes += buf.length;
};
s.end = function (buf) {
if (arguments.length) s.write(buf);
s.writable = false;
console.log(bytes + ' bytes written');
};
s.destroy = function () {
s.writable = false;
};
var fs = require('fs');
fs.createReadStream('/etc/passwd').pipe(s);
| mit |
conveyal/static-site-debugger | index.js | 53 | require('babel-core/register')
require('./index-es6') | mit |
baraabourghli/MarketplaceInterview | Marketplace.Interview/Marketplace.Interview.Business/Shipping/BundledPerRegionShipping.cs | 286 | using System.Collections.Generic;
using System.Linq;
using Marketplace.Interview.Business.Basket;
namespace Marketplace.Interview.Business.Shipping
{
public class BundledPerRegionShipping : BasePerRegionShipping
{
public static decimal DiscountAmount = 0.5M;
}
} | mit |
tsnow/ridecharge-rubocop | spec/rubocop/cop/lint/ambiguous_operator_spec.rb | 2773 | # encoding: utf-8
require 'spec_helper'
describe Rubocop::Cop::Lint::AmbiguousOperator do
subject(:cop) { described_class.new }
before do
inspect_source(cop, source)
end
context 'with a splat operator in the first argument' do
context 'without parentheses' do
context 'without whitespaces on the right of the operator' do
let(:source) do
[
'array = [1, 2, 3]',
'puts *array'
]
end
it 'registers an offence' do
expect(cop.offences.size).to eq(1)
expect(cop.offences.first.message).to eq(
'Ambiguous splat operator. ' \
"Parenthesize the method arguments if it's surely a splat " +
'operator, ' +
'or add a whitespace to the right of the * if it should be a ' +
'multiplication.'
)
expect(cop.highlights).to eq(['*'])
end
end
context 'with a whitespace on the right of the operator' do
let(:source) do
[
'array = [1, 2, 3]',
'puts * array'
]
end
it 'accepts' do
expect(cop.offences).to be_empty
end
end
end
context 'with parentheses' do
let(:source) do
[
'array = [1, 2, 3]',
'puts(*array)'
]
end
it 'accepts' do
expect(cop.offences).to be_empty
end
end
end
context 'with a block ampersand in the first argument' do
context 'without parentheses' do
context 'without whitespaces on the right of the operator' do
let(:source) do
[
'process = proc { do_something }',
'2.times &process'
]
end
it 'registers an offence' do
expect(cop.offences.size).to eq(1)
expect(cop.offences.first.message).to eq(
'Ambiguous block operator. ' \
"Parenthesize the method arguments if it's surely a block " +
'operator, ' +
'or add a whitespace to the right of the & if it should be a ' +
'binary AND.'
)
expect(cop.highlights).to eq(['&'])
end
end
context 'with a whitespace on the right of the operator' do
let(:source) do
[
'process = proc { do_something }',
'2.times & process'
]
end
it 'accepts' do
expect(cop.offences).to be_empty
end
end
end
context 'with parentheses' do
let(:source) do
[
'process = proc { do_something }',
'2.times(&process)'
]
end
it 'accepts' do
expect(cop.offences).to be_empty
end
end
end
end
| mit |
trenoncourt/generic-net | sample/ApiTest/Data/Tables/TableBase.cs | 110 | namespace ApiTest.Data.Tables
{
public interface ITable
{
string TableName { get; }
}
} | mit |
james-jenkinson/tango-atlas | src/test/components/fom/LinkButton.test.tsx | 233 | import { shallow } from "enzyme";
import * as React from "react";
import LinkButton from "../../../components/form/LinkButton";
describe("LinkButton", () => {
it("should render", () => {
shallow(<LinkButton to=""/>);
});
}); | mit |
no22/PicowaCore | _pico/libs/Pw/Wrapper/Post.php | 202 | <?php
/**
* Picowa $_POST wrapper
*
* @package Picowa
* @since 2010-04-06
*/
class Pw_Wrapper_Post extends Pw_Wrapper_Array
{
public function __construct()
{
$this->subject = &$_POST;
}
}
| mit |
peasy/Samples | Orders.com.BLL/Services/IProductService.cs | 270 | using System.Collections.Generic;
using Orders.com.BLL.Domain;
using Peasy;
namespace Orders.com.BLL.Services
{
public interface IProductService : IService<Product, long>
{
ICommand<IEnumerable<Product>> GetByCategoryCommand(long categoryID);
}
} | mit |
fellix/collect4j | src/main/java/com/rollingwithcode/collect/CompareHandler.java | 2221 | /**
*
*/
package com.rollingwithcode.collect;
import java.util.Collection;
import com.rollingwithcode.collect.comparator.CollectComparator;
import com.rollingwithcode.collect.comparator.EqualsComparator;
import com.rollingwithcode.collect.comparator.LikeComparator;
import com.rollingwithcode.collect.comparator.OnlyComparator;
/**
* Used to make compare using values
* @author Rafael Felix da Silva
* @version 1.0
* @since 0.1-snaphost
*/
public class CompareHandler<E> {
private Object[] fields;
private Collection<E> collection;
/**
* Defaults construtor
* @param fields to filter
* @param collection to eval
* @since 1.0
*/
public CompareHandler(Object[] fields, Collection<E> collection) {
super();
this.fields = fields;
this.collection = collection;
}
/**
* Compare object with when same (equals)
* @param values for each fields
* @return new Collection (ArrayList) with the filter
* @since 1.0
* @see #compare(CollectComparator, Object...)
* @see EqualsComparator
*/
public Collection<E> eql(Object...values){
return compare(new EqualsComparator<E>(), values);
}
/**
* Generic method for custom compare
* @param comparator the Comparator implementation
* @param values passed as parameters
* @return Collection for the result
* @since 1.0
* @see CollectComparator#compare(Collection, Object[], Object[])
*/
public Collection<E> compare(CollectComparator<E> comparator, Object...values){
return comparator.compare(collection, fields, values);
}
/**
* Compare using like.
* @param values for each fields
* @return new Collection (ArrayList) with the filter
* @since 1.0
* @see LikeComparator
* @throws CollectException
* @see #compare(CollectComparator, Object...)
*/
public Collection<E> like(Object...values){
return compare(new LikeComparator<E>(), values);
}
/**
* Compare if any field is equals to all values.
* @param values for each fields
* new Collection (ArrayList) with the filter
* @since 1.0
* @see OnlyComparator
* @see #compare(CollectComparator, Object...)
* @throws CollectException
*/
public Collection<E> only(Object...values){
return compare(new OnlyComparator<E>(), values);
}
}
| mit |
flavour/cedarbluff | controllers/inv.py | 47642 | # -*- coding: utf-8 -*-
"""
Inventory Management
A module to record inventories of items at a locations (sites),
including Warehouses, Offices, Shelters & Hospitals
"""
module = request.controller
resourcename = request.function
if not deployment_settings.has_module(module):
raise HTTP(404, body="Module disabled: %s" % module)
# -----------------------------------------------------------------------------
def index():
"""
Application Home page
- custom View
"""
# Load models
s3mgr.load("cr_shelter") # Need CRUD String
module_name = deployment_settings.modules[module].name_nice
response.title = module_name
return dict(module_name=module_name)
# =============================================================================
def office():
"""
Required to ensure the tabs work from req_match
"""
return warehouse()
def warehouse():
"""
RESTful CRUD controller
Filtered version of the org_office resource
"""
module = "org"
resourcename = "office"
tablename = "org_office"
table = s3db[tablename]
s3mgr.load("inv_inv_item")
if "viewing" in request.get_vars:
viewing = request.get_vars.viewing
tn, record = viewing.split(".", 1)
if tn == "org_office":
request.args.insert(0, record)
s3.crud_strings[tablename] = s3.org_warehouse_crud_strings
# Type is Warehouse
table.type.default = 5 # Warehouse
table.type.writable = False
# Only show warehouses
response.s3.filter = (table.type == 5)
# Remove type from list_fields
list_fields = s3mgr.model.get_config(tablename, "list_fields")
try:
list_fields.remove("type")
except:
# Already removed
pass
s3mgr.configure(tablename, list_fields=list_fields)
warehouse_search = s3base.S3Search(
advanced=(s3base.S3SearchSimpleWidget(
name="warehouse_search_text",
label=T("Search"),
comment=T("Search for warehouse by text."),
field=["name","comments", "email"]
),
s3base.S3SearchOptionsWidget(
name="warehouse_search_org",
label=T("Organization"),
comment=T("Search for warehouse by organization."),
field=["organisation_id"],
represent ="%(name)s",
cols = 3
),
s3base.S3SearchLocationHierarchyWidget(
name="warehouse_search_location",
comment=T("Search for warehouse by location."),
represent ="%(name)s",
cols = 3
),
s3base.S3SearchLocationWidget(
name="warehouse_search_map",
label=T("Map"),
),
))
s3mgr.configure(tablename,
search_method = warehouse_search)
# CRUD pre-process
def prep(r):
if r.interactive and r.tablename == "org_office":
if r.method != "read":
# Don't want to see in Create forms
# inc list_create (list_fields over-rides)
r.table.obsolete.writable = False
r.table.obsolete.readable = False
address_hide(table)
# Process Base Location
#s3mgr.configure(table._tablename,
# onaccept=address_onaccept)
if r.component:
if r.component.name == "inv_item":
# Filter out items which are already in this inventory
s3db.inv_prep(r)
# Remove the Warehouse Name from the list_fields
list_fields = s3mgr.model.get_config("inv_inv_item", "list_fields")
try:
list_fields.remove("site_id")
s3mgr.configure("inv_inv_item", list_fields=list_fields)
except:
pass
elif r.component.name == "recv" or \
r.component.name == "send":
# Filter out items which are already in this inventory
s3db.inv_prep(r)
elif r.component.name == "human_resource":
# Filter out people which are already staff for this warehouse
s3_filter_staff(r)
# Cascade the organisation_id from the hospital to the staff
htable = s3db.hrm_human_resource
htable.organisation_id.default = r.record.organisation_id
htable.organisation_id.writable = False
elif r.component.name == "req":
s3db.req_prep(r)
if r.method != "update" and r.method != "read":
# Hide fields which don't make sense in a Create form
# inc list_create (list_fields over-rides)
s3db.req_create_form_mods()
# "show_obsolete" var option can be added (btn?) later to
# disable this filter
if r.method in [None, "list"] and \
not r.vars.get("show_obsolete", False):
r.resource.add_filter((s3db.org_office.obsolete != True))
return True
response.s3.prep = prep
# CRUD post-process
def postp(r, output):
if r.interactive and not r.component and r.method != "import":
# Change Action buttons to open Stock Tab by default
read_url = URL(f="warehouse", args=["[id]", "inv_item"])
update_url = URL(f="warehouse", args=["[id]", "inv_item"])
s3mgr.crud.action_buttons(r,
read_url=read_url,
update_url=update_url)
if "add_btn" in output:
del output["add_btn"]
return output
response.s3.postp = postp
rheader = response.s3.inv_warehouse_rheader
if "extra_data" in request.get_vars:
csv_template = "inv_item"
module = "inv"
resourcename = "inv_item"
else:
csv_template = "warehouse"
csv_stylesheet = "%s.xsl" % csv_template
output = s3_rest_controller(module, resourcename,
rheader=rheader,
csv_template = csv_template,
csv_stylesheet = csv_stylesheet,
# Extra fields for CSV uploads:
csv_extra_fields = [
dict(label="Organisation",
field=s3db.org_organisation_id(comment=None))
])
return output
# =============================================================================
def incoming():
""" Incoming Shipments """
# Defined in the Model for use from Multiple Controllers for unified menus
return inv_incoming()
# =============================================================================
def req_match():
""" Match Requests """
return s3db.req_match()
# =============================================================================
def inv_item():
""" REST Controller """
table = s3db.inv_inv_item
# Upload for configuration (add replace option)
response.s3.importerPrep = lambda: dict(ReplaceOption=T("Remove existing data before import"))
# Import pre-process
def import_prep(data):
"""
Deletes all Stock records of the organisation
before processing a new data import, used for the import_prep
hook in s3mgr
"""
request = current.request
resource, tree = data
xml = s3mgr.xml
tag = xml.TAG
att = xml.ATTRIBUTE
if response.s3.importerReplace:
if tree is not None:
root = tree.getroot()
expr = "/%s/%s[@%s='org_organisation']/%s[@%s='name']" % \
(tag.root, tag.resource, att.name, tag.data, att.field)
orgs = root.xpath(expr)
otable = s3db.org_organisation
stable = s3db.org_site
itable = s3db.inv_inv_item
for org in orgs:
org_name = org.get("value", None) or org.text
if org_name:
try:
org_name = json.loads(s3mgr.xml.xml_decode(org_name))
except:
pass
if org_name:
query = (otable.name == org_name) & \
(stable.organisation_id == otable.id) & \
(itable.site_id == stable.id)
resource = s3mgr.define_resource("inv", "inv_item", filter=query)
ondelete = s3mgr.model.get_config("inv_inv_item", "ondelete")
resource.delete(ondelete=ondelete, format="xml")
resource.skip_import = True
s3mgr.import_prep = import_prep
# Limit site_id to sites the user has permissions for
auth.permission.permitted_facilities(table=table,
error_msg=T("You do not have permission for any site to add an inventory item."))
# remove CRUD generated buttons in the tabs
s3mgr.configure("inv_inv_item",
create=False,
listadd=False,
editable=False,
deletable=False,
)
rheader = response.s3.inv_warehouse_rheader
output = s3_rest_controller("inv",
"inv_item",
rheader=rheader,
csv_extra_fields = [
dict(label="Organisation",
field=s3db.org_organisation_id(comment=None)
)
],
interactive_report = True
)
if "add_btn" in output:
del output["add_btn"]
return output
# -----------------------------------------------------------------------------
def inv_item_quantity():
"""
"""
table = s3db.inv_inv_item
ptable = s3db.supply_item_pack
query = (table.id == request.args[0]) & \
(table.item_pack_id == ptable.id)
record = db(query).select(table.quantity,
ptable.quantity,
limitby=(0, 1)).first()
response.headers["Content-Type"] = "application/json"
return json.dumps(record)
# -----------------------------------------------------------------------------
def inv_item_packs():
"""
Called by S3FilterFieldChange to provide the pack options for a
particular Item
"""
table = s3db.inv_inv_item
ptable = s3db.supply_item_pack
query = (table.id == request.args[0]) & \
(table.item_id == ptable.item_id)
records = db(query).select(ptable.id,
ptable.name,
ptable.quantity)
response.headers["Content-Type"] = "application/json"
return records.json()
# =============================================================================
def send():
""" RESTful CRUD controller """
s3mgr.load("inv_send")
s3db = current.s3db
db = current.db
auth = current.auth
request = current.request
response = current.response
s3 = response.s3
tablename = "inv_send"
table = s3db.inv_send
# Limit site_id to sites the user has permissions for
error_msg = T("You do not have permission for any facility to send a shipment.")
auth.permission.permitted_facilities(table=table,
error_msg=error_msg)
# Set Validator for checking against the number of items in the warehouse
vars = request.vars
if (vars.send_stock_id):
s3db.inv_track_item.quantity.requires = QUANTITY_INV_ITEM(db,
vars.send_stock_id,
vars.item_pack_id)
def prep(r):
# Default to the Search tab in the location selector
response.s3.gis.tab = "search"
if r.component:
# Can only create or delete track items for a send record if the status is preparing
if r.method == "create" or r.method == "delete":
record = table[r.id]
if record.status != 1:
return False
if r.method == "delete":
return s3.inv_track_item_deleting(r.component_id)
if r.record.get("site_id"):
# Restrict to items from this warehouse only
tracktable = s3db.inv_track_item
comp_rec = tracktable[r.component_id]
tracktable.send_stock_id.requires = IS_ONE_OF(db,
"inv_inv_item.id",
s3db.inv_item_represent,
orderby="inv_inv_item.id",
sort=True,
filterby = "site_id",
filter_opts = [r.record.site_id]
)
# Hide the values that will be copied from the inv_inv_item record
if comp_rec and comp_rec.get("req_item_id"):
tracktable.item_id.readable = True
else:
tracktable.item_id.readable = False
tracktable.item_id.writable = False
tracktable.item_source_no.readable = False
tracktable.item_source_no.writable = False
tracktable.expiry_date.readable = False
tracktable.expiry_date.writable = False
tracktable.bin.readable = False
tracktable.bin.writable = False
tracktable.supply_org_id.readable = False
tracktable.supply_org_id.writable = False
# Hide the link to the receive and adjustment records
tracktable.recv_id.readable = False
tracktable.recv_id.writable = False
tracktable.adj_item_id.readable = False
tracktable.adj_item_id.writable = False
if r.interactive:
SHIP_STATUS_IN_PROCESS = s3db.inv_ship_status["IN_PROCESS"]
SHIP_STATUS_SENT = s3db.inv_ship_status["SENT"]
if r.record.status == SHIP_STATUS_IN_PROCESS:
s3.crud_strings.inv_send.title_update = \
s3.crud_strings.inv_send.title_display = T("Process Shipment to Send")
elif "site_id" in request.vars and r.record.status == SHIP_STATUS_SENT:
s3.crud_strings.inv_send.title_update = \
s3.crud_strings.inv_send.title_display = T("Review Incoming Shipment to Receive")
return True
if len(request.args) > 1 and request.args[1] == "track_item" and table[request.args[0]].status:
# remove CRUD generated buttons in the tabs
s3mgr.configure("inv_track_item",
create=False,
listadd=False,
editable=False,
deletable=False,
)
response.s3.prep = prep
output = s3_rest_controller("inv",
"send",
rheader=s3.inv_send_rheader,
)
return output
# ==============================================================================
def prepare_commit():
""" RESTful CRUD controller """
s3mgr.load("inv_send")
s3db = current.s3db
db = current.db
auth = current.auth
request = current.request
response = current.response
s3 = response.s3
# Get the commit and request records
if len(request.args) > 0:
commit_id = request.args[0]
else:
redirect(URL(c = "req",
f = "commit",
)
)
req_table = s3db.req_req
rim_table = s3db.req_req_item
com_table = s3db.req_commit
cim_table = s3db.req_commit_item
send_table = s3db.inv_send
track_table = s3db.inv_track_item
query = (com_table.id == commit_id) & \
(com_table.req_id == req_table.id) & \
(com_table.deleted == False)
record = db(query).select(limitby = (0, 1)).first()
# create a inv_send and link to the commit
send_id = send_table.insert(sender_id = record.req_commit.committer_id,
site_id = record.req_commit.site_id,
recipient_id = record.req_req.requester_id,
to_site_id = record.req_req.site_id,
status = 0)
# get all of the committed items
query = (cim_table.commit_id == commit_id) & \
(cim_table.req_item_id == rim_table.id) & \
(cim_table.deleted == False)
records = db(query).select()
# create inv_track_items for each commit item
for row in records:
id = track_table.insert(track_org_id = record.req_commit.organisation_id,
send_id = send_id,
status = 1,
item_id = row.req_req_item.item_id,
item_pack_id = row.req_req_item.item_pack_id,
quantity = row.req_commit_item.quantity,
currency = row.req_req_item.currency,
req_item_id = row.req_req_item.id)
track_table(track_table.id == id).update(tracking_no = "TN:%6d" % (10000 + id))
# redirect to inv_send for the send id just created
redirect(URL(c = "inv",
f = "send",
args = [send_id, "track_item"]))
# -----------------------------------------------------------------------------
def send_process():
""" Send a Shipment """
send_id = request.args[0]
stable = s3db.inv_send
tracktable = s3db.inv_track_item
ritable = s3db.req_req_item
otable = s3db.org_office
if not auth.s3_has_permission("update",
stable,
record_id=send_id):
session.error = T("You do not have permission to send this shipment.")
send_record = stable[send_id]
if send_record.status != eden.inv.inv_ship_status["IN_PROCESS"]:
session.error = T("This shipment has already been sent.")
# Get the track items that are part of this shipment
query = ( tracktable.send_id == send_id ) & \
(tracktable.deleted == False)
track_items = db(query).select()
if not track_items:
session.error = T("No items have been selected for shipping.")
if session.error:
redirect(URL(c = "inv",
f = "send",
args = [send_id]))
# Update Send record & lock for editing
stable[send_id] = dict(date = request.utcnow,
status = eden.inv.inv_ship_status["SENT"],
owned_by_user = None,
owned_by_group = ADMIN)
# if this is linked to a request then update the quantity in transit
for track_item in track_items:
if track_item.req_item_id:
db(ritable.id == track_item.req_item_id).update(quantity_transit = ritable.quantity_transit + track_item.quantity)
# Create a Receive record
recv_id = s3db.inv_recv.insert(sender_id = send_record.sender_id,
tracking_no = send_record.tracking_no,
from_site_id = send_record.site_id,
eta = send_record.delivery_date,
recipient_id = send_record.recipient_id,
site_id = send_record.to_site_id,
comments = send_record.comments,
status = eden.inv.inv_ship_status["SENT"],
type = 1, # 1:"Another Inventory"
)
# Change the status for all track items in this shipment to In transit
# and link to the receive record
db(tracktable.send_id == send_id).update(status = 2,
recv_id = recv_id)
session.confirmation = T("Shipment Items sent from Warehouse")
# Go to the Site which has sent these items
site_id = send_record.site_id
(prefix, resourcename, id) = s3mgr.model.get_instance(s3db.org_site,
site_id)
query = (otable.id == id)
otype = db(query).select(otable.type, limitby = (0, 1)).first()
if otype and otype.type == 5:
url = URL(c = "inv",
f = "warehouse",
args = [id, "inv_item"])
else:
url = URL(c = "org",
f = "office",
args = [id, "inv_item"])
redirect(url)
# -----------------------------------------------------------------------------
def send_cancel():
"""
This will cancel a shipment that has been sent
@todo need to roll back commitments
"""
send_id = request.args[0]
stable = s3db.inv_send
rtable = s3db.inv_recv
tracktable = s3db.inv_track_item
if not auth.s3_has_permission("delete",
stable,
record_id=send_id):
session.error = T("You do not have permission to cancel this sent shipment.")
send_record = stable[send_id]
if send_record.status != eden.inv.inv_ship_status["SENT"]:
session.error = T("This shipment has not been sent - it has NOT been canceled because can still be edited.")
if session.error:
redirect(URL(c = "inv",
f = "send",
args = [send_id],
)
)
# Okay no error so far, let's delete that baby
# Change the send and recv status to cancelled
stable[send_id] = dict(date = request.utcnow,
status = eden.inv.inv_ship_status["CANCEL"],
owned_by_user = None,
owned_by_group = ADMIN)
recv_row = db(tracktable.send_id == send_id).select(tracktable.recv_id,
limitby = (0, 1)).first()
if recv_row:
recv_id = recv_row.recv_id
rtable[recv_id] = dict(date = request.utcnow,
status = eden.inv.inv_ship_status["CANCEL"],
owned_by_user = None,
owned_by_group = ADMIN)
# Change the track items status to canceled and then delete them
# If they are linked to a request then the in transit total will also be reduced
# Records can only be deleted if the status is 1 (prepare)
# so change the status before we delete
db(tracktable.send_id == send_id).update(status = 1)
track_rows = db(tracktable.send_id == send_id).select(tracktable.id)
for track_item in track_rows:
s3.inv_track_item_deleting(track_item.id)
# Now change the status to 4 (cancelled)
db(tracktable.send_id == send_id).update(status = 4)
session.confirmation = T("Sent Shipment canceled and items returned to Warehouse")
redirect(URL(c = "inv",
f = "send",
args = [send_id]))
# =============================================================================
def recv():
""" RESTful CRUD controller """
s3mgr.load("inv_recv")
s3mgr.load("inv_adj_item")
tablename = "inv_recv"
table = s3db.inv_recv
# Limit site_id to sites the user has permissions for
if deployment_settings.get_inv_shipment_name() == "order":
error_msg = T("You do not have permission for any facility to add an order.")
else:
error_msg = T("You do not have permission for any facility to receive a shipment.")
auth.permission.permitted_facilities(table=table,
error_msg=error_msg)
# The inv_recv record might be created when the shipment is send and so it
# might not have the recipient identified. If it is null then set it to
# the person who is logged in (the default)
if len(request.args) > 0:
try:
id = request.args[0]
if table[id].recipient_id == None:
db(table.id == id).update(recipient_id = auth.s3_logged_in_person())
except:
pass
def prep(r):
if r.component:
record = table[r.id]
# Can only create or delete track items for a recv record if the status is preparing
if r.method == "create" or r.method == "delete":
if record.status != 1:
return False
tracktable = s3db.inv_track_item
# Hide the link to the send and adjustment records
tracktable.send_id.readable = False
tracktable.send_id.writable = False
tracktable.recv_id.readable = False
tracktable.recv_id.writable = False
tracktable.bin.readable = False
tracktable.bin.writable = False
tracktable.adj_item_id.readable = False
tracktable.adj_item_id.writable = False
if r.method == "update" and record.status==2:
# Hide the values that will be copied from the inv_inv_item record
tracktable.item_source_no.readable = True
tracktable.item_source_no.writable = False
tracktable.item_id.writable = False
tracktable.send_stock_id.writable = False
tracktable.item_pack_id.writable = False
tracktable.quantity.writable = False
tracktable.currency.writable = False
tracktable.pack_value.writable = False
tracktable.expiry_date.writable = False
tracktable.supply_org_id.writable = False
tracktable.recv_quantity.readable = True
tracktable.recv_quantity.writable = True
tracktable.recv_bin.readable = True
tracktable.recv_bin.writable = True
else:
tracktable = s3db.inv_track_item
# Hide the values that will be copied from the inv_inv_item record
tracktable.send_stock_id.readable = False
tracktable.send_stock_id.writable = False
# Display the values that can only be entered on create
tracktable.item_source_no.readable = True
tracktable.item_source_no.writable = True
tracktable.recv_quantity.readable = True
tracktable.recv_bin.readable = True
tracktable.recv_bin.writable = True
SHIP_STATUS_IN_PROCESS = s3db.inv_ship_status["IN_PROCESS"]
if r.record.status == SHIP_STATUS_IN_PROCESS:
s3.crud_strings.inv_recv.title_update = \
s3.crud_strings.inv_recv.title_display = T("Process Received Shipment")
else:
table.sender_id.readable = False
table.sender_id.writable = False
table.from_site_id.readable = False
table.from_site_id.writable = False
if r.id:
record = table[r.id]
# If this is part of a shipment then lock down the type and site_id
if record.sender_id != None:
table.type.writable = False
table.site_id.writable = False
if record.status == 1:
table.recipient_id.writable = False
table.date.writable = False
return True
response.s3.prep = prep
if len(request.args) > 1 and request.args[1] == "track_item" and table[request.args[0]].status:
# remove CRUD generated buttons in the tabs
s3mgr.configure("inv_track_item",
create=False,
listadd=False,
editable=False,
deletable=False,
)
if table[request.args[0]].status == 2:
s3mgr.configure("inv_track_item",
editable=True,
)
output = s3_rest_controller("inv", "recv",
rheader=eden.inv.inv_recv_rheader,
)
return output
# -----------------------------------------------------------------------------
def req_items_for_inv(site_id, quantity_type):
"""
used by recv_process & send_process
returns a dict of unique req items (with min db.req_req.date_required | db.req_req.date)
key = item_id
@param site_id: The inventory to find the req_items from
@param quantity_type: str ("commit", "transit" or "fulfil) The
quantity type which will be used to determine if this item is still outstanding
"""
if not deployment_settings.has_module("req"):
return Storage()
table = s3db.req_req
itable = s3db.req_req_item
query = ( table.site_id == site_id ) & \
( table.id == itable.req_id) & \
( itable.item_pack_id == itable.item_pack_id) & \
( itable["quantity_%s" % quantity_type] < itable.quantity) & \
( table.cancel == False ) & \
( table.deleted == False ) & \
( itable.deleted == False )
req_items = db(query).select(itable.id,
itable.req_id,
itable.item_id,
itable.quantity,
itable["quantity_%s" % quantity_type],
itable.item_pack_id,
orderby = table.date_required | table.date,
#groupby = itable.item_id
)
# Because groupby doesn't follow the orderby, this will remove any
# duplicate req_item, using the first record according to the orderby
# req_items = req_items.as_dict( key = "req_req_item.item_id") <- doensn't work
# @todo: web2py Rows.as_dict function could be extended to enable this functionality instead
req_item_ids = []
unique_req_items = Storage()
for req_item in req_items:
if req_item.item_id not in req_item_ids:
# This item is not already in the dict
unique_req_items[req_item.item_id] = Storage( req_item.as_dict() )
req_item_ids.append(req_item.item_id)
return unique_req_items
# -----------------------------------------------------------------------------
def req_item_in_shipment( shipment_item,
shipment_type,
req_items,
):
"""
Checks if a shipment item is in a request and updates req_item
and the shipment.
"""
shipment_item_table = "inv_%s_item" % shipment_type
try:
item_id = shipment_item[shipment_item_table].item_id
except:
item_id = shipment_item.inv_inv_item.item_id
# Check for req_items
if item_id in req_items:
shipment_to_req_type = dict(recv = "fulfil",
send = "transit")
quantity_req_type = "quantity_%s" % shipment_to_req_type[shipment_type]
# This item has been requested from this inv
req_item = req_items[item_id]
req_item_id = req_item.id
# Update the req quantity
# convert the shipment items quantity into the req_tem.quantity_fulfil (according to pack)
quantity = req_item[quantity_req_type] + \
(shipment_item[shipment_item_table].pack_quantity / \
req_item.pack_quantity) * \
shipment_item[shipment_item_table].quantity
quantity = min(quantity, req_item.quantity) #Cap at req. quantity
s3db.req_req_item[req_item_id] = {quantity_req_type: quantity}
# Link the shipment_item to the req_item
s3db[shipment_item_table][shipment_item[shipment_item_table].id] = \
dict(req_item_id = req_item_id)
# Flag req record to update status_fulfil
return req_item.req_id, req_item.id
else:
return None, None
# -----------------------------------------------------------------------------
def recv_process():
""" Receive a Shipment """
s3mgr.load("inv_adj")
s3mgr.load("inv_adj_item")
recv_id = request.args[0]
rtable = s3db.inv_recv
stable = s3db.inv_send
tracktable = s3db.inv_track_item
ritable = s3db.req_req_item
otable = s3db.org_office
if not auth.s3_has_permission("update",
rtable,
record_id=recv_id):
session.error = T("You do not have permission to receive this shipment.")
recv_record = rtable[recv_id]
if recv_record.status == eden.inv.SHIP_STATUS_RECEIVED:
session.error = T("This shipment has already been received.")
if recv_record.status == eden.inv.SHIP_STATUS_CANCEL:
session.error = T("This shipment has already been received & subsequently canceled.")
if session.error:
redirect(URL(c = "inv",
f = "recv",
args = [recv_id]))
site_id = recv_record.site_id
# Update Receive record & lock for editing
rtable[recv_id] = dict(date = request.utcnow,
status = eden.inv.inv_ship_status["RECEIVED"],
owned_by_user = None,
owned_by_group = ADMIN)
send_row = db(tracktable.recv_id == recv_id).select(tracktable.send_id,
limitby = (0, 1)).first()
if send_row:
send_id = send_row.send_id
stable[send_id] = dict(date = request.utcnow,
status = eden.inv.inv_ship_status["RECEIVED"],
owned_by_user = None,
owned_by_group = ADMIN)
# Change the status for all track items in this shipment to Unloading
# the onaccept will then move the values into the site update any request
# record, create any adjustment if needed and change the status to Arrived
db(tracktable.recv_id == recv_id).update(status = 3)
# Go to the Inventory of the Site which has received these items
(prefix, resourcename, id) = s3mgr.model.get_instance(s3db.org_site,
site_id)
query = (otable.id == id)
otype = db(query).select(otable.type, limitby = (0, 1)).first()
if otype and otype.type == 5:
url = URL(c = "inv",
f = "warehouse",
args = [id, "inv_item"])
else:
url = URL(c = "org",
f = "office",
args = [id, "inv_item"])
redirect(url)
# -----------------------------------------------------------------------------
def recv_cancel():
"""
Cancel a Received Shipment
@todo what to do if the quantity cancelled doesn't exist?
"""
recv_id = request.args[0]
rtable = s3db.inv_recv
stable = s3db.inv_send
tracktable = s3db.inv_track_item
stocktable = s3db.inv_inv_item
ritable = s3db.req_req_item
if not auth.s3_has_permission("delete",
rtable,
record_id=recv_id):
session.error = T("You do not have permission to cancel this received shipment.")
recv_record = rtable[recv_id]
if recv_record.status != eden.inv.inv_ship_status["RECEIVED"]:
session.error = T("This shipment has not been received - it has NOT been canceled because can still be edited.")
if session.error:
redirect(URL(c = "inv",
f = "recv",
args = [recv_id]))
# Go through each item in the shipment remove them from the site store
# and put them back in the track item record
query = (tracktable.recv_id == recv_id) & \
(tracktable.deleted == False)
recv_items = db(query).select()
send_id = None
for recv_item in recv_items:
stock_id = recv_item.recv_stock_id
# This assumes that the inv_item has the quantity
db(stocktable.id == stock_id).update(quantity = stocktable.quantity - recv_item.quantity)
db(tracktable.recv_id == recv_id).update(status = 2) # In transit
# @todo potential problem in that the send id should be the same for all track items but is not explicitly checked
if send_id == None and recv_item.send_id != None:
send_id = recv_item.send_id
track_rows = db(tracktable.recv_id == recv_id).select()
for track_item in track_rows:
# if this is linked to a request
# then remove these items from the quantity in transit
if track_item.req_item_id:
db(ritable.id == track_item.req_item_id).update(quantity_fulfil = ritable.quantity_fulfil - track_item.quantity)
# Now set the recv record to cancelled and the send record to sent
rtable[recv_id] = dict(date = request.utcnow,
status = eden.inv.inv_ship_status["CANCEL"],
owned_by_user = None,
owned_by_group = ADMIN)
if send_id != None:
# The sent record is now set back to SENT the warehouse can now cancel
# this record to get the stock back into their warehouse.
# IMPORTANT reports need to locate this record otherwise it can be
# a mechanism to circumvent the auditing of stock
stable[send_id] = dict(date = request.utcnow,
status = eden.inv.inv_ship_status["SENT"],
owned_by_user = None,
owned_by_group = ADMIN)
redirect(URL(c = "inv",
f = "recv",
args = [recv_id]))
# -----------------------------------------------------------------------------
def recv_sent():
""" wrapper function to copy data from a shipment which was sent to the warehouse to a recv shipment (will happen at destination WH)
@ToDo: Consider making obsolete
"""
send_id = request.args[0]
# This is more explicit than getting the site_id from the inv_send.to_site_id
# As there may be multiple sites per location.
#site_id = request.vars.site_id
# Flag shipment as received as received
s3db.inv_send[send_id] = dict(status = eden.inv.inv_ship_status["RECEIVED"])
# Redirect to rec
redirect(URL(c = "inv",
f = "recv",
args = [recv_id, "recv_item"]))
# =============================================================================
def track_item():
""" RESTful CRUD controller """
output = s3_rest_controller("inv",
"track_item",
rheader=response.s3.inv_warehouse_rheader,
)
return output
# =============================================================================
def adj():
""" RESTful CRUD controller """
s3mgr.load("inv_adj")
s3db = current.s3db
db = current.db
auth = current.auth
request = current.request
response = current.response
s3 = response.s3
tablename = "inv_adj"
table = s3db.inv_adj
# Limit site_id to sites the user has permissions for
error_msg = T("You do not have permission to adjust the stock level in this warehouse.")
auth.permission.permitted_facilities(table=table,
error_msg=error_msg)
def prep(r):
if r.interactive:
if r.component:
if r.component_id:
aitable = s3db.inv_adj_item
if r.record.status == 0:
aitable.reason.writable = True
record = aitable[r.component_id]
if record.inv_item_id:
aitable.item_id.writable = False
aitable.item_pack_id.writable = False
aitable.item_id.writable = False
else:
# if an adjustment has been selected and it has been completed
# then make the fields read only
if r.record and r.record.status:
table.adjuster_id.writable = False
table.site_id.writable = False
table.comments.writable = False
return True
response.s3.prep = prep
if len(request.args) > 1 and request.args[1] == "adj_item" and table[request.args[0]].status:
# remove CRUD generated buttons in the tabs
s3mgr.configure("inv_adj_item",
create=False,
listadd=False,
editable=False,
deletable=False,
)
output = s3_rest_controller("inv",
"adj",
rheader=s3.inv_adj_rheader,
)
return output
def adj_close():
""" RESTful CRUD controller """
s3mgr.load("inv_adj")
s3db = current.s3db
db = current.db
auth = current.auth
request = current.request
response = current.response
s3 = response.s3
atable = s3db.inv_adj
aitable = s3db.inv_adj_item
stocktable = s3db.inv_inv_item
otable = s3db.org_office
# Limit site_id to sites the user has permissions for
error_msg = T("You do not have permission to adjust the stock level in this warehouse.")
auth.permission.permitted_facilities(table=table,
error_msg=error_msg)
adj_id = request.args[0]
adj_rec = atable[adj_id]
if adj_rec.status != 0:
session.error = T("This adjustment has already been closed.")
if session.error:
redirect(URL(c = "inv",
f = "adj",
args = [adj_id]))
# Go through all the adj_items
query = ( aitable.adj_id == adj_id ) & \
(aitable.deleted == False)
adj_items = db(query).select()
for adj_item in adj_items:
# if we don't have a stock item then create it
if adj_item.inv_item_id == None:
stock_id = stocktable.insert(site_id = adj_rec.site_id,
item_id = adj_item.item_id,
item_pack_id = adj_item.item_pack_id,
currency = adj_item.currency,
bin = adj_item.bin,
pack_value = adj_item.pack_value,
expiry_date = adj_item.expiry_date,
quantity = adj_item.new_quantity,
)
# and add the inventory item id to the adjustment record
db(aitable.id == adj_item.id).update(inv_item_id = stock_id)
# otherwise copy the details to the stock item
else:
db(stocktable.id == adj_item.inv_item_id).update(item_pack_id = adj_item.item_pack_id,
bin = adj_item.bin,
pack_value = adj_item.pack_value,
expiry_date = adj_item.expiry_date,
quantity = adj_item.new_quantity,
)
# Change the status of the adj record to Complete
db(atable.id == adj_id).update(status=1)
# Go to the Inventory of the Site which has adjusted these items
(prefix, resourcename, id) = s3mgr.model.get_instance(s3db.org_site,
adj_rec.site_id)
query = (otable.id == id)
otype = db(query).select(otable.type, limitby = (0, 1)).first()
if otype and otype.type == 5:
url = URL(c = "inv",
f = "warehouse",
args = [id, "inv_item"])
else:
url = URL(c = "org",
f = "office",
args = [id, "inv_item"])
redirect(url)
# =============================================================================
def recv_item_json():
"""
"""
stable = s3db.org_site
rtable = s3db.inv_recv
ittable = s3db.inv_track_item
rtable.date.represent = lambda dt: dt[:10]
query = (ittable.req_item_id == request.args[0]) & \
(rtable.id == ittable.recv_id) & \
(rtable.site_id == stable.id) & \
(rtable.status == eden.inv.inv_ship_status["RECEIVED"]) & \
(ittable.deleted == False )
records = db(query).select(rtable.id,
rtable.date,
stable.name,
ittable.quantity)
json_str = "[%s,%s" % ( json.dumps(dict(id = str(T("Received")),
quantity = "#"
)) ,
records.json()[1:])
response.headers["Content-Type"] = "application/json"
return json_str
# =============================================================================
def send_item_json():
"""
"""
stable = s3db.org_site
istable = s3db.inv_send
ittable = s3db.inv_track_item
istable.date.represent = lambda dt: dt[:10]
query = (ittable.req_item_id == request.args[0]) & \
(istable.id == ittable.send_id) & \
(istable.site_id == stable.id) & \
((istable.status == eden.inv.inv_ship_status["SENT"]) | \
(istable.status == eden.inv.inv_ship_status["RECEIVED"])) & \
(ittable.deleted == False)
records = db(query).select(istable.id,
istable.date,
stable.name,
ittable.quantity)
json_str = "[%s,%s" % ( json.dumps(dict(id = str(T("Sent")),
quantity = "#"
)) ,
records.json()[1:])
response.headers["Content-Type"] = "application/json"
return json_str
# END =========================================================================
| mit |
spanner/searchkick | lib/searchkick/process_batch_job.rb | 1103 | module Searchkick
class ProcessBatchJob < ActiveJob::Base
queue_as { Searchkick.queue_name }
def perform(class_name:, record_ids:)
# separate routing from id
routing = Hash[record_ids.map { |r| r.split(/(?<!\|)\|(?!\|)/, 2).map { |v| v.gsub("||", "|") } }]
record_ids = routing.keys
klass = class_name.constantize
scope = Searchkick.load_records(klass, record_ids)
scope = scope.search_import if scope.respond_to?(:search_import)
records = scope.select(&:should_index?)
# determine which records to delete
delete_ids = record_ids - records.map { |r| r.id.to_s }
delete_records = delete_ids.map do |id|
m = klass.new
m.id = id
if routing[id]
m.define_singleton_method(:search_routing) do
routing[id]
end
end
m
end
# bulk reindex
index = klass.searchkick_index
Searchkick.callbacks(:bulk) do
index.bulk_index(records) if records.any?
index.bulk_delete(delete_records) if delete_records.any?
end
end
end
end
| mit |
adam-boduch/coyote | config/logging.php | 2433 | <?php
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
return [
/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that gets used when writing
| messages to the logs. The name specified in this option should match
| one of the channels defined in the "channels" configuration array.
|
*/
'default' => env('LOG_CHANNEL', 'stack'),
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog",
| "custom", "stack"
|
*/
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['daily'],
],
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
'days' => 14,
],
'stderr' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'),
'with' => [
'stream' => 'php://stderr',
],
],
'gelf' => [
'driver' => 'custom',
'via' => \Hedii\LaravelGelfLogger\GelfLoggerFactory::class,
'processors' => [
\Hedii\LaravelGelfLogger\Processors\NullStringProcessor::class,
],
// This optional option determines the channel name sent with the
// message in the 'facility' field. Default is equal to app.env
// configuration value
'name' => 'coyote',
'host' => 'graylog',
'port' => 12201
],
],
];
| mit |
VenelinGP/NSQuiz | NSQuiz/app/views/quiz/solve/answers-view-model.js | 328 | 'use strict';
var Observable = require("data/observable").Observable;
function Answer() {
var answerModel = new Observable({
text: text,
isCorrect: isCorrect
});
answerModel.getCorrect = function() {
answerModel.get({value, value});
};
return answerModel;
}
module.exports = Answer; | mit |
adl1995/zoho-portal | resources/views/admin/client-create.blade.php | 7239 | @extends('layouts.admin')
@section('content')
<div class="content-wrap">
<div class="main">
<div class="container-fluid">
<div class="row header-row">
<div class="col-xs-12 p-0">
<div class="page-header">
<ol class="breadcrumb">
<li><a href="/admin">Clients</a></li>
<li class="active">Add Client</li>
</ol>
<div class="page-title">
<h1>Add Client</h1>
</div>
</div>
</div>
</div>
<div class="main-content">
<div class="row">
<form class="form-horizontal" method="POST" action="/admin/clients/add">
{{ csrf_field() }}
<div class="form-group">
<label for="" class="col-sm-4 col-md-3 col-lg-2 control-label">Company</label>
<div class="col-sm-8">
<input name="company" type="text" class="form-control" placeholder="Company Name">
@if ($errors->has('company'))
<span class="help-block">
<strong>{{ $errors->first('company') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group">
<label for="" class="col-sm-4 col-md-3 col-lg-2 control-label">First Name</label>
<div class="col-sm-8">
<input name="first_name" type="text" class="form-control" placeholder="First Name">
@if ($errors->has('first_name'))
<span class="help-block">
<strong>{{ $errors->first('first_name') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group">
<label name="last_name" for="" class="col-sm-4 col-md-3 col-lg-2 control-label">Last Name</label>
<div class="col-sm-8">
<input name="last_name" type="text" class="form-control" placeholder="Last Name">
@if ($errors->has('last_name'))
<span class="help-block">
<strong>{{ $errors->first('last_name') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group">
<label for="" class="col-sm-4 col-md-3 col-lg-2 control-label">Email</label>
<div class="col-sm-8">
<input name="email" type="email" class="form-control" placeholder="Email Address">
@if ($errors->has('email'))
<span class="help-block">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group">
<label for="" class="col-sm-4 col-md-3 col-lg-2 control-label">City</label>
<div class="col-sm-8">
<input name="city" type="text" class="form-control" placeholder="City">
@if ($errors->has('city'))
<span class="help-block">
<strong>{{ $errors->first('city') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group">
<label for="" class="col-sm-4 col-md-3 col-lg-2 control-label">State</label>
<div class="col-sm-8">
<input name="state" type="text" class="form-control" placeholder="State">
@if ($errors->has('state'))
<span class="help-block">
<strong>{{ $errors->first('state') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group">
<label for="" class="col-sm-4 col-md-3 col-lg-2 control-label">Address</label>
<div class="col-sm-8">
<input name="address1" type="text" class="form-control" placeholder="Address">
@if ($errors->has('address1'))
<span class="help-block">
<strong>{{ $errors->first('address1') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group">
<label for="" class="col-sm-4 col-md-3 col-lg-2 control-label">ZIP</label>
<div class="col-sm-8">
<input name="zip" type="text" class="form-control" placeholder="ZIP">
@if ($errors->has('zip'))
<span class="help-block">
<strong>{{ $errors->first('zip') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group">
<label name="status" for="" class="col-sm-4 col-md-3 col-lg-2 control-label">Status</label>
<div class="col-sm-8">
<label class="radio-inline tt-none fw-light">
<input type="radio" name="status" id="statusActive" value="active" checked="checked"> Active
</label>
<label class="radio-inline tt-none fw-light">
<input type="radio" name="status" id="statusInactive" value="inactive"> Inactive
</label>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-md-offset-3 col-lg-offset-2 col-sm-8">
<button type="submit" class="btn btn-primary btn-flat">Add Client</button>
<a href="admin_dashboard.html" class="btn btn-link">Cancel</a>
</div>
</div>
</form>
</div>
</div><!-- /# main content -->
</div><!-- /# container-fluid -->
</div><!-- /# main -->
</div><!-- /# content wrap -->
@endsection | mit |
unfetter-discover/unfetter-ui | src/app/events/filters/filters.component.spec.ts | 719 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FiltersComponent } from './filters.component';
import { MatCardModule } from '@angular/material';
describe('FiltersComponent', () => {
let component: FiltersComponent;
let fixture: ComponentFixture<FiltersComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [FiltersComponent],
imports: [MatCardModule],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(FiltersComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
| mit |
culturekings/shopify-app-auth-laravel | src/Models/ShopifyScriptTag.php | 488 | <?php
namespace CultureKings\ShopifyAuth\Models;
use Illuminate\Database\Eloquent\Model;
class ShopifyScriptTag extends Model
{
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'shopify_script_tags';
/**
* The attributes that aren't mass assignable.
*
* @var array
*/
protected $guarded = [];
public function shopifyUser()
{
return $this->belongsTo(ShopifyUser::class);
}
}
| mit |
joaosoft/go-manager | manager_rabbit_consumer.go | 1070 | package manager
import (
"github.com/streadway/amqp"
"sync"
)
type RabbitmqHandler func(message amqp.Delivery) error
// IRabbitmqConsumer ...
type IRabbitmqConsumer interface {
Start(wg *sync.WaitGroup) error
Stop(wg *sync.WaitGroup) error
Started() bool
}
// AddRabbitmqConsumer ...
func (manager *Manager) AddRabbitmqConsumer(key string, rabbitmqConsumer IRabbitmqConsumer) error {
manager.rabbitmqConsumers[key] = rabbitmqConsumer
manager.logger.Infof("consumer %s added", key)
return nil
}
// RemoveRabbitmqConsumer ...
func (manager *Manager) RemoveRabbitmqConsumer(key string) (IRabbitmqConsumer, error) {
rabbitmqConsumer := manager.rabbitmqConsumers[key]
delete(manager.processes, key)
manager.logger.Infof("consumer %s removed", key)
return rabbitmqConsumer, nil
}
// GetRabbitmqConsumer ...
func (manager *Manager) GetRabbitmqConsumer(key string) IRabbitmqConsumer {
if rabbitmqConsumer, exists := manager.rabbitmqConsumers[key]; exists {
return rabbitmqConsumer
}
manager.logger.Infof("consumer %s doesn't exist", key)
return nil
}
| mit |
yangboz/bugfree-bugfixes | CocosJSGame/frameworks/js-bindings/cocos2d-x/plugin/jsbindings/script/jsb_pluginx.js | 7645 | var plugin = plugin || {PluginParam: {}, ProtocolAds: {}, ProtocolIAP: {}, ProtocolShare: {}, ProtocolSocial: {}, ProtocolUser: {}};
plugin.PluginParam = plugin.PluginParam || {};
plugin.PluginParam.ParamType = {};
plugin.PluginParam.ParamType.TypeInt = 1;
plugin.PluginParam.ParamType.TypeFloat = 2;
plugin.PluginParam.ParamType.TypeBool = 3;
plugin.PluginParam.ParamType.TypeString = 4;
plugin.PluginParam.ParamType.TypeStringMap = 5;
plugin.PluginParam.ParamType.TYPE_INT = 1;
plugin.PluginParam.ParamType.TYPE_FLOAT = 2;
plugin.PluginParam.ParamType.TYPE_BOOL = 3;
plugin.PluginParam.ParamType.TYPE_STRING = 4;
plugin.PluginParam.ParamType.TYPE_STRINGMAP = 5;
plugin.ProtocolAds.AdsResultCode = {};
plugin.ProtocolAds.AdsResultCode.AdsReceived = 0;
plugin.ProtocolAds.AdsResultCode.FullScreenViewShown = 1;
plugin.ProtocolAds.AdsResultCode.FullScreenViewDismissed = 2;
plugin.ProtocolAds.AdsResultCode.PointsSpendSucceed = 3;
plugin.ProtocolAds.AdsResultCode.PointsSpendFailed = 4;
plugin.ProtocolAds.AdsResultCode.NetworkError = 5;
plugin.ProtocolAds.AdsResultCode.UnknownError = 6;
plugin.ProtocolAds.AdsResultCode.ADSRECEIVED = 0;
plugin.ProtocolAds.AdsResultCode.FULLSCREENVIEW_SHOWN = 1;
plugin.ProtocolAds.AdsResultCode.FULLSCREENVIEW_DISMISSED = 2;
plugin.ProtocolAds.AdsResultCode.POINTS_SPEND_SUCCEED = 3;
plugin.ProtocolAds.AdsResultCode.POINTS_SPEND_FAILED = 4;
plugin.ProtocolAds.AdsResultCode.NETWORK_ERROR = 5;
plugin.ProtocolAds.AdsResultCode.UNKOWN_ERROR = 6;
plugin.ProtocolAds.AdsPos = {};
plugin.ProtocolAds.AdsPos.PosCenter = 0;
plugin.ProtocolAds.AdsPos.PosTop = 1;
plugin.ProtocolAds.AdsPos.PosTopLeft = 2;
plugin.ProtocolAds.AdsPos.PosTopRight = 3;
plugin.ProtocolAds.AdsPos.PosBottom = 4;
plugin.ProtocolAds.AdsPos.PosBottomLeft = 5;
plugin.ProtocolAds.AdsPos.PosBottomRight = 6;
plugin.ProtocolAds.AdsPos.POS_CENTER = 0;
plugin.ProtocolAds.AdsPos.POS_TOP = 1;
plugin.ProtocolAds.AdsPos.POS_TOP_LEFT = 2;
plugin.ProtocolAds.AdsPos.POS_TOP_RIGHT = 3;
plugin.ProtocolAds.AdsPos.POS_BOTTOM = 4;
plugin.ProtocolAds.AdsPos.POS_BOTTOM_LEFT = 5;
plugin.ProtocolAds.AdsPos.POS_BOTTOM_RIGHT = 6;
plugin.ProtocolIAP.PayResultCode = {};
plugin.ProtocolIAP.PayResultCode.PaySuccess = 0;
plugin.ProtocolIAP.PayResultCode.PayFail = 1;
plugin.ProtocolIAP.PayResultCode.PayCancel = 2;
plugin.ProtocolIAP.PayResultCode.PayTimeOut = 3;
plugin.ProtocolIAP.PayResultCode.PAY_SUCCESS = 0;
plugin.ProtocolIAP.PayResultCode.PAY_FAIL = 1;
plugin.ProtocolIAP.PayResultCode.PAY_CANCEL = 2;
plugin.ProtocolIAP.PayResultCode.PAY_TIMEOUT = 3;
plugin.ProtocolIAP.RequestProductCode = {};
plugin.ProtocolIAP.RequestProductCode.RequestSuccess = 0;
plugin.ProtocolIAP.RequestProductCode.RequestFail = 1;
plugin.ProtocolIAP.RequestProductCode.Requestimeout = 2;
plugin.ProtocolIAP.RequestProductCode.REQUEST_SUCCESS = 0;
plugin.ProtocolIAP.RequestProductCode.REQUEST_FAIL = 1;
plugin.ProtocolIAP.RequestProductCode.REQUEST_TIMEOUT = 2;
plugin.ProtocolShare.ShareResultCode = {};
plugin.ProtocolShare.ShareResultCode.ShareSuccess = 0;
plugin.ProtocolShare.ShareResultCode.ShareFail = 1;
plugin.ProtocolShare.ShareResultCode.ShareCancel = 2;
plugin.ProtocolShare.ShareResultCode.ShareTimeOut = 3;
plugin.ProtocolShare.ShareResultCode.SHARE_SUCCESS = 0;
plugin.ProtocolShare.ShareResultCode.SHARE_FAIL = 1;
plugin.ProtocolShare.ShareResultCode.SHARE_CANCEL = 2;
plugin.ProtocolShare.ShareResultCode.SHARE_TIMEOUT = 3;
plugin.ProtocolSocial.SocialRetCode = {};
plugin.ProtocolSocial.SocialRetCode.ScoreSubmitSuccess = 1;
plugin.ProtocolSocial.SocialRetCode.ScoreSubmitFailed = 2;
plugin.ProtocolSocial.SocialRetCode.AchUnlockSuccess = 3;
plugin.ProtocolSocial.SocialRetCode.AchUnlockFailed = 4;
plugin.ProtocolSocial.SocialRetCode.SCORE_SUBMIT_SUCCESS = 1;
plugin.ProtocolSocial.SocialRetCode.SCORE_SUBMIT_FAILED = 2;
plugin.ProtocolSocial.SocialRetCode.ACH_UNLOCK_SUCCESS = 3;
plugin.ProtocolSocial.SocialRetCode.ACH_UNLOCK_FAILED = 4;
plugin.ProtocolUser.UserActionResultCode = {};
plugin.ProtocolUser.UserActionResultCode.LoginSucceed = 0;
plugin.ProtocolUser.UserActionResultCode.LoginFailed = 1;
plugin.ProtocolUser.UserActionResultCode.LogoutSucceed = 2;
plugin.ProtocolUser.UserActionResultCode.LOGIN_SUCCEED = 0;
plugin.ProtocolUser.UserActionResultCode.LOGIN_FAILED = 1;
plugin.ProtocolUser.UserActionResultCode.LOGOUT_SUCCEED = 2;
plugin.FacebookAgent.HttpMethod = {};
plugin.FacebookAgent.HttpMethod.GET = 0;
plugin.FacebookAgent.HttpMethod.POST = 1;
plugin.FacebookAgent.HttpMethod.DELETE = 2;
plugin.FacebookAgent.AppEvent = {};
plugin.FacebookAgent.AppEvent.ACTIVATED_APP = "fb_mobile_activate_app";
plugin.FacebookAgent.AppEvent.COMPLETED_REGISTRATION = "fb_mobile_complete_registration";
plugin.FacebookAgent.AppEvent.VIEWED_CONTENT = "fb_mobile_content_view";
plugin.FacebookAgent.AppEvent.SEARCHED = "fb_mobile_search";
plugin.FacebookAgent.AppEvent.RATED = "fb_mobile_rate";
plugin.FacebookAgent.AppEvent.COMPLETED_TUTORIAL = "fb_mobile_tutorial_completion";
plugin.FacebookAgent.AppEvent.ADDED_TO_CART = "fb_mobile_add_to_cart";
plugin.FacebookAgent.AppEvent.ADDED_TO_WISHLIST = "fb_mobile_add_to_wishlist";
plugin.FacebookAgent.AppEvent.INITIATED_CHECKOUT = "fb_mobile_initiated_checkout";
plugin.FacebookAgent.AppEvent.ADDED_PAYMENT_INFO = "fb_mobile_add_payment_info";
plugin.FacebookAgent.AppEvent.PURCHASED = "fb_mobile_purchase";
plugin.FacebookAgent.AppEvent.ACHIEVED_LEVEL = "fb_mobile_level_achieved";
plugin.FacebookAgent.AppEvent.UNLOCKED_ACHIEVEMENT = "fb_mobile_achievement_unlocked";
plugin.FacebookAgent.AppEvent.SPENT_CREDITS = "fb_mobile_spent_credits";
plugin.FacebookAgent.AppEventParam = {};
plugin.FacebookAgent.AppEventParam.CURRENCY = "fb_currency";
plugin.FacebookAgent.AppEventParam.REGISTRATION_METHOD = "fb_registration_method";
plugin.FacebookAgent.AppEventParam.CONTENT_TYPE = "fb_content_type";
plugin.FacebookAgent.AppEventParam.CONTENT_ID = "fb_content_id";
plugin.FacebookAgent.AppEventParam.SEARCH_STRING = "fb_search_string";
plugin.FacebookAgent.AppEventParam.SUCCESS = "fb_success";
plugin.FacebookAgent.AppEventParam.MAX_RATING_VALUE = "fb_max_rating_value";
plugin.FacebookAgent.AppEventParam.PAYMENT_INFO_AVAILABLE = "fb_payment_info_available";
plugin.FacebookAgent.AppEventParam.NUM_ITEMS = "fb_num_items";
plugin.FacebookAgent.AppEventParam.DESCRIPTION = "fb_description";
plugin.FacebookAgent.AppEventParamValue = {};
plugin.FacebookAgent.AppEventParamValue.VALUE_YES = "1";
plugin.FacebookAgent.AppEventParamValue.VALUE_NO = "0";
plugin.FacebookAgent.CODE_SUCCEED = 0;
plugin.FacebookAgent.prototype.logout = function(callback){
this._logout();
callback(0, {"isLoggedIn" : false});
};
plugin.FacebookAgent.prototype.isLoggedIn = function(callback){
if(this._isLoggedIn())
callback(0, {"isLoggedIn" : true, "accessToken": this.getAccessToken()});
else
callback(0, {"isLoggedIn" : false});
};
plugin.FacebookAgent.prototype.getPermissionList = function(callback){
var list = this._getPermissionList();
callback( list ? plugin.FacebookAgent.CODE_SUCCEED : -1, JSON.parse(list));
};
plugin.FacebookAgent.prototype.requestAccessToken = function(callback){
var at = this.getAccessToken();
callback( at ? plugin.FacebookAgent.CODE_SUCCEED : -1, {"accessToken" : at});
};
plugin.FacebookAgent.prototype._api = plugin.FacebookAgent.prototype.api;
plugin.FacebookAgent.prototype.api = function(path, HttpMethod, params, callback){
if(callback == undefined){
callback = params;
params = {};
}
this._api(path, HttpMethod, params, function(code, msg){
callback(code, JSON.parse(msg));
});
}
| mit |
struzik-vladislav/epp-client | src/Request/Domain/Check.php | 2214 | <?php
namespace Struzik\EPPClient\Request\Domain;
use Struzik\EPPClient\Request\AbstractRequest;
use Struzik\EPPClient\Response\Domain\Check as CheckResponse;
use Struzik\EPPClient\Node\Common\Check as CheckNode;
use Struzik\EPPClient\Node\Common\Command;
use Struzik\EPPClient\Node\Common\TransactionId;
use Struzik\EPPClient\Node\Domain\Name;
use Struzik\EPPClient\Node\Domain\Check as DomainCheckNode;
use Struzik\EPPClient\Exception\UnexpectedValueException;
/**
* Object representation of the request of domain checking command.
*/
class Check extends AbstractRequest
{
/**
* @var array
*/
private $domains = [];
/**
* {@inheritdoc}
*/
protected function handleParameters()
{
$epp = $this->getRoot();
$command = new Command($this);
$epp->append($command);
$check = new CheckNode($this);
$command->append($check);
$domainCheck = new DomainCheckNode($this);
$check->append($domainCheck);
if (count($this->domains) === 0) {
throw new UnexpectedValueException('List of domains to be checking cannot be empty.');
}
foreach ($this->domains as $item) {
$domainName = new Name($this, ['domain' => $item]);
$domainCheck->append($domainName);
}
$transaction = new TransactionId($this);
$command->append($transaction);
}
/**
* {@inheritdoc}
*/
public function getResponseClass()
{
return CheckResponse::class;
}
/**
* Adding a domain to the list.
*
* @param string $domain fully qualified name of the domain object
*
* @return self
*/
public function addDomain($domain)
{
if (!isset($this->domains[$domain])) {
$this->domains[$domain] = $domain;
}
return $this;
}
/**
* Removing a domain from the list.
*
* @param string $domain fully qualified name of the domain object
*
* @return self
*/
public function removeDomain($domain)
{
if (isset($this->domains[$domain])) {
unset($this->domains[$domain]);
}
return $this;
}
}
| mit |
ttruongdc/py-Learning | Cuno.py | 1099 |
def compute(x,y): # Initializing a function to compute average
average = x / y # Average = total divide for number of counts
return ("The total is: %f , the count is: %d and the average is: %f") % (sum, count, average) # Return a value of total, count and average
count = 0 # Initialize count = 0
sum = 0 # Initialize and assign value to variable 'sum'
while True:
try: #Using try and except to handle strings entered by user
while True: # loop
num = raw_input("Enter a number: ")# Get input number
if num == 'done':
break
if num.startswith(' '):
continue
num = float(num)
if num >0:
sum = sum + num # Keep adding the number to total
count += 1 # Tallying how many times the loop execute.
except:
print "What happened? You are supposed to enter numeric data only"
confirm = input("Are you sure? Enter yes to finish or no to go back.")
print type(confirm)
if confirm == ('yes'):
break
if confirm == ('no'):
continue
print compute(sum, count)# Calling function "compute"
| mit |
AckerApple/ack-node | js/modules/reqres/res.js | 10343 | "use strict";
exports.__esModule = true;
var ack = require('../../index.js').ackX, reqrtn = require('./req').reqrtn, cookies = require('cookies'), etag = require('etag'), fs = require('fs'), isProductionMode = process.env.NODE_ENV && process.env.NODE_ENV.toLowerCase() == 'production';
//inbound request response processor
//returns function that appends output that also has a tun of helper methods
function reqres(res, req) {
if (req && req._headers) {
throw new Error('Received response object where request object was expected');
}
this.res = res;
this.req = req;
if (res) {
if (res.$ && res.$.data) {
this.data = res.$.data;
}
else {
this.data = { error: null };
if (!res.$) {
res.$ = this;
}
}
}
}
exports.reqres = reqres;
reqres.prototype.relocate = function (url, statusMessage, statusCode) {
statusCode = statusCode || 301;
this.res.statusCode = statusCode;
this.res.statusMessage = statusMessage;
this.res.setHeader('Location', url);
this.close();
return this;
};
//ops (only applies when output is typeof object. See function dump())
reqres.prototype.append = function (output, ops) {
var isBuffer = Buffer.isBuffer(output);
if (!isBuffer) {
switch (typeof (output)) {
case 'object':
ops = ops || {};
ops.levels = ops.levels || 3;
ops.collapse = ops.collapse || ['function'];
output = ack(output).dump(ops);
//output = ack(output).dump('html',ops)
break;
}
}
//this.data.output += output;
this.res.$.data.output = this.res.$.data.output ? this.res.$.data.output + output : output;
return this;
};
reqres.prototype.output = reqres.prototype.append;
//ops:format,label,expand,collapse,show,hide,hideTypes,top,levels,sortKeys,syntaxHighlight,dumpFunctionName
reqres.prototype.dump = function (v, ops) {
ops = ops || {};
if (!ops.format && this.isHtml()) {
ops.format = 'html';
}
return this.append(v, ops);
};
function isResHeaderSent(res) {
return res.closed || res._headerSent;
}
reqres.prototype.isHeaderSent = function () {
return isResHeaderSent(this.res);
};
//closing request handler
/*
reqres.prototype.send = function(output){
return xreqhan(this.res, this.req, output)
}*/
/** if request is open, optional content can be appended to output and then the request is closed */
reqres.prototype.close = function (o, ops) {
if (!this.isHeaderSent()) {
if (o)
this.append(o, ops);
var output = getResOutput(this.res);
xreqhan(this.res, this.req, output);
}
return this;
};
//has the response been put into HTML mode? default=acceptsHtml()
reqres.prototype.isHtml = function (yN) {
if (this.res.$.data.isHtml === false || this.res.$.data.isHtml === true) {
return this.res.$.data.isHtml;
}
var rr = new reqrtn(this.req, this.res);
return rr.acceptsHtml();
};
reqres.prototype.prepend = function (s) {
this.res.$.data.output = s + this.res.$.data.output;
return this;
};
/** request is closed with optional output append to request */
reqres.prototype.abort = function (output) {
//if(o)this.append(o,ops)
output = output || getResOutput(this.res);
xreqhan(this.res, this.req, output);
return this;
};
reqres.prototype.send = reqres.prototype.abort; //two names same game
reqres.prototype.sendHTML = function (html) {
this.res.setHeader('content-type', 'text/html');
this.send(html);
};
reqres.prototype.sendHtml = reqres.prototype.sendHTML;
reqres.prototype.sendJSON = function (data, spaces) {
try {
data = JSON.stringify(data, null, spaces);
}
catch (e) { }
this.res.setHeader('content-type', 'application/json');
this.send(data);
};
reqres.prototype.sendJson = reqres.prototype.sendJson;
reqres.prototype.sendFileByPath = function (path, mimeType) {
var jFile = ack.file(path);
return jFile.stat().bind(this)
.then(function (stats) {
if (!mimeType) {
mimeType = jFile.getMimeType();
}
this.res.statusCode = 200;
this.res.setHeader('Content-Length', stats.size);
this.res.setHeader('Content-Type', mimeType);
this.res.setHeader('Content-Disposition', 'filename="' + jFile.getName() + '"');
return path;
})
.then(fs.createReadStream)
.then(function (rs) {
rs.pipe(this.res);
});
};
/** cookies().set(name, [value], [{maxAge,expires,path,domain,secure,secureProxy,httpOnly,signed,overwrite}]) */
reqres.prototype.cookies = function () {
if (this.Cookies)
return this.Cookies;
this.Cookies = new cookies(this.req, this.res);
return this.Cookies;
};
/** ! DEPRECATED ! */
reqres.prototype.ci = function () {
if (this.ClientInput)
return this.ClientInput;
this.ClientInput = new ClientInput(this.res, this.req);
return this.ClientInput;
};
//creates new error object to make an in-line stack trace. Adds error object to output
reqres.prototype["throw"] = function (err) {
var dumper;
/* //removed 2/2/2016
if(typeof(err)=='object' && err.stack){// && e.constructor.name=='Error' || e.constructor.name=='SyntaxError'
dumper = {
stack : err.stack.split(' at '),//back to string
err : err,
stackTrace : err.stack,
message : err.message
}
//for(x in e)d[x] = e[x]
}else
*/
if (err && err.constructor == String) {
dumper = new Error(err);
err = dumper;
ack.error(dumper).cutFirstTrace();
}
else {
dumper = err;
}
if (this.catcherArray) {
this.catcherArray.forEach(function (catcher, i) {
catcher(err);
});
}
reqResThrow(this.req, this.res, dumper);
return this;
};
reqres.prototype["catch"] = function (method) {
this.catcherArray = this.catcherArray || [];
this.catcherArray.push(method);
return this;
};
//adds error object to output
reqres.prototype.error = function (e) {
var x, sa, d = {};
for (x in e)
d[x] = e[x];
d.stack = e.stack; //back to string
this.res.$.data.error = d;
return this;
};
/** looks at generated output to create an etag header. If client ETag header "If-None-Match" present and it matches generated etag, output is cleared and 304 cache indicator is fired */
reqres.prototype.etag = function (options) {
var options = options || {};
if (options.weak == null) {
options.weak = true;
}
var noMatchHead = ack.reqres(this.req, this.res).input.header('If-None-Match');
var output = getResOutput(this.res);
var eTagVal = etag(output);
this.res.setHeader('ETag', eTagVal);
if (noMatchHead == eTagVal) {
this.res.$.data.output = '';
this.res.statusCode = 304;
this.res.statusMessage = 'Not Modified';
}
return this;
};
//error handler
function geterrhan() {
return function (err, req, res, next) {
try {
new reqres(res, req)["throw"](err);
}
catch (e) {
console.trace('!!!jE THROW PROCESSING FAILED!!!', e.stack);
throw (err);
}
//next()
};
}
exports.geterrhan = geterrhan;
/*
reqres.getxreqhan = function(){
return function(req,res,next){
if(!isResHeaderSent(res)){
xreqhan(res, req);
}
}
}
*/
/* !!! DEPRECATED !!! */
var ClientInput = function ClientInput(res, req) {
this.res = res;
this.req = req;
};
/** cookies().set(name, [value], [{maxAge,expires,path,domain,secure,secureProxy,httpOnly,signed,overwrite}]) */
ClientInput.prototype.cookies = function () {
if (this.Cookies)
return this.Cookies;
this.Cookies = new cookies(this.req, this.res);
return this.Cookies;
};
/* END */
/** only returns output data collected by reqres */
function getResOutput(res) {
if (res.$ && res.$.data && res.$.data.output) {
return res.$.data.output;
}
}
/** close request handler */
function xreqhan(res, req, output) {
if (isResHeaderSent(res)) {
return console.error('request already closed', new Error().stack);
}
output = output || '';
var isBinary = output && Buffer.isBuffer(output);
if (isBinary) {
res.end(output, 'binary');
}
else if (res.send) { //Express adds send
res.send(output);
}
else if (res.end) { //base way to end request
output = reqResOutputToString(req, res, output);
res.end(output);
}
resMarkClosed(res); //add indicators that show response has been closed
}
function reqResOutputToString(req, res, output) {
if (res.getHeader('content-type') == null) {
if (output === null || typeof output == 'object') {
output = JSON.stringify(output);
res.setHeader('content-type', 'application/json');
}
else if (ack.reqres(req, res).isHtml()) {
res.setHeader('content-type', 'text/html');
}
else {
res.setHeader('content-type', 'text/plain');
}
}
if (res.getHeader('content-length') == null && output && output.length) {
res.setHeader('content-length', output.length);
}
else {
res.statusCode = res.statusCode || 204;
}
return output;
}
function getErrorMsg(err) {
return err.message || err.code;
}
/** Handles sending errors back to client including approperiate error details.
- response status always 500 unless (err.status || err.statusCode)
*/
var reqResThrow = function (req, res, err) {
if (isResHeaderSent(res)) { //request has already been closed
//console.log('cannot throw error on an already closed request')
return;
}
if (typeof (err.stack) == 'string') {
err.stack = err.stack.split(' at '); //stack string to array
}
var isHtml = new reqres(res, req).isHtml();
if (isHtml) {
ack.router().htmlCloseError({ debug: isProductionMode })(err, req, res);
}
else {
ack.router().jsonCloseError({ debug: isProductionMode })(err, req, res);
}
resMarkClosed(res);
};
var resMarkClosed = function (res) {
res.closed = 1;
};
| mit |
engineyard/engineyard-serverside | spec/engineyard-serverside/callbacks/executor/executable_spec.rb | 12320 | require 'spec_helper'
require 'escape'
require 'result'
require 'engineyard-serverside/callbacks/executor/executable'
module EY
module Serverside
module Callbacks
module Executor
describe Executable do
let(:config) {Object.new}
let(:shell) {Object.new}
let(:paths) {Object.new}
let(:hook) {Object.new}
let(:short_name) {'hook'}
let(:active_release_path) {'/path/to/the/active/release'}
let(:hook_path) {'/path/to/the/dang/hook'}
let(:account_name) {'george'}
let(:app) {'tacoma'}
let(:env_name) {'gracie'}
let(:framework_env) {'sausages'}
let(:current_roles) {['hamlet', 'ophelia']}
let(:current_name) {nil}
let(:config_json) {'a big ol hash'}
let(:verbose) {false}
let(:execution_success) {true}
let(:hook_string) {'hooky'}
let(:executor) {described_class.new(config, shell, hook)}
before(:each) do
allow(hook).to receive(:path).and_return(hook_path)
allow(hook).to receive(:short_name).and_return(short_name)
allow(hook).to receive(:to_s).and_return(hook_string)
allow(hook).
to receive(:respond_to?).
with(:service_name).
and_return(false)
allow(shell).to receive(:info)
allow(shell).to receive(:fatal)
allow(shell).to receive(:warning)
allow(config).to receive(:paths).and_return(paths)
allow(config).to receive(:current_roles).and_return(current_roles)
allow(config).to receive(:account_name).and_return(account_name)
allow(config).to receive(:app).and_return(app)
allow(config).to receive(:environment_name).and_return(env_name)
allow(config).to receive(:verbose).and_return(verbose)
allow(config).to receive(:current_name).and_return(current_name)
allow(config).to receive(:framework_env).and_return(framework_env)
allow(config).to receive(:to_json).and_return(config_json)
allow(config).
to receive(:framework_envs).
and_return("RACK_ENV=#{framework_env} RAILS_ENV=#{framework_env}")
allow(paths).to receive(:active_release).and_return(active_release_path)
allow(hook_path).to receive(:executable?).and_return(true)
# This is a wee bit dirty, but the easiest way to test our actual code
# here is to stub out the included Runner interface.
allow(executor).to receive(:run) do |cmd|
EY::Serverside::Spawner::Result.new(cmd, execution_success, cmd, nil)
end
# We also need to stub out the #abort method, as we don't need the
# test suite to just up and stop running when we test executor failure
# modes.
allow(executor).to receive(:abort)
end
it 'is a Railway' do
expect(executor).to be_a(Railway)
end
it 'knows how to spawn CLI processes' do
expect(executor).to be_a(Runner)
end
it 'has the exact steps for executing a Ruby hook' do
steps = described_class.steps.map {|s| s[:name]}
expect(steps).to eql(
[
:validate_hook,
:populate_environment,
:calculate_wrapper,
:run_hook
]
)
end
describe '#validate_hook' do
let(:input) {
{}
}
let(:result) {executor.validate_hook}
context 'when the hook has the executable bit' do
before(:each) do
allow(hook_path).to receive(:executable?).and_return(true)
end
it 'is a Success' do
expect(result).to be_a(Result::Success)
end
it 'does not alter the input' do
expect(result.value).to eql(input)
end
end
context 'when the hook lacks the executable bit' do
before(:each) do
allow(hook_path).to receive(:executable?).and_return(false)
end
it 'is a Failure' do
expect(result).to be_a(Result::Failure)
end
it 'contains a reason for the failure' do
expect(result.error[:reason]).to eql(:not_executable)
end
end
end
describe '#populate_environment' do
let(:input) {{}}
let(:result) {executor.populate_environment(input)}
let(:result_env) {result.value[:environment]}
it 'is a Success' do
expect(result).to be_a(Result::Success)
end
it 'adds the environment to the input' do
expect(result_env).to be_a(String)
end
it 'includes the account name in the environment' do
escaped = Escape.shell_command([account_name])
expect(result_env).
to match(%r{EY_DEPLOY_ACCOUNT_NAME=#{escaped}})
end
it 'includes the application in the environment' do
escaped = Escape.shell_command([app])
expect(result_env).
to match(%{EY_DEPLOY_APP=#{escaped}})
end
it 'includes the JSON representation of the config in the environment' do
escaped = Escape.shell_command([config_json])
expect(result_env).
to match(%r{EY_DEPLOY_CONFIG=#{escaped}})
end
it 'includes all of the current roles in the environment' do
expect(result_env).
to match(%r{EY_DEPLOY_CURRENT_ROLES='#{current_roles.join(' ')}'})
end
context 'when the server is named' do
let(:current_name) {'frankie'}
let(:escaped) {Escape.shell_command([current_name])}
it 'includes the current server name' do
expect(result_env).
to match(%r{EY_DEPLOY_CURRENT_NAME=#{escaped}})
end
end
context 'when the server is unnamed' do
let(:current_name) {nil}
it 'omits the current server name' do
expect(result_env).
not_to match(%r{EY_DEPLOY_CURRENT_NAME})
end
end
it 'includes the environment name in the environment' do
escaped = Escape.shell_command([env_name])
expect(result_env).
to match(%r{EY_DEPLOY_ENVIRONMENT_NAME=#{escaped}})
end
it 'includes the framwork env in the environment' do
escaped = Escape.shell_command([framework_env])
expect(result_env).
to match(%r{EY_DEPLOY_FRAMEWORK_ENV=#{escaped}})
end
it 'includes the release path in the environment' do
escaped = Escape.shell_command([active_release_path])
expect(result_env).
to match(%r{EY_DEPLOY_RELEASE_PATH=#{escaped}})
end
context 'with verbosity configured' do
let(:verbose) {true}
it 'enables verbosity in the environment' do
expect(result.value[:environment]).
to match(%r{EY_DEPLOY_VERBOSE=1})
end
end
context 'without verbosity configured' do
let(:verbose) {false}
it 'disables verbosity in the environment' do
expect(result.value[:environment]).
to match(%r{EY_DEPLOY_VERBOSE=0})
end
end
context 'when any of the values involved are nil' do
let(:account_name) {nil}
let(:app) {nil}
let(:config_json) {nil}
let(:env_name) {nil}
it 'omits those env vars' do
affected = ['ACCOUNT_NAME', 'APP', 'CONFIG', 'ENVIRONMENT_NAME']
affected.each do |var|
expect(result_env).not_to match(%r{EY_DEPLOY_#{var}})
end
end
end
end
describe '#calculate_wrapper' do
let(:input) {{}}
let(:result) {executor.calculate_wrapper(input)}
it 'is a Success' do
expect(result).to be_a(Result::Success)
end
it 'adds a wrapper to the input' do
expect(result.value[:wrapper]).not_to be_nil
end
context 'when dealing with a service hook' do
before(:each) do
allow(hook).
to receive(:respond_to?).
with(:service_name).
and_return(true)
end
it 'wraps the service hook executor' do
expect(result.value[:wrapper]).to eql(About.service_hook_executor)
end
end
context 'when dealing with an app hook' do
before(:each) do
allow(hook).
to receive(:respond_to?).
with(:service_name).
and_return(false)
end
it 'wraps the app hook executor' do
expect(result.value[:wrapper]).to eql(About.hook_executor)
end
end
end
describe '#run_hook' do
let(:dummy_env) {'i am an environment'}
let(:wrapper) {'candy-bar'}
let(:input) {
{
:wrapper => wrapper,
:environment => dummy_env
}
}
let(:result) {executor.run_hook(input)}
it 'runs the proper command' do
expect(executor).
to receive(:run).
with(
"#{dummy_env} #{config.framework_envs} #{wrapper} #{short_name}"
)
result
end
context 'when the execution succeeds' do
let(:execution_success) {true}
it 'is a Success' do
expect(result).to be_a(Result::Success)
end
it 'does not alter the input' do
expect(result.value).to eql(input)
end
end
context 'when the execution fails' do
let(:execution_success) {false}
it 'is a Failure' do
expect(result).to be_a(Result::Failure)
end
it 'has exeuction failure as its reason' do
expect(result.error[:reason]).to eql(:execution_failed)
end
end
end
describe '#handle_failure' do
let(:reason) {nil}
let(:error) {
{
:reason => reason
}
}
let(:result) {executor.handle_failure(error)}
context 'when the hook is not actually executable' do
let(:reason) {:not_executable}
it 'does nothing and returns true' do
expect(result).to eql(true)
end
end
context 'when execution of the hook fails' do
let(:reason) {:execution_failed}
it 'aborts with a message about the execution failure' do
expect(executor).
to receive(:abort).
with(
"*** [Error] Hook failed to exit cleanly: #{hook_path} ***\n"
)
result
end
end
context 'when an otherwise unexpected error occurs' do
let(:reason) {nil}
it 'aborts with a message about the unknown error' do
expect(executor).
to receive(:abort).
with("*** [Error] An unknown error occurred for hook: #{hook_path} ***\n")
result
end
end
end
end
end
end
end
end
| mit |
kravigupta/mvn-service-builder-sample | mvn-service-builder-sample-portlet-service/src/main/java/me/rkg/plugins/service/FooLocalService.java | 10919 | package me.rkg.plugins.service;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.transaction.Isolation;
import com.liferay.portal.kernel.transaction.Propagation;
import com.liferay.portal.kernel.transaction.Transactional;
import com.liferay.portal.service.BaseLocalService;
import com.liferay.portal.service.InvokableLocalService;
import com.liferay.portal.service.PersistedModelLocalService;
/**
* The interface for the foo local service.
*
* <p>
* This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
* </p>
*
* @author Brian Wing Shun Chan
* @see FooLocalServiceUtil
* @see me.rkg.plugins.service.base.FooLocalServiceBaseImpl
* @see me.rkg.plugins.service.impl.FooLocalServiceImpl
* @generated
*/
@Transactional(isolation = Isolation.PORTAL, rollbackFor = {
PortalException.class, SystemException.class}
)
public interface FooLocalService extends BaseLocalService, InvokableLocalService,
PersistedModelLocalService {
/*
* NOTE FOR DEVELOPERS:
*
* Never modify or reference this interface directly. Always use {@link FooLocalServiceUtil} to access the foo local service. Add custom service methods to {@link me.rkg.plugins.service.impl.FooLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
*/
/**
* Adds the foo to the database. Also notifies the appropriate model listeners.
*
* @param foo the foo
* @return the foo that was added
* @throws SystemException if a system exception occurred
*/
public me.rkg.plugins.model.Foo addFoo(me.rkg.plugins.model.Foo foo)
throws com.liferay.portal.kernel.exception.SystemException;
/**
* Creates a new foo with the primary key. Does not add the foo to the database.
*
* @param fooId the primary key for the new foo
* @return the new foo
*/
public me.rkg.plugins.model.Foo createFoo(long fooId);
/**
* Deletes the foo with the primary key from the database. Also notifies the appropriate model listeners.
*
* @param fooId the primary key of the foo
* @return the foo that was removed
* @throws PortalException if a foo with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
public me.rkg.plugins.model.Foo deleteFoo(long fooId)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException;
/**
* Deletes the foo from the database. Also notifies the appropriate model listeners.
*
* @param foo the foo
* @return the foo that was removed
* @throws SystemException if a system exception occurred
*/
public me.rkg.plugins.model.Foo deleteFoo(me.rkg.plugins.model.Foo foo)
throws com.liferay.portal.kernel.exception.SystemException;
public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
/**
* Performs a dynamic query on the database and returns the matching rows.
*
* @param dynamicQuery the dynamic query
* @return the matching rows
* @throws SystemException if a system exception occurred
*/
@SuppressWarnings("rawtypes")
public java.util.List dynamicQuery(
com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
throws com.liferay.portal.kernel.exception.SystemException;
/**
* Performs a dynamic query on the database and returns a range of the matching rows.
*
* <p>
* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
* </p>
*
* @param dynamicQuery the dynamic query
* @param start the lower bound of the range of model instances
* @param end the upper bound of the range of model instances (not inclusive)
* @return the range of matching rows
* @throws SystemException if a system exception occurred
*/
@SuppressWarnings("rawtypes")
public java.util.List dynamicQuery(
com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
int end) throws com.liferay.portal.kernel.exception.SystemException;
/**
* Performs a dynamic query on the database and returns an ordered range of the matching rows.
*
* <p>
* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
* </p>
*
* @param dynamicQuery the dynamic query
* @param start the lower bound of the range of model instances
* @param end the upper bound of the range of model instances (not inclusive)
* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
* @return the ordered range of matching rows
* @throws SystemException if a system exception occurred
*/
@SuppressWarnings("rawtypes")
public java.util.List dynamicQuery(
com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException;
/**
* Returns the number of rows that match the dynamic query.
*
* @param dynamicQuery the dynamic query
* @return the number of rows that match the dynamic query
* @throws SystemException if a system exception occurred
*/
public long dynamicQueryCount(
com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
throws com.liferay.portal.kernel.exception.SystemException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public me.rkg.plugins.model.Foo fetchFoo(long fooId)
throws com.liferay.portal.kernel.exception.SystemException;
/**
* Returns the foo with the primary key.
*
* @param fooId the primary key of the foo
* @return the foo
* @throws PortalException if a foo with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public me.rkg.plugins.model.Foo getFoo(long fooId)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public com.liferay.portal.model.PersistedModel getPersistedModel(
java.io.Serializable primaryKeyObj)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException;
/**
* Returns the foo with the UUID in the group.
*
* @param uuid the UUID of foo
* @param groupId the group id of the foo
* @return the foo
* @throws PortalException if a foo with the UUID in the group could not be found
* @throws SystemException if a system exception occurred
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public me.rkg.plugins.model.Foo getFooByUuidAndGroupId(
java.lang.String uuid, long groupId)
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException;
/**
* Returns a range of all the foos.
*
* <p>
* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
* </p>
*
* @param start the lower bound of the range of foos
* @param end the upper bound of the range of foos (not inclusive)
* @return the range of foos
* @throws SystemException if a system exception occurred
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public java.util.List<me.rkg.plugins.model.Foo> getFoos(int start, int end)
throws com.liferay.portal.kernel.exception.SystemException;
/**
* Returns the number of foos.
*
* @return the number of foos
* @throws SystemException if a system exception occurred
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public int getFoosCount()
throws com.liferay.portal.kernel.exception.SystemException;
/**
* Updates the foo in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
*
* @param foo the foo
* @return the foo that was updated
* @throws SystemException if a system exception occurred
*/
public me.rkg.plugins.model.Foo updateFoo(me.rkg.plugins.model.Foo foo)
throws com.liferay.portal.kernel.exception.SystemException;
/**
* Updates the foo in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
*
* @param foo the foo
* @param merge whether to merge the foo with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
* @return the foo that was updated
* @throws SystemException if a system exception occurred
*/
public me.rkg.plugins.model.Foo updateFoo(me.rkg.plugins.model.Foo foo,
boolean merge)
throws com.liferay.portal.kernel.exception.SystemException;
/**
* Returns the Spring bean ID for this bean.
*
* @return the Spring bean ID for this bean
*/
public java.lang.String getBeanIdentifier();
/**
* Sets the Spring bean ID for this bean.
*
* @param beanIdentifier the Spring bean ID for this bean
*/
public void setBeanIdentifier(java.lang.String beanIdentifier);
public java.lang.Object invokeMethod(java.lang.String name,
java.lang.String[] parameterTypes, java.lang.Object[] arguments)
throws java.lang.Throwable;
}
| mit |
ronaldlunaramos/webstore | app/cache/dev/twig/99/95/145d69e0f5477ecd10d30ca4434e.php | 4878 | <?php
/* AcmeDemoBundle::layout.html.twig */
class __TwigTemplate_9995145d69e0f5477ecd10d30ca4434e extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = $this->env->loadTemplate("TwigBundle::layout.html.twig");
$this->blocks = array(
'head' => array($this, 'block_head'),
'title' => array($this, 'block_title'),
'body' => array($this, 'block_body'),
'content_header' => array($this, 'block_content_header'),
'content_header_more' => array($this, 'block_content_header_more'),
'content' => array($this, 'block_content'),
);
}
protected function doGetParent(array $context)
{
return "TwigBundle::layout.html.twig";
}
protected function doDisplay(array $context, array $blocks = array())
{
$this->parent->display($context, array_merge($this->blocks, $blocks));
}
// line 3
public function block_head($context, array $blocks = array())
{
// line 4
echo " <link rel=\"icon\" sizes=\"16x16\" href=\"";
echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("favicon.ico"), "html", null, true);
echo "\" />
<link rel=\"stylesheet\" href=\"";
// line 5
echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/acmedemo/css/demo.css"), "html", null, true);
echo "\" />
";
}
// line 8
public function block_title($context, array $blocks = array())
{
echo "Demo Bundle";
}
// line 10
public function block_body($context, array $blocks = array())
{
// line 11
echo " ";
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["app"]) ? $context["app"] : $this->getContext($context, "app")), "session"), "flashbag"), "get", array(0 => "notice"), "method"));
foreach ($context['_seq'] as $context["_key"] => $context["flashMessage"]) {
// line 12
echo " <div class=\"flash-message\">
<em>Notice</em>: ";
// line 13
echo twig_escape_filter($this->env, (isset($context["flashMessage"]) ? $context["flashMessage"] : $this->getContext($context, "flashMessage")), "html", null, true);
echo "
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['flashMessage'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
echo "
";
// line 17
$this->displayBlock('content_header', $context, $blocks);
// line 26
echo "
<div class=\"block\">
";
// line 28
$this->displayBlock('content', $context, $blocks);
// line 29
echo " </div>
";
// line 31
if (array_key_exists("code", $context)) {
// line 32
echo " <h2>Code behind this page</h2>
<div class=\"block\">
<div class=\"symfony-content\">";
// line 34
echo (isset($context["code"]) ? $context["code"] : $this->getContext($context, "code"));
echo "</div>
</div>
";
}
}
// line 17
public function block_content_header($context, array $blocks = array())
{
// line 18
echo " <ul id=\"menu\">
";
// line 19
$this->displayBlock('content_header_more', $context, $blocks);
// line 22
echo " </ul>
<div style=\"clear: both\"></div>
";
}
// line 19
public function block_content_header_more($context, array $blocks = array())
{
// line 20
echo " <li><a href=\"";
echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("_demo"), "html", null, true);
echo "\">Demo Home</a></li>
";
}
// line 28
public function block_content($context, array $blocks = array())
{
}
public function getTemplateName()
{
return "AcmeDemoBundle::layout.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 127 => 28, 120 => 20, 117 => 19, 110 => 22, 108 => 19, 105 => 18, 102 => 17, 94 => 34, 90 => 32, 88 => 31, 84 => 29, 82 => 28, 78 => 26, 76 => 17, 73 => 16, 64 => 13, 61 => 12, 56 => 11, 53 => 10, 47 => 8, 41 => 5, 36 => 4, 33 => 3, 40 => 6, 37 => 5, 31 => 3, 26 => 9,);
}
}
| mit |
pazguille/scrollshit | browserify.js | 376 | 'use strict';
var fs = require('fs');
var browserify = require('browserify');
if (!fs.existsSync('./dist')) {
fs.mkdirSync('./dist');
}
browserify({'debug': true, 'standalone': 'scrollshit'})
.require('./index.js', {'entry': true})
.bundle()
.on('error', function(err) { console.log('Error : ' + err.message); })
.pipe(fs.createWriteStream('dist/scrollshit.js')); | mit |
alpendergrass/montanacycling-racing_on_rails | vendor/gems/selenium-client-1.2.16/lib/selenium/client/extensions.rb | 4375 | module Selenium
module Client
# Convenience methods not explicitely part of the protocol
module Extensions
# These for all Ajax request to finish (Only works if you are using prototype, the wait in happenning browser side)
#
# See http://davidvollbracht.com/2008/6/4/30-days-of-tech-day-3-waitforajax for
# more background.
def wait_for_ajax(options={})
builder = JavascriptExpressionBuilder.new active_javascript_framework(options)
wait_for_condition builder.no_pending_ajax_requests.script,
options[:timeout_in_seconds]
end
# Wait for all Prototype effects to be processed (the wait in happenning browser side).
#
# Credits to http://github.com/brynary/webrat/tree/master
def wait_for_effects(options={})
builder = JavascriptExpressionBuilder.new active_javascript_framework(options)
wait_for_condition builder.no_pending_effects.script,
options[:timeout_in_seconds]
end
# Wait for an element to be present (the wait in happenning browser side).
def wait_for_element(locator, options={})
builder = JavascriptExpressionBuilder.new
builder.find_element(locator).append("element != null;")
wait_for_condition builder.script, options[:timeout_in_seconds]
end
# Wait for an element to NOT be present (the wait in happenning browser side).
def wait_for_no_element(locator, options={})
builder = JavascriptExpressionBuilder.new
builder.find_element(locator).append("element == null;")
wait_for_condition builder.script, options[:timeout_in_seconds]
end
# Wait for some text to be present (the wait is happening browser side).
#
# wait_for_text will search for the given argument within the innerHTML
# of the current DOM. Note that this method treats a single string
# as a special case.
#
# ==== Parameters
# wait_for_text accepts an optional hash of parameters:
# * <tt>:element</tt> - a selenium locator for an element limiting
# the search scope.
# * <tt>:timeout_in_seconds</tt> - duration in seconds after which we
# time out if text cannot be found.
#
# ==== Regular Expressions
# In addition to plain strings, wait_for_text accepts regular expressions
# as the pattern specification.
#
# ==== Examples
# The following are equivalent, and will match "some text" anywhere
# within the document:
# wait_for_text "some text"
# wait_for_text /some text/
#
# This will match "some text" anywhere within the specified element:
# wait_for_text /some text/, :element => "container"
#
# This will match "some text" only if it exactly matches the complete
# innerHTML of the specified element:
# wait_for_text "some text", :element => "container"
#
def wait_for_text(pattern, options={})
builder = JavascriptExpressionBuilder.new
builder.find_text(pattern, options).append("text_match == true;")
wait_for_condition builder.script, options[:timeout_in_seconds]
end
# Wait for some text to NOT be present (the wait in happenning browser side).
#
# See wait_for_text for usage details.
def wait_for_no_text(pattern, options={})
builder = JavascriptExpressionBuilder.new
builder.find_text(pattern, options).append("text_match == false;")
wait_for_condition builder.script, options[:timeout_in_seconds]
end
# Wait for a field to get a specific value (the wait in happenning browser side).
def wait_for_field_value(locator, expected_value, options={})
builder = JavascriptExpressionBuilder.new
builder.find_element(locator).element_value_is(expected_value)
wait_for_condition builder.script, options[:timeout_in_seconds]
end
def wait_for_no_field_value(locator, expected_value, options={})
builder = JavascriptExpressionBuilder.new
builder.find_element(locator).element_value_is_not(expected_value)
wait_for_condition builder.script, options[:timeout_in_seconds]
end
def active_javascript_framework(options)
options[:javascript_framework] || default_javascript_framework
end
end
end
end | mit |
npnelson/NETToolBox | src/NetToolBox.Core/TransientException.cs | 538 | using System;
using System.Collections.Generic;
using System.Text;
namespace NetToolBox.Core
{
/// <summary>
/// Use this exception class or one inherited from it to indicate the exception is likely transient (ie network down,etc)
/// </summary>
public class TransientException:Exception
{
public TransientException(string message) : base(message)
{
}
public TransientException(string message, Exception innerException) : base(message, innerException)
{
}
}
}
| mit |
jldec/pub-pkg-editor | client/editor-ui.js | 11477 | /*
* editor-ui.js
* browserify entry point for pub-pkg-editor user interface
*
* - depends on jquery
* - uses iframe containing website layout for preview with 2 editing modes
* - edit-mode captures clicks purely for selecting areas of content to edit
* - nav-mode makes the iframe work just like a normal website
*
* Copyright (c) 2015-2022 Jürgen Leschner - github.com/jldec - MIT license
*/
var humane = require('humane-js').create({ waitForMove:true });
window.onGeneratorLoaded = function editorUI(generator) {
var opts = generator.opts;
var u = generator.util;
var log = opts.log;
var origin = location.href.replace(/^(.*?:\/\/[^\/]+)\/.*$/,'$1' + opts.staticRoot + opts.editorPrefix);
var $outer = $('.outer').get(0); // outermost div - for width and height
var editor =
{ $name: $('.name'), // jquery name area in header
$edit: $('textarea.editor'), // jquery editor textarea
$updates: $('.updateslist'),
$uploads: $('.uploadsform'),
// binding is the _href of fragment being edited
// NOTE: don't bind by ref! recompile invalidates refs
binding: '' };
var $preview = $('iframe.preview'); // jquery preview iframe
var iframe = $preview.get(0); // preview iframe
var isLeftRight = true;
var editorSize; // set in resizeEditor
var DDPANE = 'pane-handle-drag'; // custom drag event type for pane handles
var $css, pwindow; // set in previewOnLoad
// iframe navigation and window backbutton handlers - use polling instead of onload
// iframe.onload = previewOnLoad;
var previewPoller = setInterval(previewOnLoad, 150);
// navigation handler - nav events emitted by pager in pub-preview.js
// note: fragments are selected via fragmentClick in preview selection mode
generator.on('nav', handleNav);
generator.on('loaded', handleNav);
generator.on('notify', function(s) { log(s); humane.log(s); });
var onIOS = /iPad|iPhone/i.test(navigator.userAgent);
$(window).on(onIOS ? "pagehide" : "beforeunload", function() {
log('beforeunload')
forceSave();
});
$('.commitbutton').click(toggleUpdates);
$('.editbutton').click(toggleFragments);
$('.menubutton').click(toggleUploads);
$('.name').click(revertEdits);
$('.helpbutton').click(help);
// initialize drag to adjust panes - use Text for type to satisfy IE
$('.handle').attr('draggable', 'true').get(0)
.addEventListener('dragstart', function(e) {
e.dataTransfer.setData('Text', DDPANE);
});
// handle pane adjust event over editor
document.addEventListener('dragover', function(e) {
adjustPanes(e.clientX, e.clientY, false); // handle over editor
e.preventDefault();
});
// handle pane adjuster drop event
// (firefox will try to navigate to the url if text is dropped on it)
document.addEventListener('drop', function(e) {
e.preventDefault();
});
// restore pane dimensions
resizeEditor(-1);
// called before unload or file commit/revert
function forceSave() {
generator.clientSaveHoldText();
generator.clientSaveUnThrottled();
}
// preview iframe onload handler - initializes pwindow and $css
function previewOnLoad() {
pwindow = iframe.contentWindow;
var p$ = pwindow && pwindow.$; // preview jquery object
if (!p$ || p$.editorLoaded) return; // not ready || already initialized
var pdoc = pwindow.document;
// handle pane adjust event over preview
pdoc.addEventListener('dragover', function(e) {
adjustPanes(e.clientX, e.clientY, true); // handle over preview
e.preventDefault();
});
// handle pane adjuster drop event over preview
// (firefox will try to navigate to the url if text is dropped on it)
pdoc.addEventListener('drop', function(e) {
e.preventDefault();
});
pRef = pwindow.pubRef || {};
var relPath = pRef.relPath || '';
$css = p$('<link rel="stylesheet" href="' + relPath + '/pub/css/pub-preview.css">');
p$('head').append($css);
$css.get(0).disabled = true;
var $script = p$('<script src="' + relPath + '/pub/js/pub-preview.js"></script>');
p$('body').append($script);
p$.editorLoaded = true;
clearInterval(previewPoller);
};
function toggleFragments() {
var css = $css && $css.get(0);
if (!css) return;
if (css.disabled) {
css.disabled = false;
pwindow.addEventListener('click', fragmentClick, true);
}
else {
css.disabled = true;
pwindow.removeEventListener('click', fragmentClick, true);
}
}
// fragment click handler
function fragmentClick(e) {
var el = e.target;
var href;
while (el && el.nodeName !== 'HTML' && !el.getAttribute('data-render-html')) { el = el.parentNode };
if (el && (href = el.getAttribute('data-render-html'))) {
bindEditor(generator.fragment$[href]);
toggleFragments(); // single fragment select less confusing
e.preventDefault(); // will also stop pager because it checks for e.defaultPrevented
}
}
// navigation handler
function handleNav(path, query, hash) {
if (path) {
history.replaceState(null, null, origin + path + (query || '') + (hash || ''));
bindEditor(generator.fragment$[path + hash]);
}
else {
// reload
bindEditor(generator.fragment$[editor.binding]);
}
hideControls();
}
// change editingHref to a different fragment or page
function bindEditor(fragment) {
saveBreakHold();
if (fragment) {
editor.$name.text(fragment._href);
if (fragment._holdUpdates) {
editText(fragment._holdText);
}
else {
editText(fragment._hdr + fragment._txt);
}
editor.binding = fragment._href;
showIfModified();
}
else {
editor.$name.text('');
editText('');
editor.binding = '';
}
}
// replace text in editor using clone()
// firefox gotcha: undo key mutates content after nav-triggered $edit.val()
// assume that jquery takes care of removing keyup handler
function editText(text) {
var pos = editor.$edit.get(0).selectionStart;
var $newedit = editor.$edit.clone().val(text);
var newedit = $newedit.get(0);
editor.$edit.replaceWith($newedit);
editor.$edit = $newedit;
$newedit.on('keyup', editorUpdate);
newedit.selectionStart = pos;
newedit.selectionEnd = pos;
editor.$edit.focus(hideControls).focus();
}
// register updates from editor using editor.binding
function editorUpdate() {
if (editor.binding) {
if ('hold' === generator.clientUpdateFragmentText(editor.binding, editor.$edit.val())) {
editor.holding = true;
}
showIfModified();
}
}
function showIfModified() {
if (generator.isFragmentModified(editor.binding)) { editor.$name.addClass('modified') }
else { editor.$name.removeClass('modified'); }
}
function revertEdits() {
if (generator.isFragmentModified(editor.binding) && confirm('Are you sure you want to revert the edits from this session?')) {
generator.revertFragmentState(editor.binding);
showIfModified();
}
}
// save with breakHold - may result in modified href ==> loss of binding context?
function saveBreakHold() {
if (editor.binding && editor.holding) {
generator.clientUpdateFragmentText(editor.binding, editor.$edit.val(), true);
editor.holding = false;
}
}
function toggleUpdates() {
if (toggleControls(editor.$updates)) {
refreshUpdates(); // get latest updates when opening updates.
}
editor.$uploads.hide();
}
function toggleUploads() {
toggleControls(editor.$uploads);
editor.$updates.hide();
}
function toggleControls($x) {
if (!$x.is(':hidden')) {
$x.slideUp(150);
editor.$edit.removeClass('showcontrols');
return false;
}
else {
editor.$edit.addClass('showcontrols');
$x.slideDown(150);
return true;
}
}
function hideControls() {
editor.$updates.slideUp(150);
editor.$uploads.slideUp(150);
editor.$edit.removeClass('showcontrols');
}
function refreshUpdates() {
forceSave();
$.getJSON('/admin/pub-editor-diffs', function(data) {
var html = generator.renderTemplate( {
_href: '/pub-editor-updates',
name: data.length + ' Updates',
diffs: data },
'pub-editor-updates')
var li$ = editor.$updates.html(html).find('li');
li$.click(function() {
var href = $(this).attr('data-href');
if (href) pwindow.pager(href);
});
li$.find('span.diffcommit').click(function() {
var path = $(this).parent().attr('data-file');
var difftext = $(this).parent().attr('title').slice(24);
if (confirm('Confirm commit:\n' + difftext + '\n')) {
$.post('/admin/pub-editor-commit', { path:path }, function() {
generator.emit('notify', 'Commit ' + path + ' OK');
}).fail(function(resp) {
generator.emit('notify', 'Commit failed, please reload browser and try again.\n' + resp.responseText);
});
hideControls();
return false;
}
});
li$.find('span.diffrevert').click(function() {
var path = $(this).parent().attr('data-file');
var difftext = $(this).parent().attr('title').slice(24);
if (confirm('Confirm revert:\n' + difftext + '\n')) {
$.post('/admin/pub-editor-revert', { path:path }, function() {
location.reload(); // brute force client reset after file-revert
}).fail(function(resp) {
generator.emit('notify', 'Revert failed, please reload browser and try again.\n' + resp.responseText);
});
hideControls();
return false;
}
});
});
}
// draggable pane adjuster
// x and y come from the mouse either over the preview or the editor
// preview coordinates start at the separator (==> editorSize + ratio)
// allow 25 pixels for the header (should be read from element)
function adjustPanes(x, y, overPreview) {
var ratio = isLeftRight ?
(x / $outer.clientWidth) :
((overPreview ? y : y - 25) / ($outer.clientHeight - 25));
var psize = overPreview ? editorSize + ratio * 100 : ratio * 100;
if (psize >= 0) { resizeEditor(psize); }
}
// adjust editor window size between 0 and 100%
// 0 means hide
// -1 means restore last setting (or 50%)
function resizeEditor(psize) {
var force = false;
if (psize === -1) {
force = true;
psize = max(10, editorSize || Number(localStorage.editorSize) || 50);
} else {
psize = psize % 100;
}
if (force || editorSize !== psize) {
if (psize) { localStorage.editorSize = editorSize = psize; } // don't remember 0
if (isLeftRight) {
$('.left.col').css( { width: psize + '%', height: '100%' });
$('.right.col').css( { width: (100 - psize) + '%', height: '100%' });
$('.handle').css( { left: psize + '%', top: '0' });
} else {
$('.top.row').css( { height: psize + '%', width: '100%' });
$('.bottom.row').css({ height: 100 - psize + '%', width: '100%' });
$('.handle').css( { left: '0', top: ((psize / 100 * ($outer.clientHeight - 25)) + 25) + 'px' });
}
}
}
function max(x,y) { return x>y ? x : y; }
function help() {
pwindow.pager(generator.page$['/help'] ? '/help' : '/pub-editor-help');
}
}
| mit |
codenautas/qa-control-server | test/test-get-info.js | 5425 | "use strict";
var expect = require('expect.js');
var qacServices = require('../lib/qac-services.js');
var helper=require('../test/test-helper.js');
var _ = require('lodash');
var sinon = require('sinon');
var fs = require('fs-extra');
var Path = require('path');
describe('qac-services information functions', function(){
helper.setup(qacServices);
describe('getInfo', function() {
var organization='sourcetravelers';
var project='the-app', project2='other-app';
var notADir = 'aFileNotADir';
function testBadInput(msg, p1, p2, expRE, sinonFS, sinonSTAT) {
it('should fail with '+msg, function() {
if(sinonFS) {
sinon.stub(fs, 'readFile').callsFake(function(pathDeJson){
var jsf = fs.readFileSync(pathDeJson, 'utf8');
jsf = jsf.slice(0, jsf.indexOf(']'))+',\n{"projectName":"'+sinonFS+'"}\n]'
//console.log("stubbed readFile", pathDeJson, jsf);
return Promise.resolve(jsf);
});
}
if(sinonSTAT) {
sinon.stub(fs, 'stat').callsFake(function(path){
if(new RegExp(project).test(path)) {
return Promise.reject({message:'STUBBED stat', code:'not-ENOENT'});
}
if(new RegExp(project2).test(path)) {
return Promise.reject({message:'STUBBED stat', code:'ENOENT'});
}
return Promise.resolve({isDirectory:function() { return true;} });
});
}
return qacServices.getInfo(p1, p2).then(function(info) {
console.log("info", info);
throw new Error('should fail');
},function(err){
if(sinonFS) { fs.readFile.restore(); }
if(sinonSTAT) { fs.stat.restore(); }
expect(err.message).to.match(expRE);
});
});
}
testBadInput('missing parameters', null, null, /missing organization/);
testBadInput('missing organization', 'non-existent-organization', null, /inexistent organization/);
testBadInput('missing organization directory', notADir , project, /invalid organization/);
testBadInput('missing project', organization, 'not-an-app', /inexistent project/);
testBadInput('missing project directory', organization, notADir, /invalid project/, notADir);
testBadInput('missing project directory wrong error', organization, project, /STUBBED stat/, false, true);
testBadInput('missing project directory right error', organization, project2, /invalid project/, false, true);
it('should return organization info', function() {
return qacServices.getInfo(organization).then(function(info) {
expect(info.organization.name).to.be(organization);
expect(info.organization.path).to.match(new RegExp(organization));
//console.log("info", info.organization.projects);
expect(info.organization.projects).to.eql([{projectName:project2}, {projectName:project}]);
});
});
it('should return project info', function() {
return qacServices.getInfo(organization, project).then(function(info) {
expect(info.organization.name).to.be(organization);
expect(info.organization.path).to.match(new RegExp(organization));
expect(info.project.name).to.be(project);
expect(info.project.path).to.match(new RegExp(project));
});
});
describe('coverage', function() {
it('forward wrong error', function(done) {
sinon.stub(fs, 'stat').callsFake(function(path){
return Promise.reject({message:'file not found', code:'not-ENOENT'});
});
qacServices.getInfo('wrong-organization', project).then(function(info) {
console.log("info", info)
done('should fail');
}).catch(function(err) {
expect(err.code).to.eql('not-ENOENT');
fs.stat.restore();
done();
});
});
});
});
describe('getOrganizations', function() {
it('should fail on inexistent repository path', function(done) {
var oriPath = _.clone(qacServices.repository.path);
qacServices.repository.path = '/non/existent/path/';
qacServices.getOrganizations().then(function(orgs) {
throw new Error('should fail');
},function(err){
expect(err.message).to.match(/inexistent repository/);
}).then(done,done).then(function() {
qacServices.repository.path = oriPath;
});
});
it('should return the list of organizations', function() {
return qacServices.getOrganizations().then(function(orgs) {
expect(orgs).to.eql(['codenautas','emptygroup','sourcetravelers']);
});
});
});
});
| mit |
T5750/book-repositories | SpringCloudInAction/ribbon-consumer/src/main/java/com/evangel/web/HelloService.java | 2678 | package com.evangel.web;
import java.net.URI;
import java.util.HashMap;
import java.util.Map;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponents;
import org.springframework.web.util.UriComponentsBuilder;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
@Service
public class HelloService {
private final Logger logger = Logger.getLogger(getClass());
@Autowired
RestTemplate restTemplate;
@HystrixCommand(fallbackMethod = "helloFallback")
public String helloService() {
return restTemplate
.getForEntity("http://HELLO-SERVICE/hello", String.class)
.getBody();
}
@HystrixCommand(fallbackMethod = "helloFallback", commandKey = "helloKey")
public String hello() {
long start = System.currentTimeMillis();
StringBuilder result = new StringBuilder();
// GET
result.append(restTemplate
.getForEntity("http://HELLO-SERVICE/hello", String.class)
.getBody()).append("<br>");
result.append(restTemplate
.getForEntity("http://HELLO-SERVICE/hello1?name={1}",
String.class, "didi")
.getBody()).append("<br>");
Map<String, String> params = new HashMap<>();
params.put("name", "dada");
result.append(restTemplate
.getForEntity("http://HELLO-SERVICE/hello1?name={name}",
String.class, params)
.getBody()).append("<br>");
UriComponents uriComponents = UriComponentsBuilder
.fromUriString("http://HELLO-SERVICE/hello1?name={name}")
.build().expand("dodo").encode();
URI uri = uriComponents.toUri();
result.append(restTemplate.getForEntity(uri, String.class).getBody())
.append("<br>");
// POST
User user = new User("didi", 20);
String postResult = restTemplate.postForObject(
"http://HELLO-SERVICE/hello3", user, String.class);
result.append(postResult).append("<br>");
user = new User("didi", 30);
ResponseEntity<String> responseEntity = restTemplate.postForEntity(
"http://HELLO-SERVICE/hello3", user, String.class);
result.append(responseEntity.getBody()).append("<br>");
// user = new User("didi", 40);
// URI responseURI =
// restTemplate.postForLocation("http://HELLO-SERVICE/hello3", user);
// result.append(responseURI).append("<br>");
//
// Long id = 10001L;
// restTemplate.delete("http://USER-SERVICE/user/{1}", id);
long end = System.currentTimeMillis();
logger.info("Spend time : " + (end - start));
return result.toString();
}
public String helloFallback() {
return "error";
}
} | mit |
kacpak/rpg-helper | src/app/api/session.api.js | 1883 | import Vue from 'vue';
import store from '../store';
export default {
fetchAll() {
return Vue.http.get('/api/sessions', {
headers: {
Authorization: `JWT ${store.state.account.token}`
}
});
},
fetch({ id, detailed }) {
return Vue.http.get(`/api/sessions/${id}`, {
params: {
detailed
},
headers: {
Authorization: `JWT ${store.state.account.token}`
}
});
},
create(name, description) {
return Vue.http.post('/api/sessions', {name, description}, {
headers: {
Authorization: `JWT ${store.state.account.token}`
}
});
},
invite({ id, userLogin }) {
return Vue.http.post(`/api/sessions/${id}/invite`, { login: userLogin }, {
headers: {
Authorization: `JWT ${store.state.account.token}`
}
});
},
createCharacter({ id, character }) {
return Vue.http.post(`/api/sessions/${id}/character`, { character }, {
headers: {
Authorization: `JWT ${store.state.account.token}`
}
});
},
editDetails({ id, details }) {
return Vue.http.post(`/api/sessions/${id}/details`, { details }, {
headers: {
Authorization: `JWT ${store.state.account.token}`
}
});
},
finish({ id }) {
return Vue.http.delete(`/api/sessions/${id}/details`, {
headers: {
Authorization: `JWT ${store.state.account.token}`
}
});
},
resume({ id }) {
return Vue.http.post(`/api/sessions/${id}/details/resume`, {}, {
headers: {
Authorization: `JWT ${store.state.account.token}`
}
});
}
};
| mit |
Reddit-Mud/RMUD | SinglePlayer/CloakOfDarkness/Cloakroom.cs | 1835 | using RMUD;
namespace CloakOfDarkness
{
public class Cloakroom : RMUD.Room
{
public override void Initialize()
{
/*
The Cloakroom is west of the Foyer.
"The walls of this small room were clearly once lined with hooks, though now only one remains.
The exit is a door to the east."
In the Cloakroom is a supporter called the small brass hook.
The hook is scenery. Understand "peg" as the hook.
[Inform will automatically understand any words in the object definition
("small", "brass", and "hook", in this case), but we can add extra synonyms
with this sort of Understand command.]
The description of the hook is "It's just a small brass hook,
[if something is on the hook]with [a list of things on the hook]
hanging on it[otherwise]screwed to the wall[end if]."
[This description is general enough that, if we were to add other hangable items
to the game, they would automatically be described correctly as well.]
*/
Short = "Cloakroom";
Long = "The walls of this small room were clearly once lined with hooks, though now only one remains.";
OpenLink(Direction.EAST, "Foyer");
Move(MudObject.GetObject("Hook"), this);
}
}
public class Hook : RMUD.Container
{
public Hook()
: base(RelativeLocations.On, RelativeLocations.On)
{ }
public override void Initialize()
{
SimpleName("small brass hook", "peg");
Long = "It's just a small brass hook.";
Check<MudObject, MudObject>("can take?")
.Do((actor, item) =>
{
SendMessage(actor, "It's screwed into the wall.");
return CheckResult.Disallow;
});
}
}
} | mit |
Tallyb/loopback-graphql | __test__/mutation.spec.ts | 2919 | 'use strict';
import { gqlRequest } from './testHelper';
import gql from 'graphql-tag';
// var _ = require('lodash');
describe('mutation', () => {
it('should add and Delete single entity', () => {
let id;
const createAuthor = gql`
mutation save ($obj: AuthorInput!) {
saveAuthor (obj: $obj) {
first_name
last_name
birth_date
id
}
}
`;
const authorInput = {
first_name: 'Virginia',
last_name: 'Wolf',
birth_date: new Date(),
};
const deleteAuthor = gql`
mutation delete ($id: ID!) {
deleteAuthor (id: $id) {
text
}
}
`;
return gqlRequest(createAuthor, 200, {
obj: authorInput,
})
.then(res => {
id = res.body.data.saveAuthor.id;
return gqlRequest(deleteAuthor, 200, {
id: id,
});
});
});
it('should add a single entity with sub type', () => {
const body = 'Heckelbery Finn';
const query = gql`
mutation save ($obj: NoteInput!) {
saveNote (obj: $obj) {
id
title
author {
first_name
last_name
}
}
}
`;
const variables = {
obj: {
title: 'Heckelbery Finn',
content: {
body: body,
footer: 'The end',
},
},
};
return gqlRequest(query, 200, variables)
.then(res => {
expect(res.body.data.saveNote.title).toEqual(body);
});
});
describe('remote methods', () => {
const userInput = {
email: 'John@a.com',
password: '123456',
username: 'John@a.com',
};
const createUser = `
mutation userCreate ($obj: UserInput!) {
saveUser ( obj: $obj ) {
id
}
}
`;
const deleteUser = gql`
mutation delete ($id: ID!) {
deleteAuthor (id: $id) {
text
}
}
`;
let userId;
beforeEach(() => {
return gqlRequest(createUser, 200, {
obj: userInput,
})
.then(res => {
userId = res.body.data.saveUser.id;
});
});
afterEach(() => {
return gqlRequest(deleteUser, 200, {
id: userId,
});
});
it.skip('should login and return an accessToken', () => {
const query = gql`
mutation login{
UserLogin(credentials:{username:"John@a.com", password:"123456"})
}
`;
return gqlRequest(query, 200)
.then(res => {
expect(res.body.data.UserLogin).toHaveProperty('id');
});
});
});
});
| mit |
baberthal/gulp_helpers_rails | spec/helpers/home_helper_spec.rb | 1280 | require 'rails_helper'
# Specs in this file have access to a helper object that includes
# the HomeHelper. For example:
#
# describe HomeHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# end
RSpec.describe HomeHelper, type: :helper do
before :each do
GulpHelpers.configure do |config|
config.stylesheet_path = 'whatever/stylesheets'
end
end
after :each do
GulpHelpers.configure do |config|
config.stylesheet_path = '/stylesheets'
end
end
describe 'gulp_stylesheet_link_tag' do
it 'returns a link tag for the stylesheet specified' do
expect(helper.gulp_stylesheet_link_tag('application'))
.to match(%r{/assets/whatever/stylesheets/application})
end
end
describe 'gulp_stylesheet_link_tag' do
it 'returns a link tag for the javascript file specified' do
expect(helper.gulp_javascript_include_tag('app'))
.to match(%r{/assets/javascripts/app})
end
end
describe 'gulp_stylesheet_link_tag' do
it 'returns an anchor tag for the image specified' do
expect(helper.gulp_image_tag('smiley'))
.to match(%r{/assets/images/smiley})
end
end
end
| mit |
fritzy/msgpack5 | test/16-bits-unsigned-integers.js | 974 |
var test = require('tape').test
, msgpack = require('../')
test('encoding/decoding 16-bits big-endian unsigned integers', function(t) {
var encoder = msgpack()
, allNum = []
, i
for (i = 256; i < 65536; i += 1423) {
allNum.push(i)
}
allNum.push(65535)
allNum.forEach(function(num) {
t.test('encoding ' + num, function(t) {
var buf = encoder.encode(num)
t.equal(buf.length, 3, 'must have 3 bytes')
t.equal(buf[0], 0xcd, 'must have the proper header');
t.equal(buf.readUInt16BE(1), num, 'must decode correctly');
t.end()
})
t.test('decoding ' + num, function(t) {
var buf = new Buffer(3)
buf[0] = 0xcd
buf.writeUInt16BE(num, 1)
t.equal(encoder.decode(buf), num, 'must decode correctly');
t.end()
})
t.test('mirror test ' + num, function(t) {
t.equal(encoder.decode(encoder.encode(num)), num, 'must stay the same');
t.end()
})
})
t.end()
})
| mit |
Rohansi/LoonyC | LoonyC.Shared/Assembly/Instructions/MultiInstruction.cs | 909 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace LoonyC.Shared.Assembly.Instructions
{
public class MultiInstruction : Instruction
{
private readonly List<Instruction> _instructions;
public MultiInstruction(IEnumerable<Instruction> instructions)
: base(Opcode.Count)
{
_instructions = instructions.ToList();
}
public override int Length
{
get { return _instructions.Sum(i => i.Length); }
}
public override void Write(BinaryWriter writer)
{
foreach (var instruction in _instructions)
{
instruction.Write(writer);
}
}
public override string ToString()
{
return string.Join(Environment.NewLine, _instructions.Select(i => i.ToString()));
}
}
}
| mit |
jlaso/tradukoj | src/JLaso/TranslationsBundle/Resources/public/resource/validate/script.js | 1028 | //
// jQuery Validate example script
//
// Prepared by David Cochran
//
// Free for your use -- No warranties, no guarantees!
//
$(document).ready(function(){
// Validate
// http://bassistance.de/jquery-plugins/jquery-plugin-validation/
// http://docs.jquery.com/Plugins/Validation/
// http://docs.jquery.com/Plugins/Validation/validate#toptions
$('#contact-form').validate({
rules: {
name: {
minlength: 2,
required: true
},
email: {
required: true,
email: true
},
subject: {
minlength: 2,
required: true
},
message: {
minlength: 2,
required: true
}
},
highlight: function(label) {
$(label).closest('.control-group').addClass('error');
},
success: function(label) {
label
.text('OK!').addClass('valid')
.closest('.control-group').addClass('success');
}
});
}); // end document.ready | mit |
nyjt/activeportal | spec/features/signing_in_spec.rb | 1316 | require 'spec_helper'
feature 'Signing in' do
given(:default_params) { { locale: :en } }
given(:other_user) { FactoryGirl.attributes_for(:user) }
background do
ActivePortal::User.create!(email: 'user@example.com', password: 'hello123', password_confirmation: 'hello123')
end
scenario 'Signing in with correct credentials' do
visit active_portal.user_session_path(default_params)
fill_in 'Email', with: 'user@example.com'
fill_in 'Password', with: 'hello123'
click_button 'Sign in'
expect(page).to have_text 'success'
expect(page).not_to have_text('translation missing')
end
scenario 'Signing in as another user' do
visit active_portal.user_session_path(default_params)
fill_in 'Email', with: other_user[:email]
fill_in 'Password', with: other_user[:password]
click_button 'Sign in'
expect(page).to have_text 'Invalid email or password'
expect(page).not_to have_text 'Logout'
end
scenario 'Signing in twice handle with error message' do
visit active_portal.user_session_path(default_params)
fill_in 'Email', with: 'user@example.com'
fill_in 'Password', with: 'hello123'
click_button 'Sign in'
visit active_portal.user_session_path(default_params)
expect(page).to have_text('You are already signed in.')
end
end
| mit |
romainneutron/PHPExiftool | lib/PHPExiftool/Driver/Tag/Pentax/ShadowCorrection.php | 1602 | <?php
/*
* This file is part of PHPExifTool.
*
* (c) 2012 Romain Neutron <imprec@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPExiftool\Driver\Tag\Pentax;
use JMS\Serializer\Annotation\ExclusionPolicy;
use PHPExiftool\Driver\AbstractTag;
/**
* @ExclusionPolicy("all")
*/
class ShadowCorrection extends AbstractTag
{
protected $Id = 121;
protected $Name = 'ShadowCorrection';
protected $FullName = 'Pentax::Main';
protected $GroupName = 'Pentax';
protected $g0 = 'MakerNotes';
protected $g1 = 'Pentax';
protected $g2 = 'Camera';
protected $Type = 'int8u';
protected $Writable = true;
protected $Description = 'Shadow Correction';
protected $flag_Permanent = true;
protected $Values = array(
0 => array(
'Id' => 0,
'Label' => 'Off',
),
1 => array(
'Id' => 1,
'Label' => 'On',
),
2 => array(
'Id' => 2,
'Label' => 'Auto 2',
),
'0 0' => array(
'Id' => '0 0',
'Label' => 'Off',
),
'1 1' => array(
'Id' => '1 1',
'Label' => 'Weak',
),
'1 2' => array(
'Id' => '1 2',
'Label' => 'Normal',
),
'1 3' => array(
'Id' => '1 3',
'Label' => 'Strong',
),
'2 4' => array(
'Id' => '2 4',
'Label' => 'Auto',
),
);
}
| mit |
datacite/bracco | tests/integration/components/doi-creator-test.js | 1203 | import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { setupFactoryGuy, make } from 'ember-data-factory-guy';
import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
module('Integration | Component | doi creator', function(hooks) {
setupRenderingTest(hooks);
setupFactoryGuy(hooks);
test('it renders', async function(assert) {
this.set('model', make('doi'));
this.set('creator', make('creator'));
await render(hbs`{{doi-creator model=model fragment=creator index=0}}`);
assert.dom('*').hasText('Name Identifier Uniquely identifies an individual or legal entity, according to various schemas, e.g. ORCID, ROR or ISNI. Use name identifier expressed as URL. The Given Name, Family Name and Name will automatically be filled out for ORCID and ROR identifiers. Add another name identifier Person Organization Unknown Given Name The personal or first name of the creator. Family Name The surname or last name of the creator. Name (from Given Name and Family Name) Affiliation Affiliation names and identifiers are provided by the Research Organization Registry (ROR). Add another affiliation');
});
});
| mit |
GoodBoyDigital/p2.js | src/utils/Pool.js | 1056 | module.exports = Pool;
/**
* @class Object pooling utility.
*/
function Pool(options) {
options = options || {};
/**
* @property {Array} objects
* @type {Array}
*/
this.objects = [];
if(options.size !== undefined){
this.resize(options.size);
}
}
/**
* @method resize
* @param {number} size
* @return {Pool} Self, for chaining
*/
Pool.prototype.resize = function (size) {
var objects = this.objects;
while (objects.length > size) {
objects.pop();
}
while (objects.length < size) {
objects.push(this.create());
}
return this;
};
/**
* Get an object from the pool or create a new instance.
* @method get
* @returns {Object}
*/
Pool.prototype.get = function () {
var objects = this.objects;
return objects.length ? objects.pop() : this.create();
};
/**
* Clean up and put the object back into the pool for later use.
* @method release
* @param {Object} object
* @return {Pool} Self for chaining
*/
Pool.prototype.release = function (object) {
this.destroy(object);
this.objects.push(object);
return this;
};
| mit |
indirectlylit/whattowatch | starter/wsgi.py | 391 | """
WSGI config for starter project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "starter.settings")
application = get_wsgi_application()
| mit |
rafaeljuzo/makeuptown | site/tools/smarty/plugins/modifier.escape.php | 7799 | <?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifier
*/
/**
* Smarty escape modifier plugin
*
* Type: modifier<br>
* Name: escape<br>
* Purpose: escape string for output
*
* @link http://www.smarty.net/manual/en/language.modifier.count.characters.php count_characters (Smarty online manual)
* @author Monte Ohrt <monte at ohrt dot com>
* @param string $string input string
* @param string $esc_type escape type
* @param string $char_set character set, used for htmlspecialchars() or htmlentities()
* @param boolean $double_encode encode already encoded entitites again, used for htmlspecialchars() or htmlentities()
* @return string escaped input string
*/
/* PrestaShop
change double_encode to false by default
function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $double_encode = true)
*/
function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $double_encode = false)
/* END */
{
static $_double_encode = null;
if ($_double_encode === null) {
$_double_encode = version_compare(PHP_VERSION, '5.2.3', '>=');
}
if (!$char_set) {
$char_set = Smarty::$_CHARSET;
}
switch ($esc_type) {
case 'html':
if ($_double_encode) {
// php >=5.3.2 - go native
return htmlspecialchars($string, ENT_QUOTES, $char_set, $double_encode);
} else {
if ($double_encode) {
// php <5.2.3 - only handle double encoding
return htmlspecialchars($string, ENT_QUOTES, $char_set);
} else {
// php <5.2.3 - prevent double encoding
$string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
$string = htmlspecialchars($string, ENT_QUOTES, $char_set);
$string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);
return $string;
}
}
case 'htmlall':
if (Smarty::$_MBSTRING) {
// mb_convert_encoding ignores htmlspecialchars()
if ($_double_encode) {
// php >=5.3.2 - go native
$string = htmlspecialchars($string, ENT_QUOTES, $char_set, $double_encode);
} else {
if ($double_encode) {
// php <5.2.3 - only handle double encoding
$string = htmlspecialchars($string, ENT_QUOTES, $char_set);
} else {
// php <5.2.3 - prevent double encoding
$string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
$string = htmlspecialchars($string, ENT_QUOTES, $char_set);
$string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);
return $string;
}
}
// htmlentities() won't convert everything, so use mb_convert_encoding
return mb_convert_encoding($string, 'HTML-ENTITIES', $char_set);
}
// no MBString fallback
if ($_double_encode) {
return htmlentities($string, ENT_QUOTES, $char_set, $double_encode);
} else {
if ($double_encode) {
return htmlentities($string, ENT_QUOTES, $char_set);
} else {
$string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
$string = htmlentities($string, ENT_QUOTES, $char_set);
$string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);
return $string;
}
}
case 'url':
return rawurlencode($string);
case 'urlpathinfo':
return str_replace('%2F', '/', rawurlencode($string));
case 'quotes':
// escape unescaped single quotes
return preg_replace("%(?<!\\\\)'%", "\\'", $string);
case 'hex':
// escape every byte into hex
// Note that the UTF-8 encoded character ä will be represented as %c3%a4
$return = '';
$_length = strlen($string);
for ($x = 0; $x < $_length; $x++) {
$return .= '%' . bin2hex($string[$x]);
}
return $return;
case 'hexentity':
$return = '';
if (Smarty::$_MBSTRING) {
require_once(SMARTY_PLUGINS_DIR . 'shared.mb_unicode.php');
$return = '';
foreach (smarty_mb_to_unicode($string, Smarty::$_CHARSET) as $unicode) {
$return .= '&#x' . strtoupper(dechex($unicode)) . ';';
}
return $return;
}
// no MBString fallback
$_length = strlen($string);
for ($x = 0; $x < $_length; $x++) {
$return .= '&#x' . bin2hex($string[$x]) . ';';
}
return $return;
case 'decentity':
$return = '';
if (Smarty::$_MBSTRING) {
require_once(SMARTY_PLUGINS_DIR . 'shared.mb_unicode.php');
$return = '';
foreach (smarty_mb_to_unicode($string, Smarty::$_CHARSET) as $unicode) {
$return .= '&#' . $unicode . ';';
}
return $return;
}
// no MBString fallback
$_length = strlen($string);
for ($x = 0; $x < $_length; $x++) {
$return .= '&#' . ord($string[$x]) . ';';
}
return $return;
case 'javascript':
// escape quotes and backslashes, newlines, etc.
return strtr($string, array('\\' => '\\\\', "'" => "\\'", '"' => '\\"', "\r" => '\\r', "\n" => '\\n', '</' => '<\/'));
case 'mail':
if (Smarty::$_MBSTRING) {
require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php');
return smarty_mb_str_replace(array('@', '.'), array(' [AT] ', ' [DOT] '), $string);
}
// no MBString fallback
return str_replace(array('@', '.'), array(' [AT] ', ' [DOT] '), $string);
case 'nonstd':
// escape non-standard chars, such as ms document quotes
$return = '';
if (Smarty::$_MBSTRING) {
require_once(SMARTY_PLUGINS_DIR . 'shared.mb_unicode.php');
foreach (smarty_mb_to_unicode($string, Smarty::$_CHARSET) as $unicode) {
if ($unicode >= 126) {
$return .= '&#' . $unicode . ';';
} else {
$return .= chr($unicode);
}
}
return $return;
}
$_length = strlen($string);
for ($_i = 0; $_i < $_length; $_i++) {
$_ord = ord(substr($string, $_i, 1));
// non-standard char, escape it
if ($_ord >= 126) {
$return .= '&#' . $_ord . ';';
} else {
$return .= substr($string, $_i, 1);
}
}
return $return;
default:
return $string;
}
}
?>
| mit |
pixelmaid/DynamicBrushes | javascript/app/Expression.js | 7765 | //Expression.js
/* View class that describes mathematical expression built on top of CodeMirror
(http://codemirror.net/
Some code here references expressions in Apparatus: https://github.com/cdglabs/apparatus
*/
"use strict";
define(["jquery", "codemirror", "app/Emitter", "app/id"],
function($, CodeMirror, Emitter, ID) {
var Expression = class extends Emitter {
constructor(el, mappingId, expressionId) {
super();
this.el = el;
this.addReferenceCheck = false;
this.mappingId = mappingId;
this.id = expressionId;
this.references = {};
this.marks = {};
this.mirror = CodeMirror.fromTextArea(el, {
mode: "javascript",
// Needed for auto-expanding height to work properly.
viewportMargin: Infinity,
// Use tabs to indent.
smartIndent: true,
indentUnit: 2,
tabSize: 2,
indentWithTabs: true,
// Disable scrolling
lineWrapping: true,
scrollbarStyle: "null",
// Disable undo
undoDepth: 0
});
this.mirror.setSize("auto", 24);
this.mirror.on("change", function() {
this.onChange();
}.bind(this));
this.mirror.on("mousedown", function() {
this.onMirrorMouseDown();
}.bind(this));
this.mirror.setValue("");
}
onChange() {
//does not trigger if change is the result of adding a reference
if (!this.addReferenceCheck) {
console.log("code mirror", this.mappingId, "changed", this.mirror.getValue());
var removedReferences = [];
var text = this.getText();
for(var p in this.references){
if(this.references.hasOwnProperty(p)){
var inText = text.search(p);
if(inText == -1){
removedReferences.push(p);
}
}
}
console.log("changed",removedReferences,text);
this.trigger("ON_TEXT_CHANGED", [this,removedReferences]);
}
}
onMirrorMouseDown() {
console.log("mirror mouse down");
}
getText() {
return this.mirror.getValue();
}
getPropertyList() {
return this.references;
}
containsActive(){
for(var p in this.references){
if(this.references.hasOwnProperty(p)){
if(this.references[p][0] == "stylus" || this.references[p][0] == "ui" ){
return true;
}
}
}
return false;
}
removeReference(referenceId) {
this.addReferenceCheck = true;
delete this.references[referenceId];
delete this.marks[referenceId];
var referenceString = '%' + referenceId + '%';
var currentText = this.getText();
var newText = currentText.replace(referenceString, "");
console.log("old text, new text", currentText, newText);
this.mirror.setValue(newText);
this.renderMarks();
this.addReferenceCheck = false;
}
renderMarks() {
this.clearAllMarks();
this.addReferenceCheck = true;
var currentText = this.getText();
for (var key in this.marks) {
if (this.marks.hasOwnProperty(key)) {
var markText = '%' + key + '%';
var startIndex = currentText.indexOf(markText);
var endIndex = startIndex + markText.length;
console.log("start index, end index", startIndex, endIndex);
var el = this.marks[key];
this.mirror.markText({
line: 0,
ch: startIndex
}, {
line: 0,
ch: endIndex
}, {
replacedWith: el,
handleMouseEvents: true
});
}
}
this.addReferenceCheck = false;
}
clearAllMarks() {
this.addReferenceCheck = true;
var text = this.getText();
this.mirror.setValue("");
this.mirror.setValue(text);
this.addReferenceCheck = false;
}
updateReferences(expressionText, expressionPropertyList) {
this.addReferenceCheck = true;
this.mirror.setValue(expressionText);
this.addReferenceCheck = false;
this.references = expressionPropertyList;
var els = [];
for (var key in expressionPropertyList) {
if (expressionPropertyList.hasOwnProperty(key)) {
var propList = expressionPropertyList[key];
var type;
if (propList[0] == "stylus") {
type = "sensor_prop";
}
else if (propList[0] == "ui") {
type = "ui_prop";
} else {
type = "generator";
}
var name = propList[1][0];
var referenceDisplayName = propList[2][0];
els.push($(this.addMark(referenceDisplayName, type, key, name, propList[0])));
}
}
this.renderMarks();
return els;
}
addMark(referenceDisplayName, type, referenceId, name,heading) {
var el = document.createElement("span");
el.innerHTML = referenceDisplayName;
el.setAttribute("class", "block property " + type);
el.setAttribute("type", type);
el.setAttribute("parent_id", this.id);
el.setAttribute("id", referenceId);
el.setAttribute("name", name);
this.marks[referenceId] = el;
return el;
}
addReference(type, referenceName, referenceProperties, referencePropertyDisplayNames, referenceId, referenceDisplayName, name) {
this.references[referenceId] = [referenceName, referenceProperties, referencePropertyDisplayNames];
console.log("added reference", this.references, referenceName,referenceDisplayName);
this.addReferenceCheck = true;
this.mirror.setValue(this.mirror.getValue() + "%" + referenceId + "%");
this.addReferenceCheck = false;
var el = this.addMark(referenceDisplayName, type, referenceId, name, referenceName);
this.renderMarks();
return $(el);
}
};
return Expression;
}); | mit |
neetsdkasu/Paiza-POH-MyAnswers | POH6/kirishima/answer.js | 829 | /*
* 結果 https://paiza.jp/poh/joshibato/kirishima/result/dbb4f923
*/
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function (chunk) {
var lines = chunk.toString().trim().split('\n');
var n = parseInt(lines[0]);
var t = lines[1].split(' ').map(function(x){return parseInt(x);});
var m = parseInt(lines[2]);
var i, d, f, r;
for (i = 0; i < m; i++) {
d = parseInt(lines[i + 3]);
f = (new Array(n)).fill(false);
r = 'No';
for (;;) {
if (d < 1 || d >= n) break;
if (d == n - 1) {
r = 'Yes';
break;
}
if (t[d] == 0) break;
if (f[d] == true) break;
f[d] = true;
d += t[d] - 0;
}
console.log(r);
}
});
| mit |
SuperheroicCoding/notifications | karma.conf.js | 2363 | 'use strict';
var path = require('path');
var conf = require('./gulp/conf');
var _ = require('lodash');
var wiredep = require('wiredep');
var pathSrcHtml = [
path.join(conf.paths.src, '/**/*.html')
];
function listFiles() {
var wiredepOptions = _.extend({}, conf.wiredep, {
dependencies: true,
devDependencies: true
});
var patterns = wiredep(wiredepOptions).js
.concat([
path.join(conf.paths.tmp, '/serve/app/index.module.js'),
])
.concat(pathSrcHtml);
var files = patterns.map(function(pattern) {
return {
pattern: pattern
};
});
files.push({
pattern: path.join(conf.paths.src, '/assets/**/*'),
included: false,
served: true,
watched: false
});
return files;
}
module.exports = function(config) {
var configuration = {
files: listFiles(),
singleRun: true,
autoWatch: false,
ngHtml2JsPreprocessor: {
stripPrefix: conf.paths.src + '/',
moduleName: 'sokoNotifications'
},
logLevel: 'WARN',
frameworks: ['jasmine'],
browsers : ['PhantomJS'],
plugins : [
'karma-phantomjs-launcher',
'karma-coverage',
'karma-jasmine',
'karma-ng-html2js-preprocessor'
],
coverageReporter: {
type : 'html',
dir : 'coverage/'
},
reporters: ['progress'],
proxies: {
'/assets/': path.join('/base/', conf.paths.src, '/assets/')
}
};
// This is the default preprocessors configuration for a usage with Karma cli
// The coverage preprocessor is added in gulp/unit-test.js only for single tests
// It was not possible to do it there because karma doesn't let us now if we are
// running a single test or not
configuration.preprocessors = {};
pathSrcHtml.forEach(function(path) {
configuration.preprocessors[path] = ['ng-html2js'];
});
// This block is needed to execute Chrome on Travis
// If you ever plan to use Chrome and Travis, you can keep it
// If not, you can safely remove it
// https://github.com/karma-runner/karma/issues/1144#issuecomment-53633076
if(configuration.browsers[0] === 'Chrome' && process.env.TRAVIS) {
configuration.customLaunchers = {
'chrome-travis-ci': {
base: 'Chrome',
flags: ['--no-sandbox']
}
};
configuration.browsers = ['chrome-travis-ci'];
}
config.set(configuration);
};
| mit |
SimpleRepos/TRPG | Assets/Scripts/UI/CharacterSheet.cs | 871 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CharacterSheet : MonoBehaviour, IGUIStateable {
#region IGUIStateable
public void GUISet(GUIStateMachine.Setting setting) {
Visible = (setting != GUIStateMachine.Setting.OFF);
}
#endregion
bool Visible {
get { return background.activeSelf; }
set { background.SetActive(value); }
}
#pragma warning disable 0649
[SerializeField] GameObject background;
#pragma warning restore 0649
GUIStateMachine gui;
void Start() {
gui = FindObjectOfType<GUIStateMachine>();
}
public void Activate(Actor actor) {
//~~_ populate
gui.SetState(GUIStateMachine.GUIState.CHARACTER_SHEET);
}
public void OnCloseButton() {
gui.SetState(GUIStateMachine.GUIState.BROWSE);
}
}
| mit |
SyndicateLtd/SyndicateQT | src/test/torcontrol_tests.cpp | 7200 | // Copyright (c) 2017 The Zcash developers
// Copyright (c) 2017-2018 The PIVX developers
// Copyright (c) 2019 The Syndicate Ltd developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "torcontrol.cpp"
#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_SUITE(torcontrol_tests)
void CheckSplitTorReplyLine(std::string input, std::string command, std::string args)
{
BOOST_TEST_MESSAGE(std::string("CheckSplitTorReplyLine(") + input + ")");
auto ret = SplitTorReplyLine(input);
BOOST_CHECK_EQUAL(ret.first, command);
BOOST_CHECK_EQUAL(ret.second, args);
}
BOOST_AUTO_TEST_CASE(util_SplitTorReplyLine)
{
// Data we should receive during normal usage
CheckSplitTorReplyLine(
"PROTOCOLINFO PIVERSION",
"PROTOCOLINFO", "PIVERSION");
CheckSplitTorReplyLine(
"AUTH METHODS=COOKIE,SAFECOOKIE COOKIEFILE=\"/home/x/.tor/control_auth_cookie\"",
"AUTH", "METHODS=COOKIE,SAFECOOKIE COOKIEFILE=\"/home/x/.tor/control_auth_cookie\"");
CheckSplitTorReplyLine(
"AUTH METHODS=NULL",
"AUTH", "METHODS=NULL");
CheckSplitTorReplyLine(
"AUTH METHODS=HASHEDPASSWORD",
"AUTH", "METHODS=HASHEDPASSWORD");
CheckSplitTorReplyLine(
"VERSION Tor=\"0.2.9.8 (git-a0df013ea241b026)\"",
"VERSION", "Tor=\"0.2.9.8 (git-a0df013ea241b026)\"");
CheckSplitTorReplyLine(
"AUTHCHALLENGE SERVERHASH=aaaa SERVERNONCE=bbbb",
"AUTHCHALLENGE", "SERVERHASH=aaaa SERVERNONCE=bbbb");
// Other valid inputs
CheckSplitTorReplyLine("COMMAND", "COMMAND", "");
CheckSplitTorReplyLine("COMMAND SOME ARGS", "COMMAND", "SOME ARGS");
// These inputs are valid because PROTOCOLINFO accepts an OtherLine that is
// just an OptArguments, which enables multiple spaces to be present
// between the command and arguments.
CheckSplitTorReplyLine("COMMAND ARGS", "COMMAND", " ARGS");
CheckSplitTorReplyLine("COMMAND EVEN+more ARGS", "COMMAND", " EVEN+more ARGS");
}
void CheckParseTorReplyMapping(std::string input, std::map<std::string,std::string> expected)
{
BOOST_TEST_MESSAGE(std::string("CheckParseTorReplyMapping(") + input + ")");
auto ret = ParseTorReplyMapping(input);
BOOST_CHECK_EQUAL(ret.size(), expected.size());
auto r_it = ret.begin();
auto e_it = expected.begin();
while (r_it != ret.end() && e_it != expected.end()) {
BOOST_CHECK_EQUAL(r_it->first, e_it->first);
BOOST_CHECK_EQUAL(r_it->second, e_it->second);
r_it++;
e_it++;
}
}
BOOST_AUTO_TEST_CASE(util_ParseTorReplyMapping)
{
// Data we should receive during normal usage
CheckParseTorReplyMapping(
"METHODS=COOKIE,SAFECOOKIE COOKIEFILE=\"/home/x/.tor/control_auth_cookie\"", {
{"METHODS", "COOKIE,SAFECOOKIE"},
{"COOKIEFILE", "/home/x/.tor/control_auth_cookie"},
});
CheckParseTorReplyMapping(
"METHODS=NULL", {
{"METHODS", "NULL"},
});
CheckParseTorReplyMapping(
"METHODS=HASHEDPASSWORD", {
{"METHODS", "HASHEDPASSWORD"},
});
CheckParseTorReplyMapping(
"Tor=\"0.2.9.8 (git-a0df013ea241b026)\"", {
{"Tor", "0.2.9.8 (git-a0df013ea241b026)"},
});
CheckParseTorReplyMapping(
"SERVERHASH=aaaa SERVERNONCE=bbbb", {
{"SERVERHASH", "aaaa"},
{"SERVERNONCE", "bbbb"},
});
CheckParseTorReplyMapping(
"ServiceID=exampleonion1234", {
{"ServiceID", "exampleonion1234"},
});
CheckParseTorReplyMapping(
"PrivateKey=RSA1024:BLOB", {
{"PrivateKey", "RSA1024:BLOB"},
});
CheckParseTorReplyMapping(
"ClientAuth=bob:BLOB", {
{"ClientAuth", "bob:BLOB"},
});
// Other valid inputs
CheckParseTorReplyMapping(
"Foo=Bar=Baz Spam=Eggs", {
{"Foo", "Bar=Baz"},
{"Spam", "Eggs"},
});
CheckParseTorReplyMapping(
"Foo=\"Bar=Baz\"", {
{"Foo", "Bar=Baz"},
});
CheckParseTorReplyMapping(
"Foo=\"Bar Baz\"", {
{"Foo", "Bar Baz"},
});
// Escapes
CheckParseTorReplyMapping(
"Foo=\"Bar\\ Baz\"", {
{"Foo", "Bar Baz"},
});
CheckParseTorReplyMapping(
"Foo=\"Bar\\Baz\"", {
{"Foo", "BarBaz"},
});
CheckParseTorReplyMapping(
"Foo=\"Bar\\@Baz\"", {
{"Foo", "Bar@Baz"},
});
CheckParseTorReplyMapping(
"Foo=\"Bar\\\"Baz\" Spam=\"\\\"Eggs\\\"\"", {
{"Foo", "Bar\"Baz"},
{"Spam", "\"Eggs\""},
});
CheckParseTorReplyMapping(
"Foo=\"Bar\\\\Baz\"", {
{"Foo", "Bar\\Baz"},
});
// C escapes
CheckParseTorReplyMapping(
"Foo=\"Bar\\nBaz\\t\" Spam=\"\\rEggs\" Octals=\"\\1a\\11\\17\\18\\81\\377\\378\\400\\2222\" Final=Check", {
{"Foo", "Bar\nBaz\t"},
{"Spam", "\rEggs"},
{"Octals", "\1a\11\17\1" "881\377\37" "8\40" "0\222" "2"},
{"Final", "Check"},
});
CheckParseTorReplyMapping(
"Valid=Mapping Escaped=\"Escape\\\\\"", {
{"Valid", "Mapping"},
{"Escaped", "Escape\\"},
});
CheckParseTorReplyMapping(
"Valid=Mapping Bare=\"Escape\\\"", {});
CheckParseTorReplyMapping(
"OneOctal=\"OneEnd\\1\" TwoOctal=\"TwoEnd\\11\"", {
{"OneOctal", "OneEnd\1"},
{"TwoOctal", "TwoEnd\11"},
});
// Special handling for null case
// (needed because string comparison reads the null as end-of-string)
BOOST_TEST_MESSAGE(std::string("CheckParseTorReplyMapping(Null=\"\\0\")"));
auto ret = ParseTorReplyMapping("Null=\"\\0\"");
BOOST_CHECK_EQUAL(ret.size(), 1);
auto r_it = ret.begin();
BOOST_CHECK_EQUAL(r_it->first, "Null");
BOOST_CHECK_EQUAL(r_it->second.size(), 1);
BOOST_CHECK_EQUAL(r_it->second[0], '\0');
// A more complex valid grammar. PROTOCOLINFO accepts a VersionLine that
// takes a key=value pair followed by an OptArguments, making this valid.
// Because an OptArguments contains no semantic data, there is no point in
// parsing it.
CheckParseTorReplyMapping(
"SOME=args,here MORE optional=arguments here", {
{"SOME", "args,here"},
});
// Inputs that are effectively invalid under the target grammar.
// PROTOCOLINFO accepts an OtherLine that is just an OptArguments, which
// would make these inputs valid. However,
// - This parser is never used in that situation, because the
// SplitTorReplyLine parser enables OtherLine to be skipped.
// - Even if these were valid, an OptArguments contains no semantic data,
// so there is no point in parsing it.
CheckParseTorReplyMapping("ARGS", {});
CheckParseTorReplyMapping("MORE ARGS", {});
CheckParseTorReplyMapping("MORE ARGS", {});
CheckParseTorReplyMapping("EVEN more=ARGS", {});
CheckParseTorReplyMapping("EVEN+more ARGS", {});
}
BOOST_AUTO_TEST_SUITE_END()
| mit |
Sndicate/sndicate-deprecated | core/views/dash/post_layout.rb | 199 | class PostLayout < Mustache
def page_name
'Posts'
end
def csrf_tag
@csrf_tag || "Whatever"
end
def whatever
@whatever || 'Not the thing that is supposed to be here'
end
end
| mit |
hubot-js/hubot.js | src/internal-gears/gear-hubot-gears-status/src/handlers/status.js | 2777 | 'use strict';
const db = require('../../../../lib/db');
const trigger = require('../../../../message-handler/trigger');
exports.handle = handle;
function handle(hubot, message, task, params) {
const action = getAction(message, hubot);
if (action && isGearChangeStatusMessage(action, hubot, message)) {
hubot.isAdminUser(message.user)
.then(isAdmin => changeStatus(isAdmin, action, hubot, message, params[0]));
return true;
}
return false;
}
function changeStatus(isAdmin, action, hubot, message, gearDescription) {
if (isAdmin) {
const gear = hubot.findGear(gearDescription);
if (gear && !gear.isInternal) {
if (gear.active === action.status) {
hubot.speak(message, 'hubot-gears-status:activation.already', { statusDescription: action.already });
} else {
changeGearStatus(action, hubot, gear.description)
.then(() => hubot.speak(message, sucessMessage(action, hubot, gear.description)),
() => hubot.speak(message, errorMessage(action, hubot, gear.description)));
}
}
}
}
function changeGearStatus(action, hubot, gear) {
hubot.findGear(gear).active = action.status;
return db.getDb().run('UPDATE gears SET active = ? WHERE description = ?', action.status, gear);
}
function isGearChangeStatusMessage(action, hubot, message) {
return hubot.gears.find(gear => trigger.check(message, `${action.description} ${gear.description}`).ok) !== null;
}
function sucessMessage(action, hubot, gearDescription) {
const messages = { statusDescription: action.success, gearDescription };
return hubot.speech().append('hubot-gears-status:activation.success', messages).end();
}
function errorMessage(action, hubot, gearDescription) {
const messages = { statusDescription: action.description, gearDescription };
return hubot.speech().append('hubot-gears-status:activation.error', messages).end();
}
function getAction(message, hubot) {
const active = hubot.i18n('hubot-gears-status:activation.active');
const inactive = hubot.i18n('hubot-gears-status:activation.inactive');
const activate = hubot.i18n('hubot-gears-status:activation.activate');
const deactivate = hubot.i18n('hubot-gears-status:activation.deactivate');
const activated = hubot.i18n('hubot-gears-status:activation.actived');
const deactivated = hubot.i18n('hubot-gears-status:activation.deactivated');
const messageWithoutBotName = hubot.removeBotNameFromMessage(message);
if (messageWithoutBotName.startsWith(activate)) {
return { description: activate, status: true, already: active, success: activated };
}
if (messageWithoutBotName.startsWith(deactivate)) {
return { description: deactivate, status: false, already: inactive, success: deactivated };
}
return null;
}
| mit |
wegowise/polymorpheus | spec/mysql2_adapter_spec.rb | 9076 | require 'spec_helper'
describe Polymorpheus::ConnectionAdapters::MysqlAdapter do
# The foreign key name is not truncated, so the maximum column name
# length ends up being: 64 - "pets_" - "_fk" == 56
#
# Using `t.references` also adds an index on this column, with a slightly
# longer name: 64 - "index_pets_on_" - "_id" == 46
#
# Go with the shorter of the two here, since it's still long enough to test
# the generation of Polymorpheus' trigger names.
let(:long_column1) { ('x' * 46).to_sym }
let(:long_column2) { ('y' * 46).to_sym }
before do
create_table(:pets) do |t|
t.references :cat
t.references :dog
t.string :name
t.string :color
end
create_table(:cats)
create_table(:dogs)
clear_sql_history
end
after do
drop_table :pets
drop_table :cats
drop_table :dogs
end
#######################################################
# Specs
#######################################################
describe '#add_polymorphic_constraints' do
it 'adds foreign keys with no uniqueness constraints' do
add_polymorphic_constraints(
'pets',
{ cat_id: 'cats.id', dog_id: 'dogs.id' }
)
should_execute_sql <<-EOS
DROP TRIGGER IF EXISTS pfki_pets_catid_dogid
DROP TRIGGER IF EXISTS pfku_pets_catid_dogid
CREATE TRIGGER pfki_pets_catid_dogid BEFORE INSERT ON pets
FOR EACH ROW
BEGIN
IF(IF(NEW.cat_id IS NULL, 0, 1) + IF(NEW.dog_id IS NULL, 0, 1)) <> 1 THEN
SET NEW = 'Error';
END IF;
END
CREATE TRIGGER pfku_pets_catid_dogid BEFORE UPDATE ON pets
FOR EACH ROW
BEGIN
IF(IF(NEW.cat_id IS NULL, 0, 1) + IF(NEW.dog_id IS NULL, 0, 1)) <> 1 THEN
SET NEW = 'Error';
END IF;
END
ALTER TABLE `pets` ADD CONSTRAINT `pets_cat_id_fk`
FOREIGN KEY (`cat_id`)
REFERENCES `cats`(id)
ALTER TABLE `pets` ADD CONSTRAINT `pets_dog_id_fk`
FOREIGN KEY (`dog_id`)
REFERENCES `dogs`(id)
EOS
end
it 'adds uniqueness specified with true' do
add_polymorphic_constraints(
'pets',
{ cat_id: 'cats.id', dog_id: 'dogs.id' },
unique: true
)
should_execute_sql <<-EOS
CREATE UNIQUE INDEX pfk_pets_catid ON pets (cat_id)
CREATE UNIQUE INDEX pfk_pets_dogid ON pets (dog_id)
EOS
end
it 'adds uniqueness specified with a string' do
add_polymorphic_constraints('pets', { cat_id: 'cats.id' }, unique: 'name')
should_execute_sql <<-EOS
CREATE UNIQUE INDEX pfk_pets_catid_name ON pets (cat_id, name)
EOS
end
it 'adds uniqueness specified as an array' do
add_polymorphic_constraints(
'pets',
{ cat_id: 'cats.id' },
unique: [:name, :color]
)
should_execute_sql <<-EOS
CREATE UNIQUE INDEX pfk_pets_catid_name_color ON pets (cat_id, name, color)
EOS
end
it 'adds an on update constraint' do
add_polymorphic_constraints(
'pets',
{ cat_id: 'cats.id' },
on_update: :cascade
)
should_execute_sql <<-EOS
ALTER TABLE `pets` ADD CONSTRAINT `pets_cat_id_fk`
FOREIGN KEY (`cat_id`)
REFERENCES `cats`(id)
ON UPDATE CASCADE
EOS
end
it 'raises an error when on_update has invalid arguments' do
expect do
add_polymorphic_constraints(
'pets',
{ cat_id: 'cats.id' },
on_update: :invalid
)
end.to raise_error ArgumentError
end
it 'adds an on delete constraint' do
add_polymorphic_constraints(
'pets',
{ cat_id: 'cats.id' },
on_delete: :cascade
)
should_execute_sql <<-EOS
ALTER TABLE `pets` ADD CONSTRAINT `pets_cat_id_fk`
FOREIGN KEY (`cat_id`)
REFERENCES `cats`(id)
ON DELETE CASCADE
EOS
end
it 'raises an error when on_delete has invalid arguments' do
expect do
add_polymorphic_constraints(
'pets',
{ cat_id: 'cats.id' },
on_update: :invalid
)
end.to raise_error ArgumentError
end
it 'truncates long trigger names to 64 characters' do
create_table(:pets) do |t|
t.references long_column1
t.references long_column2
end
add_polymorphic_constraints(
'pets',
{ "#{long_column1}_id" => 'cats.id', "#{long_column2}_id" => 'dogs.id' }
)
should_execute_sql <<-EOS
DROP TRIGGER IF EXISTS pfki_pets_xxxxxxxxxxxxxxxxxxxxxxxxxx_yyyyyyyyyyyyyyyyyyyyyyyyyy
DROP TRIGGER IF EXISTS pfku_pets_xxxxxxxxxxxxxxxxxxxxxxxxxx_yyyyyyyyyyyyyyyyyyyyyyyyyy
CREATE TRIGGER pfki_pets_xxxxxxxxxxxxxxxxxxxxxxxxxx_yyyyyyyyyyyyyyyyyyyyyyyyyy BEFORE INSERT ON pets
FOR EACH ROW
BEGIN
IF(IF(NEW.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_id IS NULL, 0, 1) + IF(NEW.yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy_id IS NULL, 0, 1)) <> 1 THEN
SET NEW = 'Error';
END IF;
END
CREATE TRIGGER pfku_pets_xxxxxxxxxxxxxxxxxxxxxxxxxx_yyyyyyyyyyyyyyyyyyyyyyyyyy BEFORE UPDATE ON pets
FOR EACH ROW
BEGIN
IF(IF(NEW.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_id IS NULL, 0, 1) + IF(NEW.yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy_id IS NULL, 0, 1)) <> 1 THEN
SET NEW = 'Error';
END IF;
END
EOS
end
end
describe '#remove_polymorphic_constraints' do
it 'removes triggers and foreign keys with no uniqueness constraints' do
add_polymorphic_constraints(
'pets',
{ cat_id: 'cats.id', dog_id: 'dogs.id' },
unique: true
)
clear_sql_history
remove_polymorphic_constraints(
'pets',
{ cat_id: 'cats.id', dog_id: 'dogs.id' }
)
should_execute_sql <<-EOS
DROP TRIGGER IF EXISTS pfki_pets_catid_dogid
DROP TRIGGER IF EXISTS pfku_pets_catid_dogid
EOS
end
it 'removes uniqueness index specified with true' do
add_polymorphic_constraints(
'pets',
{ cat_id: 'cats.id', dog_id: 'dogs.id' },
unique: true
)
clear_sql_history
remove_polymorphic_constraints(
'pets',
{ cat_id: 'cats.id', dog_id: 'dogs.id' },
unique: true
)
should_execute_sql <<-EOS
DROP INDEX pfk_pets_catid ON pets
DROP INDEX pfk_pets_dogid ON pets
EOS
end
it 'removes uniqueness index specified with a string' do
add_polymorphic_constraints(
'pets',
{ cat_id: 'cats.id', dog_id: 'dogs.id' },
unique: 'name'
)
clear_sql_history
remove_polymorphic_constraints(
'pets',
{ cat_id: 'cats.id', dog_id: 'dogs.id' },
unique: 'name'
)
end
it 'removes uniqueness index specified with an array' do
add_polymorphic_constraints(
'pets',
{ cat_id: 'cats.id', dog_id: 'dogs.id' },
unique: [:name, :color]
)
clear_sql_history
remove_polymorphic_constraints(
'pets',
{ cat_id: 'cats.id', dog_id: 'dogs.id' },
unique: [:name, :color]
)
end
it 'removes an on update constraint' do
add_polymorphic_constraints(
'pets',
{ cat_id: 'cats.id', dog_id: 'dogs.id' },
on_update: :cascade
)
clear_sql_history
remove_polymorphic_constraints(
'pets',
{ cat_id: 'cats.id', dog_id: 'dogs.id' },
on_update: :cascade
)
end
it 'removes an on delete constraint' do
add_polymorphic_constraints(
'pets',
{ cat_id: 'cats.id', dog_id: 'dogs.id' },
on_delete: :cascade
)
clear_sql_history
remove_polymorphic_constraints(
'pets',
{ cat_id: 'cats.id', dog_id: 'dogs.id' },
on_update: :cascade
)
end
it 'truncates long trigger names to 64 characters' do
create_table(:pets) do |t|
t.references long_column1
t.references long_column2
end
args = [
'pets',
{ "#{long_column1}_id" => 'cats.id', "#{long_column2}_id" => 'dogs.id' }
]
add_polymorphic_constraints(*args)
clear_sql_history
remove_polymorphic_constraints(*args)
should_execute_sql <<-EOS
DROP TRIGGER IF EXISTS pfki_pets_xxxxxxxxxxxxxxxxxxxxxxxxxx_yyyyyyyyyyyyyyyyyyyyyyyyyy
DROP TRIGGER IF EXISTS pfku_pets_xxxxxxxxxxxxxxxxxxxxxxxxxx_yyyyyyyyyyyyyyyyyyyyyyyyyy
EOS
end
end
describe "#triggers" do
it 'returns the triggers for the current schema' do
add_polymorphic_constraints(
'pets',
{ cat_id: 'cats.id', dog_id: 'dogs.id' }
)
expect(triggers.map(&:name)).to eq(
['pfki_pets_catid_dogid', 'pfku_pets_catid_dogid']
)
end
end
end
| mit |
Flexberry/ember-flexberry-designer | addon/locales/en/components/fd-create-node-editing-panel.js | 472 | export default {
'create-page': 'Add page at',
'choose-page': 'Select from existing forms',
'name-custom-page': 'Name',
'name-custom-page-placeholder': 'Page name',
'url-custom-page': 'Url',
'url-custom-page-placeholder': 'http://www.example.com',
'add-custom-page': 'Add page',
'add-form': 'Add form',
'name-form': 'Form name',
'name-entity': 'Entity name',
'description-caption': 'Description',
'description-placeholder': 'Enter description',
};
| mit |
captbaritone/winamp2-js | packages/webamp/js/components/MainWindow/MainBalance.tsx | 615 | import { memo } from "react";
import Balance from "../Balance";
import * as Selectors from "../../selectors";
import { useTypedSelector } from "../../hooks";
export const offsetFromBalance = (balance: number): number => {
const percent = Math.abs(balance) / 100;
const sprite = Math.floor(percent * 27);
const offset = sprite * 15;
return offset;
};
const MainBalance = memo(() => {
const balance = useTypedSelector(Selectors.getBalance);
return (
<Balance
id="balance"
style={{ backgroundPosition: `0 -${offsetFromBalance(balance)}px` }}
/>
);
});
export default MainBalance;
| mit |
karim/adila | database/src/main/java/adila/db/n721_karbonn5fa1.java | 216 | // This file is automatically generated.
package adila.db;
/*
* ZTE Karbonn_A1
*
* DEVICE: N721
* MODEL: Karbonn_A1
*/
final class n721_karbonn5fa1 {
public static final String DATA = "ZTE|Karbonn_A1|";
}
| mit |
jarofghosts/jsmv | test/dummyfile4.js | 69 | var test = wutever('a')
var herp = require('a')
var derp = nope('a')
| mit |
joeferraro/jsforce | lib/api/streaming.js | 4812 | /**
* @file Manages Streaming APIs
* @author Shinichi Tomita <shinichi.tomita@gmail.com>
*/
'use strict';
var events = require('events'),
inherits = require('inherits'),
_ = require('underscore'),
Faye = require('faye');
/**
* Streaming API topic class
*
* @class Streaming~Topic
* @param {Streaming} steaming - Streaming API object
* @param {String} name - Topic name
*/
var Topic = function(streaming, name) {
this._streaming = streaming;
this.name = name;
};
/**
* @typedef {Object} Streaming~StreamingMessage
* @prop {Object} event
* @prop {Object} event.type - Event type
* @prop {Record} sobject - Record information
*/
/**
* Subscribe listener to topic
*
* @method Streaming~Topic#subscribe
* @param {Callback.<Streaming~StreamingMesasge>} listener - Streaming message listener
* @returns {Subscription} - Faye subscription object
*/
Topic.prototype.subscribe = function(listener) {
return this._streaming.subscribe(this.name, listener);
};
/**
* Unsubscribe listener from topic
*
* @method Streaming~Topic#unsubscribe
* @param {Callback.<Streaming~StreamingMesasge>} listener - Streaming message listener
* @returns {Streaming~Topic}
*/
Topic.prototype.unsubscribe = function(listener) {
this._streaming.unsubscribe(this.name, listener);
return this;
};
/*--------------------------------------------*/
/**
* Streaming API Generic Streaming Channel
*
* @class Streaming~Channel
* @param {Streaming} steaming - Streaming API object
* @param {String} name - Channel name (starts with "/u/")
*/
var Channel = function(streaming, name) {
this._streaming = streaming;
this._name = name;
};
/**
* Subscribe to hannel
*
* @param {Callback.<Streaming~StreamingMessage>} listener - Streaming message listener
* @returns {Subscription} - Faye subscription object
*/
Channel.prototype.subscribe = function(listener) {
return this._streaming.subscribe(this._name, listener);
};
Channel.prototype.unsubscribe = function(listener) {
this._streaming.unsubscribe(this._name, listener);
return this;
};
Channel.prototype.push = function(events, callback) {
var isArray = _.isArray(events);
events = isArray ? events : [ events ];
var conn = this._streaming._conn;
if (!this._id) {
this._id = conn.sobject('StreamingChannel').findOne({ Name: this._name }, 'Id')
.then(function(rec) { return rec.Id });
}
return this._id.then(function(id) {
var channelUrl = '/sobjects/StreamingChannel/' + id + '/push';
return conn.requestPost(channelUrl, { pushEvents: events });
}).then(function(rets) {
return isArray ? rets : rets[0];
}).thenCall(callback);
};
/*--------------------------------------------*/
/**
* Streaming API class
*
* @class
* @extends events.EventEmitter
* @param {Connection} conn - Connection object
*/
var Streaming = function(conn) {
this._conn = conn;
};
inherits(Streaming, events.EventEmitter);
/** @private **/
Streaming.prototype._createClient = function() {
var endpointUrl = [ this._conn.instanceUrl, "cometd", this._conn.version ].join('/');
var fayeClient = new Faye.Client(endpointUrl, {});
fayeClient.setHeader('Authorization', 'OAuth '+this._conn.accessToken);
return fayeClient;
};
/**
* Get named topic
*
* @param {String} name - Topic name
* @returns {Streaming~Topic}
*/
Streaming.prototype.topic = function(name) {
this._topics = this._topics || {};
var topic = this._topics[name] =
this._topics[name] || new Topic(this, name);
return topic;
};
/**
* Get Channel for Id
* @param {String} channelId - Id of StreamingChannel object
* @returns {Streaming~Channel}
*/
Streaming.prototype.channel = function(channelId) {
return new Channel(this, channelId);
};
/**
* Subscribe topic/channel
*
* @param {String} name - Topic name
* @param {Callback.<Streaming~StreamingMessage>} listener - Streaming message listener
* @returns {Subscription} - Faye subscription object
*/
Streaming.prototype.subscribe = function(name, listener) {
if (!this._fayeClient) {
if (Faye.Transport.NodeHttp) {
Faye.Transport.NodeHttp.prototype.batching = false; // prevent streaming API server error
}
this._fayeClient = this._createClient();
}
var channelName = name.indexOf('/') === 0 ? name : '/topic/' + name;
return this._fayeClient.subscribe(channelName, listener);
};
/**
* Unsubscribe topic
*
* @param {String} name - Topic name
* @param {Callback.<Streaming~StreamingMessage>} listener - Streaming message listener
* @returns {Streaming}
*/
Streaming.prototype.unsubscribe = function(name, listener) {
if (this._fayeClient) {
var channelName = name.indexOf('/') === 0 ? name : '/topic/' + name;
this._fayeClient.unsubscribe(channelName, listener);
}
return this;
};
module.exports = Streaming; | mit |
willis/java-memcached-client | src/main/java/net/spy/memcached/NodeLocator.java | 730 | package net.spy.memcached;
import java.util.Collection;
import java.util.Iterator;
/**
* Interface for locating a node by hash value.
*/
public interface NodeLocator {
/**
* Get the primary location for the given key.
*
* @param k the object key
* @return the QueueAttachment containing the primary storage for a key
*/
MemcachedNode getPrimary(String k);
/**
* Get an iterator over the sequence of nodes that make up the backup
* locations for a given key.
*
* @param k the object key
* @return the sequence of backup nodes.
*/
Iterator<MemcachedNode> getSequence(String k);
/**
* Get all memcached nodes. This is useful for broadcasting messages.
*/
Collection<MemcachedNode> getAll();
}
| mit |
jcinnamond/causally-linked | lib/causal_link.rb | 647 | class CausalLink < ActiveRecord::Base
belongs_to :from, :polymorphic => true
belongs_to :to, :polymorphic => true
belongs_to :relationship
named_scope :linked_from, lambda { |relationship, from|
{
:conditions => {
:relationship_id => relationship.id,
:from_type => from.class.name,
:from_id => from.id
}
}
}
named_scope :linked_to, lambda { |relationship, to|
{
:conditions => {
:relationship_id => relationship.id,
:to_type => to.class.name,
:to_id => to.id
}
}
}
def to_s
"#{from}'s #{relationship.from_inflection} is #{to}"
end
end
| mit |
pahumadad/weight-control | wcontrol/src/momentjs.py | 502 | from jinja2 import Markup
class momentjs(object):
def __init__(self, timestamp):
self.timestamp = timestamp
def render(self, format):
return Markup("<script>\ndocument.write(moment(\"%s\").%s);\n</script>" % (self.timestamp.strftime("%Y-%m-%dT%H:%M:%S Z"), format))
def format(self, fmt):
return self.render("format(\"%s\")" % fmt)
def calendar(self):
return self.render("calendar()")
def fromNow(self):
return self.render("fromNow()")
| mit |
floatdrop/got | test/error.js | 4231 | import http from 'http';
import test from 'ava';
import sinon from 'sinon';
import getStream from 'get-stream';
import proxyquire from 'proxyquire';
import got from '../source';
import {createServer} from './helpers/server';
let s;
test.before('setup', async () => {
s = await createServer();
s.on('/', (request, response) => {
response.statusCode = 404;
response.end('not');
});
s.on('/default-status-message', (request, response) => {
response.statusCode = 400;
response.end('body');
});
s.on('/custom-status-message', (request, response) => {
response.statusCode = 400;
response.statusMessage = 'Something Exploded';
response.end('body');
});
s.on('/no-status-message', (request, response) => {
response.writeHead(400, '');
response.end('body');
});
s.on('/body', async (request, response) => {
const body = await getStream(request);
response.end(body);
});
await s.listen(s.port);
});
test.after('cleanup', async () => {
await s.close();
});
test('properties', async t => {
const error = await t.throwsAsync(got(s.url));
t.truthy(error);
t.truthy(error.response);
t.false({}.propertyIsEnumerable.call(error, 'response'));
t.false({}.hasOwnProperty.call(error, 'code'));
t.is(error.message, 'Response code 404 (Not Found)');
t.is(error.host, `${s.host}:${s.port}`);
t.is(error.method, 'GET');
t.is(error.protocol, 'http:');
t.is(error.url, error.response.requestUrl);
t.is(error.headers.connection, 'close');
t.is(error.response.body, 'not');
});
test('dns message', async t => {
const error = await t.throwsAsync(got('.com', {retry: 0}));
t.truthy(error);
t.regex(error.message, /getaddrinfo ENOTFOUND/);
t.is(error.host, '.com');
t.is(error.method, 'GET');
});
test('options.body error message', async t => {
await t.throwsAsync(got(s.url, {body: {}}), {
message: 'The `body` option must be a stream.Readable, string or Buffer'
});
});
test('options.body json error message', async t => {
await t.throwsAsync(got(s.url, {body: Buffer.from('test'), json: true}), {
message: 'The `body` option must be an Object or Array when the `json` option is used'
});
});
test('options.body form error message', async t => {
await t.throwsAsync(got(s.url, {body: Buffer.from('test'), form: true}), {
message: 'The `body` option must be an Object when the `form` option is used'
});
});
test('no plain object restriction on body', async t => {
function CustomObject() {
this.a = 123;
}
const {body} = await got(`${s.url}/body`, {body: new CustomObject(), json: true});
t.deepEqual(body, {a: 123});
});
test('default status message', async t => {
const error = await t.throwsAsync(got(`${s.url}/default-status-message`));
t.is(error.statusCode, 400);
t.is(error.statusMessage, 'Bad Request');
});
test('custom status message', async t => {
const error = await t.throwsAsync(got(`${s.url}/custom-status-message`));
t.is(error.statusCode, 400);
t.is(error.statusMessage, 'Something Exploded');
});
test('custom body', async t => {
const error = await t.throwsAsync(got(s.url));
t.is(error.statusCode, 404);
t.is(error.body, 'not');
});
test('no status message is overriden by the default one', async t => {
const error = await t.throwsAsync(got(`${s.url}/no-status-message`));
t.is(error.statusCode, 400);
t.is(error.statusMessage, http.STATUS_CODES[400]);
});
test.serial('http.request error', async t => {
const stub = sinon.stub(http, 'request').callsFake(() => {
throw new TypeError('The header content contains invalid characters');
});
await t.throwsAsync(got(s.url), {instanceOf: got.RequestError, message: 'The header content contains invalid characters'});
stub.restore();
});
test.serial('catch error in mimicResponse', async t => {
const mimicResponse = () => {
throw new Error('Error in mimic-response');
};
mimicResponse['@global'] = true;
const proxiedGot = proxyquire('..', {
'mimic-response': mimicResponse
});
await t.throwsAsync(proxiedGot(s.url), {message: 'Error in mimic-response'});
});
test('errors are thrown directly when options.stream is true', t => {
t.throws(() => got(s.url, {stream: true, body: {}}), {
message: 'The `body` option must be a stream.Readable, string or Buffer'
});
});
| mit |
braintree/braintree_java | src/main/java/com/braintreegateway/ExternalVaultVerificationRequest.java | 1528 | package com.braintreegateway;
/**
* Provides a fluent interface to build up requests around {@link CreditCardVerification CreditCardVerifications}.
*/
public class ExternalVaultVerificationRequest extends Request {
private CreditCardVerificationRequest parent;
private ExternalVault.Status status;
private String previousNetworkTransactionId;
public ExternalVaultVerificationRequest(CreditCardVerificationRequest parent) {
this.parent = parent;
}
public CreditCardVerificationRequest done() {
return parent;
}
public ExternalVaultVerificationRequest willVault() {
this.status = ExternalVault.Status.WILL_VAULT;
return this;
}
public ExternalVaultVerificationRequest vaulted() {
this.status = ExternalVault.Status.VAULTED;
return this;
}
public ExternalVaultVerificationRequest status(ExternalVault.Status status) {
this.status = status;
return this;
}
public ExternalVaultVerificationRequest previousNetworkTransactionId(String previousNetworkTransactionId) {
this.previousNetworkTransactionId = previousNetworkTransactionId;
return this;
}
@Override
public String toXML() {
return buildRequest("externalVault").toXML();
}
protected RequestBuilder buildRequest(String root) {
return new RequestBuilder(root)
.addElement("status", status)
.addElement("previousNetworkTransactionId", previousNetworkTransactionId);
}
}
| mit |
uploadcare/django-briteverify | django_briteverify/api.py | 1481 | # coding: utf-8
import os
import logging
import requests
from django.conf import settings
__ALL__ = ('check_email',)
ENTRY_POINT = 'https://bpi.briteverify.com/emails.json'
TIMEOUT = 10
logger = logging.getLogger(__name__)
session = requests.session()
def check_email(email):
""" Checks email by sending request to briteverify API
Spec: http://docs.briteverify.com/real-time-api/
"""
api_key = (os.environ.get('BRITEVERIFY_API_KEY', None) or
getattr(settings, 'BRITEVERIFY_API_KEY', None))
result = dict(valid=True, disposable=False)
if not api_key:
return result
data = dict(address=email, apikey=api_key)
try:
response = session.get(ENTRY_POINT, data=data, timeout=TIMEOUT)
response.raise_for_status()
except requests.exceptions.RequestException as e:
logger.exception('Briteverify service error.')
return result
try:
email_info = response.json()
except ValueError:
logger.exception('Briteverify service error. No json received.')
return result
try:
result.update(dict(
# TODO: customize this by settings
# http://docs.briteverify.com/status-key
valid=email_info['status'] != 'invalid',
disposable=email_info['disposable']
))
except KeyError:
logger.exception('Briteverify service error. Bad json data: %r',
email_info)
return result
| mit |
AlloyTeam/Nuclear | components/icon/esm/minimize.js | 154 | import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h("path", {
d: "M6 19h12v2H6z"
}), 'Minimize'); | mit |
qichunren/enum_attr | spec/enum_spec.rb | 2754 | # encoding: utf-8
require File.dirname(__FILE__) + "/spec_helper"
require "active_record"
dbconfig = YAML::load(File.open(File.dirname(__FILE__) + "/database.yml"))
ActiveRecord::Base.establish_connection(dbconfig)
ActiveRecord::Base.logger = Logger.new(STDOUT)
#migrations
class CreateAllTables < ActiveRecord::Migration
def self.up
create_table(:contracts) do |t|
t.string :name
t.integer :status
end
end
end
RSpec.configure do |config|
config.before :all do
CreateAllTables.up unless ActiveRecord::Base.connection.table_exists? 'contracts'
end
end
class Contract < ActiveRecord::Base
enum_attr :status, [['新建', 0, "origin"], ['整理中', 1, "collecting"], ["已上传", 2, "uploaded"]]
end
describe "EnumAttr" do
after(:each) do
Contract.delete_all
end
it "should get superclass" do
Contract.superclass.should == ActiveRecord::Base
end
it "should get const" do
Contract::STATUS_ORIGIN.should == 0
Contract::STATUS_COLLECTING.should == 1
Contract::STATUS_UPLOADED.should == 2
end
it "should get scope" do
Contract.should respond_to(:status_origin)
Contract.should respond_to(:status_collecting)
Contract.should respond_to(:status_uploaded)
Contract.create!(:name => "contract 1", :status => 0)
Contract.create!(:name => "contract 2", :status => 1)
Contract.create!(:name => "contract 3", :status => 2)
Contract.create!(:name => "contract 4", :status => 1)
Contract.status_origin.first.name.should == "contract 1"
Contract.status_collecting.count.should == 2
end
it "should return origanl value if not matched" do
contract_with_error_status = Contract.new(:name => "contract with no correct status value", :status => 100000)
contract_with_error_status.save(:validate => false)
Contract.first.status_name.should == ""
end
it "should get status_#name#?" do
contract = Contract.create(:name => "测试合同", :status => 0)
contract.should respond_to(:status_origin?)
contract.should respond_to(:status_collecting?)
contract.should respond_to(:status_uploaded?)
contract.status_origin?.should == true
contract.status_uploaded?.should == false
end
it "should get const array" do
Contract::ENUMS_STATUS.should == [['新建', 0], ['整理中', 1], ["已上传", 2]]
end
it "should get status_name" do
contract = Contract.create(:name => "测试合同", :status => 0)
contract.status_name.should == "新建"
end
it "should get status_name_by" do
Contract.status_name_by(0).should == "新建"
Contract.status_name_by(1).should == "整理中"
Contract.status_name_by(2).should == "已上传"
Contract.status_name_by(3).should == ""
end
end | mit |
iRaySpace/hack4xu | database/seeds/DatabaseSeeder.php | 385 | <?php
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
// $this->call(UsersTableSeeder::class);
$this->call(StudentsTableSeeder::class);
$this->call(BooksTableSeeder::class);
$this->call(ProjectsTableSeeder::class);
}
}
| mit |
Kelzo/ProjetPoivre | app/cache/prod/annotations/Poivre-PrincipalBundle-Entity-Salle.cache.php | 323 | <?php return unserialize('a:2:{i:0;O:26:"Doctrine\\ORM\\Mapping\\Table":5:{s:4:"name";N;s:6:"schema";N;s:7:"indexes";N;s:17:"uniqueConstraints";N;s:5:"value";N;}i:1;O:27:"Doctrine\\ORM\\Mapping\\Entity":3:{s:15:"repositoryClass";s:45:"Poivre\\PrincipalBundle\\Entity\\SalleRepository";s:8:"readOnly";b:0;s:5:"value";N;}}'); | mit |
Epredator/projects | thinkingInJava/src/pl/etroya/corejava/collection/shipment/CollectionConcepts.java | 1261 | package pl.etroya.corejava.collection.shipment;
/*information about collections from
https://app.pluralsight.com/player?course=java-fundamentals-collections&author=richard-warburton&name=java-fundamentals-collections-m2&clip=3&mode=live
*/
import pl.etroya.corejava.collection.Product;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
public class CollectionConcepts {
public static void main(String[] args) {
Product door = new Product("Wooden door", 35);
Product floorPanel = new Product("Floor panel", 25);
Product window = new Product("Glass window", 10);
Collection<Product> products = new ArrayList<>();
products.add(door);
products.add(floorPanel);
products.add(window);
final Iterator<Product> productIterator = products.iterator();
while (productIterator.hasNext()) {
Product product = productIterator.next();
if (product.getWeight() > 20) {
System.out.println(product);
} else {
productIterator.remove();
}
}
for (Product p : products) {
System.out.println(p);
}
System.out.println(products);
}
}
| mit |
influencetech/ivx-js | src/modules/ui/materialize/angular/controllers/input.password.js | 956 | import createFactoryFunction from '../../../../../angular/utilities/create-factory-function.js';
import FirebaseAuthentication from "../../../../../constants/firebase.authentication.js";
import { InputControllerHelper } from '../../../../../angular/utilities/input-controller.js';
let FirebaseAuthenticationConstants = new FirebaseAuthentication();
class PasswordInputController extends InputControllerHelper {
constructor($scope, iVXjs, iVXjsActions) {
super($scope, iVXjs, iVXjsActions);
let self = this;
this.setPassword = (inputValue) =>{
this.password = inputValue;
}
iVXjs.Bus.once(FirebaseAuthenticationConstants.REQUEST_PASSWORD, () =>{
iVXjs.Bus.emit(FirebaseAuthenticationConstants.GET_PASSWORD, self.password);
});
}
}
PasswordInputController.$inject = ['$scope', 'iVXjs', 'ivxjs.actions'];
export default createFactoryFunction(PasswordInputController) | mit |
haidarvm/serj | e4/application/config/autoload.php | 4091 | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| AUTO-LOADER
| -------------------------------------------------------------------
| This file specifies which systems should be loaded by default.
|
| In order to keep the framework as light-weight as possible only the
| absolute minimal resources are loaded by default. For example,
| the database is not connected to automatically since no assumption
| is made regarding whether you intend to use it. This file lets
| you globally define which systems you would like loaded with every
| request.
|
| -------------------------------------------------------------------
| Instructions
| -------------------------------------------------------------------
|
| These are the things you can load automatically:
|
| 1. Packages
| 2. Libraries
| 3. Drivers
| 4. Helper files
| 5. Custom config files
| 6. Language files
| 7. Models
|
*/
/*
| -------------------------------------------------------------------
| Auto-load Packages
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared');
|
*/
$autoload['packages'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Libraries
| -------------------------------------------------------------------
| These are the classes located in system/libraries/ or your
| application/libraries/ directory, with the addition of the
| 'database' library, which is somewhat of a special case.
|
| Prototype:
|
| $autoload['libraries'] = array('database', 'email', 'session');
|
| You can also supply an alternative library name to be assigned
| in the controller:
|
| $autoload['libraries'] = array('user_agent' => 'ua');
*/
$autoload['libraries'] = array('database','session','form_validation');
/*
| -------------------------------------------------------------------
| Auto-load Drivers
| -------------------------------------------------------------------
| These classes are located in system/libraries/ or in your
| application/libraries/ directory, but are also placed inside their
| own subdirectory and they extend the CI_Driver_Library class. They
| offer multiple interchangeable driver options.
|
| Prototype:
|
| $autoload['drivers'] = array('cache');
|
| You can also supply an alternative property name to be assigned in
| the controller:
|
| $autoload['drivers'] = array('cache' => 'cch');
|
*/
$autoload['drivers'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Helper Files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['helper'] = array('url', 'file');
*/
$autoload['helper'] = array('url','file','global','form');
/*
| -------------------------------------------------------------------
| Auto-load Config files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['config'] = array('config1', 'config2');
|
| NOTE: This item is intended for use ONLY if you have created custom
| config files. Otherwise, leave it blank.
|
*/
$autoload['config'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Language files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['language'] = array('lang1', 'lang2');
|
| NOTE: Do not include the "_lang" part of your file. For example
| "codeigniter_lang.php" would be referenced as array('codeigniter');
|
*/
$autoload['language'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Models
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['model'] = array('first_model', 'second_model');
|
| You can also supply an alternative model name to be assigned
| in the controller:
|
| $autoload['model'] = array('first_model' => 'first');
*/
$autoload['model'] = array();
| mit |
xiewulong/yii2-payment | models/PaymentNotify.php | 193 | <?php
namespace yii\payment\models;
use Yii;
use yii\db\ActiveRecord;
class PaymentNotify extends ActiveRecord {
public static function tableName() {
return '{{%payment_notify}}';
}
}
| mit |
joebadmo/puppet-osx | spec/classes/airport/join_mode_fallback_spec.rb | 2557 | require 'spec_helper'
describe 'osx::airport::join_mode_fallback' do
let(:facts) { {:boxen_user => 'ilikebees' } }
describe 'Prompt' do
let(:params) { {:mode => 'Prompt'} }
it 'should set Join Mode Fallback to "Prompt"' do
should include_class('osx::airport')
should contain_exec('Set What to Do When None of the Preferred Networks Are Available').with({
:command => "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport prefs JoinModeFallback=Prompt",
:unless => "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport prefs JoinModeFallback | grep Prompt",
:user => 'root',
})
end
end
describe 'JoinOpen' do
let(:params) { {:mode => 'JoinOpen'} }
it 'should set Join Mode Fallback to "JoinOpen"' do
should include_class('osx::airport')
should contain_exec('Set What to Do When None of the Preferred Networks Are Available').with({
:command => "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport prefs JoinModeFallback=JoinOpen",
:unless => "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport prefs JoinModeFallback | grep JoinOpen",
:user => 'root',
})
end
end
describe 'KeepLooking' do
let(:params) { {:mode => 'KeepLooking'} }
it 'should set Join Mode Fallback to "KeepLooking"' do
should include_class('osx::airport')
should contain_exec('Set What to Do When None of the Preferred Networks Are Available').with({
:command => "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport prefs JoinModeFallback=KeepLooking",
:unless => "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport prefs JoinModeFallback | grep KeepLooking",
:user => 'root',
})
end
end
describe 'DoNothing' do
let(:params) { {:mode => 'DoNothing'} }
it 'should set Join Mode Fallback to "DoNothing"' do
should include_class('osx::airport')
should contain_exec('Set What to Do When None of the Preferred Networks Are Available').with({
:command => "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport prefs JoinModeFallback=DoNothing",
:unless => "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport prefs JoinModeFallback | grep DoNothing",
:user => 'root',
})
end
end
end
| mit |
hugozap/svg-anim-example | node_modules/browserify/node_modules/buffer/index.js | 34946 | /*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
var base64 = require('base64-js')
var ieee754 = require('ieee754')
var isArray = require('is-array')
exports.Buffer = Buffer
exports.SlowBuffer = SlowBuffer
exports.INSPECT_MAX_BYTES = 50
Buffer.poolSize = 8192 // not used by this implementation
var kMaxLength = 0x3fffffff
var rootParent = {}
/**
* If `Buffer.TYPED_ARRAY_SUPPORT`:
* === true Use Uint8Array implementation (fastest)
* === false Use Object implementation (most compatible, even IE6)
*
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
* Opera 11.6+, iOS 4.2+.
*
* Note:
*
* - Implementation must support adding new properties to `Uint8Array` instances.
* Firefox 4-29 lacked support, fixed in Firefox 30+.
* See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
*
* - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
*
* - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
* incorrect length in some situations.
*
* We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they will
* get the Object implementation, which is slower but will work correctly.
*/
Buffer.TYPED_ARRAY_SUPPORT = (function () {
try {
var buf = new ArrayBuffer(0)
var arr = new Uint8Array(buf)
arr.foo = function () { return 42 }
return 42 === arr.foo() && // typed array instances can be augmented
typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
new Uint8Array(1).subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
} catch (e) {
return false
}
})()
/**
* Class: Buffer
* =============
*
* The Buffer constructor returns instances of `Uint8Array` that are augmented
* with function properties for all the node `Buffer` API functions. We use
* `Uint8Array` so that square bracket notation works as expected -- it returns
* a single octet.
*
* By augmenting the instances, we can avoid modifying the `Uint8Array`
* prototype.
*/
function Buffer (subject, encoding, noZero) {
if (!(this instanceof Buffer))
return new Buffer(subject, encoding, noZero)
var type = typeof subject
// Find the length
var length
if (type === 'number')
length = subject > 0 ? subject >>> 0 : 0
else if (type === 'string') {
length = Buffer.byteLength(subject, encoding)
} else if (type === 'object' && subject !== null) { // assume object is array-like
if (subject.type === 'Buffer' && isArray(subject.data))
subject = subject.data
length = +subject.length > 0 ? Math.floor(+subject.length) : 0
} else
throw new TypeError('must start with number, buffer, array or string')
if (length > kMaxLength)
throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
'size: 0x' + kMaxLength.toString(16) + ' bytes')
var buf
if (Buffer.TYPED_ARRAY_SUPPORT) {
// Preferred: Return an augmented `Uint8Array` instance for best performance
buf = Buffer._augment(new Uint8Array(length))
} else {
// Fallback: Return THIS instance of Buffer (created by `new`)
buf = this
buf.length = length
buf._isBuffer = true
}
var i
if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {
// Speed optimization -- use set if we're copying from a typed array
buf._set(subject)
} else if (isArrayish(subject)) {
// Treat array-ish objects as a byte array
if (Buffer.isBuffer(subject)) {
for (i = 0; i < length; i++)
buf[i] = subject.readUInt8(i)
} else {
for (i = 0; i < length; i++)
buf[i] = ((subject[i] % 256) + 256) % 256
}
} else if (type === 'string') {
buf.write(subject, 0, encoding)
} else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT && !noZero) {
for (i = 0; i < length; i++) {
buf[i] = 0
}
}
if (length > 0 && length <= Buffer.poolSize)
buf.parent = rootParent
return buf
}
function SlowBuffer(subject, encoding, noZero) {
if (!(this instanceof SlowBuffer))
return new SlowBuffer(subject, encoding, noZero)
var buf = new Buffer(subject, encoding, noZero)
delete buf.parent
return buf
}
Buffer.isBuffer = function (b) {
return !!(b != null && b._isBuffer)
}
Buffer.compare = function (a, b) {
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b))
throw new TypeError('Arguments must be Buffers')
var x = a.length
var y = b.length
for (var i = 0, len = Math.min(x, y); i < len && a[i] === b[i]; i++) {}
if (i !== len) {
x = a[i]
y = b[i]
}
if (x < y) return -1
if (y < x) return 1
return 0
}
Buffer.isEncoding = function (encoding) {
switch (String(encoding).toLowerCase()) {
case 'hex':
case 'utf8':
case 'utf-8':
case 'ascii':
case 'binary':
case 'base64':
case 'raw':
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return true
default:
return false
}
}
Buffer.concat = function (list, totalLength) {
if (!isArray(list)) throw new TypeError('Usage: Buffer.concat(list[, length])')
if (list.length === 0) {
return new Buffer(0)
} else if (list.length === 1) {
return list[0]
}
var i
if (totalLength === undefined) {
totalLength = 0
for (i = 0; i < list.length; i++) {
totalLength += list[i].length
}
}
var buf = new Buffer(totalLength)
var pos = 0
for (i = 0; i < list.length; i++) {
var item = list[i]
item.copy(buf, pos)
pos += item.length
}
return buf
}
Buffer.byteLength = function (str, encoding) {
var ret
str = str + ''
switch (encoding || 'utf8') {
case 'ascii':
case 'binary':
case 'raw':
ret = str.length
break
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
ret = str.length * 2
break
case 'hex':
ret = str.length >>> 1
break
case 'utf8':
case 'utf-8':
ret = utf8ToBytes(str).length
break
case 'base64':
ret = base64ToBytes(str).length
break
default:
ret = str.length
}
return ret
}
// pre-set for values that may exist in the future
Buffer.prototype.length = undefined
Buffer.prototype.parent = undefined
// toString(encoding, start=0, end=buffer.length)
Buffer.prototype.toString = function (encoding, start, end) {
var loweredCase = false
start = start >>> 0
end = end === undefined || end === Infinity ? this.length : end >>> 0
if (!encoding) encoding = 'utf8'
if (start < 0) start = 0
if (end > this.length) end = this.length
if (end <= start) return ''
while (true) {
switch (encoding) {
case 'hex':
return hexSlice(this, start, end)
case 'utf8':
case 'utf-8':
return utf8Slice(this, start, end)
case 'ascii':
return asciiSlice(this, start, end)
case 'binary':
return binarySlice(this, start, end)
case 'base64':
return base64Slice(this, start, end)
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return utf16leSlice(this, start, end)
default:
if (loweredCase)
throw new TypeError('Unknown encoding: ' + encoding)
encoding = (encoding + '').toLowerCase()
loweredCase = true
}
}
}
Buffer.prototype.equals = function (b) {
if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
return Buffer.compare(this, b) === 0
}
Buffer.prototype.inspect = function () {
var str = ''
var max = exports.INSPECT_MAX_BYTES
if (this.length > 0) {
str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
if (this.length > max)
str += ' ... '
}
return '<Buffer ' + str + '>'
}
Buffer.prototype.compare = function (b) {
if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
return Buffer.compare(this, b)
}
// `get` will be removed in Node 0.13+
Buffer.prototype.get = function (offset) {
console.log('.get() is deprecated. Access using array indexes instead.')
return this.readUInt8(offset)
}
// `set` will be removed in Node 0.13+
Buffer.prototype.set = function (v, offset) {
console.log('.set() is deprecated. Access using array indexes instead.')
return this.writeUInt8(v, offset)
}
function hexWrite (buf, string, offset, length) {
offset = Number(offset) || 0
var remaining = buf.length - offset
if (!length) {
length = remaining
} else {
length = Number(length)
if (length > remaining) {
length = remaining
}
}
// must be an even number of digits
var strLen = string.length
if (strLen % 2 !== 0) throw new Error('Invalid hex string')
if (length > strLen / 2) {
length = strLen / 2
}
for (var i = 0; i < length; i++) {
var byte = parseInt(string.substr(i * 2, 2), 16)
if (isNaN(byte)) throw new Error('Invalid hex string')
buf[offset + i] = byte
}
return i
}
function utf8Write (buf, string, offset, length) {
var charsWritten = blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
return charsWritten
}
function asciiWrite (buf, string, offset, length) {
var charsWritten = blitBuffer(asciiToBytes(string), buf, offset, length)
return charsWritten
}
function binaryWrite (buf, string, offset, length) {
return asciiWrite(buf, string, offset, length)
}
function base64Write (buf, string, offset, length) {
var charsWritten = blitBuffer(base64ToBytes(string), buf, offset, length)
return charsWritten
}
function utf16leWrite (buf, string, offset, length) {
var charsWritten = blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length, 2)
return charsWritten
}
Buffer.prototype.write = function (string, offset, length, encoding) {
// Support both (string, offset, length, encoding)
// and the legacy (string, encoding, offset, length)
if (isFinite(offset)) {
if (!isFinite(length)) {
encoding = length
length = undefined
}
} else { // legacy
var swap = encoding
encoding = offset
offset = length
length = swap
}
offset = Number(offset) || 0
if (length < 0 || offset < 0 || offset > this.length)
throw new RangeError('attempt to write outside buffer bounds');
var remaining = this.length - offset
if (!length) {
length = remaining
} else {
length = Number(length)
if (length > remaining) {
length = remaining
}
}
encoding = String(encoding || 'utf8').toLowerCase()
var ret
switch (encoding) {
case 'hex':
ret = hexWrite(this, string, offset, length)
break
case 'utf8':
case 'utf-8':
ret = utf8Write(this, string, offset, length)
break
case 'ascii':
ret = asciiWrite(this, string, offset, length)
break
case 'binary':
ret = binaryWrite(this, string, offset, length)
break
case 'base64':
ret = base64Write(this, string, offset, length)
break
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
ret = utf16leWrite(this, string, offset, length)
break
default:
throw new TypeError('Unknown encoding: ' + encoding)
}
return ret
}
Buffer.prototype.toJSON = function () {
return {
type: 'Buffer',
data: Array.prototype.slice.call(this._arr || this, 0)
}
}
function base64Slice (buf, start, end) {
if (start === 0 && end === buf.length) {
return base64.fromByteArray(buf)
} else {
return base64.fromByteArray(buf.slice(start, end))
}
}
function utf8Slice (buf, start, end) {
var res = ''
var tmp = ''
end = Math.min(buf.length, end)
for (var i = start; i < end; i++) {
if (buf[i] <= 0x7F) {
res += decodeUtf8Char(tmp) + String.fromCharCode(buf[i])
tmp = ''
} else {
tmp += '%' + buf[i].toString(16)
}
}
return res + decodeUtf8Char(tmp)
}
function asciiSlice (buf, start, end) {
var ret = ''
end = Math.min(buf.length, end)
for (var i = start; i < end; i++) {
ret += String.fromCharCode(buf[i] & 0x7F)
}
return ret
}
function binarySlice (buf, start, end) {
var ret = ''
end = Math.min(buf.length, end)
for (var i = start; i < end; i++) {
ret += String.fromCharCode(buf[i])
}
return ret
}
function hexSlice (buf, start, end) {
var len = buf.length
if (!start || start < 0) start = 0
if (!end || end < 0 || end > len) end = len
var out = ''
for (var i = start; i < end; i++) {
out += toHex(buf[i])
}
return out
}
function utf16leSlice (buf, start, end) {
var bytes = buf.slice(start, end)
var res = ''
for (var i = 0; i < bytes.length; i += 2) {
res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
}
return res
}
Buffer.prototype.slice = function (start, end) {
var len = this.length
start = ~~start
end = end === undefined ? len : ~~end
if (start < 0) {
start += len;
if (start < 0)
start = 0
} else if (start > len) {
start = len
}
if (end < 0) {
end += len
if (end < 0)
end = 0
} else if (end > len) {
end = len
}
if (end < start)
end = start
var newBuf
if (Buffer.TYPED_ARRAY_SUPPORT) {
newBuf = Buffer._augment(this.subarray(start, end))
} else {
var sliceLen = end - start
newBuf = new Buffer(sliceLen, undefined, true)
for (var i = 0; i < sliceLen; i++) {
newBuf[i] = this[i + start]
}
}
if (newBuf.length)
newBuf.parent = this.parent || this
return newBuf
}
/*
* Need to make sure that buffer isn't trying to write out of bounds.
*/
function checkOffset (offset, ext, length) {
if ((offset % 1) !== 0 || offset < 0)
throw new RangeError('offset is not uint')
if (offset + ext > length)
throw new RangeError('Trying to access beyond buffer length')
}
Buffer.prototype.readUIntLE = function (offset, byteLength, noAssert) {
offset = offset >>> 0
byteLength = byteLength >>> 0
if (!noAssert)
checkOffset(offset, byteLength, this.length)
var val = this[offset]
var mul = 1
var i = 0
while (++i < byteLength && (mul *= 0x100))
val += this[offset + i] * mul
return val
}
Buffer.prototype.readUIntBE = function (offset, byteLength, noAssert) {
offset = offset >>> 0
byteLength = byteLength >>> 0
if (!noAssert)
checkOffset(offset, byteLength, this.length)
var val = this[offset + --byteLength]
var mul = 1
while (byteLength > 0 && (mul *= 0x100))
val += this[offset + --byteLength] * mul;
return val
}
Buffer.prototype.readUInt8 = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 1, this.length)
return this[offset]
}
Buffer.prototype.readUInt16LE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 2, this.length)
return this[offset] | (this[offset + 1] << 8)
}
Buffer.prototype.readUInt16BE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 2, this.length)
return (this[offset] << 8) | this[offset + 1]
}
Buffer.prototype.readUInt32LE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 4, this.length)
return ((this[offset]) |
(this[offset + 1] << 8) |
(this[offset + 2] << 16)) +
(this[offset + 3] * 0x1000000)
}
Buffer.prototype.readUInt32BE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 4, this.length)
return (this[offset] * 0x1000000) +
((this[offset + 1] << 16) |
(this[offset + 2] << 8) |
this[offset + 3])
}
Buffer.prototype.readIntLE = function (offset, byteLength, noAssert) {
offset = offset >>> 0
byteLength = byteLength >>> 0
if (!noAssert)
checkOffset(offset, byteLength, this.length)
var val = this[offset]
var mul = 1
var i = 0
while (++i < byteLength && (mul *= 0x100))
val += this[offset + i] * mul
mul *= 0x80
if (val >= mul)
val -= Math.pow(2, 8 * byteLength)
return val
}
Buffer.prototype.readIntBE = function (offset, byteLength, noAssert) {
offset = offset >>> 0
byteLength = byteLength >>> 0
if (!noAssert)
checkOffset(offset, byteLength, this.length)
var i = byteLength
var mul = 1
var val = this[offset + --i]
while (i > 0 && (mul *= 0x100))
val += this[offset + --i] * mul
mul *= 0x80
if (val >= mul)
val -= Math.pow(2, 8 * byteLength)
return val
}
Buffer.prototype.readInt8 = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 1, this.length)
if (!(this[offset] & 0x80))
return (this[offset])
return ((0xff - this[offset] + 1) * -1)
}
Buffer.prototype.readInt16LE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 2, this.length)
var val = this[offset] | (this[offset + 1] << 8)
return (val & 0x8000) ? val | 0xFFFF0000 : val
}
Buffer.prototype.readInt16BE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 2, this.length)
var val = this[offset + 1] | (this[offset] << 8)
return (val & 0x8000) ? val | 0xFFFF0000 : val
}
Buffer.prototype.readInt32LE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 4, this.length)
return (this[offset]) |
(this[offset + 1] << 8) |
(this[offset + 2] << 16) |
(this[offset + 3] << 24)
}
Buffer.prototype.readInt32BE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 4, this.length)
return (this[offset] << 24) |
(this[offset + 1] << 16) |
(this[offset + 2] << 8) |
(this[offset + 3])
}
Buffer.prototype.readFloatLE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 4, this.length)
return ieee754.read(this, offset, true, 23, 4)
}
Buffer.prototype.readFloatBE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 4, this.length)
return ieee754.read(this, offset, false, 23, 4)
}
Buffer.prototype.readDoubleLE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 8, this.length)
return ieee754.read(this, offset, true, 52, 8)
}
Buffer.prototype.readDoubleBE = function (offset, noAssert) {
if (!noAssert)
checkOffset(offset, 8, this.length)
return ieee754.read(this, offset, false, 52, 8)
}
function checkInt (buf, value, offset, ext, max, min) {
if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance')
if (value > max || value < min) throw new RangeError('value is out of bounds')
if (offset + ext > buf.length) throw new RangeError('index out of range')
}
Buffer.prototype.writeUIntLE = function (value, offset, byteLength, noAssert) {
value = +value
offset = offset >>> 0
byteLength = byteLength >>> 0
if (!noAssert)
checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)
var mul = 1
var i = 0
this[offset] = value & 0xFF
while (++i < byteLength && (mul *= 0x100))
this[offset + i] = (value / mul) >>> 0 & 0xFF
return offset + byteLength
}
Buffer.prototype.writeUIntBE = function (value, offset, byteLength, noAssert) {
value = +value
offset = offset >>> 0
byteLength = byteLength >>> 0
if (!noAssert)
checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)
var i = byteLength - 1
var mul = 1
this[offset + i] = value & 0xFF
while (--i >= 0 && (mul *= 0x100))
this[offset + i] = (value / mul) >>> 0 & 0xFF
return offset + byteLength
}
Buffer.prototype.writeUInt8 = function (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert)
checkInt(this, value, offset, 1, 0xff, 0)
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
this[offset] = value
return offset + 1
}
function objectWriteUInt16 (buf, value, offset, littleEndian) {
if (value < 0) value = 0xffff + value + 1
for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) {
buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
(littleEndian ? i : 1 - i) * 8
}
}
Buffer.prototype.writeUInt16LE = function (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert)
checkInt(this, value, offset, 2, 0xffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = value
this[offset + 1] = (value >>> 8)
} else objectWriteUInt16(this, value, offset, true)
return offset + 2
}
Buffer.prototype.writeUInt16BE = function (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert)
checkInt(this, value, offset, 2, 0xffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 8)
this[offset + 1] = value
} else objectWriteUInt16(this, value, offset, false)
return offset + 2
}
function objectWriteUInt32 (buf, value, offset, littleEndian) {
if (value < 0) value = 0xffffffff + value + 1
for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) {
buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
}
}
Buffer.prototype.writeUInt32LE = function (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert)
checkInt(this, value, offset, 4, 0xffffffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset + 3] = (value >>> 24)
this[offset + 2] = (value >>> 16)
this[offset + 1] = (value >>> 8)
this[offset] = value
} else objectWriteUInt32(this, value, offset, true)
return offset + 4
}
Buffer.prototype.writeUInt32BE = function (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert)
checkInt(this, value, offset, 4, 0xffffffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 24)
this[offset + 1] = (value >>> 16)
this[offset + 2] = (value >>> 8)
this[offset + 3] = value
} else objectWriteUInt32(this, value, offset, false)
return offset + 4
}
Buffer.prototype.writeIntLE = function (value, offset, byteLength, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert) {
checkInt(this,
value,
offset,
byteLength,
Math.pow(2, 8 * byteLength - 1) - 1,
-Math.pow(2, 8 * byteLength - 1))
}
var i = 0
var mul = 1
var sub = value < 0 ? 1 : 0
this[offset] = value & 0xFF
while (++i < byteLength && (mul *= 0x100))
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
return offset + byteLength
}
Buffer.prototype.writeIntBE = function (value, offset, byteLength, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert) {
checkInt(this,
value,
offset,
byteLength,
Math.pow(2, 8 * byteLength - 1) - 1,
-Math.pow(2, 8 * byteLength - 1))
}
var i = byteLength - 1
var mul = 1
var sub = value < 0 ? 1 : 0
this[offset + i] = value & 0xFF
while (--i >= 0 && (mul *= 0x100))
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
return offset + byteLength
}
Buffer.prototype.writeInt8 = function (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert)
checkInt(this, value, offset, 1, 0x7f, -0x80)
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
if (value < 0) value = 0xff + value + 1
this[offset] = value
return offset + 1
}
Buffer.prototype.writeInt16LE = function (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert)
checkInt(this, value, offset, 2, 0x7fff, -0x8000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = value
this[offset + 1] = (value >>> 8)
} else objectWriteUInt16(this, value, offset, true)
return offset + 2
}
Buffer.prototype.writeInt16BE = function (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert)
checkInt(this, value, offset, 2, 0x7fff, -0x8000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 8)
this[offset + 1] = value
} else objectWriteUInt16(this, value, offset, false)
return offset + 2
}
Buffer.prototype.writeInt32LE = function (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert)
checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = value
this[offset + 1] = (value >>> 8)
this[offset + 2] = (value >>> 16)
this[offset + 3] = (value >>> 24)
} else objectWriteUInt32(this, value, offset, true)
return offset + 4
}
Buffer.prototype.writeInt32BE = function (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert)
checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
if (value < 0) value = 0xffffffff + value + 1
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 24)
this[offset + 1] = (value >>> 16)
this[offset + 2] = (value >>> 8)
this[offset + 3] = value
} else objectWriteUInt32(this, value, offset, false)
return offset + 4
}
function checkIEEE754 (buf, value, offset, ext, max, min) {
if (value > max || value < min) throw new RangeError('value is out of bounds')
if (offset + ext > buf.length) throw new RangeError('index out of range')
if (offset < 0) throw new RangeError('index out of range')
}
function writeFloat (buf, value, offset, littleEndian, noAssert) {
if (!noAssert)
checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
ieee754.write(buf, value, offset, littleEndian, 23, 4)
return offset + 4
}
Buffer.prototype.writeFloatLE = function (value, offset, noAssert) {
return writeFloat(this, value, offset, true, noAssert)
}
Buffer.prototype.writeFloatBE = function (value, offset, noAssert) {
return writeFloat(this, value, offset, false, noAssert)
}
function writeDouble (buf, value, offset, littleEndian, noAssert) {
if (!noAssert)
checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
ieee754.write(buf, value, offset, littleEndian, 52, 8)
return offset + 8
}
Buffer.prototype.writeDoubleLE = function (value, offset, noAssert) {
return writeDouble(this, value, offset, true, noAssert)
}
Buffer.prototype.writeDoubleBE = function (value, offset, noAssert) {
return writeDouble(this, value, offset, false, noAssert)
}
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
Buffer.prototype.copy = function (target, target_start, start, end) {
var source = this
if (!start) start = 0
if (!end && end !== 0) end = this.length
if (target_start >= target.length) target_start = target.length
if (!target_start) target_start = 0
if (end > 0 && end < start) end = start
// Copy 0 bytes; we're done
if (end === start) return 0
if (target.length === 0 || source.length === 0) return 0
// Fatal error conditions
if (target_start < 0)
throw new RangeError('targetStart out of bounds')
if (start < 0 || start >= source.length) throw new RangeError('sourceStart out of bounds')
if (end < 0) throw new RangeError('sourceEnd out of bounds')
// Are we oob?
if (end > this.length)
end = this.length
if (target.length - target_start < end - start)
end = target.length - target_start + start
var len = end - start
if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
for (var i = 0; i < len; i++) {
target[i + target_start] = this[i + start]
}
} else {
target._set(this.subarray(start, start + len), target_start)
}
return len
}
// fill(value, start=0, end=buffer.length)
Buffer.prototype.fill = function (value, start, end) {
if (!value) value = 0
if (!start) start = 0
if (!end) end = this.length
if (end < start) throw new RangeError('end < start')
// Fill 0 bytes; we're done
if (end === start) return
if (this.length === 0) return
if (start < 0 || start >= this.length) throw new RangeError('start out of bounds')
if (end < 0 || end > this.length) throw new RangeError('end out of bounds')
var i
if (typeof value === 'number') {
for (i = start; i < end; i++) {
this[i] = value
}
} else {
var bytes = utf8ToBytes(value.toString())
var len = bytes.length
for (i = start; i < end; i++) {
this[i] = bytes[i % len]
}
}
return this
}
/**
* Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance.
* Added in Node 0.12. Only available in browsers that support ArrayBuffer.
*/
Buffer.prototype.toArrayBuffer = function () {
if (typeof Uint8Array !== 'undefined') {
if (Buffer.TYPED_ARRAY_SUPPORT) {
return (new Buffer(this)).buffer
} else {
var buf = new Uint8Array(this.length)
for (var i = 0, len = buf.length; i < len; i += 1) {
buf[i] = this[i]
}
return buf.buffer
}
} else {
throw new TypeError('Buffer.toArrayBuffer not supported in this browser')
}
}
// HELPER FUNCTIONS
// ================
var BP = Buffer.prototype
/**
* Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
*/
Buffer._augment = function (arr) {
arr.constructor = Buffer
arr._isBuffer = true
// save reference to original Uint8Array get/set methods before overwriting
arr._get = arr.get
arr._set = arr.set
// deprecated, will be removed in node 0.13+
arr.get = BP.get
arr.set = BP.set
arr.write = BP.write
arr.toString = BP.toString
arr.toLocaleString = BP.toString
arr.toJSON = BP.toJSON
arr.equals = BP.equals
arr.compare = BP.compare
arr.copy = BP.copy
arr.slice = BP.slice
arr.readUIntLE = BP.readUIntLE
arr.readUIntBE = BP.readUIntBE
arr.readUInt8 = BP.readUInt8
arr.readUInt16LE = BP.readUInt16LE
arr.readUInt16BE = BP.readUInt16BE
arr.readUInt32LE = BP.readUInt32LE
arr.readUInt32BE = BP.readUInt32BE
arr.readIntLE = BP.readIntLE
arr.readIntBE = BP.readIntBE
arr.readInt8 = BP.readInt8
arr.readInt16LE = BP.readInt16LE
arr.readInt16BE = BP.readInt16BE
arr.readInt32LE = BP.readInt32LE
arr.readInt32BE = BP.readInt32BE
arr.readFloatLE = BP.readFloatLE
arr.readFloatBE = BP.readFloatBE
arr.readDoubleLE = BP.readDoubleLE
arr.readDoubleBE = BP.readDoubleBE
arr.writeUInt8 = BP.writeUInt8
arr.writeUIntLE = BP.writeUIntLE
arr.writeUIntBE = BP.writeUIntBE
arr.writeUInt16LE = BP.writeUInt16LE
arr.writeUInt16BE = BP.writeUInt16BE
arr.writeUInt32LE = BP.writeUInt32LE
arr.writeUInt32BE = BP.writeUInt32BE
arr.writeIntLE = BP.writeIntLE
arr.writeIntBE = BP.writeIntBE
arr.writeInt8 = BP.writeInt8
arr.writeInt16LE = BP.writeInt16LE
arr.writeInt16BE = BP.writeInt16BE
arr.writeInt32LE = BP.writeInt32LE
arr.writeInt32BE = BP.writeInt32BE
arr.writeFloatLE = BP.writeFloatLE
arr.writeFloatBE = BP.writeFloatBE
arr.writeDoubleLE = BP.writeDoubleLE
arr.writeDoubleBE = BP.writeDoubleBE
arr.fill = BP.fill
arr.inspect = BP.inspect
arr.toArrayBuffer = BP.toArrayBuffer
return arr
}
var INVALID_BASE64_RE = /[^+\/0-9A-z\-]/g
function base64clean (str) {
// Node strips out invalid characters like \n and \t from the string, base64-js does not
str = stringtrim(str).replace(INVALID_BASE64_RE, '')
// replace url-safe space and slash
str = str.replace(/-/g, '+').replace(/_/g, '/')
// Node converts strings with length < 2 to ''
if (str.length < 2) return ''
// Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
while (str.length % 4 !== 0) {
str = str + '='
}
return str
}
function stringtrim (str) {
if (str.trim) return str.trim()
return str.replace(/^\s+|\s+$/g, '')
}
function isArrayish (subject) {
return isArray(subject) || Buffer.isBuffer(subject) ||
subject && typeof subject === 'object' &&
typeof subject.length === 'number'
}
function toHex (n) {
if (n < 16) return '0' + n.toString(16)
return n.toString(16)
}
function utf8ToBytes(string, units) {
var codePoint, length = string.length
var leadSurrogate = null
units = units || Infinity
var bytes = []
var i = 0
for (; i<length; i++) {
codePoint = string.charCodeAt(i)
// is surrogate component
if (codePoint > 0xD7FF && codePoint < 0xE000) {
// last char was a lead
if (leadSurrogate) {
// 2 leads in a row
if (codePoint < 0xDC00) {
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
leadSurrogate = codePoint
continue
}
// valid surrogate pair
else {
codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000
leadSurrogate = null
}
}
// no lead yet
else {
// unexpected trail
if (codePoint > 0xDBFF) {
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
continue
}
// unpaired lead
else if (i + 1 === length) {
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
continue
}
// valid lead
else {
leadSurrogate = codePoint
continue
}
}
}
// valid bmp char, but last char was a lead
else if (leadSurrogate) {
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
leadSurrogate = null
}
// encode utf8
if (codePoint < 0x80) {
if ((units -= 1) < 0) break
bytes.push(codePoint)
}
else if (codePoint < 0x800) {
if ((units -= 2) < 0) break
bytes.push(
codePoint >> 0x6 | 0xC0,
codePoint & 0x3F | 0x80
);
}
else if (codePoint < 0x10000) {
if ((units -= 3) < 0) break
bytes.push(
codePoint >> 0xC | 0xE0,
codePoint >> 0x6 & 0x3F | 0x80,
codePoint & 0x3F | 0x80
);
}
else if (codePoint < 0x200000) {
if ((units -= 4) < 0) break
bytes.push(
codePoint >> 0x12 | 0xF0,
codePoint >> 0xC & 0x3F | 0x80,
codePoint >> 0x6 & 0x3F | 0x80,
codePoint & 0x3F | 0x80
);
}
else {
throw new Error('Invalid code point')
}
}
return bytes
}
function asciiToBytes (str) {
var byteArray = []
for (var i = 0; i < str.length; i++) {
// Node's code seems to be doing this and not & 0x7F..
byteArray.push(str.charCodeAt(i) & 0xFF)
}
return byteArray
}
function utf16leToBytes (str, units) {
var c, hi, lo
var byteArray = []
for (var i = 0; i < str.length; i++) {
if ((units -= 2) < 0) break
c = str.charCodeAt(i)
hi = c >> 8
lo = c % 256
byteArray.push(lo)
byteArray.push(hi)
}
return byteArray
}
function base64ToBytes (str) {
return base64.toByteArray(base64clean(str))
}
function blitBuffer (src, dst, offset, length, unitSize) {
if (unitSize) length -= length % unitSize;
for (var i = 0; i < length; i++) {
if ((i + offset >= dst.length) || (i >= src.length))
break
dst[i + offset] = src[i]
}
return i
}
function decodeUtf8Char (str) {
try {
return decodeURIComponent(str)
} catch (err) {
return String.fromCharCode(0xFFFD) // UTF 8 invalid char
}
}
| mit |
pmrozek/highcharts | Highsoft.Web.Mvc/src/Highsoft.Web.Mvc/Stocks/FlagsSeriesZone.cs | 2578 | // Type: Highsoft.Web.Mvc.Stocks.FlagsSeriesZone
using System.Collections;
using Newtonsoft.Json;
namespace Highsoft.Web.Mvc.Stocks
{
public class FlagsSeriesZone : BaseObject
{
public FlagsSeriesZone()
{
this.ClassName = this.ClassName_DefaultValue = "";
this.Color = this.Color_DefaultValue = (string) null;
this.DashStyle = this.DashStyle_DefaultValue = (string) null;
this.FillColor = this.FillColor_DefaultValue = (object) null;
double? nullable = new double?();
this.Value_DefaultValue = nullable;
this.Value = nullable;
}
public string ClassName { get; set; }
private string ClassName_DefaultValue { get; set; }
public string Color { get; set; }
private string Color_DefaultValue { get; set; }
public string DashStyle { get; set; }
private string DashStyle_DefaultValue { get; set; }
public object FillColor { get; set; }
private object FillColor_DefaultValue { get; set; }
public double? Value { get; set; }
private double? Value_DefaultValue { get; set; }
internal override Hashtable ToHashtable()
{
Hashtable hashtable = new Hashtable();
if (this.ClassName != this.ClassName_DefaultValue)
hashtable.Add((object) "className", (object) this.ClassName);
if (this.Color != this.Color_DefaultValue)
hashtable.Add((object) "color", (object) this.Color);
if (this.DashStyle != this.DashStyle_DefaultValue)
hashtable.Add((object) "dashStyle", (object) this.DashStyle);
if (this.FillColor != this.FillColor_DefaultValue)
hashtable.Add((object) "fillColor", this.FillColor);
double? nullable = this.Value;
double? valueDefaultValue = this.Value_DefaultValue;
if (nullable.GetValueOrDefault() != valueDefaultValue.GetValueOrDefault() ||
nullable.HasValue != valueDefaultValue.HasValue)
hashtable.Add((object) "value", (object) this.Value);
return hashtable;
}
internal override string ToJSON()
{
Hashtable hashtable = this.ToHashtable();
if (hashtable.Count > 0)
return JsonConvert.SerializeObject((object) this.ToHashtable());
return "";
}
internal override bool IsDirty()
{
return this.ToHashtable().Count > 0;
}
}
} | mit |
indexcoin/Indexcoin | src/qt/locale/bitcoin_hu.ts | 110096 | <?xml version="1.0" ?><!DOCTYPE TS><TS language="hu" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Bitcoin</source>
<translation>A Indexról</translation>
</message>
<message>
<location line="+39"/>
<source><b>Bitcoin</b> version</source>
<translation><b>Index</b> verzió</translation>
</message>
<message>
<location line="+57"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
<translation>
Ez egy kísérleti program.
MIT/X11 szoftverlicenc alatt kiadva, lásd a mellékelt fájlt COPYING vagy http://www.opensource.org/licenses/mit-license.php.
Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (http://www.openssl.org/) és kriptográfiai szoftvertben való felhasználásra, írta Eric Young (eay@cryptsoft.com) és UPnP szoftver, írta Thomas Bernard.</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="+14"/>
<source>Copyright</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The Bitcoin developers</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation>Címjegyzék</translation>
</message>
<message>
<location line="+19"/>
<source>Double-click to edit address or label</source>
<translation>Dupla-kattintás a cím vagy a címke szerkesztéséhez</translation>
</message>
<message>
<location line="+27"/>
<source>Create a new address</source>
<translation>Új cím létrehozása</translation>
</message>
<message>
<location line="+14"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation>A kiválasztott cím másolása a vágólapra</translation>
</message>
<message>
<location line="-11"/>
<source>&New Address</source>
<translation>&Új cím</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+63"/>
<source>These are your Bitcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source>
<translation>Ezekkel a Index-címekkel fogadhatod kifizetéseket. Érdemes lehet minden egyes kifizető számára külön címet létrehozni, hogy könnyebben nyomon követhesd, kitől kaptál már pénzt.</translation>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>&Copy Address</source>
<translation>&Cím másolása</translation>
</message>
<message>
<location line="+11"/>
<source>Show &QR Code</source>
<translation>&QR kód mutatása</translation>
</message>
<message>
<location line="+11"/>
<source>Sign a message to prove you own a Bitcoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Delete the currently selected address from the list</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Export the data in the current tab to a file</source>
<translation>Jelenlegi nézet exportálása fájlba</translation>
</message>
<message>
<location line="+3"/>
<source>&Export</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>Verify a message to ensure it was signed with a specified Bitcoin address</source>
<translation>Üzenet ellenőrzése, hogy valóban a megjelölt Index címekkel van-e aláírva.</translation>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation>Üzenet ellenőrzése</translation>
</message>
<message>
<location line="+14"/>
<source>&Delete</source>
<translation>&Törlés</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="-5"/>
<source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
<translation>These are your Index addresses for sending payments. Always check the amount and the receiving address before sending coins.</translation>
</message>
<message>
<location line="+13"/>
<source>Copy &Label</source>
<translation>Címke &másolása</translation>
</message>
<message>
<location line="+1"/>
<source>&Edit</source>
<translation>Sz&erkesztés</translation>
</message>
<message>
<location line="+1"/>
<source>Send &Coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+260"/>
<source>Export Address Book Data</source>
<translation>Címjegyzék adatainak exportálása</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Vesszővel elválasztott fájl (*. csv)</translation>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation>Hiba exportálás közben</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>%1 nevű fájl nem írható.</translation>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+144"/>
<source>Label</source>
<translation>Címke</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Cím</translation>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation>(nincs címke)</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation>Kulcsszó párbeszédablak</translation>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation>Add meg a jelszót</translation>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation>Új jelszó</translation>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation>Új jelszó újra</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="+33"/>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source>
<translation>Írd be az új jelszót a tárcához.<br/>Használj legalább 10<br/>véletlenszerű karaktert</b> vagy <b>legalább nyolc szót</b>.</translation>
</message>
<message>
<location line="+1"/>
<source>Encrypt wallet</source>
<translation>Tárca kódolása</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>A tárcád megnyitásához a műveletnek szüksége van a tárcád jelszavára.</translation>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation>Tárca megnyitása</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>A tárcád dekódolásához a műveletnek szüksége van a tárcád jelszavára.</translation>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation>Tárca dekódolása</translation>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation>Jelszó megváltoztatása</translation>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation>Írd be a tárca régi és új jelszavát.</translation>
</message>
<message>
<location line="+46"/>
<source>Confirm wallet encryption</source>
<translation>Biztosan kódolni akarod a tárcát?</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>!</source>
<translation>Figyelem: Ha kódolod a tárcát, és elveszíted a jelszavad, akkor <b>AZ ÖSSZES IndexODAT IS EL FOGOD VESZÍTENI!</b></translation>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation>Biztosan kódolni akarod a tárcát?</translation>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation>FONTOS: A pénztárca-fájl korábbi mentéseit ezzel az új, titkosított pénztárca-fájllal kell helyettesíteni. Biztonsági okokból a pénztárca-fájl korábbi titkosítás nélküli mentései haszontalanná válnak amint elkezdi használni az új, titkosított pénztárcát.</translation>
</message>
<message>
<location line="+100"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-130"/>
<location line="+58"/>
<source>Wallet encrypted</source>
<translation>Tárca kódolva</translation>
</message>
<message>
<location line="-56"/>
<source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
<translation>Index will close now to finish the encryption process. Ne feledd, hogy a tárca titkosítása sem nyújt teljes védelmet az adathalász programok fertőzésével szemben.</translation>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+42"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation>Tárca kódolása sikertelen.</translation>
</message>
<message>
<location line="-54"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>Tárca kódolása belső hiba miatt sikertelen. A tárcád nem lett kódolva.</translation>
</message>
<message>
<location line="+7"/>
<location line="+48"/>
<source>The supplied passphrases do not match.</source>
<translation>A megadott jelszavak nem egyeznek.</translation>
</message>
<message>
<location line="-37"/>
<source>Wallet unlock failed</source>
<translation>Tárca megnyitása sikertelen</translation>
</message>
<message>
<location line="+1"/>
<location line="+11"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation>Hibás jelszó.</translation>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation>Dekódolás sikertelen.</translation>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation>Jelszó megváltoztatva.</translation>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="+233"/>
<source>Sign &message...</source>
<translation>Üzenet aláírása...</translation>
</message>
<message>
<location line="+280"/>
<source>Synchronizing with network...</source>
<translation>Szinkronizálás a hálózattal...</translation>
</message>
<message>
<location line="-349"/>
<source>&Overview</source>
<translation>&Áttekintés</translation>
</message>
<message>
<location line="+1"/>
<source>Show general overview of wallet</source>
<translation>Tárca általános áttekintése</translation>
</message>
<message>
<location line="+20"/>
<source>&Transactions</source>
<translation>&Tranzakciók</translation>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation>Tranzakciótörténet megtekintése</translation>
</message>
<message>
<location line="+7"/>
<source>Edit the list of stored addresses and labels</source>
<translation>Tárolt címek és címkék listájának szerkesztése</translation>
</message>
<message>
<location line="-14"/>
<source>Show the list of addresses for receiving payments</source>
<translation>Kiizetést fogadó címek listája</translation>
</message>
<message>
<location line="+31"/>
<source>E&xit</source>
<translation>&Kilépés</translation>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation>Kilépés</translation>
</message>
<message>
<location line="+4"/>
<source>Show information about Bitcoin</source>
<translation>Információk a Indexról</translation>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation>A &Qt-ról</translation>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation>Információk a Qt ról</translation>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation>&Opciók...</translation>
</message>
<message>
<location line="+6"/>
<source>&Encrypt Wallet...</source>
<translation>Tárca &kódolása...</translation>
</message>
<message>
<location line="+3"/>
<source>&Backup Wallet...</source>
<translation>&Bisztonsági másolat készítése a Tárcáról</translation>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation>Jelszó &megváltoztatása...</translation>
</message>
<message>
<location line="+285"/>
<source>Importing blocks from disk...</source>
<translation>A blokkok importálása lemezről...</translation>
</message>
<message>
<location line="+3"/>
<source>Reindexing blocks on disk...</source>
<translation>A blokkok lemezen történő ujraindexelése...</translation>
</message>
<message>
<location line="-347"/>
<source>Send coins to a Bitcoin address</source>
<translation>Érmék küldése megadott címre</translation>
</message>
<message>
<location line="+49"/>
<source>Modify configuration options for Bitcoin</source>
<translation>Index konfigurációs opciók</translation>
</message>
<message>
<location line="+9"/>
<source>Backup wallet to another location</source>
<translation>Biztonsági másolat készítése a Tárcáról egy másik helyre</translation>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation>Tárcakódoló jelszó megváltoztatása</translation>
</message>
<message>
<location line="+6"/>
<source>&Debug window</source>
<translation>&Debug ablak</translation>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation>Hibakereső és diagnosztikai konzol megnyitása</translation>
</message>
<message>
<location line="-4"/>
<source>&Verify message...</source>
<translation>Üzenet &valódiságának ellenőrzése</translation>
</message>
<message>
<location line="-165"/>
<location line="+530"/>
<source>Bitcoin</source>
<translation>Index</translation>
</message>
<message>
<location line="-530"/>
<source>Wallet</source>
<translation>Tárca</translation>
</message>
<message>
<location line="+101"/>
<source>&Send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Receive</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>&Addresses</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>&About Bitcoin</source>
<translation>&A Indexról</translation>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show or hide the main Window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Encrypt the private keys that belong to your wallet</source>
<translation>A pénztárcájához tartozó privát kulcsok titkosítása</translation>
</message>
<message>
<location line="+7"/>
<source>Sign messages with your Bitcoin addresses to prove you own them</source>
<translation>Üzenet aláírása a Index címmel, amivel bizonyítja, hogy a cím az ön tulajdona.</translation>
</message>
<message>
<location line="+2"/>
<source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
<translation>Annak ellenőrzése, hogy az üzenetek valóban a megjelölt Index címekkel vannak-e alaírva</translation>
</message>
<message>
<location line="+28"/>
<source>&File</source>
<translation>&Fájl</translation>
</message>
<message>
<location line="+7"/>
<source>&Settings</source>
<translation>&Beállítások</translation>
</message>
<message>
<location line="+6"/>
<source>&Help</source>
<translation>&Súgó</translation>
</message>
<message>
<location line="+9"/>
<source>Tabs toolbar</source>
<translation>Fül eszköztár</translation>
</message>
<message>
<location line="+17"/>
<location line="+10"/>
<source>[testnet]</source>
<translation>[teszthálózat]</translation>
</message>
<message>
<location line="+47"/>
<source>Bitcoin client</source>
<translation>Index kliens</translation>
</message>
<message numerus="yes">
<location line="+141"/>
<source>%n active connection(s) to Bitcoin network</source>
<translation><numerusform>%n aktív kapcsolat a Index-hálózattal</numerusform><numerusform>%n aktív kapcsolat a Index-hálózattal</numerusform></translation>
</message>
<message>
<location line="+22"/>
<source>No block source available...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Processed %1 blocks of transaction history.</source>
<translation>A tranzakció-történet %1 blokkja feldolgozva.</translation>
</message>
<message numerus="yes">
<location line="+20"/>
<source>%n hour(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n week(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>%1 behind</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Last received block was generated %1 ago.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Transactions after this will not yet be visible.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>Error</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+70"/>
<source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-140"/>
<source>Up to date</source>
<translation>Naprakész</translation>
</message>
<message>
<location line="+31"/>
<source>Catching up...</source>
<translation>Frissítés...</translation>
</message>
<message>
<location line="+113"/>
<source>Confirm transaction fee</source>
<translation>Tranzakciós díj jóváhagyása</translation>
</message>
<message>
<location line="+8"/>
<source>Sent transaction</source>
<translation>Tranzakció elküldve.</translation>
</message>
<message>
<location line="+0"/>
<source>Incoming transaction</source>
<translation>Beérkező tranzakció</translation>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation>Dátum: %1
Összeg: %2
Típus: %3
Cím: %4
</translation>
</message>
<message>
<location line="+33"/>
<location line="+23"/>
<source>URI handling</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-23"/>
<location line="+23"/>
<source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation>Tárca <b>kódolva</b> és jelenleg <b>nyitva</b>.</translation>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation>Tárca <b>kódolva</b> és jelenleg <b>zárva</b>.</translation>
</message>
<message>
<location filename="../bitcoin.cpp" line="+111"/>
<source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+104"/>
<source>Network Alert</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation>Cím szerkesztése</translation>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation>Cím&ke</translation>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation>A címhez tartozó címke</translation>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation>&Cím</translation>
</message>
<message>
<location line="+10"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation>Az ehhez a címjegyzék-bejegyzéshez tartozó cím. Ez csak a küldő címeknél módosítható.</translation>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+21"/>
<source>New receiving address</source>
<translation>Új fogadó cím</translation>
</message>
<message>
<location line="+4"/>
<source>New sending address</source>
<translation>Új küldő cím</translation>
</message>
<message>
<location line="+3"/>
<source>Edit receiving address</source>
<translation>Fogadó cím szerkesztése</translation>
</message>
<message>
<location line="+4"/>
<source>Edit sending address</source>
<translation>Küldő cím szerkesztése</translation>
</message>
<message>
<location line="+76"/>
<source>The entered address "%1" is already in the address book.</source>
<translation>A megadott "%1" cím már szerepel a címjegyzékben.</translation>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid Bitcoin address.</source>
<translation>A megadott "%1" cím nem egy érvényes Index-cím.</translation>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation>Tárca feloldása sikertelen</translation>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation>Új kulcs generálása sikertelen</translation>
</message>
</context>
<context>
<name>GUIUtil::HelpMessageBox</name>
<message>
<location filename="../guiutil.cpp" line="+424"/>
<location line="+12"/>
<source>Bitcoin-Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-12"/>
<source>version</source>
<translation>verzió</translation>
</message>
<message>
<location line="+2"/>
<source>Usage:</source>
<translation>Használat:</translation>
</message>
<message>
<location line="+1"/>
<source>command-line options</source>
<translation>parancssoros opciók</translation>
</message>
<message>
<location line="+4"/>
<source>UI options</source>
<translation>UI opciók</translation>
</message>
<message>
<location line="+1"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Start minimized</source>
<translation>Indítás lekicsinyítve
</translation>
</message>
<message>
<location line="+1"/>
<source>Show splash screen on startup (default: 1)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../forms/optionsdialog.ui" line="+14"/>
<source>Options</source>
<translation>Opciók</translation>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation>&Fő</translation>
</message>
<message>
<location line="+6"/>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation>Tranzakciós &díj fizetése</translation>
</message>
<message>
<location line="+31"/>
<source>Automatically start Bitcoin after logging in to the system.</source>
<translation>Induljon el a Index a számítógép bekapcsolásakor</translation>
</message>
<message>
<location line="+3"/>
<source>&Start Bitcoin on system login</source>
<translation>&Induljon el a számítógép bekapcsolásakor</translation>
</message>
<message>
<location line="+35"/>
<source>Reset all client options to default.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Reset Options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>&Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation>A Index-kliens portjának automatikus megnyitása a routeren. Ez csak akkor működik, ha a routered támogatja az UPnP-t és az engedélyezve is van rajta.</translation>
</message>
<message>
<location line="+3"/>
<source>Map port using &UPnP</source>
<translation>&UPnP port-feltérképezés</translation>
</message>
<message>
<location line="+7"/>
<source>Connect to the Bitcoin network through a SOCKS proxy (e.g. when connecting through Tor).</source>
<translation>SOCKS proxyn keresztüli csatlakozás a Index hálózatához (pl. Tor-on keresztüli csatlakozás esetén)</translation>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS proxy:</source>
<translation>&Csatlakozás SOCKS proxyn keresztül:</translation>
</message>
<message>
<location line="+9"/>
<source>Proxy &IP:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation>Proxy IP címe (pl.: 127.0.0.1)</translation>
</message>
<message>
<location line="+7"/>
<source>&Port:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Port of the proxy (e.g. 9050)</source>
<translation>Proxy portja (pl.: 9050)</translation>
</message>
<message>
<location line="+7"/>
<source>SOCKS &Version:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>SOCKS version of the proxy (e.g. 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+36"/>
<source>&Window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation>Kicsinyítés után csak eszköztár-ikont mutass</translation>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation>&Kicsinyítés a tálcára az eszköztár helyett</translation>
</message>
<message>
<location line="+7"/>
<source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
<translation>Az alkalmazásból való kilépés helyett az eszköztárba kicsinyíti az alkalmazást az ablak bezárásakor. Ez esetben az alkalmazás csak a Kilépés menüponttal zárható be.</translation>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation>K&icsinyítés záráskor</translation>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation>&Megjelenítés</translation>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation>&Mértékegység:</translation>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation>Válaszd ki az interfészen és érmék küldésekor megjelenítendő alapértelmezett alegységet.</translation>
</message>
<message>
<location line="+9"/>
<source>Whether to show Bitcoin addresses in the transaction list or not.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Display addresses in transaction list</source>
<translation>&Címek megjelenítése a tranzakciólistában</translation>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation>Megszakítás</translation>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation>Alkalmazás</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+53"/>
<source>default</source>
<translation>alapértelmezett</translation>
</message>
<message>
<location line="+130"/>
<source>Confirm options reset</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Some settings may require a client restart to take effect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Do you want to proceed?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+42"/>
<location line="+9"/>
<source>Warning</source>
<translation>Figyelem</translation>
</message>
<message>
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting Bitcoin.</source>
<translation>Ez a beállítás a Index ujraindítása után lép érvénybe.</translation>
</message>
<message>
<location line="+29"/>
<source>The supplied proxy address is invalid.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation>Űrlap</translation>
</message>
<message>
<location line="+50"/>
<location line="+166"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
<translation>A kijelzett információ lehet, hogy elavult. A pénztárcája automatikusan szinkronizálja magát a Index hálózattal miután a kapcsolat létrejön, de ez e folyamat még nem fejeződött be.</translation>
</message>
<message>
<location line="-124"/>
<source>Balance:</source>
<translation>Egyenleg:</translation>
</message>
<message>
<location line="+29"/>
<source>Unconfirmed:</source>
<translation>Megerősítetlen:</translation>
</message>
<message>
<location line="-78"/>
<source>Wallet</source>
<translation>Tárca</translation>
</message>
<message>
<location line="+107"/>
<source>Immature:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+46"/>
<source><b>Recent transactions</b></source>
<translation><b>Legutóbbi tranzakciók</b></translation>
</message>
<message>
<location line="-101"/>
<source>Your current balance</source>
<translation>Aktuális egyenleged</translation>
</message>
<message>
<location line="+29"/>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source>
<translation>Még megerősítésre váró, a jelenlegi egyenlegbe be nem számított tranzakciók</translation>
</message>
<message>
<location filename="../overviewpage.cpp" line="+116"/>
<location line="+1"/>
<source>out of sync</source>
<translation>Nincs szinkronban.</translation>
</message>
</context>
<context>
<name>PaymentServer</name>
<message>
<location filename="../paymentserver.cpp" line="+107"/>
<source>Cannot start bitcoin: click-to-pay handler</source>
<translation>Cannot start Index: click-to-pay handler</translation>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="+14"/>
<source>QR Code Dialog</source>
<translation>QR kód párbeszédablak</translation>
</message>
<message>
<location line="+59"/>
<source>Request Payment</source>
<translation>Fizetés kérése</translation>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation>Összeg:</translation>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation>Címke:</translation>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation>Üzenet:</translation>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation>Mentés má&sként</translation>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="+62"/>
<source>Error encoding URI into QR Code.</source>
<translation>Hiba lépett fel az URI QR kóddá alakításakor</translation>
</message>
<message>
<location line="+40"/>
<source>The entered amount is invalid, please check.</source>
<translation>A megadott összeg nem érvényes. Kérem ellenőrizze.</translation>
</message>
<message>
<location line="+23"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation>A keletkezett URI túl hosszú, próbálja meg csökkenteni a cimkeszöveg / üzenet méretét.</translation>
</message>
<message>
<location line="+25"/>
<source>Save QR Code</source>
<translation>QR kód mentése</translation>
</message>
<message>
<location line="+0"/>
<source>PNG Images (*.png)</source>
<translation>PNG Képfájlok (*.png)</translation>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation>Kliens néve</translation>
</message>
<message>
<location line="+10"/>
<location line="+23"/>
<location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+36"/>
<location line="+53"/>
<location line="+23"/>
<location line="+23"/>
<location filename="../rpcconsole.cpp" line="+339"/>
<source>N/A</source>
<translation>Nem elérhető</translation>
</message>
<message>
<location line="-217"/>
<source>Client version</source>
<translation>Kliens verzió</translation>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation>&Információ</translation>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation>Bekapcsolás ideje</translation>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation>Hálózat</translation>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation>Kapcsolatok száma</translation>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation>Teszthálózaton</translation>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation>Blokklánc</translation>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation>Aktuális blokkok száma</translation>
</message>
<message>
<location line="+23"/>
<source>Estimated total blocks</source>
<translation>Becsült összes blokk</translation>
</message>
<message>
<location line="+23"/>
<source>Last block time</source>
<translation>Utolsó blokk ideje</translation>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation>&Megnyitás</translation>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Show the Bitcoin-Qt help message to get a list with possible Bitcoin command-line options.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation>&Konzol</translation>
</message>
<message>
<location line="-260"/>
<source>Build date</source>
<translation>Fordítás dátuma</translation>
</message>
<message>
<location line="-104"/>
<source>Bitcoin - Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Bitcoin Core</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+279"/>
<source>Debug log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+102"/>
<source>Clear console</source>
<translation>Konzol törlése</translation>
</message>
<message>
<location filename="../rpcconsole.cpp" line="-30"/>
<source>Welcome to the Bitcoin RPC console.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation>Navigálhat a fel és le nyilakkal, és <b>Ctrl-L</b> -vel törölheti a képernyőt.</translation>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
<location filename="../sendcoinsdialog.cpp" line="+124"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation>Érmék küldése</translation>
</message>
<message>
<location line="+50"/>
<source>Send to multiple recipients at once</source>
<translation>Küldés több címzettnek egyszerre</translation>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation>&Címzett hozzáadása</translation>
</message>
<message>
<location line="+20"/>
<source>Remove all transaction fields</source>
<translation>Az összes tranzakciós mező eltávolítása</translation>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation>Mindent &töröl</translation>
</message>
<message>
<location line="+22"/>
<source>Balance:</source>
<translation>Egyenleg:</translation>
</message>
<message>
<location line="+10"/>
<source>123.456 SPUR</source>
<translation>123.456 IDX</translation>
</message>
<message>
<location line="+31"/>
<source>Confirm the send action</source>
<translation>Küldés megerősítése</translation>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation>&Küldés</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-59"/>
<source><b>%1</b> to %2 (%3)</source>
<translation><b>%1</b> %2-re (%3)</translation>
</message>
<message>
<location line="+5"/>
<source>Confirm send coins</source>
<translation>Küldés megerősítése</translation>
</message>
<message>
<location line="+1"/>
<source>Are you sure you want to send %1?</source>
<translation>Valóban el akarsz küldeni %1-t?</translation>
</message>
<message>
<location line="+0"/>
<source> and </source>
<translation> és</translation>
</message>
<message>
<location line="+23"/>
<source>The recipient address is not valid, please recheck.</source>
<translation>A címzett címe érvénytelen, kérlek, ellenőrizd.</translation>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation>A fizetendő összegnek nagyobbnak kell lennie 0-nál.</translation>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation>Nincs ennyi Index az egyenlegeden.</translation>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation>A küldeni kívánt összeg és a %1 tranzakciós díj együtt meghaladja az egyenlegeden rendelkezésedre álló összeget.</translation>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation>Többször szerepel ugyanaz a cím. Egy küldési műveletben egy címre csak egyszer lehet küldeni.</translation>
</message>
<message>
<location line="+5"/>
<source>Error: Transaction creation failed!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation>Hiba: a tranzakciót elutasították. Ezt az okozhatja, ha már elköltöttél valamennyi érmét a tárcádból például ha a wallet.dat-od egy másolatát használtad, és így az elköltés csak abban lett jelölve, de itt nem.</translation>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="+14"/>
<source>Form</source>
<translation>Űrlap</translation>
</message>
<message>
<location line="+15"/>
<source>A&mount:</source>
<translation>Összeg:</translation>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation>Címzett:</translation>
</message>
<message>
<location line="+34"/>
<source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+60"/>
<location filename="../sendcoinsentry.cpp" line="+26"/>
<source>Enter a label for this address to add it to your address book</source>
<translation>Milyen címkével kerüljön be ez a cím a címtáradba?
</translation>
</message>
<message>
<location line="-78"/>
<source>&Label:</source>
<translation>Címke:</translation>
</message>
<message>
<location line="+28"/>
<source>Choose address from address book</source>
<translation>Válassz egy címet a címjegyzékből</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="+7"/>
<source>Paste address from clipboard</source>
<translation>Cím beillesztése a vágólapról</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+7"/>
<source>Remove this recipient</source>
<translation>Címzett eltávolítása</translation>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
<translation>Adj meg egy Index-címet (pl.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L )</translation>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="+14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>&Sign Message</source>
<translation>Üzenet aláírása...</translation>
</message>
<message>
<location line="+6"/>
<source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
<translation>Aláírhat a címeivel üzeneteket, amivel bizonyíthatja, hogy a címek az önéi. Vigyázzon, hogy ne írjon alá semmi félreérthetőt, mivel a phising támadásokkal megpróbálhatják becsapni, hogy az azonosságát átírja másokra. Csak olyan részletes állításokat írjon alá, amivel egyetért.</translation>
</message>
<message>
<location line="+18"/>
<source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
<translation>Adj meg egy Index-címet (pl.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L )</translation>
</message>
<message>
<location line="+10"/>
<location line="+213"/>
<source>Choose an address from the address book</source>
<translation>Válassz egy címet a címjegyzékből</translation>
</message>
<message>
<location line="-203"/>
<location line="+213"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="-203"/>
<source>Paste address from clipboard</source>
<translation>Cím beillesztése a vágólapról</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+12"/>
<source>Enter the message you want to sign here</source>
<translation>Ide írja az aláírandó üzenetet</translation>
</message>
<message>
<location line="+7"/>
<source>Signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Copy the current signature to the system clipboard</source>
<translation>A jelenleg kiválasztott aláírás másolása a rendszer-vágólapra</translation>
</message>
<message>
<location line="+21"/>
<source>Sign the message to prove you own this Bitcoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Reset all sign message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation>Mindent &töröl</translation>
</message>
<message>
<location line="-87"/>
<source>&Verify Message</source>
<translation>Üzenet ellenőrzése</translation>
</message>
<message>
<location line="+6"/>
<source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source>
<translation>Írja be az aláírás címét, az üzenetet (ügyelve arra, hogy az új-sor, szóköz, tab, stb. karaktereket is pontosan) és az aláírást az üzenet ellenőrzéséhez. Ügyeljen arra, ne gondoljon többet az aláírásról, mint amennyi az aláírt szövegben ténylegesen áll, hogy elkerülje a köztes-ember (man-in-the-middle) támadást.</translation>
</message>
<message>
<location line="+21"/>
<source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
<translation>Adj meg egy Index-címet (pl.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L )</translation>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Verify &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Reset all verify message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
<translation>Adj meg egy Index-címet (pl.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L )</translation>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Enter Bitcoin signature</source>
<translation>Adja meg a Index aláírást</translation>
</message>
<message>
<location line="+82"/>
<location line="+81"/>
<source>The entered address is invalid.</source>
<translation>A megadott cím nem érvényes.</translation>
</message>
<message>
<location line="-81"/>
<location line="+8"/>
<location line="+73"/>
<location line="+8"/>
<source>Please check the address and try again.</source>
<translation>Ellenőrizze a címet és próbálja meg újra.</translation>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SplashScreen</name>
<message>
<location filename="../splashscreen.cpp" line="+22"/>
<source>The Bitcoin developers</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>[testnet]</source>
<translation>[teszthálózat]</translation>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+20"/>
<source>Open until %1</source>
<translation>Megnyitva %1-ig</translation>
</message>
<message>
<location line="+6"/>
<source>%1/offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation>%1/megerősítetlen</translation>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation>%1 megerősítés</translation>
</message>
<message>
<location line="+18"/>
<source>Status</source>
<translation>Állapot</translation>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation>Dátum</translation>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation>Legenerálva</translation>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<source>From</source>
<translation>Űrlap</translation>
</message>
<message>
<location line="+1"/>
<location line="+22"/>
<location line="+58"/>
<source>To</source>
<translation>Címzett</translation>
</message>
<message>
<location line="-77"/>
<location line="+2"/>
<source>own address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation>címke</translation>
</message>
<message>
<location line="+37"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation>Jóváírás</translation>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation>elutasítva</translation>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation>Terhelés</translation>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation>Tranzakciós díj</translation>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation>Nettó összeg</translation>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation>Üzenet</translation>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation>Megjegyzés</translation>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation>A frissen generált érméket csak 120 blokkal később tudod elkölteni. Ez a blokk nyomban szétküldésre került a hálózatba, amint legeneráltad, hogy hozzáadhassák a blokklánchoz. Ha nem kerül be a láncba, úgy az állapota "elutasítva"-ra módosul, és nem költheted el az érméket. Ez akkor következhet be időnként, ha egy másik csomópont mindössze néhány másodperc különbséggel generált le egy blokkot a tiédhez képest.</translation>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation>Tranzakció</translation>
</message>
<message>
<location line="+3"/>
<source>Inputs</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Amount</source>
<translation>Összeg</translation>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-209"/>
<source>, has not been successfully broadcast yet</source>
<translation>, még nem sikerült elküldeni.</translation>
</message>
<message numerus="yes">
<location line="-35"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+70"/>
<source>unknown</source>
<translation>ismeretlen</translation>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.ui" line="+14"/>
<source>Transaction details</source>
<translation>Tranzakció részletei</translation>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation>Ez a mező a tranzakció részleteit mutatja</translation>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<location filename="../transactiontablemodel.cpp" line="+225"/>
<source>Date</source>
<translation>Dátum</translation>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation>Típus</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Cím</translation>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation>Összeg</translation>
</message>
<message numerus="yes">
<location line="+57"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+3"/>
<source>Open until %1</source>
<translation>%1-ig megnyitva</translation>
</message>
<message>
<location line="+3"/>
<source>Offline (%1 confirmations)</source>
<translation>Offline (%1 megerősítés)</translation>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed (%1 of %2 confirmations)</source>
<translation>Megerősítetlen (%1 %2 megerősítésből)</translation>
</message>
<message>
<location line="+3"/>
<source>Confirmed (%1 confirmations)</source>
<translation>Megerősítve (%1 megerősítés)</translation>
</message>
<message numerus="yes">
<location line="+8"/>
<source>Mined balance will be available when it matures in %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+5"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation>Ezt a blokkot egyetlen másik csomópont sem kapta meg, így valószínűleg nem lesz elfogadva!</translation>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation>Legenerálva, de még el nem fogadva.</translation>
</message>
<message>
<location line="+43"/>
<source>Received with</source>
<translation>Erre a címre</translation>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation>Erről az</translation>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation>Erre a címre</translation>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation>Magadnak kifizetve</translation>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation>Kibányászva</translation>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation>(nincs)</translation>
</message>
<message>
<location line="+199"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation>Tranzakció állapota. Húzd ide a kurzort, hogy lásd a megerősítések számát.</translation>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation>Tranzakció fogadásának dátuma és időpontja.</translation>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation>Tranzakció típusa.</translation>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation>A tranzakció címzettjének címe.</translation>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation>Az egyenleghez jóváírt vagy ráterhelt összeg.</translation>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+52"/>
<location line="+16"/>
<source>All</source>
<translation>Mind</translation>
</message>
<message>
<location line="-15"/>
<source>Today</source>
<translation>Mai</translation>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation>Ezen a héten</translation>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation>Ebben a hónapban</translation>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation>Múlt hónapban</translation>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation>Ebben az évben</translation>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation>Tartomány ...</translation>
</message>
<message>
<location line="+11"/>
<source>Received with</source>
<translation>Erre a címre</translation>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation>Erre a címre</translation>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation>Magadnak</translation>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation>Kibányászva</translation>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation>Más</translation>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation>Írd be a keresendő címet vagy címkét</translation>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation>Minimális összeg</translation>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation>Cím másolása</translation>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation>Címke másolása</translation>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation>Összeg másolása</translation>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation>Címke szerkesztése</translation>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation>Tranzakciós részletek megjelenítése</translation>
</message>
<message>
<location line="+139"/>
<source>Export Transaction Data</source>
<translation>Tranzakció adatainak exportálása</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Vesszővel elválasztott fájl (*.csv)</translation>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation>Megerősítve</translation>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation>Dátum</translation>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation>Típus</translation>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation>Címke</translation>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation>Cím</translation>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation>Összeg</translation>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation>Azonosító</translation>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation>Hiba lépett fel exportálás közben</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>%1 fájlba való kiírás sikertelen.</translation>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation>Tartomány:</translation>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation>meddig</translation>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+193"/>
<source>Send Coins</source>
<translation>Érmék küldése</translation>
</message>
</context>
<context>
<name>WalletView</name>
<message>
<location filename="../walletview.cpp" line="+42"/>
<source>&Export</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Export the data in the current tab to a file</source>
<translation>Jelenlegi nézet exportálása fájlba</translation>
</message>
<message>
<location line="+193"/>
<source>Backup Wallet</source>
<translation>Biztonsági másolat készítése a Tárcáról</translation>
</message>
<message>
<location line="+0"/>
<source>Wallet Data (*.dat)</source>
<translation>Tárca fájl (*.dat)</translation>
</message>
<message>
<location line="+3"/>
<source>Backup Failed</source>
<translation>Biztonsági másolat készítése sikertelen</translation>
</message>
<message>
<location line="+0"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation>Hiba lépett fel a Tárca másik helyre való mentése közben</translation>
</message>
<message>
<location line="+4"/>
<source>Backup Successful</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The wallet data was successfully saved to the new location.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+94"/>
<source>Bitcoin version</source>
<translation>Index verzió</translation>
</message>
<message>
<location line="+102"/>
<source>Usage:</source>
<translation>Használat:</translation>
</message>
<message>
<location line="-29"/>
<source>Send command to -server or bitcoind</source>
<translation>Parancs küldése a -serverhez vagy a bitcoindhez
</translation>
</message>
<message>
<location line="-23"/>
<source>List commands</source>
<translation>Parancsok kilistázása
</translation>
</message>
<message>
<location line="-12"/>
<source>Get help for a command</source>
<translation>Segítség egy parancsról
</translation>
</message>
<message>
<location line="+24"/>
<source>Options:</source>
<translation>Opciók
</translation>
</message>
<message>
<location line="+24"/>
<source>Specify configuration file (default: bitcoin.conf)</source>
<translation>Konfigurációs fájl (alapértelmezett: bitcoin.conf)
</translation>
</message>
<message>
<location line="+3"/>
<source>Specify pid file (default: bitcoind.pid)</source>
<translation>pid-fájl (alapértelmezett: bitcoind.pid)
</translation>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation>Adatkönyvtár
</translation>
</message>
<message>
<location line="-9"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation>Az adatbázis gyorsítótár mérete megabájtban (alapértelmezés: 25)</translation>
</message>
<message>
<location line="-28"/>
<source>Listen for connections on <port> (default: 11070 or testnet: 5744)</source>
<translation>Csatlakozásokhoz figyelendő <port> (alapértelmezett: 11070 or testnet: 5744)</translation>
</message>
<message>
<location line="+5"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation>Maximálisan <n> számú kapcsolat fenntartása a peerekkel (alapértelmezés: 125)</translation>
</message>
<message>
<location line="-48"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation>Kapcsolódás egy csomóponthoz a peerek címeinek megszerzése miatt, majd szétkapcsolás</translation>
</message>
<message>
<location line="+82"/>
<source>Specify your own public address</source>
<translation>Adja meg az Ön saját nyilvános címét</translation>
</message>
<message>
<location line="+3"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation>Helytelenül viselkedő peerek leválasztási határértéke (alapértelmezés: 100)</translation>
</message>
<message>
<location line="-134"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation>Helytelenül viselkedő peerek kizárási ideje másodpercben (alapértelmezés: 86400)</translation>
</message>
<message>
<location line="-29"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Listen for JSON-RPC connections on <port> (default: 21070 or testnet: 5745)</source>
<translation>JSON-RPC csatlakozásokhoz figyelendő <port> (alapértelmezett: 21070 or testnet: 5745)</translation>
</message>
<message>
<location line="+37"/>
<source>Accept command line and JSON-RPC commands</source>
<translation>Parancssoros és JSON-RPC parancsok elfogadása
</translation>
</message>
<message>
<location line="+76"/>
<source>Run in the background as a daemon and accept commands</source>
<translation>Háttérben futtatás daemonként és parancsok elfogadása
</translation>
</message>
<message>
<location line="+37"/>
<source>Use the test network</source>
<translation>Teszthálózat használata
</translation>
</message>
<message>
<location line="-112"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-80"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=bitcoinrpc
rpcpassword=%s
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Cannot obtain a lock on data directory %s. Bitcoin is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation>Figyelem: a -paytxfee nagyon magas. Ennyi tranzakciós díjat fogsz fizetni, ha elküldöd a tranzakciót.</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
<translation>Figyelem: Ellenőrizd, hogy helyesen van-e beállítva a gépeden a dátum és az idő. A Index nem fog megfelelően működni, ha rosszul van beállítvaaz órád.</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Block creation options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Connect only to the specified node(s)</source>
<translation>Csatlakozás csak a megadott csomóponthoz</translation>
</message>
<message>
<location line="+3"/>
<source>Corrupted block database detected</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Do you want to rebuild the block database now?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error initializing block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error initializing wallet database environment %s!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error loading block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error opening block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error: Disk space is low!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error: Wallet locked, unable to create transaction!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error: system error: </source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to read block info</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to read block</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to sync block index</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write block index</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write block info</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write block</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write file info</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write to coin database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write transaction index</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write undo data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Find peers using DNS lookup (default: 1 unless -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Generate coins (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>How many blocks to check at startup (default: 288, 0 = all)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>How thorough the block verification is (0-4, default: 3)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Not enough file descriptors available.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Rebuild block chain index from current blk000??.dat files</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Set the number of threads to service RPC calls (default: 4)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+26"/>
<source>Verifying blocks...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Verifying wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-69"/>
<source>Imports blocks from external blk000??.dat file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-76"/>
<source>Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+77"/>
<source>Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Invalid -tor address: '%s'</source>
<translation>Érvénytelen -tor cím: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -minrelaytxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -mintxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Maintain a full transaction index (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Only accept block chain matching built-in checkpoints (default: 1)</source>
<translation>Csak blokklánccal egyező beépített ellenőrző pontok elfogadása (alapértelmezés: 1)</translation>
</message>
<message>
<location line="+1"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Output extra debugging information. Implies all other -debug* options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Output extra network debugging information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Prepend debug output with timestamp</source>
<translation>Időbélyeges hibakeresési kimenet hozzáadása az elejéhez</translation>
</message>
<message>
<location line="+5"/>
<source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
<translation>SSL-opciók: (lásd a Index Wiki SSL-beállítási instrukcióit)</translation>
</message>
<message>
<location line="+1"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>trace/debug információ küldése a konzolra a debog.log fájl helyett</translation>
</message>
<message>
<location line="+1"/>
<source>Send trace/debug info to debugger</source>
<translation>trace/debug információ küldése a debuggerre</translation>
</message>
<message>
<location line="+5"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Signing transaction failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation>Csatlakozás időkerete milliszekundumban (alapértelmezett: 5000)</translation>
</message>
<message>
<location line="+4"/>
<source>System error: </source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Transaction amount too small</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transaction amounts must be positive</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transaction too large</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation>UPnP-használat engedélyezése a figyelő port feltérképezésénél (default: 0)</translation>
</message>
<message>
<location line="+1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation>UPnP-használat engedélyezése a figyelő port feltérképezésénél (default: 1 when listening)</translation>
</message>
<message>
<location line="+1"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Username for JSON-RPC connections</source>
<translation>Felhasználói név JSON-RPC csatlakozásokhoz
</translation>
</message>
<message>
<location line="+4"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>You need to rebuild the databases using -reindex to change -txindex</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-50"/>
<source>Password for JSON-RPC connections</source>
<translation>Jelszó JSON-RPC csatlakozásokhoz
</translation>
</message>
<message>
<location line="-67"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation>JSON-RPC csatlakozások engedélyezése meghatározott IP-címről
</translation>
</message>
<message>
<location line="+76"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation>Parancsok küldése <ip> címen működő csomóponthoz (alapértelmezett: 127.0.0.1)
</translation>
</message>
<message>
<location line="-120"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation>Parancs, amit akkor hajt végre, amikor a legjobb blokk megváltozik (%s a cmd-ban lecserélődik a blokk hash-re)</translation>
</message>
<message>
<location line="+147"/>
<source>Upgrade wallet to latest format</source>
<translation>A Tárca frissítése a legfrissebb formátumra</translation>
</message>
<message>
<location line="-21"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation>Kulcskarika mérete <n> (alapértelmezett: 100)
</translation>
</message>
<message>
<location line="-12"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation>Blokklánc újraszkennelése hiányzó tárca-tranzakciók után
</translation>
</message>
<message>
<location line="+35"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation>OpenSSL (https) használata JSON-RPC csatalkozásokhoz
</translation>
</message>
<message>
<location line="-26"/>
<source>Server certificate file (default: server.cert)</source>
<translation>Szervertanúsítvány-fájl (alapértelmezett: server.cert)
</translation>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation>Szerver titkos kulcsa (alapértelmezett: server.pem)
</translation>
</message>
<message>
<location line="-151"/>
<source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source>
<translation>Elfogadható rejtjelkulcsok (alapértelmezett: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH )
</translation>
</message>
<message>
<location line="+165"/>
<source>This help message</source>
<translation>Ez a súgó-üzenet
</translation>
</message>
<message>
<location line="+6"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation>A %s nem elérhető ezen a gépen (bind returned error %d, %s)</translation>
</message>
<message>
<location line="-91"/>
<source>Connect through socks proxy</source>
<translation>Csatlakozás SOCKS proxyn keresztül</translation>
</message>
<message>
<location line="-10"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation>DNS-kikeresés engedélyezése az addnode-nál és a connect-nél</translation>
</message>
<message>
<location line="+55"/>
<source>Loading addresses...</source>
<translation>Címek betöltése...</translation>
</message>
<message>
<location line="-35"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation>Hiba a wallet.dat betöltése közben: meghibásodott tárca</translation>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
<translation>Hiba a wallet.dat betöltése közben: ehhez a tárcához újabb verziójú Index-kliens szükséges</translation>
</message>
<message>
<location line="+93"/>
<source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
<translation>A Tárca újraírása szükséges: Indítsa újra a teljesen a Index-t</translation>
</message>
<message>
<location line="-95"/>
<source>Error loading wallet.dat</source>
<translation>Hiba az wallet.dat betöltése közben</translation>
</message>
<message>
<location line="+28"/>
<source>Invalid -proxy address: '%s'</source>
<translation>Érvénytelen -proxy cím: '%s'</translation>
</message>
<message>
<location line="+56"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>Ismeretlen hálózat lett megadva -onlynet: '%s'</translation>
</message>
<message>
<location line="-1"/>
<source>Unknown -socks proxy version requested: %i</source>
<translation>Ismeretlen -socks proxy kérése: %i</translation>
</message>
<message>
<location line="-96"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation>Étvénytelen -paytxfee=<összeg> összeg: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount</source>
<translation>Étvénytelen összeg</translation>
</message>
<message>
<location line="-6"/>
<source>Insufficient funds</source>
<translation>Nincs elég Indexod.</translation>
</message>
<message>
<location line="+10"/>
<source>Loading block index...</source>
<translation>Blokkindex betöltése...</translation>
</message>
<message>
<location line="-57"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation>Elérendő csomópont megadása and attempt to keep the connection open</translation>
</message>
<message>
<location line="-25"/>
<source>Unable to bind to %s on this computer. Bitcoin is probably already running.</source>
<translation>A %s nem elérhető ezen a gépen. A Index valószínűleg fut már.</translation>
</message>
<message>
<location line="+64"/>
<source>Fee per KB to add to transactions you send</source>
<translation>kB-onként felajánlandó díj az általad küldött tranzakciókhoz</translation>
</message>
<message>
<location line="+19"/>
<source>Loading wallet...</source>
<translation>Tárca betöltése...</translation>
</message>
<message>
<location line="-52"/>
<source>Cannot downgrade wallet</source>
<translation>Nem sikerült a Tárca visszaállítása a korábbi verzióra</translation>
</message>
<message>
<location line="+3"/>
<source>Cannot write default address</source>
<translation>Nem sikerült az alapértelmezett címet írni.</translation>
</message>
<message>
<location line="+64"/>
<source>Rescanning...</source>
<translation>Újraszkennelés...</translation>
</message>
<message>
<location line="-57"/>
<source>Done loading</source>
<translation>Betöltés befejezve.</translation>
</message>
<message>
<location line="+82"/>
<source>To use the %s option</source>
<translation>Használd a %s opciót</translation>
</message>
<message>
<location line="-74"/>
<source>Error</source>
<translation>Hiba</translation>
</message>
<message>
<location line="-31"/>
<source>You must set rpcpassword=<password> in the configuration file:
%s
If the file does not exist, create it with owner-readable-only file permissions.</source>
<translation>Be kell állítani rpcpassword=<password> a konfigurációs fájlban
%s
Ha a fájl nem létezik, hozd létre 'csak a felhasználó által olvasható' fájl engedéllyel</translation>
</message>
</context>
</TS> | mit |
skygragon/video-boy | lib/youku.js | 2974 | var util = require('util'),
_ = require('underscore'),
$ = require('./utils');
var FILEID_BOOK = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/\\:._-1234567890',
FILE_URL = 'http://k.youku.com/player/getFlvPath/sid/%s_00/st/%s/fileid/%s'
+ '?K=%s&token=%s&ep=%s&ctype=12&ev=1&oip=%s',
ST_BOOK = { 'flv':'flv', 'hd2':'flv', 'hd3':'flv', '3gp':'flv', 'mp4':'mp4', '3gphd':'mp4'};
// TODO: extract base class
function Youku(){}
Youku.prototype.parse = function(url, cb) {
// TODO: support more patterns
var reg = /v_show\/id_([0-9a-zA-Z=\-]+)\.html/,
res = reg.exec(url);
if (!res) return cb('unknown URL');
var self = this;
var options = {
hostname: 'v.youku.com',
path: util.format('/player/getPlayList/VideoIDS/%s/Pf/4/ctype/12/ev/1', res[1])
};
$.do_http(options, function(e, body){
if (e) return cb(e);
var data = JSON.parse(body).data[0],
video = self.parse_video(data);
return cb(null, video);
});
};
Youku.prototype.parse_video = function(data) {
var video = _.pick(data, 'title', 'seconds');
video.id = data.vidEncoded;
var ep = this.dec_ep(new Buffer(data.ep,'base64'), 'becaf9be').split('_'),
sid = ep[0], token = ep[1];
var self = this;
data.streamtypes.forEach(function(t){
var fileid = self.dec_fileid(data.streamfileids[t], data.seed);
video[t] = _.map(data.segs[t], function(seg){
var no = (seg.no.length < 2 ? '0' : '') + seg.no,
fileid2 = fileid.substr(0,8) + no + fileid.substr(10),
ep = self.enc_ep(sid, fileid2, token);
// TODO: add more attrs? e.g. size
return util.format(FILE_URL, sid, ST_BOOK[t], fileid2, seg.k, token, ep, data.ip);
});
});
return video;
};
Youku.prototype.dec_fileid = function(cipher, seed) {
var book1 = FILEID_BOOK.split('');
var book2 = _.map(_.range(book1.length), function(x){
seed = (seed * 211 + 30031) % 65536;
var i = Math.floor(seed / 65536 * book1.length);
return book1.splice(i, 1);
});
return _.map(cipher.split('*'), function(x){
return book2[parseInt(x)];
}).join('');
};
Youku.prototype.dec_ep = function(cipher, salt) {
var i,j,k;
var book = _.range(256);
for (i=j=0; i < 256; ++i) {
j = (j + book[i] + salt.charCodeAt(i % salt.length)) % 256;
$.swap(book, i, j);
}
i=j=k=0;
var tmp = _.map(_.toArray(cipher), function(x) {
k = (k+1) % 256;
j = (j+book[k]) % 256;
$.swap(book, k, j);
var c = x ^ book[(book[k]+book[j]) % 256];
return String.fromCharCode(c);
});
return tmp.join('');
};
Youku.prototype.enc_ep = function(sid, fileid, token) {
var cipher = new Buffer(sid+'_'+fileid+'_'+token);
var ep = this.dec_ep(cipher, 'bf7e5f01');
var ep2 = _.map(ep, function(x){ return x.charCodeAt(0); });
return new Buffer(ep2).toString('base64')
.replace(/\+/g, '%2B').replace(/=/g, '%3D').replace(/\//g, '%2F');
};
module.exports = Youku;
| mit |
robertlemke/flow-development-collection | TYPO3.Flow/Classes/TYPO3/Flow/Aop/Exception/VoidImplementationException.php | 629 | <?php
namespace TYPO3\Flow\Aop\Exception;
/* *
* This script belongs to the Flow framework. *
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the MIT license. *
* */
/**
* A "Void Implementation" Exception
*
* @api
*/
class VoidImplementationException extends \TYPO3\Flow\Aop\Exception
{
}
| mit |
MiguelAdige/m2l | app/cache/dev/appDevUrlMatcher.php | 16884 | <?php
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
use Symfony\Component\Routing\RequestContext;
/**
* appDevUrlMatcher
*
* This class has been auto-generated
* by the Symfony Routing Component.
*/
class appDevUrlMatcher extends Symfony\Bundle\FrameworkBundle\Routing\RedirectableUrlMatcher
{
/**
* Constructor.
*/
public function __construct(RequestContext $context)
{
$this->context = $context;
}
public function match($pathinfo)
{
$allow = array();
$pathinfo = rawurldecode($pathinfo);
$context = $this->context;
$request = $this->request;
if (0 === strpos($pathinfo, '/_')) {
// _wdt
if (0 === strpos($pathinfo, '/_wdt') && preg_match('#^/_wdt/(?P<token>[^/]++)$#s', $pathinfo, $matches)) {
return $this->mergeDefaults(array_replace($matches, array('_route' => '_wdt')), array ( '_controller' => 'web_profiler.controller.profiler:toolbarAction',));
}
if (0 === strpos($pathinfo, '/_profiler')) {
// _profiler_home
if (rtrim($pathinfo, '/') === '/_profiler') {
if (substr($pathinfo, -1) !== '/') {
return $this->redirect($pathinfo.'/', '_profiler_home');
}
return array ( '_controller' => 'web_profiler.controller.profiler:homeAction', '_route' => '_profiler_home',);
}
if (0 === strpos($pathinfo, '/_profiler/search')) {
// _profiler_search
if ($pathinfo === '/_profiler/search') {
return array ( '_controller' => 'web_profiler.controller.profiler:searchAction', '_route' => '_profiler_search',);
}
// _profiler_search_bar
if ($pathinfo === '/_profiler/search_bar') {
return array ( '_controller' => 'web_profiler.controller.profiler:searchBarAction', '_route' => '_profiler_search_bar',);
}
}
// _profiler_purge
if ($pathinfo === '/_profiler/purge') {
return array ( '_controller' => 'web_profiler.controller.profiler:purgeAction', '_route' => '_profiler_purge',);
}
// _profiler_info
if (0 === strpos($pathinfo, '/_profiler/info') && preg_match('#^/_profiler/info/(?P<about>[^/]++)$#s', $pathinfo, $matches)) {
return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_info')), array ( '_controller' => 'web_profiler.controller.profiler:infoAction',));
}
// _profiler_phpinfo
if ($pathinfo === '/_profiler/phpinfo') {
return array ( '_controller' => 'web_profiler.controller.profiler:phpinfoAction', '_route' => '_profiler_phpinfo',);
}
// _profiler_search_results
if (preg_match('#^/_profiler/(?P<token>[^/]++)/search/results$#s', $pathinfo, $matches)) {
return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_search_results')), array ( '_controller' => 'web_profiler.controller.profiler:searchResultsAction',));
}
// _profiler
if (preg_match('#^/_profiler/(?P<token>[^/]++)$#s', $pathinfo, $matches)) {
return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler')), array ( '_controller' => 'web_profiler.controller.profiler:panelAction',));
}
// _profiler_router
if (preg_match('#^/_profiler/(?P<token>[^/]++)/router$#s', $pathinfo, $matches)) {
return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_router')), array ( '_controller' => 'web_profiler.controller.router:panelAction',));
}
// _profiler_exception
if (preg_match('#^/_profiler/(?P<token>[^/]++)/exception$#s', $pathinfo, $matches)) {
return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_exception')), array ( '_controller' => 'web_profiler.controller.exception:showAction',));
}
// _profiler_exception_css
if (preg_match('#^/_profiler/(?P<token>[^/]++)/exception\\.css$#s', $pathinfo, $matches)) {
return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_exception_css')), array ( '_controller' => 'web_profiler.controller.exception:cssAction',));
}
}
if (0 === strpos($pathinfo, '/_configurator')) {
// _configurator_home
if (rtrim($pathinfo, '/') === '/_configurator') {
if (substr($pathinfo, -1) !== '/') {
return $this->redirect($pathinfo.'/', '_configurator_home');
}
return array ( '_controller' => 'Sensio\\Bundle\\DistributionBundle\\Controller\\ConfiguratorController::checkAction', '_route' => '_configurator_home',);
}
// _configurator_step
if (0 === strpos($pathinfo, '/_configurator/step') && preg_match('#^/_configurator/step/(?P<index>[^/]++)$#s', $pathinfo, $matches)) {
return $this->mergeDefaults(array_replace($matches, array('_route' => '_configurator_step')), array ( '_controller' => 'Sensio\\Bundle\\DistributionBundle\\Controller\\ConfiguratorController::stepAction',));
}
// _configurator_final
if ($pathinfo === '/_configurator/final') {
return array ( '_controller' => 'Sensio\\Bundle\\DistributionBundle\\Controller\\ConfiguratorController::finalAction', '_route' => '_configurator_final',);
}
}
}
if (0 === strpos($pathinfo, '/messagerie')) {
// messagerie_homepage
if (rtrim($pathinfo, '/') === '/messagerie') {
if (substr($pathinfo, -1) !== '/') {
return $this->redirect($pathinfo.'/', 'messagerie_homepage');
}
return array ( '_controller' => 'M2L\\MessagerieBundle\\Controller\\MessagerieController::indexAction', 'boite' => 1, '_route' => 'messagerie_homepage',);
}
if (0 === strpos($pathinfo, '/messagerie/new')) {
// messagerie_new_msg
if (rtrim($pathinfo, '/') === '/messagerie/new') {
if (substr($pathinfo, -1) !== '/') {
return $this->redirect($pathinfo.'/', 'messagerie_new_msg');
}
return array ( '_controller' => 'M2L\\MessagerieBundle\\Controller\\MessagerieController::NewMessageAction', '_route' => 'messagerie_new_msg',);
}
// messagerie_new_msg_user
if (preg_match('#^/messagerie/new/(?P<user>[^/]++)/?$#s', $pathinfo, $matches)) {
if (substr($pathinfo, -1) !== '/') {
return $this->redirect($pathinfo.'/', 'messagerie_new_msg_user');
}
return $this->mergeDefaults(array_replace($matches, array('_route' => 'messagerie_new_msg_user')), array ( '_controller' => 'M2L\\MessagerieBundle\\Controller\\MessagerieController::NewMessageUserAction',));
}
}
// messagerie_inbox
if ($pathinfo === '/messagerie/inbox') {
return array ( '_controller' => 'M2L\\MessagerieBundle\\Controller\\MessagerieController::indexAction', 'boite' => 1, '_route' => 'messagerie_inbox',);
}
// messagerie_send
if ($pathinfo === '/messagerie/send') {
return array ( '_controller' => 'M2L\\MessagerieBundle\\Controller\\MessagerieController::indexAction', 'boite' => 2, '_route' => 'messagerie_send',);
}
// messagerie_delete
if (0 === strpos($pathinfo, '/messagerie/delete') && preg_match('#^/messagerie/delete/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
return $this->mergeDefaults(array_replace($matches, array('_route' => 'messagerie_delete')), array ( '_controller' => 'M2L\\MessagerieBundle\\Controller\\MessagerieController::deleteAction',));
}
// messagerie_view
if (0 === strpos($pathinfo, '/messagerie/view') && preg_match('#^/messagerie/view/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
return $this->mergeDefaults(array_replace($matches, array('_route' => 'messagerie_view')), array ( '_controller' => 'M2L\\MessagerieBundle\\Controller\\MessagerieController::viewAction',));
}
}
// m2l_ligue_homepage
if (rtrim($pathinfo, '/') === '') {
if (substr($pathinfo, -1) !== '/') {
return $this->redirect($pathinfo.'/', 'm2l_ligue_homepage');
}
return array ( '_controller' => 'M2L\\LigueBundle\\Controller\\DefaultController::indexAction', '_route' => 'm2l_ligue_homepage',);
}
// m2l_ligue_view
if (0 === strpos($pathinfo, '/ligue') && preg_match('#^/ligue/(?P<id>\\d+)$#s', $pathinfo, $matches)) {
return $this->mergeDefaults(array_replace($matches, array('_route' => 'm2l_ligue_view')), array ( '_controller' => 'M2L\\LigueBundle\\Controller\\DefaultController::viewAction',));
}
if (0 === strpos($pathinfo, '/an')) {
if (0 === strpos($pathinfo, '/annonces')) {
// m2l_annonces_home
if ($pathinfo === '/annonces') {
return array ( '_controller' => 'M2L\\AnnoncesBundle\\Controller\\AnnoncesController::indexAction', '_route' => 'm2l_annonces_home',);
}
// m2l_annonces_view
if (preg_match('#^/annonces/(?P<id>\\d+)$#s', $pathinfo, $matches)) {
return $this->mergeDefaults(array_replace($matches, array('_route' => 'm2l_annonces_view')), array ( '_controller' => 'M2L\\AnnoncesBundle\\Controller\\AnnoncesController::viewAction',));
}
}
// m2l_annonces_add
if ($pathinfo === '/anonnces/add') {
return array ( '_controller' => 'M2L\\AnnoncesBundle\\Controller\\AnnoncesController::addAction', '_route' => 'm2l_annonces_add',);
}
if (0 === strpos($pathinfo, '/annonces')) {
// m2l_annonces_edit
if (0 === strpos($pathinfo, '/annonces/edit') && preg_match('#^/annonces/edit/(?P<id>\\d+)$#s', $pathinfo, $matches)) {
return $this->mergeDefaults(array_replace($matches, array('_route' => 'm2l_annonces_edit')), array ( '_controller' => 'M2L\\AnnoncesBundle\\Controller\\AnnoncesController::editAction',));
}
// m2l_annonces_post
if ($pathinfo === '/annonces/mes-annonces') {
return array ( '_controller' => 'M2L\\AnnoncesBundle\\Controller\\AnnoncesController::userAnnoncesAction', '_route' => 'm2l_annonces_post',);
}
}
}
// m2l_inscription
if ($pathinfo === '/inscription') {
return array ( '_controller' => 'M2L\\UserBundle\\Controller\\UserController::inscriptionAction', '_route' => 'm2l_inscription',);
}
if (0 === strpos($pathinfo, '/log')) {
if (0 === strpos($pathinfo, '/login')) {
// login
if ($pathinfo === '/login') {
return array ( '_controller' => 'M2L\\UserBundle\\Controller\\UserController::loginAction', '_route' => 'login',);
}
// login_check
if ($pathinfo === '/login_check') {
return array('_route' => 'login_check');
}
}
// logout
if ($pathinfo === '/logout') {
return array('_route' => 'logout');
}
}
if (0 === strpos($pathinfo, '/profil')) {
// m2l_profil_edit
if ($pathinfo === '/profil/edit') {
return array ( '_controller' => 'M2L\\UserBundle\\Controller\\UserController::editAction', '_route' => 'm2l_profil_edit',);
}
// m2l_profil_view
if (preg_match('#^/profil/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
return $this->mergeDefaults(array_replace($matches, array('_route' => 'm2l_profil_view')), array ( '_controller' => 'M2L\\UserBundle\\Controller\\UserController::viewAction',));
}
}
// _welcome
if (rtrim($pathinfo, '/') === '') {
if (substr($pathinfo, -1) !== '/') {
return $this->redirect($pathinfo.'/', '_welcome');
}
return array ( '_controller' => 'Acme\\DemoBundle\\Controller\\WelcomeController::indexAction', '_route' => '_welcome',);
}
if (0 === strpos($pathinfo, '/demo')) {
if (0 === strpos($pathinfo, '/demo/secured')) {
if (0 === strpos($pathinfo, '/demo/secured/log')) {
if (0 === strpos($pathinfo, '/demo/secured/login')) {
// _demo_login
if ($pathinfo === '/demo/secured/login') {
return array ( '_controller' => 'Acme\\DemoBundle\\Controller\\SecuredController::loginAction', '_route' => '_demo_login',);
}
// _demo_security_check
if ($pathinfo === '/demo/secured/login_check') {
return array ( '_controller' => 'Acme\\DemoBundle\\Controller\\SecuredController::securityCheckAction', '_route' => '_demo_security_check',);
}
}
// _demo_logout
if ($pathinfo === '/demo/secured/logout') {
return array ( '_controller' => 'Acme\\DemoBundle\\Controller\\SecuredController::logoutAction', '_route' => '_demo_logout',);
}
}
if (0 === strpos($pathinfo, '/demo/secured/hello')) {
// acme_demo_secured_hello
if ($pathinfo === '/demo/secured/hello') {
return array ( 'name' => 'World', '_controller' => 'Acme\\DemoBundle\\Controller\\SecuredController::helloAction', '_route' => 'acme_demo_secured_hello',);
}
// _demo_secured_hello
if (preg_match('#^/demo/secured/hello/(?P<name>[^/]++)$#s', $pathinfo, $matches)) {
return $this->mergeDefaults(array_replace($matches, array('_route' => '_demo_secured_hello')), array ( '_controller' => 'Acme\\DemoBundle\\Controller\\SecuredController::helloAction',));
}
// _demo_secured_hello_admin
if (0 === strpos($pathinfo, '/demo/secured/hello/admin') && preg_match('#^/demo/secured/hello/admin/(?P<name>[^/]++)$#s', $pathinfo, $matches)) {
return $this->mergeDefaults(array_replace($matches, array('_route' => '_demo_secured_hello_admin')), array ( '_controller' => 'Acme\\DemoBundle\\Controller\\SecuredController::helloadminAction',));
}
}
}
// _demo
if (rtrim($pathinfo, '/') === '/demo') {
if (substr($pathinfo, -1) !== '/') {
return $this->redirect($pathinfo.'/', '_demo');
}
return array ( '_controller' => 'Acme\\DemoBundle\\Controller\\DemoController::indexAction', '_route' => '_demo',);
}
// _demo_hello
if (0 === strpos($pathinfo, '/demo/hello') && preg_match('#^/demo/hello/(?P<name>[^/]++)$#s', $pathinfo, $matches)) {
return $this->mergeDefaults(array_replace($matches, array('_route' => '_demo_hello')), array ( '_controller' => 'Acme\\DemoBundle\\Controller\\DemoController::helloAction',));
}
// _demo_contact
if ($pathinfo === '/demo/contact') {
return array ( '_controller' => 'Acme\\DemoBundle\\Controller\\DemoController::contactAction', '_route' => '_demo_contact',);
}
}
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
}
}
| mit |
capoio/capo-gem | lib/capo/capfile.rb | 1722 | module Capo
module Capfile
class << self
def generate
files.each do |file, content|
file = File.join Capo.app_path, file
if File.exists?(file)
warn "[skip] '#{file}' already exists"
elsif File.exists?(file.downcase)
warn "[skip] '#{file.downcase}' exists, which could conflict with '#{file}'"
else
unless File.exists?(File.dirname(file))
puts "[add] making directory '#{File.dirname file}'"
FileUtils.mkdir File.dirname(file)
end
puts "[add] writing '#{file}'"
File.open(file, 'w'){|f| f.write content}
end
end
end
private
def capfile
<<-FILE
load 'deploy'
load 'config/deploy'
FILE
end
def config_deploy
<<-FILE
set :application, "set your application name here"
set :repository, "set your repository location here"
set :branch, "set your branch here"
role :web, "your web-server here" # Your HTTP server, Apache/etc
role :app, "your app-server here" # This may be the same as your `Web` server
role :db, "your primary db-server here", :primary => true # This is where Rails migrations will run
role :db, "your slave db-server here"
FILE
end
def files
{
"Capfile" => unindent(capfile),
"config/deploy.rb" => unindent(config_deploy)
}
end
def unindent string
indentation = string[/\A\s*/]
string.gsub /^#{indentation}/, ''
end
end
end
end
| mit |