answer
stringlengths
15
1.25M
<?xml version="1.0" ?><!DOCTYPE TS><TS language="la" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About NOBTCOIN</source> <translation type="unfinished"/> </message> <message> <location line="+39"/> <source>&lt;b&gt;NOBTCOIN&lt;/b&gt; version</source> <translation type="unfinished"/> </message> <message> <location line="+41"/> <source>Copyright © 2009-2014 The Bitcoin developers Copyright © 2012-2014 The NovaCoin developers Copyright © 2014 The NOBTCOIN developers</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http: This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http: <translation>Hoc est experimentale programma. Distributum sub MIT/X11 licentia programmatum, vide comitantem plicam COPYING vel http: Hoc productum continet programmata composita ab OpenSSL Project pro utendo in OpenSSL Toolkit (http: </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>Double-click to edit address or label</source> <translation>Dupliciter-clicca ut inscriptionem vel titulum mutes</translation> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation>Crea novam inscriptionem</translation> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation>Copia inscriptionem iam selectam in latibulum systematis</translation> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation type="unfinished"/> </message> <message> <location line="-46"/> <source>These are your NOBTCOIN 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 line="+60"/> <source>&amp;Copy Address</source> <translation>&amp;Copia Inscriptionem</translation> </message> <message> <location line="+11"/> <source>Show &amp;QR Code</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Sign a message to prove you own a NOBTCOIN address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Delete the currently selected address from the list</source> <translation>Dele active selectam inscriptionem ex enumeratione</translation> </message> <message> <location line="-14"/> <source>Verify a message to ensure it was signed with a specified NOBTCOIN address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>&amp;Delete</source> <translation>&amp;Dele</translation> </message> <message> <location filename="../addressbookpage.cpp" line="+65"/> <source>Copy &amp;Label</source> <translation>Copia &amp;Titulum</translation> </message> <message> <location line="+2"/> <source>&amp;Edit</source> <translation>&amp;Muta</translation> </message> <message> <location line="+250"/> <source>Export Address Book Data</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Comma Separata Plica (*.csv)</translation> </message> <message> <location line="+13"/> <source>Error exporting</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+144"/> <source>Label</source> <translation>Titulus</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Inscriptio</translation> </message> <message> <location line="+36"/> <source>(no label)</source> <translation>(nullus titulus)</translation> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation>Dialogus Tesserae</translation> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation>Insere tesseram</translation> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation>Nova tessera</translation> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation>Itera novam tesseram</translation> </message> <message> <location line="+33"/> <source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>For staking only</source> <translation type="unfinished"/> </message> <message> <location filename="../askpassphrasedialog.cpp" line="+35"/> <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source> <translation>Insero novam tesseram cassidili.&lt;br/&gt;Sodes tessera &lt;b&gt;10 pluriumve fortuitarum litterarum&lt;/b&gt; utere aut &lt;b&gt;octo pluriumve verborum&lt;/b&gt;.</translation> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation>Cifra cassidile</translation> </message> <message> <location line="+7"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation>Huic operationi necesse est tessera cassidili tuo ut cassidile reseret.</translation> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation>Resera cassidile</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation>Huic operationi necesse est tessera cassidili tuo ut cassidile decifret.</translation> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation>Decifra cassidile</translation> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation>Muta tesseram</translation> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation>Insero veterem novamque tesseram cassidili.</translation> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation>Confirma cifrationem cassidilis</translation> </message> <message> <location line="+1"/> <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR COINS&lt;/b&gt;!</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation>Certusne es te velle tuum cassidile cifrare?</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>GRAVE: Oportet ulla prioria conservata quae fecisti de plica tui cassidilis reponi a nove generata cifrata plica cassidilis. Propter securitatem, prioria conservata de plica non cifrata cassidilis inutilia fiet simul atque incipis uti novo cifrato cassidili.</translation> </message> <message> <location line="+103"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation>Monitio: Litterae ut capitales seratae sunt!</translation> </message> <message> <location line="-133"/> <location line="+60"/> <source>Wallet encrypted</source> <translation>Cassidile cifratum</translation> </message> <message> <location line="-58"/> <source>NOBTCOIN will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer.</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+44"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation>Cassidile cifrare abortum est</translation> </message> <message> <location line="-56"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation>Cassidile cifrare abortum est propter internum errorem. Tuum cassidile cifratum non est.</translation> </message> <message> <location line="+7"/> <location line="+50"/> <source>The supplied passphrases do not match.</source> <translation>Tesserae datae non eaedem sunt.</translation> </message> <message> <location line="-38"/> <source>Wallet unlock failed</source> <translation>Cassidile reserare abortum est.</translation> </message> <message> <location line="+1"/> <location line="+12"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation>Tessera inserta pro cassidilis decifrando prava erat.</translation> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation>Cassidile decifrare abortum est.</translation> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation>Tessera cassidilis successa est in mutando.</translation> </message> </context> <context> <name>BitcoinGUI</name> <message> <location filename="../bitcoingui.cpp" line="+280"/> <source>Sign &amp;message...</source> <translation>Signa &amp;nuntium...</translation> </message> <message> <location line="+242"/> <source>Synchronizing with network...</source> <translation>Synchronizans cum rete...</translation> </message> <message> <location line="-308"/> <source>&amp;Overview</source> <translation>&amp;Summarium</translation> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation>Monstra generale summarium cassidilis</translation> </message> <message> <location line="+17"/> <source>&amp;Transactions</source> <translation>&amp;Transactiones</translation> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation>Inspicio historiam transactionum</translation> </message> <message> <location line="+5"/> <source>&amp;Address Book</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Edit the list of stored addresses and labels</source> <translation type="unfinished"/> </message> <message> <location line="-13"/> <source>&amp;Receive coins</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show the list of addresses for receiving payments</source> <translation type="unfinished"/> </message> <message> <location line="-7"/> <source>&amp;Send coins</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>E&amp;xit</source> <translation>E&amp;xi</translation> </message> <message> <location line="+1"/> <source>Quit application</source> <translation>Exi applicatione</translation> </message> <message> <location line="+4"/> <source>Show information about NOBTCOIN</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation>Informatio de &amp;Qt</translation> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation>Monstra informationem de Qt</translation> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation>&amp;Optiones</translation> </message> <message> <location line="+4"/> <source>&amp;Encrypt Wallet...</source> <translation>&amp;Cifra Cassidile...</translation> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation>&amp;Conserva Cassidile...</translation> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation>&amp;Muta tesseram...</translation> </message> <message numerus="yes"> <location line="+250"/> <source>~%n block(s) remaining</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+6"/> <source>Downloaded %1 of %2 blocks of transaction history (%3% done).</source> <translation type="unfinished"/> </message> <message> <location line="-247"/> <source>&amp;Export...</source> <translation type="unfinished"/> </message> <message> <location line="-62"/> <source>Send coins to a NOBTCOIN address</source> <translation type="unfinished"/> </message> <message> <location line="+45"/> <source>Modify configuration options for NOBTCOIN</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"/> </message> <message> <location line="-14"/> <source>Encrypt or decrypt wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Backup wallet to another location</source> <translation>Conserva cassidile in locum alium</translation> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation>Muta tesseram utam pro cassidilis cifrando</translation> </message> <message> <location line="+10"/> <source>&amp;Debug window</source> <translation>Fenestra &amp;Debug</translation> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation>Aperi terminalem debug et diagnosticalem</translation> </message> <message> <location line="-5"/> <source>&amp;Verify message...</source> <translation>&amp;Verifica nuntium...</translation> </message> <message> <location line="-200"/> <source>NOBTCOIN</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Wallet</source> <translation>Cassidile</translation> </message> <message> <location line="+178"/> <source>&amp;About NOBTCOIN</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation>&amp;Monstra/Occulta</translation> </message> <message> <location line="+9"/> <source>Unlock wallet</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>&amp;Lock Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Lock wallet</source> <translation type="unfinished"/> </message> <message> <location line="+34"/> <source>&amp;File</source> <translation>&amp;Plica</translation> </message> <message> <location line="+8"/> <source>&amp;Settings</source> <translation>&amp;Configuratio</translation> </message> <message> <location line="+8"/> <source>&amp;Help</source> <translation>&amp;Auxilium</translation> </message> <message> <location line="+9"/> <source>Tabs toolbar</source> <translation>Tabella instrumentorum &quot;Tabs&quot;</translation> </message> <message> <location line="+8"/> <source>Actions toolbar</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <location line="+9"/> <source>[testnet]</source> <translation>[testnet]</translation> </message> <message> <location line="+0"/> <location line="+60"/> <source>NOBTCOIN client</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+70"/> <source>%n active connection(s) to NOBTCOIN network</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+40"/> <source>Downloaded %1 blocks of transaction history.</source> <translation type="unfinished"/> </message> <message> <location line="+413"/> <source>Staking.&lt;br&gt;Your weight is %1&lt;br&gt;Network weight is %2&lt;br&gt;Expected time to earn reward is %3</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Not staking because wallet is locked</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Not staking because wallet is offline</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Not staking because wallet is syncing</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Not staking because you don&apos;t have mature coins</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-403"/> <source>%n second(s) ago</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="-284"/> <source>&amp;Unlock Wallet...</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+288"/> <source>%n minute(s) ago</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n hour(s) ago</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s) ago</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+6"/> <source>Up to date</source> <translation>Recentissimo</translation> </message> <message> <location line="+7"/> <source>Catching up...</source> <translation>Persequens...</translation> </message> <message> <location line="+10"/> <source>Last received block was generated %1.</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <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="+5"/> <source>Confirm transaction fee</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Sent transaction</source> <translation>Transactio missa</translation> </message> <message> <location line="+1"/> <source>Incoming transaction</source> <translation>Transactio incipiens</translation> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation>Dies: %1 Quantitas: %2 Typus: %3 Inscriptio: %4 </translation> </message> <message> <location line="+100"/> <location line="+15"/> <source>URI handling</source> <translation type="unfinished"/> </message> <message> <location line="-15"/> <location line="+15"/> <source>URI can not be parsed! This can be caused by an invalid NOBTCOIN address or malformed URI parameters.</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation>Cassidile &lt;b&gt;cifratum&lt;/b&gt; est et iam nunc &lt;b&gt;reseratum&lt;/b&gt;</translation> </message> <message> <location line="+10"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source> <translation>Cassidile &lt;b&gt;cifratum&lt;/b&gt; est et iam nunc &lt;b&gt;seratum&lt;/b&gt;</translation> </message> <message> <location line="+25"/> <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 numerus="yes"> <location line="+76"/> <source>%n second(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n minute(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n hour(s)</source> <translation><numerusform>%n hora</numerusform><numerusform>%n horae</numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation><numerusform>%n dies</numerusform><numerusform>%n dies</numerusform></translation> </message> <message> <location line="+18"/> <source>Not staking</source> <translation type="unfinished"/> </message> <message> <location filename="../bitcoin.cpp" line="+109"/> <source>A fatal error occurred. NOBTCOIN can no longer continue safely and will quit.</source> <translation type="unfinished"/> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+90"/> <source>Network Alert</source> <translation>Monitio Retis</translation> </message> </context> <context> <name>CoinControlDialog</name> <message> <location filename="../forms/coincontroldialog.ui" line="+14"/> <source>Coin Control</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Quantity:</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>Bytes:</source> <translation type="unfinished"/> </message> <message> <location line="+48"/> <source>Amount:</source> <translation>Quantitas:</translation> </message> <message> <location line="+32"/> <source>Priority:</source> <translation type="unfinished"/> </message> <message> <location line="+48"/> <source>Fee:</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Low Output:</source> <translation type="unfinished"/> </message> <message> <location filename="../coincontroldialog.cpp" line="+551"/> <source>no</source> <translation type="unfinished"/> </message> <message> <location filename="../forms/coincontroldialog.ui" line="+51"/> <source>After Fee:</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Change:</source> <translation type="unfinished"/> </message> <message> <location line="+69"/> <source>(un)select all</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Tree mode</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>List mode</source> <translation type="unfinished"/> </message> <message> <location line="+45"/> <source>Amount</source> <translation>Quantitas</translation> </message> <message> <location line="+5"/> <source>Label</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Address</source> <translation>Inscriptio</translation> </message> <message> <location line="+5"/> <source>Date</source> <translation>Dies</translation> </message> <message> <location line="+5"/> <source>Confirmations</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Confirmed</source> <translation>Confirmatum</translation> </message> <message> <location line="+5"/> <source>Priority</source> <translation type="unfinished"/> </message> <message> <location filename="../coincontroldialog.cpp" line="-515"/> <source>Copy address</source> <translation>Copia inscriptionem</translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>Copia titulum</translation> </message> <message> <location line="+1"/> <location line="+26"/> <source>Copy amount</source> <translation>Copia quantitatem</translation> </message> <message> <location line="-25"/> <source>Copy transaction ID</source> <translation>Copia transactionis ID</translation> </message> <message> <location line="+24"/> <source>Copy quantity</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Copy fee</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy after fee</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy bytes</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy priority</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy low output</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy change</source> <translation type="unfinished"/> </message> <message> <location line="+317"/> <source>highest</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>high</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>medium-high</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>medium</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>low-medium</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>low</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>lowest</source> <translation type="unfinished"/> </message> <message> <location line="+155"/> <source>DUST</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>yes</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>This label turns red, if the transaction size is bigger than 10000 bytes. This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transactions with higher priority get more likely into a block. This label turns red, if the priority is smaller than &quot;medium&quot;. This means a fee of at least %1 per kb is required.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This label turns red, if any recipient receives an amount smaller than %1. This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required.</source> <translation type="unfinished"/> </message> <message> <location line="+37"/> <location line="+66"/> <source>(no label)</source> <translation>(nullus titulus)</translation> </message> <message> <location line="-9"/> <source>change from %1 (%2)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>(change)</source> <translation type="unfinished"/> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation>Muta Inscriptionem</translation> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation>&amp;Titulus</translation> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation>&amp;Inscriptio</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 type="unfinished"/> </message> <message> <location filename="../editaddressdialog.cpp" line="+20"/> <source>New receiving address</source> <translation>Nova inscriptio accipiendi</translation> </message> <message> <location line="+4"/> <source>New sending address</source> <translation>Nova inscriptio mittendi</translation> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation>Muta inscriptionem accipiendi</translation> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation>Muta inscriptionem mittendi</translation> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation>Inserta inscriptio &quot;%1&quot; iam in libro inscriptionum est.</translation> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid NOBTCOIN address.</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation>Non potuisse cassidile reserare</translation> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation>Generare novam clavem abortum est.</translation> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+420"/> <location line="+12"/> <source>NOBTCOIN-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 &quot;de_DE&quot; (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>Optiones</translation> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation>&amp;Princeps</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. Fee 0.01 recommended.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation>Solve &amp;mercedem transactionis</translation> </message> <message> <location line="+31"/> <source>Reserved amount does not participate in staking and is therefore spendable at any time.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Reserve</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Automatically start NOBTCOIN after logging in to the system.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Start NOBTCOIN on system login</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Detach block and address databases at shutdown. This means they can be moved to another data directory, but it slows down shutdown. The wallet is always detached.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Detach databases at shutdown</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>&amp;Network</source> <translation>&amp;Rete</translation> </message> <message> <location line="+6"/> <source>Automatically open the NOBTCOIN 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 &amp;UPnP</source> <translation>Designa portam utendo &amp;UPnP</translation> </message> <message> <location line="+7"/> <source>Connect to the NOBTCOIN network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy:</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Proxy &amp;IP:</source> <translation>&amp;IP vicarii:</translation> </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>&amp;Port:</source> <translation>&amp;Porta:</translation> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation>Porta vicarii (e.g. 9050)</translation> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation>SOCKS &amp;Versio:</translation> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation>SOCKS versio vicarii (e.g. 5)</translation> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation>&amp;Fenestra</translation> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation>Monstra tantum iconem in tabella systematis postquam fenestram minifactam est.</translation> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation>&amp;Minifac in tabellam systematis potius quam applicationum</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>Minifac potius quam exire applicatione quando fenestra clausa sit. Si haec optio activa est, applicatio clausa erit tantum postquam selegeris Exi in menu.</translation> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation>M&amp;inifac ad claudendum</translation> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation>&amp;UI</translation> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation>&amp;Lingua monstranda utenti:</translation> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting NOBTCOIN.</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation>&amp;Unita qua quantitates monstrare:</translation> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation>Selige praedefinitam unitam subdivisionis monstrare in interfacie et quando nummos mittere</translation> </message> <message> <location line="+9"/> <source>Whether to show NOBTCOIN addresses in the transaction list or not.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation>&amp;Monstra inscriptiones in enumeratione transactionum</translation> </message> <message> <location line="+7"/> <source>Whether to show coin control features or not.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Display coin &amp;control features (experts only!)</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>&amp;OK</source> <translation>&amp;OK</translation> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation>&amp;Cancella</translation> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation type="unfinished"/> </message> <message> <location filename="../optionsdialog.cpp" line="+55"/> <source>default</source> <translation>praedefinitum</translation> </message> <message> <location line="+149"/> <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 NOBTCOIN.</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation>Inscriptio vicarii tradita non valida est.</translation> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation>Schema</translation> </message> <message> <location line="+33"/> <location line="+231"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the NOBTCOIN network after a connection is established, but this process has not completed yet.</source> <translation type="unfinished"/> </message> <message> <location line="-160"/> <source>Stake:</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>Unconfirmed:</source> <translation type="unfinished"/> </message> <message> <location line="-107"/> <source>Wallet</source> <translation>Cassidile</translation> </message> <message> <location line="+49"/> <source>Spendable:</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Your current spendable balance</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>Immature:</source> <translation>Immatura:</translation> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation>Fossum pendendum quod nondum maturum est</translation> </message> <message> <location line="+20"/> <source>Total:</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Your current total balance</source> <translation type="unfinished"/> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation>&lt;b&gt;Recentes transactiones&lt;/b&gt;</translation> </message> <message> <location line="-108"/> <source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source> <translation type="unfinished"/> </message> <message> <location line="-29"/> <source>Total of coins that was staked, and do not yet count toward the current balance</source> <translation type="unfinished"/> </message> <message> <location filename="../overviewpage.cpp" line="+113"/> <location line="+1"/> <source>out of sync</source> <translation>non synchronizato</translation> </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 type="unfinished"/> </message> <message> <location line="-44"/> <source>Label:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Message:</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>&amp;Save As...</source> <translation type="unfinished"/> </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>Nomen clientis</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="+348"/> <source>N/A</source> <translation>N/A</translation> </message> <message> <location line="-217"/> <source>Client version</source> <translation>Versio clientis</translation> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation>&amp;Informatio</translation> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation>Utens OpenSSL versione</translation> </message> <message> <location line="+49"/> <source>Startup time</source> <translation>Tempus initiandi</translation> </message> <message> <location line="+29"/> <source>Network</source> <translation>Rete</translation> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation>Numerus conexionum</translation> </message> <message> <location line="+23"/> <source>On testnet</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Block chain</source> <translation>Catena frustorum</translation> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation>Numerus frustorum iam nunc</translation> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation>Aestimatus totalis numerus frustorum</translation> </message> <message> <location line="+23"/> <source>Last block time</source> <translation>Hora postremi frusti</translation> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation>&amp;Aperi</translation> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Show the NOBTCOIN-Qt help message to get a list with possible NOBTCOIN command-line options.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Show</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation>&amp;Terminale</translation> </message> <message> <location line="-260"/> <source>Build date</source> <translation>Dies aedificandi</translation> </message> <message> <location line="-104"/> <source>NOBTCOIN - Debug window</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>NOBTCOIN Core</source> <translation type="unfinished"/> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation>Debug catalogi plica</translation> </message> <message> <location line="+7"/> <source>Open the NOBTCOIN 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>Vacuefac terminale</translation> </message> <message> <location filename="../rpcconsole.cpp" line="-33"/> <source>Welcome to the NOBTCOIN RPC console.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source> <translation>Utere sagittis sursum deorsumque ut per historiam naviges, et &lt;b&gt;Ctrl+L&lt;/b&gt; ut scrinium vacuefacias.</translation> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation>Scribe &lt;b&gt;help&lt;/b&gt; pro summario possibilium mandatorum.</translation> </message> </context> <context> <name>SendCoinsDialog</name> <message> <location filename="../forms/sendcoinsdialog.ui" line="+14"/> <location filename="../sendcoinsdialog.cpp" line="+182"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+6"/> <location line="+5"/> <location line="+5"/> <source>Send Coins</source> <translation>Mitte Nummos</translation> </message> <message> <location line="+76"/> <source>Coin Control Features</source> <translation type="unfinished"/> </message> <message> <location line="+20"/> <source>Inputs...</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>automatically selected</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Insufficient funds!</source> <translation type="unfinished"/> </message> <message> <location line="+77"/> <source>Quantity:</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <location line="+35"/> <source>0</source> <translation type="unfinished"/> </message> <message> <location line="-19"/> <source>Bytes:</source> <translation type="unfinished"/> </message> <message> <location line="+51"/> <source>Amount:</source> <translation>Quantitas:</translation> </message> <message> <location line="+22"/> <location line="+86"/> <location line="+86"/> <location line="+32"/> <source>0.00 BC</source> <translation type="unfinished"/> </message> <message> <location line="-191"/> <source>Priority:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>medium</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>Fee:</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Low Output:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>no</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>After Fee:</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Change</source> <translation type="unfinished"/> </message> <message> <location line="+50"/> <source>custom change address</source> <translation type="unfinished"/> </message> <message> <location line="+106"/> <source>Send to multiple recipients at once</source> <translation>Mitte pluribus accipientibus simul</translation> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation>Adde &amp;Accipientem</translation> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation>Vacuefac &amp;Omnia</translation> </message> <message> <location line="+28"/> <source>Balance:</source> <translation>Pendendum:</translation> </message> <message> <location line="+16"/> <source>123.456 BC</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Confirm the send action</source> <translation>Confirma actionem mittendi</translation> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation>&amp;Mitte</translation> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-173"/> <source>Enter a NOBTCOIN address (e.g. <API key>)</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Copy quantity</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation>Copia quantitatem</translation> </message> <message> <location line="+1"/> <source>Copy fee</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy after fee</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy bytes</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy priority</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy low output</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy change</source> <translation type="unfinished"/> </message> <message> <location line="+86"/> <source>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Confirm send coins</source> <translation>Confirma mittendum nummorum</translation> </message> <message> <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source> and </source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>The recipient address is not valid, please recheck.</source> <translation>Inscriptio accipientis non est valida, sodes reproba.</translation> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation>Oportet quantitatem ad pensandum maiorem quam 0 esse.</translation> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation>Quantitas est ultra quod habes.</translation> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation>Quantitas est ultra quod habes cum merces transactionis %1 includitur.</translation> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation>Geminata inscriptio inventa, tantum posse mittere ad quamque inscriptionem semel singulare operatione.</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 type="unfinished"/> </message> <message> <location line="+251"/> <source>WARNING: Invalid NOBTCOIN address</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>(no label)</source> <translation>(nullus titulus)</translation> </message> <message> <location line="+4"/> <source>WARNING: unknown change address</source> <translation type="unfinished"/> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>A&amp;mount:</source> <translation>&amp;Quantitas:</translation> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation>Pensa &amp;Ad:</translation> </message> <message> <location line="+24"/> <location filename="../sendcoinsentry.cpp" line="+25"/> <source>Enter a label for this address to add it to your address book</source> <translation>Insero titulum huic inscriptioni ut eam in tuum librum inscriptionum addas.</translation> </message> <message> <location line="+9"/> <source>&amp;Label:</source> <translation>&amp;Titulus:</translation> </message> <message> <location line="+18"/> <source>The address to send the payment to (e.g. <API key>)</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <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>Conglutina inscriptionem ex latibulo</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 type="unfinished"/> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a NOBTCOIN address (e.g. <API key>)</source> <translation type="unfinished"/> </message> </context> <context> <name><API key></name> <message> <location filename="../forms/<API key>.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation>Signationes - Signa / Verifica nuntium</translation> </message> <message> <location line="+13"/> <location line="+124"/> <source>&amp;Sign Message</source> <translation>&amp;Signa Nuntium</translation> </message> <message> <location line="-118"/> <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>Potes nuntios signare inscriptionibus tuis ut demonstres te eas possidere. Cautus es non amibiguum signare, quia impetus phiscatorum conentur te fallere ut signes identitatem tuam ad eos. Solas signa sententias cuncte descriptas quibus convenis.</translation> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. <API key>)</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <location line="+203"/> <source>Choose an address from the address book</source> <translation type="unfinished"/> </message> <message> <location line="-193"/> <location line="+203"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="-193"/> <source>Paste address from clipboard</source> <translation>Glutina inscriptionem ex latibulo</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>Insere hic nuntium quod vis signare</translation> </message> <message> <location line="+24"/> <source>Copy the current signature to the system clipboard</source> <translation>Copia signationem in latibulum systematis</translation> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this NOBTCOIN address</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Reset all sign message fields</source> <translation>Reconstitue omnes campos signandi nuntii</translation> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation>Vacuefac &amp;Omnia</translation> </message> <message> <location line="-87"/> <location line="+70"/> <source>&amp;Verify Message</source> <translation>&amp;Verifica Nuntium</translation> </message> <message> <location line="-64"/> <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>Insere inscriptionem signantem, nuntium (cura ut copias intermissiones linearum, spatia, tabs, et cetera exacte) et signationem infra ut nuntium verifices. Cautus esto ne magis legas in signationem quam in nuntio signato ipso est, ut vites falli ab impetu homo-in-medio.</translation> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. <API key>)</source> <translation type="unfinished"/> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified NOBTCOIN address</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Reset all verify message fields</source> <translation>Reconstitue omnes campos verificandi nuntii</translation> </message> <message> <location filename="../<API key>.cpp" line="+27"/> <location line="+3"/> <source>Enter a NOBTCOIN address (e.g. <API key>)</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation>Clicca &quot;Signa Nuntium&quot; ut signatio generetur</translation> </message> <message> <location line="+3"/> <source>Enter NOBTCOIN signature</source> <translation type="unfinished"/> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation>Inscriptio inserta non valida est.</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>Sodes inscriptionem proba et rursus conare.</translation> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation>Inserta inscriptio clavem non refert.</translation> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation>Cassidilis reserare cancellatum est.</translation> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation>Clavis privata absens est pro inserta inscriptione.</translation> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation>Nuntium signare abortum est.</translation> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation>Nuntius signatus.</translation> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation>Signatio decodificari non potuit.</translation> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation>Sodes signationem proba et rursus conare.</translation> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation>Signatio non convenit digesto nuntii</translation> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation>Nuntium verificare abortum est.</translation> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation>Nuntius verificatus.</translation> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+19"/> <source>Open until %1</source> <translation>Apertum donec %1</translation> </message> <message numerus="yes"> <location line="-2"/> <source>Open for %n block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+8"/> <source>conflicted</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1/offline</source> <translation>%1/non conecto</translation> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation>%1/non confirmata</translation> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation>%1 confirmationes</translation> </message> <message> <location line="+18"/> <source>Status</source> <translation>Status</translation> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation><numerusform>, disseminatum per %n nodo</numerusform><numerusform>, disseminata per %n nodis</numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation>Dies</translation> </message> <message> <location line="+7"/> <source>Source</source> <translation>Fons</translation> </message> <message> <location line="+0"/> <source>Generated</source> <translation>Generatum</translation> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation>Ab</translation> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation>Ad</translation> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation>inscriptio propria</translation> </message> <message> <location line="-2"/> <source>label</source> <translation>titulus</translation> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation>Creditum</translation> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation><numerusform>maturum erit in %n plure frusto</numerusform><numerusform>maturum erit in %n pluribus frustis</numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation>non acceptum</translation> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation>Debitum</translation> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation>Transactionis merces</translation> </message> <message> <location line="+16"/> <source>Net amount</source> <translation>Cuncta quantitas</translation> </message> <message> <location line="+6"/> <source>Message</source> <translation>Nuntius</translation> </message> <message> <location line="+2"/> <source>Comment</source> <translation>Annotatio</translation> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation>ID transactionis</translation> </message> <message> <location line="+3"/> <source>Generated coins must mature 100 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 &quot;not accepted&quot; and it won&apos;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>Informatio de debug</translation> </message> <message> <location line="+8"/> <source>Transaction</source> <translation>Transactio</translation> </message> <message> <location line="+5"/> <source>Inputs</source> <translation>Lectenda</translation> </message> <message> <location line="+23"/> <source>Amount</source> <translation>Quantitas</translation> </message> <message> <location line="+1"/> <source>true</source> <translation>verum</translation> </message> <message> <location line="+0"/> <source>false</source> <translation>falsum</translation> </message> <message> <location line="-211"/> <source>, has not been successfully broadcast yet</source> <translation>, nondum prospere disseminatum est</translation> </message> <message> <location line="+35"/> <source>unknown</source> <translation>ignotum</translation> </message> </context> <context> <name><API key></name> <message> <location filename="../forms/<API key>.ui" line="+14"/> <source>Transaction details</source> <translation>Particularia transactionis</translation> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation>Haec tabula monstrat descriptionem verbosam transactionis</translation> </message> </context> <context> <name><API key></name> <message> <location filename="../<API key>.cpp" line="+226"/> <source>Date</source> <translation>Dies</translation> </message> <message> <location line="+0"/> <source>Type</source> <translation>Typus</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Inscriptio</translation> </message> <message> <location line="+0"/> <source>Amount</source> <translation>Quantitas</translation> </message> <message> <location line="+60"/> <source>Open until %1</source> <translation>Apertum donec %1</translation> </message> <message> <location line="+12"/> <source>Confirmed (%1 confirmations)</source> <translation>Confirmatum (%1 confirmationes)</translation> </message> <message numerus="yes"> <location line="-15"/> <source>Open for %n more block(s)</source> <translation><numerusform>Aperi pro %n plure frusto</numerusform><numerusform>Aperi pro %n pluribus frustis</numerusform></translation> </message> <message> <location line="+6"/> <source>Offline</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Unconfirmed</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Confirming (%1 of %2 recommended confirmations)</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Conflicted</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Immature (%1 confirmations, will be available after %2)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>This block was not received by any other nodes and will probably not be accepted!</source> <translation>Hoc frustum non acceptum est ab ulla alia nodis et probabiliter non acceptum erit!</translation> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation>Generatum sed non acceptum</translation> </message> <message> <location line="+42"/> <source>Received with</source> <translation>Acceptum cum</translation> </message> <message> <location line="+2"/> <source>Received from</source> <translation>Acceptum ab</translation> </message> <message> <location line="+3"/> <source>Sent to</source> <translation>Missum ad</translation> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation>Pensitatio ad te ipsum</translation> </message> <message> <location line="+2"/> <source>Mined</source> <translation>Fossa</translation> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation>(n/a)</translation> </message> <message> <location line="+190"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation>Status transactionis. Supervola cum mure ut monstretur numerus confirmationum.</translation> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation>Dies et tempus quando transactio accepta est.</translation> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation>Typus transactionis.</translation> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation>Inscriptio destinationis transactionis.</translation> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation>Quantitas remota ex pendendo aut addita ei.</translation> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+55"/> <location line="+16"/> <source>All</source> <translation>Omne</translation> </message> <message> <location line="-15"/> <source>Today</source> <translation>Hodie</translation> </message> <message> <location line="+1"/> <source>This week</source> <translation>Hac hebdomade</translation> </message> <message> <location line="+1"/> <source>This month</source> <translation>Hoc mense</translation> </message> <message> <location line="+1"/> <source>Last month</source> <translation>Postremo mense</translation> </message> <message> <location line="+1"/> <source>This year</source> <translation>Hoc anno</translation> </message> <message> <location line="+1"/> <source>Range...</source> <translation>Intervallum...</translation> </message> <message> <location line="+11"/> <source>Received with</source> <translation>Acceptum cum</translation> </message> <message> <location line="+2"/> <source>Sent to</source> <translation>Missum ad</translation> </message> <message> <location line="+2"/> <source>To yourself</source> <translation>Ad te ipsum</translation> </message> <message> <location line="+1"/> <source>Mined</source> <translation>Fossa</translation> </message> <message> <location line="+1"/> <source>Other</source> <translation>Alia</translation> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation>Insere inscriptionem vel titulum ut quaeras</translation> </message> <message> <location line="+7"/> <source>Min amount</source> <translation>Quantitas minima</translation> </message> <message> <location line="+34"/> <source>Copy address</source> <translation>Copia inscriptionem</translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>Copia titulum</translation> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation>Copia quantitatem</translation> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation>Copia transactionis ID</translation> </message> <message> <location line="+1"/> <source>Edit label</source> <translation>Muta titulum</translation> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation>Monstra particularia transactionis</translation> </message> <message> <location line="+144"/> <source>Export Transaction Data</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Comma Separata Plica (*.csv)</translation> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation>Confirmatum</translation> </message> <message> <location line="+1"/> <source>Date</source> <translation>Dies</translation> </message> <message> <location line="+1"/> <source>Type</source> <translation>Typus</translation> </message> <message> <location line="+1"/> <source>Label</source> <translation>Titulus</translation> </message> <message> <location line="+1"/> <source>Address</source> <translation>Inscriptio</translation> </message> <message> <location line="+1"/> <source>Amount</source> <translation>Quantitas</translation> </message> <message> <location line="+1"/> <source>ID</source> <translation>ID</translation> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation type="unfinished"/> </message> <message> <location line="+100"/> <source>Range:</source> <translation>Intervallum:</translation> </message> <message> <location line="+8"/> <source>to</source> <translation>ad</translation> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+206"/> <source>Sending...</source> <translation type="unfinished"/> </message> </context> <context> <name>bitcoin-core</name> <message> <location filename="../bitcoinstrings.cpp" line="+33"/> <source>NOBTCOIN version</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Usage:</source> <translation>Usus:</translation> </message> <message> <location line="+1"/> <source>Send command to -server or nobtcoind</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>List commands</source> <translation>Enumera mandata</translation> </message> <message> <location line="+1"/> <source>Get help for a command</source> <translation>Accipe auxilium pro mandato</translation> </message> <message> <location line="+2"/> <source>Options:</source> <translation>Optiones:</translation> </message> <message> <location line="+2"/> <source>Specify configuration file (default: nobtcoin.conf)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Specify pid file (default: nobtcoind.pid)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify wallet file (within data directory)</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation>Specifica indicem datorum</translation> </message> <message> <location line="+2"/> <source>Set database cache size in megabytes (default: 25)</source> <translation>Constitue magnitudinem databasis cache in megabytes (praedefinitum: 25)</translation> </message> <message> <location line="+1"/> <source>Set database disk log size in megabytes (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Listen for connections on &lt;port&gt; (default: 12475 or testnet: 22475)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation>Manutene non plures quam &lt;n&gt; conexiones ad paria (praedefinitum: 125)</translation> </message> <message> <location line="+3"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation>Conecta ad nodum acceptare inscriptiones parium, et disconecte</translation> </message> <message> <location line="+1"/> <source>Specify your own public address</source> <translation>Specifica tuam propriam publicam inscriptionem</translation> </message> <message> <location line="+5"/> <source>Bind to given address. Use [host]:port notation for IPv6</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Stake your coins to support network and gain reward (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation>Limen pro disconectendo paria improba (praedefinitum: 100)</translation> </message> <message> <location line="+1"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation>Numerum secundorum prohibere ne paria improba reconectant (praedefinitum: 86400)</translation> </message> <message> <location line="-44"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation>Error erat dum initians portam RPC %u pro auscultando in IPv4: %s</translation> </message> <message> <location line="+51"/> <source>Detach block and address databases. Increases shutdown time (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+109"/> <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="-5"/> <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="-87"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 12476 or testnet: 22476)</source> <translation type="unfinished"/> </message> <message> <location line="-11"/> <source>Accept command line and JSON-RPC commands</source> <translation>Accipe terminalis et JSON-RPC mandata.</translation> </message> <message> <location line="+101"/> <source>Error: Transaction creation failed </source> <translation type="unfinished"/> </message> <message> <location line="-5"/> <source>Error: Wallet locked, unable to create transaction </source> <translation type="unfinished"/> </message> <message> <location line="-8"/> <source>Importing blockchain data file.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Importing bootstrap blockchain data file.</source> <translation type="unfinished"/> </message> <message> <location line="-88"/> <source>Run in the background as a daemon and accept commands</source> <translation>Operare infere sicut daemon et mandata accipe</translation> </message> <message> <location line="+1"/> <source>Use the test network</source> <translation>Utere rete experimentale</translation> </message> <message> <location line="-24"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation>Accipe conexiones externas (praedefinitum: 1 nisi -proxy neque -connect)</translation> </message> <message> <location line="-38"/> <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source> <translation>Error erat dum initians portam RPC %u pro auscultando in IPv6, labens retrorsum ad IPv4: %s</translation> </message> <message> <location line="+117"/> <source>Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat.</source> <translation type="unfinished"/> </message> <message> <location line="-20"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source> <translation>Monitio: -paytxfee constitutum valde magnum! Hoc est merces transactionis solves si mittis transactionem.</translation> </message> <message> <location line="+61"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong NOBTCOIN will not work properly.</source> <translation type="unfinished"/> </message> <message> <location line="-31"/> <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> <translation>Monitio: error legendo wallet.dat! Omnes claves recte lectae, sed data transactionum vel libri inscriptionum fortasse desint vel prava sint.</translation> </message> <message> <location line="-18"/> <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>Monitio: wallet.data corrupta, data salvata! Originalis wallet.dat salvata ut wallet.{timestamp}.bak in %s; si pendendum tuum vel transactiones pravae sunt, oportet ab conservato restituere.</translation> </message> <message> <location line="-30"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation>Conare recipere claves privatas de corrupto wallet.dat</translation> </message> <message> <location line="+4"/> <source>Block creation options:</source> <translation>Optiones creandi frustorum:</translation> </message> <message> <location line="-62"/> <source>Connect only to the specified node(s)</source> <translation>Conecte sole ad nodos specificatos (vel nodum specificatum)</translation> </message> <message> <location line="+4"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation>Discooperi propriam inscriptionem IP (praedefinitum: 1 quando auscultans et nullum -externalip)</translation> </message> <message> <location line="+94"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation>Non potuisse auscultare in ulla porta. Utere -listen=0 si hoc vis.</translation> </message> <message> <location line="-90"/> <source>Find peers using DNS lookup (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Sync checkpoints policy (default: strict)</source> <translation type="unfinished"/> </message> <message> <location line="+83"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Invalid amount for -reservebalance=&lt;amount&gt;</source> <translation type="unfinished"/> </message> <message> <location line="-82"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation>Maxima magnitudo memoriae pro datis accipendis singulis conexionibus, &lt;n&gt;*1000 octetis/bytes (praedefinitum: 5000)</translation> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation>Maxima magnitudo memoriae pro datis mittendis singulis conexionibus, &lt;n&gt;*1000 octetis/bytes (praedefinitum: 1000)</translation> </message> <message> <location line="-16"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation>Tantum conecte ad nodos in rete &lt;net&gt; (IPv4, IPv6 aut Tor)</translation> </message> <message> <location line="+28"/> <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="+1"/> <source>Prepend debug output with timestamp</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source> <translation>Optiones SSL: (vide vici de Bitcoin pro instructionibus SSL configurationis)</translation> </message> <message> <location line="-74"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation type="unfinished"/> </message> <message> <location line="+41"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation>Mitte informationem vestigii/debug ad terminale potius quam plicam debug.log</translation> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <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>Constitue minimam magnitudinem frusti in octetis/bytes (praedefinitum: 0)</translation> </message> <message> <location line="-29"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation>Diminue plicam debug.log ad initium clientis (praedefinitum: 1 nisi -debug)</translation> </message> <message> <location line="-42"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation>Specifica tempumfati conexionis in millisecundis (praedefinitum: 5000)</translation> </message> <message> <location line="+109"/> <source>Unable to sign checkpoint, wrong checkpointkey? </source> <translation type="unfinished"/> </message> <message> <location line="-80"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation>Utere UPnP designare portam auscultandi (praedefinitum: 0)</translation> </message> <message> <location line="-1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation>Utere UPnP designare portam auscultandi (praedefinitum: 1 quando auscultans)</translation> </message> <message> <location line="-25"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation type="unfinished"/> </message> <message> <location line="+42"/> <source>Username for JSON-RPC connections</source> <translation>Nomen utentis pro conexionibus JSON-RPC</translation> </message> <message> <location line="+47"/> <source>Verifying database integrity...</source> <translation type="unfinished"/> </message> <message> <location line="+57"/> <source>WARNING: syncronized checkpoint violation detected, but skipped!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Warning: Disk space is low!</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation>Monitio: Haec versio obsoleta est, progressio postulata!</translation> </message> <message> <location line="-48"/> <source>wallet.dat corrupt, salvage failed</source> <translation>wallet.dat corrupta, salvare abortum est</translation> </message> <message> <location line="-54"/> <source>Password for JSON-RPC connections</source> <translation>Tessera pro conexionibus JSON-RPC</translation> </message> <message> <location line="-84"/> <source>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: rpcuser=nobtcoinrpc 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 &quot;NOBTCOIN Alert&quot; admin@foo.com </source> <translation type="unfinished"/> </message> <message> <location line="+51"/> <source>Find peers using internet relay chat (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>When creating transactions, ignore inputs with value less than this (default: 0.01)</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation>Permitte conexionibus JSON-RPC ex inscriptione specificata</translation> </message> <message> <location line="+1"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation>Mitte mandata nodo operanti in &lt;ip&gt; (praedefinitum: 127.0.0.1)</translation> </message> <message> <location line="+1"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation>Pelle mandatum quando optissimum frustum mutat (%s in mandato substituitur ab hash frusti)</translation> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation>Facere mandatum quotiescumque cassidilis transactio mutet (%s in mandato sbstituitur ab TxID)</translation> </message> <message> <location line="+3"/> <source>Require a confirmations for change (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Enforce transaction scripts to use canonical PUSH operators (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <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>Upgrade wallet to latest format</source> <translation>Progredere cassidile ad formam recentissimam</translation> </message> <message> <location line="+1"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation>Constitue magnitudinem stagni clavium ad &lt;n&gt; (praedefinitum: 100)</translation> </message> <message> <location line="+1"/> <source>Rescan the block chain for missing wallet transactions</source> <translation>Iterum perlege catenam frustorum propter absentes cassidilis transactiones</translation> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 2500, 0 = all)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>How thorough the block verification is (0-6, default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Imports blocks from external blk000?.dat file</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation>Utere OpenSSL (https) pro conexionibus JSON-RPC</translation> </message> <message> <location line="+1"/> <source>Server certificate file (default: server.cert)</source> <translation>Plica certificationis daemonis moderantis (praedefinitum: server.cert)</translation> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation>Clavis privata daemonis moderans (praedefinitum: server.pem)</translation> </message> <message> <location line="+1"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation type="unfinished"/> </message> <message> <location line="+53"/> <source>Error: Wallet unlocked for staking only, unable to create transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers.</source> <translation type="unfinished"/> </message> <message> <location line="-158"/> <source>This help message</source> <translation>Hic nuntius auxilii</translation> </message> <message> <location line="+95"/> <source>Wallet %s resides outside data directory %s.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Cannot obtain a lock on data directory %s. NOBTCOIN is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="-98"/> <source>NOBTCOIN</source> <translation type="unfinished"/> </message> <message> <location line="+140"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation>Non posse conglutinare ad %s in hoc computatro (conglutinare redidit errorem %d, %s)</translation> </message> <message> <location line="-130"/> <source>Connect through socks proxy</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation>Permitte quaerenda DNS pro -addnode, -seednode, et -connect</translation> </message> <message> <location line="+122"/> <source>Loading addresses...</source> <translation>Legens inscriptiones...</translation> </message> <message> <location line="-15"/> <source>Error loading blkindex.dat</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation>Error legendi wallet.dat: Cassidile corruptum</translation> </message> <message> <location line="+4"/> <source>Error loading wallet.dat: Wallet requires newer version of NOBTCOIN</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Wallet needed to be rewritten: restart NOBTCOIN to complete</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading wallet.dat</source> <translation>Error legendi wallet.dat</translation> </message> <message> <location line="-16"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation>Inscriptio -proxy non valida: &apos;%s&apos;</translation> </message> <message> <location line="-1"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation>Ignotum rete specificatum in -onlynet: &apos;%s&apos;</translation> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation>Ignota -socks vicarii versio postulata: %i</translation> </message> <message> <location line="+4"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation>Non posse resolvere -bind inscriptonem: &apos;%s&apos;</translation> </message> <message> <location line="+2"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation>Non posse resolvere -externalip inscriptionem: &apos;%s&apos;</translation> </message> <message> <location line="-24"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>Quantitas non valida pro -paytxfee=&lt;quantitas&gt;: &apos;%s&apos;</translation> </message> <message> <location line="+44"/> <source>Error: could not start node</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Sending...</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Invalid amount</source> <translation>Quantitas non valida</translation> </message> <message> <location line="+1"/> <source>Insufficient funds</source> <translation>Inopia nummorum</translation> </message> <message> <location line="-34"/> <source>Loading block index...</source> <translation>Legens indicem frustorum...</translation> </message> <message> <location line="-103"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation>Adice nodum cui conectere et conare sustinere conexionem apertam</translation> </message> <message> <location line="+122"/> <source>Unable to bind to %s on this computer. NOBTCOIN is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="-97"/> <source>Fee per KB to add to transactions you send</source> <translation type="unfinished"/> </message> <message> <location line="+55"/> <source>Invalid amount for -mininput=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Loading wallet...</source> <translation>Legens cassidile...</translation> </message> <message> <location line="+8"/> <source>Cannot downgrade wallet</source> <translation>Non posse cassidile regredi</translation> </message> <message> <location line="+1"/> <source>Cannot initialize keypool</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Cannot write default address</source> <translation>Non posse scribere praedefinitam inscriptionem</translation> </message> <message> <location line="+1"/> <source>Rescanning...</source> <translation>Iterum perlegens...</translation> </message> <message> <location line="+5"/> <source>Done loading</source> <translation>Completo lengendi</translation> </message> <message> <location line="-167"/> <source>To use the %s option</source> <translation>Ut utaris optione %s</translation> </message> <message> <location line="+14"/> <source>Error</source> <translation>Error</translation> </message> <message> <location line="+6"/> <source>You must set rpcpassword=&lt;password&gt; in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions.</source> <translation>Necesse est te rpcpassword=&lt;tesseram&gt; constituere in plica configurationum: %s Si plica non existat, crea eam cum permissionibus ut solus eius dominus eam legere sinatur.</translation> </message> </context> </TS>
/** * Allows you to register actions that when dispatched, send the action to the * server via a socket.io socket. * `criteria` may be a function (type, action) that returns true if you wish to send the * action to the server, array of action types, or a string prefix. * the third parameter is an options object with the following properties: * { * eventName,// a string name to use to send and receive actions from the server. * execute, // a function (action, emit, next, dispatch) that is responsible for * // sending the message to the server. * } * */ export default function <API key>(socket, criteria = [], { eventName = 'action', execute = defaultExecute } = {}) { const emitBound = socket.emit.bind(socket); return ({ dispatch }) => { // Wire socket.io to dispatch actions sent by the server. socket.on(eventName, dispatch); return next => action => { if (evaluate(action, criteria)) { execute(action, emitBound, next, dispatch); } else { next(action); } }; }; function evaluate(action, option) { const { type } = action; let matched = false; if (typeof option === 'function') { // Test function matched = option(type, action); } else if (typeof option === 'string') { // String prefix matched = type.indexOf(option) === 0; } else if (Array.isArray(option)) { // Array of types matched = option.some((item) => type.indexOf(item) === 0); } return matched; } function defaultExecute(action, emit, next, dispatch) { // eslint-disable-line no-unused-vars emit(eventName, action); next(action); } }
// <auto-generated> // This code was generated by a tool. // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> namespace Managed.D2DSharp.Ellipse.Properties { [global::System.Runtime.CompilerServices.<API key>()] [global::System.CodeDom.Compiler.<API key>("Microsoft.VisualStudio.Editors.SettingsDesigner.<API key>", "17.0.2.0")] internal sealed partial class Settings : global::System.Configuration.<API key> { private static Settings defaultInstance = ((Settings)(global::System.Configuration.<API key>.Synchronized(new Settings()))); public static Settings Default { get { return defaultInstance; } } } }
<script>window.Testee = { provider: { type: 'rest' } };</script> <script src="../node_modules/steal/steal.js" data-main="test/test"></script>
var fs = require('fs'); Class(Cobalt.Logger, 'File')({ prototype : { file : null, formatterOpts : {}, init : function (config) { if (config) { for (property in config) { this[property] = config[property]; } } this._stream = fs.createWriteStream(this.file, {flags: 'a'}); }, log : function () { var i, message = [], severity; for (i = 0; i < arguments.length; i++) { // We're not formatting objects for now. if (!arguments[i].__skipConsole && !arguments[i].message.__skipConsole) { message.push(this.format(arguments[i])); if (!severity) { severity = arguments[i]._level } } } for (i = 0; i < message.length; i++) { this._stream.write(message[i] + '\n'); } }, format : function (logObject) { if (this.formatter) { if (typeof logObject.message === 'object') { return logObject.message; } return this.formatter.format(logObject, this.formatterOpts); } return Cobalt.stringify(logObject); } } });
package com.highmaps.config import scalajs.js, js.`|` import com.highcharts.CleanJsObject import com.highcharts.HighchartsUtils._ /** * @note JavaScript name: <code><API key></code> */ @js.annotation.ScalaJSDefined class <API key> extends com.highcharts.<API key> { /** * <p>The normal state of a single point marker. Currently only used * for setting animation when returning to normal state from hover.</p> * @since 6.0.0 */ val normal: js.Any = js.undefined /** * <p>The hover state for a single point marker.</p> * @since 6.0.0 */ val hover: js.Any = js.undefined /** * <p>The appearance of the point marker when selected. In order to * allow a point to be selected, set the <code>series.allowPointSelect</code> * option to true.</p> * @since 6.0.0 */ val select: js.Any = js.undefined } object <API key> { /** * @param normal <p>The normal state of a single point marker. Currently only used. for setting animation when returning to normal state from hover.</p> * @param hover <p>The hover state for a single point marker.</p> * @param select <p>The appearance of the point marker when selected. In order to. allow a point to be selected, set the <code>series.allowPointSelect</code>. option to true.</p> */ def apply(normal: js.UndefOr[js.Any] = js.undefined, hover: js.UndefOr[js.Any] = js.undefined, select: js.UndefOr[js.Any] = js.undefined): <API key> = { val normalOuter: js.Any = normal val hoverOuter: js.Any = hover val selectOuter: js.Any = select com.highcharts.<API key>.toCleanObject(new <API key> { override val normal: js.Any = normalOuter override val hover: js.Any = hoverOuter override val select: js.Any = selectOuter }) } }
import { TaxLine } from "./tax_line"; import { ShopifyObject } from "./base"; import { LineItemProperty } from "./line_item_property"; export interface LineItem extends ShopifyObject { <summary> The amount available to fulfill. This is the quantity - max(refunded_quantity, fulfilled_quantity) - <API key>. </summary> <API key>?: number; <summary> Service provider who is doing the fulfillment. Valid values are either "manual" or the name of the provider. eg: "amazon", "shipwire", etc. </summary> fulfillment_service?: string; <summary> The fulfillment status of this line item. Known values are 'fulfilled', 'null' and 'partial'. </summary> fulfillment_status?: string; <summary> The weight of the item in grams. </summary> grams?: number; <summary> The price of the item before discounts have been applied. </summary> <remarks>Shopify returns this value as a string.</remarks> price?: number; <summary> The unique numeric identifier for the product in the fulfillment. Can be null if the original product associated with the order is deleted at a later date </summary> product_id?: number; <summary> The number of products that were purchased. </summary> quantity?: number; <summary> States whether or not the fulfillment requires shipping. </summary> requires_shipping?: boolean; <summary> A unique identifier of the item in the fulfillment. </summary> sku?: string; <summary> The title of the product. </summary> title?: string; <summary> The id of the product variant. Can be null if the product purchased is not a variant. </summary> variant_id?: number; <summary> The title of the product variant. Can be null if the product purchased is not a variant. </summary> variant_title?: string; <summary> The name of the product variant. </summary> name?: string; <summary> The name of the supplier of the item. </summary> vendor?: string; <summary> States whether the order used a gift card. </summary> gift_card?: boolean; <summary> States whether or not the product was taxable. </summary> taxable?: boolean; <summary> An array of <see cref="ShopifyTaxLine"/> objects, each of which details the taxes applicable to this <see cref="ShopifyLineItem"/>. </summary> tax_lines?: TaxLine[]; <summary> The total discount amount applied to this line item. This value is not subtracted in the line item price. </summary> total_discount?: number; <summary> An array of custom information for an item that has been added to the cart. Often used to provide product customization options. An array of <see cref="ShopifyTaxLine"/> objects, each of which details the taxes applicable to this <see cref="ShopifyLineItem"/>. </summary> properties?: LineItemProperty[]; }
using Portal.CMS.Entities.Entities; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; namespace Portal.CMS.Web.Areas.Admin.ViewModels.ThemeManager { public class UpsertViewModel { public int ThemeId { get; set; } [Required] [DisplayName("Theme Name")] public string ThemeName { get; set; } #region Colour Settings [Required] [DisplayName("Page Background Colour")] public string <API key> { get; set; } [Required] [DisplayName("Menu Background Colour")] public string <API key> { get; set; } [Required] [DisplayName("Menu Text Colour")] public string MenuTextColour { get; set; } #endregion Colour Settings #region Text Settings [Required] [DisplayName("Title Font")] public int TitleFontId { get; set; } [Required] [DisplayName("Text Font")] public int TextFontId { get; set; } [Required] [DisplayName("Large Title Font Size")] public int LargeTitleFontSize { get; set; } = 35; [Required] [DisplayName("Medium Title Font Size")] public int MediumTitleFontSize { get; set; } = 35; [Required] [DisplayName("Small Title Font Size")] public int SmallTitleFontSize { get; set; } = 24; [Required] [DisplayName("Tiny Title Font Size")] public int TinyTitleFontSize { get; set; } = 22; [Required] [DisplayName("Standard Text Font Size")] public int <API key> { get; set; } = 20; #endregion Text Settings public bool IsDefault { get; set; } public IEnumerable<Font> FontList { get; set; } } }
using System; using System.Text.RegularExpressions; namespace _2.<API key> { class Program { static void Main(string[] args) { var word = Console.ReadLine(); var text = Console.ReadLine(); var regex = new Regex($"\\W{word}\\W"); var sentences = text.Split(new[] { '.', '!', '?' }, StringSplitOptions.RemoveEmptyEntries); foreach (var item in sentences) { var result = regex.Matches(item); foreach (var sentence in result) { Console.WriteLine(item); } } } } }
define(["myApp/hello"], function(){ return function(){ return "Hello World !"; } })
<div data-ng-init="deviceEditCtrl.init()"> <div class="row"> <div class="col-lg-12"> <div class="box box-info"> <div class="box-header with-border"> <h3 class="box-title" translate="global.EDIT"></h3> </div> <form class="form-horizontal" data-ng-submit="deviceEditCtrl.update()" novalidate> <div class="box-body"> <device-data device="deviceEditCtrl.device" apps="deviceEditCtrl.apps" loading="deviceEditCtrl.loading"></device-data> <div data-ng-show="deviceEditCtrl.error" class="text-danger"> <strong data-ng-bind="deviceEditCtrl.error"></strong> </div> </div> <div class="box-footer text-right"> <a class="btn btn-sm btn-default" data-ng-click="deviceEditCtrl.cancel();" translate="global.CANCEL"></a> <button class="btn btn-sm btn-primary" type="submit"><strong translate="global.UPDATE"></strong></button> </div> </form> </div> </div> </div> </div>
(function (angular) { 'use strict'; angular.module('DepartmentModule') .controller('<API key>', ['$scope', 'toastr', 'Departments', '$state', function ($scope, toastr, Departments, $state) { $scope.me = window.SAILS_LOCALS.me; if (!$scope.me.admin && !$scope.me.kadr) return $state.go('home'); // var ups = $scope.ups = Departments.query(); // console.log('UPS1: '); // console.log(ups); // // console.log( $scope.ups.then(onFullField)); // ups.$promise.then(onFullField,onReject); // function onFullField(succ){ // console.log('DADAD!!!: '); // console.log(succ); // console.log('DADAD!!22!: '); // console.log(succ.filter(action:1); // function onReject(err) { // console.log('ONreject'); // console.log(err); $scope.refresh = function () { $scope.items = Departments.query({limit: 300, sort: 'name'}, function(departments) { //console.log('DEPARTMENTS:', departments); $scope.items = departments; }, function (err) { toastr.error(err, 'Ошибка <API key>!'); }); }; //$scope.sections = $scope.departments.sections(); $scope.propertyName = 'name'; $scope.reverse = false; // $scope.friends = friends; $scope.sortBy = function (propertyName) { $scope.reverse = ($scope.propertyName === propertyName) ? !$scope.reverse : false; $scope.propertyName = propertyName; }; function BreadCrumb() { var name; var path; this.arr = []; } BreadCrumb.prototype.add = function () { this.arr.push({name: this.name, path: this.path}); }; BreadCrumb.prototype.set = function (name, path) { this.name = name; this.path = path; this.add(); }; BreadCrumb.prototype.getAll = function () { return this.arr; }; var breadcrumb = new BreadCrumb(); breadcrumb.set('Home', '/'); breadcrumb.set('Admin', '/admin'); breadcrumb.set('Departments', '/departments/' + $state.current.url); $scope.breadcrumbs = breadcrumb; $scope.refresh(); }]) ; })(window.angular);
#define <API key> \ X(vkDestroyDevice) \ X(vkDeviceWaitIdle) \ X(vkGetDeviceQueue) \ X(vkCreateCommandPool) \ X(vkResetCommandPool) \ X(<API key>) \ X(<API key>) \ X(<API key>) \ X(<API key>) \ X(<API key>) \ X(vkEndCommandBuffer) \ X(vkQueueSubmit) \ X(<API key>) \ X(vkCreateFence) \ X(vkDestroyFence) \ X(vkGetFenceStatus) \ X(vkResetFences) \ X(vkWaitForFences) \ X(vkCreateSemaphore) \ X(vkDestroySemaphore) \ X(vkCreateEvent) \ X(vkDestroyEvent) \ X(vkGetEventStatus) \ X(vkSetEvent) \ X(vkResetEvent) \ X(vkCmdSetEvent) \ X(vkCmdResetEvent) \ X(vkCmdWaitEvents) \ X(<API key>) \ X(vkCreateRenderPass) \ X(vkDestroyRenderPass) \ X(vkCreateFramebuffer) \ X(<API key>) \ X(<API key>) \ X(<API key>) \ X(vkCmdNextSubpass) \ X(vkCmdEndRenderPass) \ X(<API key>) \ X(<API key>) \ X(<API key>) \ X(<API key>) \ X(vkDestroyPipeline) \ X(<API key>) \ X(<API key>) \ X(<API key>) \ X(<API key>) \ X(vkCmdBindPipeline) \ X(<API key>) \ X(vkAllocateMemory) \ X(vkFreeMemory) \ X(vkMapMemory) \ X(<API key>) \ X(<API key>) \ X(vkUnmapMemory) \ X(<API key>) \ X(vkCreateBuffer) \ X(vkDestroyBuffer) \ X(vkCreateBufferView) \ X(vkDestroyBufferView) \ X(vkCreateImage) \ X(<API key>) \ X(vkDestroyImage) \ X(vkCreateImageView) \ X(vkDestroyImageView) \ X(<API key>) \ X(<API key>) \ X(vkBindBufferMemory) \ X(vkBindImageMemory) \ X(vkCreateSampler) \ X(vkDestroySampler) \ X(<API key>) \ X(<API key>) \ X(<API key>) \ X(<API key>) \ X(<API key>) \ X(<API key>) \ X(<API key>) \ X(<API key>) \ X(<API key>) \ X(<API key>) \ X(<API key>) \ X(vkCmdPushConstants) \ X(<API key>) \ X(<API key>) \ X(<API key>) \ X(vkCmdFillBuffer) \ X(vkCmdUpdateBuffer) \ X(vkCreateQueryPool) \ X(vkDestroyQueryPool) \ X(vkCmdResetQueryPool) \ X(vkCmdBeginQuery) \ X(vkCmdEndQuery) \ X(<API key>) \ X(<API key>) \ X(vkCmdWriteTimestamp) \ X(vkCmdCopyBuffer) \ X(vkCmdCopyImage) \ X(<API key>) \ X(<API key>) \ X(vkCmdBlitImage) \ X(vkCmdResolveImage) \ X(<API key>) \ X(vkCmdDraw) \ X(vkCmdDrawIndexed) \ X(vkCmdDrawIndirect) \ X(<API key>) \ X(<API key>) \ X(vkCmdSetViewport) \ X(vkCmdSetLineWidth) \ X(vkCmdSetDepthBias) \ X(<API key>) \ X(vkCmdSetScissor) \ X(vkCmdSetDepthBounds) \ X(<API key>) \ X(<API key>) \ X(<API key>) \ X(<API key>) \ X(<API key>) \ X(vkQueueBindSparse) \ X(vkCmdDispatch) \ X(<API key>)
#!/Tsan/bin/python # -*- coding: utf-8 -*- # Libraries To Use from __future__ import division from CloudQuant import MiniSimulator import numpy as np import pandas as pd import pdb import cvxopt as cv from cvxopt import solvers from datetime import datetime, date, time import barraRiskModel as brm import <API key> as ff # define path path = ff.data_path filenameHS300 = '<API key>.csv' filenameICWeight = '<API key>.csv' filenameOwnVol = '<API key>.csv' filenameDDA20 = 'Own_Factor_DDA-20d.csv' filenameOWNILLIQ ='Own_Factor_ILLQ-1d.csv' filenameIDIVOL = '<API key>.csv' # Variables and Constants Init_Cap = 50000000 Start_Date = '20120101' End_Date = '20161231' ShortMA = 12 LongMA = 15 Period = 60 Position_Max = 200 rowsNum = 21 timeStampNum = 2000 thresholdNum = 0.2 indexPool = ['000300', '000905'] # Use own library to get the last day of each month benchMarkData = pd.read_csv(path+filenameHS300, <API key>=True, parse_dates=[0], index_col=0)[-timeStampNum:] startOfMonth, endOfMonth = ff.getLastDayOfMonth(benchMarkData.index) DDA20df = pd.read_csv(path+filenameDDA20, <API key>=True, parse_dates=[0], index_col=0)[-timeStampNum:] Volatilitydf = pd.read_csv(path+filenameOwnVol, <API key>=True, parse_dates=[0], index_col=0)[-timeStampNum:] # factor weight OwnILLQdf = pd.read_csv(path+filenameOWNILLIQ, <API key>=True, parse_dates=[0], index_col=0)[-timeStampNum:] IDIVOLdf = pd.read_csv(path+filenameIDIVOL, <API key>=True, parse_dates=[0], index_col=0) factorWeight = pd.read_csv(path+filenameICWeight, <API key>=True, parse_dates=[0], index_col=0) def getNewMatrix(inputArray, t, m): newMatrix = [] n = t-m+1 for i in range(n): newdata = list(inputArray[i:m+i]) newMatrix.append(newdata) #newMatrix = np.array(newMatrix).reshape(n,m) return np.array(newMatrix) def recreateArray(newMatrix,t,m): ret = [] n = t - m + 1 for p in range(1, t+1): if p < m: alpha = p elif p > t-m+1: alpha = t-p+1 else: alpha = m sigma = 0 for j in range(1, m+1): i = p - j + 1 if i > 0 and i < n+1: sigma += newMatrix[i-1][j-1] ret.append(sigma/alpha) return np.array(ret) def getSVD(inputArray,t,m): inputmatrix = getNewMatrix(inputArray, t, m) u, s, v = np.linalg.svd(inputmatrix) eviNum = 1 if s[0]/s.sum() > 0.99 else 2 sNew = np.zeros((eviNum, eviNum)) np.fill_diagonal(sNew, s[:eviNum]) matrixForts = np.dot(np.dot(u[:, :eviNum].reshape(u.shape[0], eviNum), sNew), v[:eviNum]) newts = recreateArray(matrixForts, t, m) return newts def initial(sdk): sdk.prepareData(['<API key>', 'LZ_GPA_VAL_PB', '<API key>', '<API key>', '<API key>', '<API key>', 'LZ_GPA_QUOTE_TCLOSE', '<API key>']) dateList = map(lambda x: x.date().strftime("%Y%m%d"), endOfMonth) # change time stamp to string sdk.setGlobal('dateList', dateList) sdk.setGlobal('sellSignal', [True]) DDA20df.columns = sdk.getStockList() Volatilitydf.columns = sdk.getStockList() OwnILLQdf.columns = sdk.getStockList() IDIVOLdf.columns = sdk.getStockList() #print DDA20df.head().iloc[:, :5] print len(sdk.getStockList()) def initPerDay(sdk): today = sdk.getNowDate() dateList = sdk.getGlobal('dateList') if today in dateList: # judge whether today is the last day of the month today = datetime.strptime(today, '%Y%m%d') stockPool = pd.DataFrame(np.array(sdk.getFieldData('<API key>')[-20:]), columns=sdk.getStockList()) stockPool = stockPool.iloc[-1].dropna(how='any').index.tolist() # get today's ZX500 stock pool # PBData PBDF = pd.DataFrame(np.array(sdk.getFieldData('LZ_GPA_VAL_PB')[-20:]), columns=sdk.getStockList()) PBDF = PBDF[stockPool].fillna(method='ffill').fillna(method='bfill').iloc[-1] PBSlice = (PBDF - PBDF.mean())/PBDF.std() # normalize # OCFTODEBT Data OCFTODEBT = pd.DataFrame(np.array(sdk.getFieldData('<API key>')[-20:]), columns=sdk.getStockList()) OCFTODEBT = OCFTODEBT[stockPool].fillna(method='ffill').fillna(method='bfill').iloc[-1] OCFTODEBTSlice = (OCFTODEBT - OCFTODEBT.mean())/OCFTODEBT.std() # MOM1MData MOM1MDF = pd.DataFrame(np.array(sdk.getFieldData('<API key>')[-20:]), columns=sdk.getStockList()) MOM1MDF = MOM1MDF[stockPool].fillna(method='ffill').fillna(method='bfill').iloc[-1] MOM1MSlice = (MOM1MDF - MOM1MDF.mean())/MOM1MDF.std() # YOYGRData YOYGRDF = pd.DataFrame(np.array(sdk.getFieldData('<API key>')[-20:]), columns=sdk.getStockList()) YOYGRDF = YOYGRDF[stockPool].fillna(method='ffill').fillna(method='bfill').iloc[-1] YOYGRSlice = (YOYGRDF-YOYGRDF.mean())/YOYGRDF.std() # ILLIQData #ILLIQDF = pd.DataFrame(np.array(sdk.getFieldData('LZ_GPA_DERI_ILLIQ')[-20:]), columns=sdk.getStockList()) DDA20 = DDA20df.loc[:today] DDA20 = DDA20.iloc[-20:] DDA20 = DDA20[stockPool].fillna(method='ffill').fillna(method='bfill').iloc[-1] DDA20Slice = (DDA20 - DDA20.mean())/DDA20.std() # Volatility VOL = Volatilitydf.loc[:today] VOL = VOL.iloc[-20:] VOL = VOL[stockPool].fillna(method='ffill').fillna(method='bfill').iloc[-1] VOLSlice = (VOL -VOL.mean())/VOL.std() # OwnILLQData OwnILLQ = OwnILLQdf.loc[:today] OwnILLQ = OwnILLQ.iloc[-20:] OwnILLQ = OwnILLQ[stockPool].fillna(method='ffill').fillna(method='bfill').iloc[-1] OwnILLQSlice = (OwnILLQ - OwnILLQ.mean()) / OwnILLQ.std() # Idiosyncratic Volatility IDIVOL = IDIVOLdf.loc[:today] IDIVOL = IDIVOL.iloc[-20:] IDIVOL = IDIVOL[stockPool].fillna(method='ffill').fillna(method='bfill').iloc[-1] IDIVOLSlice = (IDIVOL - IDIVOL.mean()) / IDIVOL.std() # Select the corresponding factor weight WeightSlice = factorWeight.loc[today] finalIndictor = WeightSlice['PB'] * PBSlice + WeightSlice['OCFTODEBT'] * OCFTODEBTSlice + \ WeightSlice['MOM_1M'] * MOM1MSlice + WeightSlice['YOYGR'] * YOYGRSlice + \ WeightSlice['VOLATILITY'] * VOLSlice + WeightSlice['DDA20'] * DDA20Slice \ + WeightSlice['OWNILLIQ'] * OwnILLQSlice + WeightSlice['IDIVOL'] * IDIVOLSlice stocksTobuy = finalIndictor.sort_values(ascending=False).index.tolist()[50:50+Position_Max] sdk.setGlobal('buyList', stocksTobuy) # To calculate the realized volatility matrix CPData = np.array(sdk.getFieldData('LZ_GPA_QUOTE_TCLOSE')[-121:]) ClosePriceDF = pd.DataFrame(CPData, columns=sdk.getStockList())[stocksTobuy] ADfactor = np.array(sdk.getFieldData('<API key>')[-121:]) ADfactorDF = pd.DataFrame(ADfactor, columns=sdk.getStockList())[stocksTobuy] AdForward = ADfactorDF / ADfactorDF.max() adjustedPrice = (AdForward * ClosePriceDF) adjustedPrice = adjustedPrice.loc[:, adjustedPrice.isnull().sum() < (len(adjustedPrice) * thresholdNum)] adjustedPrice = adjustedPrice.fillna(method='ffill').fillna(method='bfill') print adjustedPrice.shape[1] #covMatrix = adjustedPrice.ewm(ignore_na=True, min_periods=0, com=10).cov(pairwise = True)[-60:].iloc[-1] adjustedPrice = np.log(adjustedPrice/adjustedPrice.shift(1))[-120:] # calculate daily log return of each stock #covMatrix = brm.calEWMcovariance(adjustedPrice) covMatrix = adjustedPrice.cov(1) print 'Nan Num:', covMatrix.isnull().sum().sum() #covMatrix.values # Quadratic Optimizaiton stkNum = covMatrix.shape[1] P = cv.matrix(covMatrix.values) q = cv.matrix(0.0, (stkNum, 1)) G = cv.matrix(np.concatenate((np.diag(np.ones(stkNum)), - np.diag(np.ones(stkNum))))) h = cv.matrix(np.append(0.01 * np.ones(stkNum), np.zeros(stkNum))) A = cv.matrix(np.ones(stkNum)).T b = cv.matrix(1.0).T sol = solvers.qp(P, q, G, h, A, b) print sol['x'] # this shows the desired x weight # Add percentage of total Asset to reduce max drawdowm stocksWeightTarget = pd.Series(data=sol['x'] * sdk.getAccountAsset().previousAsset, index=covMatrix.columns) quotes = sdk.getQuotes(covMatrix.columns) noNoneData = list(set(covMatrix.columns) & set(quotes.keys())) stocksWeightTarget = stocksWeightTarget.loc[noNoneData] for stk in stocksWeightTarget.index: stocksWeightTarget.loc[stk] = stocksWeightTarget.loc[stk] / quotes[stk].open positionIndicator = sdk.getPositions() # stockPrices = pd.Series(data = np.array([i.open for i in positionIndicator]), index = covMatrix.columns) # stocksWeightTarget = stocksWeightTarget / stockPrices <API key> = pd.Series(data=[i.optPosition for i in positionIndicator], index=[i.code for i in positionIndicator]) stocksTarget = stocksWeightTarget.index.tolist() stocksCurrent = <API key>.index.tolist() finalWeight = pd.Series(index=list(set(stocksTarget) | set(stocksCurrent)), data=None) intersection = list(set(stocksCurrent) & set(stocksTarget)) differenceSell = list(set(stocksCurrent) - set(stocksTarget)) differenceBuy = list(set(stocksTarget) - set(stocksCurrent)) finalWeight.loc[intersection] = stocksWeightTarget.loc[intersection] - <API key>.loc[intersection] finalWeight.loc[differenceSell] = - <API key>.loc[differenceSell] finalWeight.loc[differenceBuy] = stocksWeightTarget.loc[differenceBuy] sdk.setGlobal('finalWeight', finalWeight) #adjustedPrice.dropna(axis=1, how='any', inplace=True) # quote all stocks positionStocks = [i.code for i in sdk.getPositions()] ## Stocks we currently hold totalPool = np.array(list(set(stocksTobuy) | set(positionStocks))) # print (stockPool) # sdk.subscribeQuote(stockPool) ##subscribe sdk.setGlobal('POOL', totalPool) #print stockPool #print today # ret = [] # for stock in sdk.getGlobal("POOL"): # late = [i.close for i in sdk.getLatest(code=stock, count=period)] # mean = np.nanmean(late) # ret.append(mean) # return np.array(ret) ## Trading function def buyStocks(sdk, finalWeight, quotes): # stockToBuy is a pd.Series quoteStocks = quotes.keys() stockToBuy = list(set(finalWeight[finalWeight > 0].index.tolist()) & set(quoteStocks)) asset = sdk.getAccountInfo() codeList = [i.code for i in sdk.getPositions()] # print sdk.getPositions() if stockToBuy and asset: if len(codeList) < Position_Max: if len(codeList) + len(stockToBuy) > Position_Max: frozenStk = frozenset(stockToBuy) spareList = sdk.getGlobal('buyList') stockToBuy = [x for x in spareList if x in frozenStk][:Position_Max - len(codeList)] orders = [] for stock in stockToBuy: #assert np.any(quotes) # judge whether quotes is None buyPrice = quotes[stock].open buyAmount = finalWeight.loc[stock] # Can also buy half of the amount if buyPrice > 0 and buyAmount > 100: orders.append([stock, buyPrice, int(np.floor(buyAmount / 100)) * 100, 'BUY']) sdk.makeOrders(orders) sdk.sdklog(orders, 'buy') # Add this trade into log def sellStocks(sdk, finalWeight, quotes): quoteStocks = quotes.keys() stockToSell = list(set(finalWeight[finalWeight < 0].index.tolist()) & set(quoteStocks)) if stockToSell: orders = [] positions = sdk.getPositions() # check the amount of stock we cuurently hold for pos in positions: if pos.code in stockToSell: sellPrice = quotes[pos.code].open sellAmount = pos.optPosition if sellPrice > 0 and sellAmount > 100: orders.append([pos.code, sellPrice, sellAmount, 'SELL']) sdk.makeOrders(orders) sdk.sdklog(orders, 'sell') ## Add this trade into log # def cancelAllOrdersInq(sdk): # ods = sdk.getQueueOrders() def sellAllStocks(sdk, stockToSell, quotes): quoteStocks = quotes.keys() stockToSell = list(set(stockToSell) & set(quoteStocks)) if stockToSell: orders = [] positions = sdk.getPositions() # check the amount of stock we cuurently hold for pos in positions: if pos.code in stockToSell: sellPrice = quotes[pos.code].open sellAmount = pos.optPosition if sellPrice > 0 and sellAmount > 100: orders.append([pos.code, sellPrice, sellAmount, 'SELL']) sdk.makeOrders(orders) sdk.sdklog(orders, 'sell') ## Add this trade into log '''def cutLose(sdk, thresholdNum, period): # cut lose function codeList = [i.code for i in sdk.getPositions()] quotes = sdk.getQuotes(codeList) closePriceDF = pd.DataFrame(np.array(sdk.getFieldData('LZ_GPA_QUOTE_TCLOSE')[-period:]), columns=sdk.getStockList())[quotes.keys()] ADfactor = np.array(sdk.getFieldData('<API key>')[-period:]) ADfactorDF = pd.DataFrame(ADfactor, columns=sdk.getStockList())[quotes.keys()] AdForward = ADfactorDF / ADfactorDF.max() closePriceDF = (AdForward * closePriceDF) maxPrice = closePriceDF.iloc[:-1].max() return closePriceDF.loc[:, (closePriceDF.iloc[-1] < (1-thresholdNum) * maxPrice).values].columns.tolist()''' # Main section def strategy(sdk): '''market timing by svd, check whether HS300 index and ZZ500 index is surging up or plunged''' sellSignalList = sdk.getGlobal('sellSignal') indexDF = pd.DataFrame(np.array(sdk.getFieldData('<API key>')[-22:]), columns=sdk.getIndexList()) # print sdk.getIndexList() indexDF = indexDF[indexPool] indexDF = indexDF.fillna(method='ffill').fillna(method='bfill')[-LongMA:] # if (indexDF.loc[:, indexDF.iloc[-1] == indexDF.iloc[-5:].min()].shape[1] == 2) and \ # (indexDF.loc[:, indexDF.iloc[-1] < indexDF.iloc[-12:].mean()].shape[1] == 2): SH300SVD = getSVD(indexDF[indexPool[0]].values, len(indexDF), ShortMA) ZZ500SVD = getSVD(indexDF[indexPool[1]].values, len(indexDF), ShortMA) # index marketing if SH300SVD[-2] < indexDF[indexPool[0]].iloc[-2] and SH300SVD[-1] > indexDF[indexPool[0]].iloc[-1] and \ ZZ500SVD[-2] < indexDF[indexPool[1]].iloc[-2] and ZZ500SVD[-1] > indexDF[indexPool[1]].iloc[-1]: sellAllFlag = True else: sellAllFlag = False sellSignalList.append(sellAllFlag) sdk.setGlobal('sellSignal', sellSignalList) # add sell signal to list if sellSignalList[-2] and sellSignalList[-1]: HoldingList = [i.code for i in sdk.getPositions()] quotes = sdk.getQuotes(HoldingList) stockToSell = HoldingList if stockToSell: sellAllStocks(sdk, stockToSell, quotes) else: # if sell-all function not triggered, normally trade today = sdk.getNowDate() dateList = sdk.getGlobal('dateList') #cutLoseList = cutLose(sdk, 0.13 , 5) # cut lose #quotes = sdk.getQuotes(cutLoseList) #if cutLoseList: # print cutLoseList # sellAllStocks(sdk, cutLoseList, quotes) if today in dateList: # if today is the last day of the month sdk.sdklog(sdk.getNowDate(), 'now') tempoPool = sdk.getGlobal('POOL') quotes = sdk.getQuotes(tempoPool) finalWeight = sdk.getGlobal('finalWeight') if len(finalWeight[finalWeight < 0]) > 0: # sell stocks with negative weights sellStocks(sdk, finalWeight, quotes) #sdk.setGlobal('StkCurrentlyHolding', [i.code for i in sdk.getPositions()]) if len(finalWeight[finalWeight > 0]) > 0: buyStocks(sdk, finalWeight, quotes) def main(): config = {'username': 'toriphy', 'password': '1991toriphy', 'rootpath': 'D:/cStrategy/', 'initCapitalStock': Init_Cap, 'startDate': Start_Date, 'endDate': End_Date, 'cycle': 1, 'executeMode': 'D', 'feeRate': 0.0015, 'feeLimit': 5, 'strategyName': '50+<API key>', 'logfile': 'ma.log', 'dealByVolume': True, 'memorySize': 5, 'initial': initial, 'preparePerDay': initPerDay, 'strategy': strategy} MiniSimulator(**config).run() if __name__ == "__main__": main()
published: true layout: post title: UnsafeSparkShuffleWriter category: spark tags: - java - spark time: 2016.11.03 22:40:00 excerpt: SparkUnsafeShuffleWriterShuffleWriterbytesJVM Spark1.4.1Lifetime Based Memory Manager for Distributed Data Processing Systems (PVLDB 2016) ## 1. Unsafe Javasun.misc.UnsafeUnsafe+Unsafe java // PlatformDependent.java Field unsafeField = Unsafe.class.getDeclaredField("theUnsafe"); unsafeField.setAccessible(true); unsafe = (sun.misc.Unsafe) unsafeField.get(null); SparkPlatFormDependentUNSAFEUNSAFEUnsafeUnsafePlatFormDependent.UNSAFEwriteread ## 2. ShuffleWriter SparkShuffleWriterRDDPartitionMapOutputTrackerBlockBlockJVMUnsafeShuffleWriter UnsafeShuffleWriterwrite scala // ShuffleMapTask.scala val manager = SparEnv.get.shuffleManager val writer = manager.getWriter writer.write(rdd.iterator(partition,context)) // UnsafeShuffleWriter.java write(scala.collection.Iterator<Product2<K,V>> records) ## 3. UnsafeShuffleWriter UnsafeShuffleWriterSortSpillUnsafeShuffleWriter -> <API key> -> PlatformDependent.UNSAFE UnsafeShuffleWriter - RDDUnsafeShuffleExternalSorter RDDrecordrecordrecordpartitionkeyvalueserOutputStreamsorter java // UnsafeShuffleWriter.java void <API key>(Product2<K, V> record) throws IOException { final K key = record._1(); final int partitionId = partitioner.getPartition(key); serBuffer.reset(); serOutputStream.writeKey(key, OBJECT_CLASS_TAG); serOutputStream.writeValue(record._2(), OBJECT_CLASS_TAG); serOutputStream.flush(); final int <API key> = serBuffer.size(); assert (<API key> > 0); // Invoke <API key>.java sorter.insertRecord( serBuffer.getBuf(), PlatformDependent.BYTE_ARRAY_OFFSET, <API key>, partitionId); } - shuffle IndexFileoffsetblockmap task java // UnsafeShuffleWriter.java void closeAndWriteOutput() throws IOException { serBuffer = null; serOutputStream = null; final SpillInfo[] spills = sorter.closeAndGetSpills(); sorter = null; final long[] partitionLengths; try { partitionLengths = mergeSpills(spills); } finally { for (SpillInfo spill : spills) { if (spill.file.exists() && ! spill.file.delete()) { logger.error("Error while deleting spill file {}", spill.file.getPath()); } } } <API key>.writeIndexFile(shuffleId, mapId, partitionLengths); mapStatus = MapStatus$.MODULE$.apply(blockManager.shuffleServerId(), partitionLengths); } <API key> UnsafeShuffleExternalSorterrecordrecordsorterpagecurrentPagecurrentPagePositionrecordrecordRecord(recordAddress, partitionId) java // <API key>.java final long recordAddress = memoryManager.<API key>(currentPage, currentPagePosition); final Object dataPageBaseObject = currentPage.getBaseObject(); PlatformDependent.UNSAFE.putInt(dataPageBaseObject, currentPagePosition, lengthInBytes); currentPagePosition += 4; <API key> -= 4; PlatformDependent.copyMemory( recordBaseObject, recordBaseOffset, dataPageBaseObject, currentPagePosition, lengthInBytes); currentPagePosition += lengthInBytes; <API key> -= lengthInBytes; // Invoke <API key>.java sorter.insertRecord(recordAddress, partitionId); UnsafeShuffleWriterHashShuffleWriterSortShuffleWritermapSideCombineUnsafeShuffleWriterUnsafeShuffleWriterKVmapSideCombineMapaggregatorVAggregationVNon-AggregationIterableUnsafeNon-AggregationV 1KV2ShuffleReader3UnsafeShuffleReaderShuffleReader Unsafeaggregator java // <API key>.java insertRecord() // new method to insert or update the record when the K has existed. <API key>() KKVVVaggregatorUnsafe K UnsafeShuffleExternalSorterisContain()keyKPage java // <API key>.java private boolean isContain( Object keyBaseObject, long keyBaseOffset, int keyLengthInBytes, int valueLengthInBytes) { final int hashcode = HASHER.hashBytesArray(keyBaseObject,keyBaseOffset, keyLengthInBytes); // locLocationKeyPage loc.pos = hashcode & mask; int step = 1; loc.hashcode = hashcode; while (true) { if(!bitset.isSet(loc.pos)) { // This is a new key. loc.setContain(false); return false; } else { long stored = longArray.get(loc.pos * 2 + 1); long fullKeyAddress = longArray.get(loc.pos * 2); if ((int) (stored) == hashcode) { // Full hash code matches. Let's compare the keys for equality. Object page = memoryManager.getPage(fullKeyAddress); long position = memoryManager.getOffsetInPage(fullKeyAddress); boolean isEqual = true; if(keyLengthInBytes +valueLengthInBytes != PlatformDependent.UNSAFE.getInt(page, position)){ isEqual =false; } else{ isEqual = ByteArrayMethods.<API key>(keyBaseObject,keyBaseOffset,page,position+4,keyLengthInBytes); } if (isEqual) { loc.setContain(true); loc.setFullKeyAddress(fullKeyAddress); loc.setPage(page); loc.setPosition(position); return true; } } } loc.pos = (loc.pos + step) & mask; step++; } } Vaggregator KKVKVVaggregator > 1. VAggregationreduceByKey > 2. VAggregationgroupBykey V VVIntLongArray[Int](10)V VUnsafecopyUNSAFEV ^_^
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.renderThumbStyle = renderThumbStyle; var BAR_MAP = exports.BAR_MAP = { vertical: { offset: 'offsetHeight', scroll: 'scrollTop', scrollSize: 'scrollHeight', size: 'height', key: 'vertical', axis: 'Y', client: 'clientY', direction: 'top' }, horizontal: { offset: 'offsetWidth', scroll: 'scrollLeft', scrollSize: 'scrollWidth', size: 'width', key: 'horizontal', axis: 'X', client: 'clientX', direction: 'left' } }; function renderThumbStyle(_ref) { var move = _ref.move, size = _ref.size, bar = _ref.bar; var style = {}; var translate = 'translate' + bar.axis + '(' + move + '%)'; style[bar.size] = size; style.transform = translate; style.msTransform = translate; style.WebkitTransform = translate; return style; }
package org.slieb.formatter; public enum Theme { EMPTY("empty"), GRAY("gray"); private final String name; Theme(String name) { this.name = name; } public String getName() { return name; } }
<div> <div class="phone-images"> <img ng-src="{{i}}" class="phone" ng-repeat="i in book.img" ng-class="{active:mainImageUrl==i}"> </div> <!-- <img ng-src="{{mainImageUrl}}" alt="" > --> <h2>{{book.title}}</h2> <p>{{book.summary}}</p> <ul class="detail-ul"> <li ng-repeat="i in book.img"> <img ng-src="{{i}}" alt="" ng-mouseenter="setImage(i)"> </li> </ul> </div>
package youtube import ( "errors" "os" "os/exec" "path/filepath" "strings" ) const ( // Specify the language subtitles are downloaded in // `youtube-dl --list` will produce the list of languages a video has // available subtitles for subLang string = "en" ) type Settings struct { ytExe string ffmpegExe string dlPath string } func NewSettings(yt, ffmpeg, dl string) (Settings, error) { // Check if the youtube-dl binary exists if _, err := os.Stat(yt); os.IsNotExist(err) { return Settings{}, err } // Check if the ffmpeg binary exists if _, err := os.Stat(ffmpeg); os.IsNotExist(err) { return Settings{}, err } // Check if the download folde exists if _, err := os.Stat(dl); os.IsNotExist(err) { // folder doesn't exist so create it err = os.MkdirAll(dl, 0755) if err != nil { // return if there is an error creating the folder return Settings{}, err } } // Make the struct with the new values out := Settings { yt, ffmpeg, dl, } return out, nil } type Downloader struct { link string uuid string subs bool settings Settings } func NewDownloader(link, uuid string, subs bool, settings Settings) *Downloader { return &Downloader{ link, uuid, subs, settings, } } // Returns title of video of the given link. func (d *Downloader) Title() (string, error) { args := []string{"--get-title", "--no-playlist", d.link} dl := exec.Command(d.settings.ytExe, args...) output, err := dl.Output() title := strings.TrimSpace(string(output)) return title, err } // Downloads video and returns filepath as string to downloaded video file. func (d *Downloader) Filepath() (string, error) { // Use output template to download to folder and set filename as UUID outputPath := d.settings.dlPath + "/" + d.uuid + `.%(ext)s` // Apply output path and ffmpeg location args := []string{"-o", outputPath, "--no-playlist", "--ffmpeg-location", d.settings.ffmpegExe} // Download and embed (non-autogenerated) youtube subtitles into the video if d.subs { args = append(args, []string{"--write-sub", "--sub-lang", subLang, "--embed-sub"}...) } // Add link args = append(args, d.link) dl := exec.Command(d.settings.ytExe, args...) err := dl.Run() if err != nil { // Return if any errors in downloading video return "", err } // The file extension for the new video is unknown, so perform a search of // the filename using a wildcard for the extension, if any. res, _ := filepath.Glob(d.settings.dlPath + "/" + d.uuid + "*") // No search results if len(res) < 1 { return "", errors.New("Cannot find downloaded video file: " + d.uuid) } // Return first search result return res[0], nil }
#include <math.h> #include <errno.h> #include <unistd.h> #include "ruby.h" #include "rubyspec.h" #ifdef __cplusplus extern "C" { #endif #ifdef <API key> static VALUE <API key>() { return rb_thread_alone() ? Qtrue : Qfalse; } #endif #pragma GCC diagnostic warning "-<API key>" #ifdef <API key> /* This is unblocked by unblock_func(). */ static VALUE blocking_func(void* data) { int rfd = (int)(size_t)data; char dummy; ssize_t rv; do { rv = read(rfd, &dummy, 1); } while (rv == -1 && errno == EINTR); return (rv == 1) ? Qtrue : Qfalse; } static void unblock_func(void *data) { int wfd = (int)(size_t)data; char dummy = 0; ssize_t rv; do { rv = write(wfd, &dummy, 1); } while (rv == -1 && errno == EINTR); } /* Returns true if the thread is interrupted. */ static VALUE <API key>(VALUE self) { int fds[2]; VALUE ret; if (pipe(fds) == -1) { return Qfalse; } SUPPRESS_DIAGNOSTIC("-<API key>", ret = <API key>(blocking_func, (void*)(size_t)fds[0], unblock_func, (void*)(size_t)fds[1]); ) close(fds[0]); close(fds[1]); return ret; } /* This is unblocked by a signal. */ static VALUE <API key>(void *data) { int rfd = (int)(size_t)data; char dummy; if (read(rfd, &dummy, 1) == -1 && errno == EINTR) { return Qtrue; } else { return Qfalse; } } /* Returns true if the thread is interrupted. */ static VALUE <API key>(VALUE self) { int fds[2]; VALUE ret; if (pipe(fds) == -1) { return Qfalse; } SUPPRESS_DIAGNOSTIC("-<API key>", ret = <API key>(<API key>, (void*)(size_t)fds[0], RUBY_UBF_IO, 0); ) close(fds[0]); close(fds[1]); return ret; } #endif #ifdef <API key> static VALUE <API key>() { return rb_thread_current(); } #endif #ifdef <API key> static VALUE <API key>(VALUE self, VALUE thr, VALUE sym) { return <API key>(thr, SYM2ID(sym)); } #endif #ifdef <API key> static VALUE <API key>(VALUE self, VALUE thr, VALUE sym, VALUE value) { return <API key>(thr, SYM2ID(sym), value); } #endif #ifdef <API key> static VALUE <API key>(VALUE self, VALUE fd_num, VALUE msec) { int fd = NUM2INT(fd_num); struct timeval tv; int n; fd_set read; FD_ZERO(&read); FD_SET(fd, &read); tv.tv_sec = 0; tv.tv_usec = NUM2INT(msec); SUPPRESS_DIAGNOSTIC("-<API key>", n = rb_thread_select(fd + 1, &read, NULL, NULL, &tv); ) if(n == 1 && FD_ISSET(fd, &read)) return Qtrue; return Qfalse; } static VALUE <API key>(VALUE self, VALUE msec) { struct timeval tv; tv.tv_sec = 0; tv.tv_usec = NUM2INT(msec); SUPPRESS_DIAGNOSTIC("-<API key>", rb_thread_select(0, NULL, NULL, NULL, &tv); ) return Qnil; } #endif #ifdef <API key> static VALUE <API key>(VALUE self, VALUE thr) { return rb_thread_wakeup(thr); } #endif #ifdef <API key> static VALUE <API key>(VALUE self, VALUE s, VALUE ms) { struct timeval tv; tv.tv_sec = NUM2INT(s); tv.tv_usec = NUM2INT(ms); rb_thread_wait_for(tv); return Qnil; } #endif void Init_thread_spec() { VALUE cls; cls = rb_define_class("CApiThreadSpecs", rb_cObject); #ifdef <API key> rb_define_method(cls, "rb_thread_alone", <API key>, 0); #endif #ifdef <API key> rb_define_method(cls, "<API key>", <API key>, 0); rb_define_method(cls, "<API key>", <API key>, 0); #endif #ifdef <API key> rb_define_method(cls, "rb_thread_current", <API key>, 0); #endif #ifdef <API key> rb_define_method(cls, "<API key>", <API key>, 2); #endif #ifdef <API key> rb_define_method(cls, "<API key>", <API key>, 3); #endif #ifdef <API key> rb_define_method(cls, "rb_thread_select_fd", <API key>, 2); rb_define_method(cls, "rb_thread_select", <API key>, 1); #endif #ifdef <API key> rb_define_method(cls, "rb_thread_wakeup", <API key>, 1); #endif #ifdef <API key> rb_define_method(cls, "rb_thread_wait_for", <API key>, 2); #endif } #ifdef __cplusplus } #endif
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_152-release) on Mon Dec 04 16:07:54 MST 2017 --> <title>UpdateHabit</title> <meta name="date" content="2017-12-04"> <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../script.js"></script> </head> <body> <script type="text/javascript"><! try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="UpdateHabit"; } } catch(err) { } var methods = {"i0":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar.top"> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-files/index-1.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../main/habitivity/interactions/SetHabits.html" title="class in main.habitivity.interactions"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../main/habitivity/interactions/UpdateHabitEvent.html" title="class in main.habitivity.interactions"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?main/habitivity/interactions/UpdateHabit.html" target="_top">Frames</a></li> <li><a href="UpdateHabit.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> </a></div> <div class="header"> <div class="subTitle">main.habitivity.interactions</div> <h2 title="Class UpdateHabit" class="title">Class UpdateHabit</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>main.habitivity.interactions.UpdateHabit</li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <hr> <br> <pre>public class <span class="typeNameLabel">UpdateHabit</span> extends java.lang.Object</pre> <div class="block">Interaction class to control updating the Habits</div> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="constructor.summary"> </a> <h3>Constructor Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><span class="memberNameLink"><a href="../../../main/habitivity/interactions/UpdateHabit.html#UpdateHabit-main.habitivity.habits.IHabitRepository-">UpdateHabit</a></span>(<a href="../../../main/habitivity/habits/IHabitRepository.html" title="interface in main.habitivity.habits">IHabitRepository</a>&nbsp;habitRepository)</code>&nbsp;</td> </tr> </table> </li> </ul> <ul class="blockList"> <li class="blockList"><a name="method.summary"> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../main/habitivity/interactions/UpdateHabit.html#update-java.lang.String-main.habitivity.habits.Habit-java.util.Date-java.lang.String-java.util.List-java.lang.String-">update</a></span>(java.lang.String&nbsp;id, <a href="../../../main/habitivity/habits/Habit.html" title="class in main.habitivity.habits">Habit</a>&nbsp;oldHabit, java.util.Date&nbsp;startDate, java.lang.String&nbsp;reason, java.util.List&lt;java.lang.Integer&gt;&nbsp;days, java.lang.String&nbsp;habitType)</code> <div class="block">Updates the current habit</div> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> </a> <h3>Methods inherited from class&nbsp;java.lang.Object</h3> <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="constructor.detail"> </a> <h3>Constructor Detail</h3> <a name="UpdateHabit-main.habitivity.habits.IHabitRepository-"> </a> <ul class="blockListLast"> <li class="blockList"> <h4>UpdateHabit</h4> <pre>public&nbsp;UpdateHabit(<a href="../../../main/habitivity/habits/IHabitRepository.html" title="interface in main.habitivity.habits">IHabitRepository</a>&nbsp;habitRepository)</pre> </li> </ul> </li> </ul> <ul class="blockList"> <li class="blockList"><a name="method.detail"> </a> <h3>Method Detail</h3> <a name="update-java.lang.String-main.habitivity.habits.Habit-java.util.Date-java.lang.String-java.util.List-java.lang.String-"> </a> <ul class="blockListLast"> <li class="blockList"> <h4>update</h4> <pre>public&nbsp;void&nbsp;update(java.lang.String&nbsp;id, <a href="../../../main/habitivity/habits/Habit.html" title="class in main.habitivity.habits">Habit</a>&nbsp;oldHabit, java.util.Date&nbsp;startDate, java.lang.String&nbsp;reason, java.util.List&lt;java.lang.Integer&gt;&nbsp;days, java.lang.String&nbsp;habitType)</pre> <div class="block">Updates the current habit</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>id</code> - of habit to update</dd> <dd><code>startDate</code> - of habit to update</dd> <dd><code>reason</code> - of habit to update</dd> <dd><code>days</code> - of habit to update</dd> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <div class="bottomNav"><a name="navbar.bottom"> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-files/index-1.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../main/habitivity/interactions/SetHabits.html" title="class in main.habitivity.interactions"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../main/habitivity/interactions/UpdateHabitEvent.html" title="class in main.habitivity.interactions"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?main/habitivity/interactions/UpdateHabit.html" target="_top">Frames</a></li> <li><a href="UpdateHabit.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> </a></div> </body> </html>
namespace Trains.Interfaces { <summary> Parser interface </summary> <typeparam name="TSource"></typeparam> <typeparam name="TTarget"></typeparam> public interface IGraphParser<in TSource,out TTarget> { <summary> Parse </summary> <param name="input"></param> <returns></returns> TTarget Parse(TSource input); } }
using System.Windows; using Noterium.ViewModels; namespace Noterium.Components.NoteMenu { <summary> Interaction logic for NoteMenu.xaml </summary> public partial class NoteMenu { public NoteMenu() { InitializeComponent(); } public NoteMenuViewModel Model => DataContext as NoteMenuViewModel; private void NoteMenu_OnLoaded(object sender, RoutedEventArgs e) { } } }
package com.highmaps.config import scalajs.js, js.`|` import com.highcharts.CleanJsObject import com.highcharts.HighchartsUtils._ /** * @note JavaScript name: <code><API key></code> */ @js.annotation.ScalaJSDefined class <API key> extends com.highcharts.<API key> { /** * <p>The position of the button.</p> */ val position: js.Any = js.undefined } object <API key> { /** * @param position <p>The position of the button.</p> */ def apply(position: js.UndefOr[js.Any] = js.undefined): <API key> = { val positionOuter: js.Any = position com.highcharts.<API key>.toCleanObject(new <API key> { override val position: js.Any = positionOuter }) } }
<?php namespace testtask\entitieslist\behaviors; use testtask\entitieslist\components\EavModel; use testtask\entitieslist\models\EavAttribute; use yii\base\Behavior; use yii\db\ActiveRecord; /** * Class EavBehavior * * @mixin ActiveRecord * @property EavModel $EavModel; * @property ActiveRecord $owner */ class EavBehavior extends Behavior { public $valueClass; public $attributeClass; protected $EavModel; public function events() { return [ ActiveRecord::EVENT_AFTER_INSERT => 'afterSave', ActiveRecord::EVENT_AFTER_UPDATE => 'afterSave', ]; } public function init() { assert(isset($this->valueClass)); assert(isset($this->valueClass)); } public function defineEavAttribute($name, $value) { $this->getEav()->{$name} = $value; } public function getLabel($attribute) { return EavAttribute::find()->select(['label'])->where(['name' => $attribute])->scalar(); } public function afterSave() { $this->getEav()->save(false); } public function getEav() { if(!($this->EavModel instanceof EavModel)) { $this->EavModel = EavModel::create([ 'entityModel' => $this->owner, 'valueClass' => $this->valueClass, 'attributeClass' => $this->attributeClass, ]); } return $this->EavModel; } }
package com.gps.capstone.traceroute; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.support.v7.app.AppCompatActivity; import android.view.MenuItem; import com.gps.capstone.traceroute.GLFiles.OpenGLActivity; import com.gps.capstone.traceroute.debugConsole.DebugConsole; import com.gps.capstone.traceroute.settings.PathManagerActivity; import com.gps.capstone.traceroute.settings.UserSettings; /** * This will hopefully help with code reduction and make it so we can * have common code for activities here */ public abstract class BasicActivity extends AppCompatActivity { // Tag for debugging private final String TAG = getClass().getSimpleName(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } /** * The menu is changing all the time so lets make it so we can have * all the possible cases here (Shouldn't be too many) */ @Override public boolean <API key>(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); // Depending on what the user clicks lets start that activity Intent i = null; switch (id) { case R.id.open_gl_view: i = new Intent(this, OpenGLActivity.class); break; case R.id.debug_console: i = new Intent(this, DebugConsole.class); break; case R.id.user_settings: i = new Intent(this, UserInfoActivity.class); break; case R.id.developer_settings: i = new Intent(this, UserSettings.class); break; case R.id.path_manager_action: i = new Intent(this, PathManagerActivity.class); break; } if (i != null) { // This disallows back press i.addFlags(Intent.<API key>); startActivity(i); return true; } return super.<API key>(item); } }
(function(){ 'use strict'; angular.module('subcategorias').service('SubCategoriaService', SubCategoriaService); function SubCategoriaService($http) { var urlBase = 'api/subcategorias/'; this.find = function(cat) { return $http.get(urlBase+cat._id); }; this.findOne = function(idSubCat) { return $http.get(urlBase+'get/'+idSubCat); }; } SubCategoriaService.$inject = ['$http']; angular.module.exports = SubCategoriaService; })();
const test = require('ava'); const { createUser, destroy, setup } = require('../../../../test/helpers/setup'); test.before(async t => { t.context.server = await setup({ usePlugins: false }); t.context.userObj = await createUser(t.context.server, { role: 'admin' }); t.context.auth = { strategy: 'session', credentials: t.context.userObj.session, artifacts: t.context.userObj.user }; t.context.headers = { cookie: 'crumb=abc', 'X-CSRF-Token': 'abc', referer: 'http://localhost' }; const resChart = await t.context.server.inject({ method: 'POST', url: '/v3/charts', auth: t.context.auth, headers: t.context.headers, payload: { metadata: { foo: 'Unpublished chart' } } }); t.context.chart = resChart.result; }); test.after.always(async t => { await destroy(...Object.values(t.context.userObj), t.context.publicChart, t.context.chart); }); test('POST /charts/{id}/unpublish resets chart properties', async t => { const { chart } = t.context; let res = await t.context.server.inject({ method: 'POST', url: `/v3/charts/${chart.id}/publish`, auth: t.context.auth, headers: t.context.headers }); t.is(res.statusCode, 200); res = await t.context.server.inject({ method: 'GET', url: `/v3/charts/${chart.id}`, auth: t.context.auth, headers: t.context.headers }); t.is(res.statusCode, 200); t.is(res.result.publicVersion, 1); t.is(res.result.lastEditStep, 5); t.truthy(res.result.publishedAt); res = await t.context.server.inject({ method: 'POST', url: `/v3/charts/${chart.id}/unpublish`, auth: t.context.auth, headers: t.context.headers }); t.is(res.statusCode, 204); res = await t.context.server.inject({ method: 'GET', url: `/v3/charts/${chart.id}`, auth: t.context.auth, headers: t.context.headers }); t.is(res.statusCode, 200); t.is(res.result.publicVersion, 0); t.is(res.result.lastEditStep, 4); t.is(res.result.publishedAt, null); });
import { getAssetPath } from '@stencil/core'; import { Icon } from './icon'; let CACHED_MAP: Map<string, string>; export const getIconMap = (): Map<string, string> => { if (typeof window === 'undefined') { return new Map(); } else { if (!CACHED_MAP) { const win = window as any; win.Ionicons = win.Ionicons || {}; CACHED_MAP = win.Ionicons.map = win.Ionicons.map || new Map(); } return CACHED_MAP; } }; export const addIcons = (icons: { [name: string]: string; }) => { const map = getIconMap(); Object.keys(icons).forEach(name => map.set(name, icons[name])); }; export const getUrl = (i: Icon) => { let url = getSrc(i.src); if (url) { return url; } url = getName(i.name, i.icon, i.mode, i.ios, i.md); if (url) { return getNamedUrl(url); } if (i.icon) { url = getSrc(i.icon); if (url) { return url; } url = getSrc(i.icon[i.mode]); if (url) { return url; } } return null; }; const getNamedUrl = (iconName: string) => { const url = getIconMap().get(iconName); if (url) { return url; } return getAssetPath(`svg/${iconName}.svg`); }; export const getName = ( iconName: string | undefined, icon: string | undefined, mode: string | undefined, ios: string | undefined, md: string | undefined ) => { // default to "md" if somehow the mode wasn't set mode = (mode && toLower(mode)) === 'ios' ? 'ios' : 'md'; // if an icon was passed in using the ios or md attributes // set the iconName to whatever was passed in if (ios && mode === 'ios') { iconName = toLower(ios); } else if (md && mode === 'md') { iconName = toLower(md); } else { if (!iconName && icon && !isSrc(icon)) { iconName = icon; } if (isStr(iconName)) { iconName = toLower(iconName); } } if (!isStr(iconName) || iconName.trim() === '') { return null; } // only allow alpha characters and dash const invalidChars = iconName.replace(/[a-z]|-|\d/gi, ''); if (invalidChars !== '') { return null; } return iconName; }; export const getSrc = (src: string | undefined) => { if (isStr(src)) { src = src.trim(); if (isSrc(src)) { return src; } } return null; }; export const isSrc = (str: string) => str.length > 0 && /(\/|\.)/.test(str); export const isStr = (val: any): val is string => typeof val === 'string'; export const toLower = (val: string) => val.toLowerCase(); /** * Elements inside of web components sometimes need to inherit global attributes * set on the host. For example, the inner input in `ion-input` should inherit * the `title` attribute that developers set directly on `ion-input`. This * helper function should be called in componentWillLoad and assigned to a variable * that is later used in the render function. * * This does not need to be reactive as changing attributes on the host element * does not trigger a re-render. */ export const inheritAttributes = (el: HTMLElement, attributes: string[] = []) => { const attributeObject: { [k: string]: any } = {}; attributes.forEach(attr => { if (el.hasAttribute(attr)) { const value = el.getAttribute(attr); if (value !== null) { attributeObject[attr] = el.getAttribute(attr); } el.removeAttribute(attr); } }); return attributeObject; }
import { Component, Input } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { NewsService } from './news/news.service'; import { News } from './news/news'; import { GlobalService } from './shared/global.service'; @Component({ selector: 'kcg-app', templateUrl: 'app.component.html', styleUrls: ['app.component.css'], providers: [NewsService] }) export class AppComponent { showNews = true; showSlideMenu = false; newsCount = 0; news: News[] = []; sub: any; public constructor(private route: ActivatedRoute, private newsService: NewsService, private globalService: GlobalService) { } showNowNews(idx: number) { return (this.newsCount % this.news.length) === idx; } getNews() { this.newsService .getNews() .subscribe( news => this.news = news, error => this.news = []); } ngOnInit() { this.getNews(); setInterval(() => { if(this.showNews) { this.newsCount++ } }, 3000); } }
// <API key>.h // DevelopmentApp #import <Foundation/Foundation.h> #import <CompositeOperations/COSequence.h> @interface <API key> : NSObject <COSequence> - (id)initWithGithubUser:(NSString *)user; - (id)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @end
# AAHC # Another Android HTTP Client ## FEATURES * Simple * It uses HttpURLConnection (cfg [Marshmallow behavior changes](https://developer.android.com/preview/behavior-changes.html#<API key>) ) * Handle BIG Files very well * Progress handler * Use a Pool (default 4 threads) to optimize/parallelize network requests * No Cache (maybe an ANTIFEATURE, but not for me) ## STATUS ___ALPHA___ Used in internal projects ## EXAMPLES To Fetch an URL and put the content into a String java AAHC .use(this) .toGet("http://aahc.fluidware.it/") .into( new StringResponse() { @Override public void done(String str) { // str contains URL body } } ); _Quite easy, isnt'it?_ To Fetch an URL and put the content into a JSONObject java AAHC .use(this) .toGet("http://aahc.fluidware.it/api/v1/data.json") .into( new JSONObjectResponse() { @Override public void done(JSONObject json) { // json is the JSONObject fetched } } ); [See more example](https://github.com/macno/aahc/wiki/Examples) ## TODO * ~~handle 3xx responses~~ Done v 0.1.0 * handle 4xx and 5xx responses _partially done - suggestions welcomed_ * ~~post methods~~ Done v 0.1.0 * ~~head methods~~ Done v 0.1.0 * delete methods * put methods * patch methods ## FAQ * __Do we really need it?__ Well, I think so.
<?php namespace App\Notification; use App\Entity\Contact; use Exception; use Symfony\Component\Mailer\MailerInterface; use Symfony\Component\Mime\Email; use Symfony\Bridge\Twig\Mime\TemplatedEmail; class ContactNotification { private $mailer; private $templatedEmail; public function __construct(MailerInterface $mailer) { $this->mailer = $mailer; } public function Notify(Contact $Contact, $template){ try{ $email = (new TemplatedEmail()) ->from('no-reply@proweb-artois.fr') ->to($Contact->getEmail()) //->cc('cc@example.com') //->bcc('bcc@example.com') //->replyTo('fabien@example.com') ->priority(Email::PRIORITY_HIGH) ->subject("Demande ".$Contact->getCategory()." du ".date_format($Contact->getCreatedAt(),'d/m/Y')) ->context([ 'contact' => $Contact, ]) ->embedFromPath('assets/images/logo.png', 'logo') ->htmlTemplate($template); $a=$this->mailer->send($email); return true; } catch(Exception $e){ dump($e->getMessage());exit; return false; } } } ?>
export default { key: 'E', suffix: '9b5', positions: [ { frets: '1221', fingers: '1221', barres: [1, 2], capo: true }, { frets: '3645', fingers: '1423' }, { frets: '7869', fingers: '2314' }, { frets: 'baab', fingers: '2113', barres: 10, capo: true } ] };
package com.sblog.repositories; import java.util.List; import com.sblog.beans.Tag; public interface ITagRepository { boolean existsById(String id); boolean exists(String name); boolean create(Tag tag); boolean delete(String id); List<Tag> getAllTag(); Tag getByName(String name); List<Tag> getByPost(String postId); }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="generator" content="rustdoc"> <meta name="description" content="API documentation for the Rust `XKB_KEY_KP_End` constant in crate `wayland_kbd`."> <meta name="keywords" content="rust, rustlang, rust-lang, XKB_KEY_KP_End"> <title>wayland_kbd::keysyms::XKB_KEY_KP_End - Rust</title> <link rel="stylesheet" type="text/css" href="../../main.css"> </head> <body class="rustdoc"> <!--[if lte IE 8]> <div class="warning"> This old browser is unsupported and will most likely display funky things. </div> <![endif] <section class="sidebar"> <p class='location'><a href='../index.html'>wayland_kbd</a>::<wbr><a href='index.html'>keysyms</a></p><script>window.sidebarCurrent = {name: 'XKB_KEY_KP_End', ty: 'constant', relpath: ''};</script><script defer src="sidebar-items.js"></script> </section> <nav class="sub"> <form class="search-form js-only"> <div class="search-container"> <input class="search-input" name="search" autocomplete="off" placeholder="Click or press 'S' to search, '?' for more options..." type="search"> </div> </form> </nav> <section id='main' class="content constant"> <h1 class='fqn'><span class='in-band'><a href='../index.html'>wayland_kbd</a>::<wbr><a href='index.html'>keysyms</a>::<wbr><a class='constant' href=''>XKB_KEY_KP_End</a></span><span class='out-of-band'><span id='render-detail'> <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs"> [<span class='inner'>&#x2212;</span>] </a> </span><a id='src-251' class='srclink' href='../../src/wayland_kbd/ffi/keysyms.rs.html#225' title='goto source code'>[src]</a></span></h1> <pre class='rust const'>pub const XKB_KEY_KP_End: <a href='http://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a><code> = </code><code>0xff9c</code></pre></section> <section id='search' class="content hidden"></section> <section class="footer"></section> <div id="help" class="hidden"> <div class="shortcuts"> <h1>Keyboard shortcuts</h1> <dl> <dt>?</dt> <dd>Show this help dialog</dd> <dt>S</dt> <dd>Focus the search field</dd> <dt>&larrb;</dt> <dd>Move up in search results</dd> <dt>&rarrb;</dt> <dd>Move down in search results</dd> <dt>&#9166;</dt> <dd>Go to active search result</dd> </dl> </div> <div class="infos"> <h1>Search tricks</h1> <p> Prefix searches with a type followed by a colon (e.g. <code>fn:</code>) to restrict the search to a given type. </p> <p> Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>typedef</code> (or <code>tdef</code>). </p> <p> Search functions by type signature (e.g. <code>vec -> usize</code>) </p> </div> </div> <script> window.rootPath = "../../"; window.currentCrate = "wayland_kbd"; window.playgroundUrl = ""; </script> <script src="../../jquery.js"></script> <script src="../../main.js"></script> <script async src="../../search-index.js"></script> </body> </html>
package org.xcolab.view.pages.proposals.impact; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.xcolab.client.contest.<API key>; import org.xcolab.client.contest.pojo.wrapper.ContestWrapper; import org.xcolab.client.contest.pojo.wrapper.FocusAreaWrapper; import org.xcolab.client.contest.pojo.wrapper.OntologyTermWrapper; import org.xcolab.client.contest.pojo.wrapper.ProposalWrapper; import org.xcolab.client.contest.proposals.enums.ImpactSeriesType; import org.xcolab.view.pages.proposals.exceptions.<API key>; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; /** * This class is used to parse inline proposal impact data (tab-separated Excel string) to a * <API key> object. * * Used for the IAF fellow impact series edit feature */ public class <API key> { private static final Logger _log = LoggerFactory.getLogger(<API key>.class); private static final String <API key> = "Business as usual"; private static final String <API key> = "emission reduction"; private static final String <API key> = "Adoption rate"; private static final String <API key> = "Estimated CO2 reduction"; private static final String[] excelSeriesTypeKeys = {<API key>, <API key>, <API key>, <API key>}; private static final Map<String, String> <API key>; private static final Map<String, String> <API key>; static { <API key> = new HashMap<>(); <API key>.put("Transport", "Transportation"); <API key>.put("EnergySupply", "Energy supply"); <API key>.put("Other", "Land use & other sectors"); <API key> .put("All other developed countries", "Other developed countries"); <API key> .put("All other developing countries", "Other developing countries"); } static { <API key> = new HashMap<>(excelSeriesTypeKeys.length); <API key>.put(<API key>, <API key>.SERIES_TYPE_BAU_KEY); // we don't need this one <API key> .put(<API key>, ImpactSeriesType.IMPACT_REDUCTION.name()); <API key>.put(<API key>, ImpactSeriesType.<API key>.name()); <API key> .put(<API key>, ""); // we don't need this one } private final String tabSeparatedString; private final ProposalWrapper proposal; private final ContestWrapper contest; /** * Creates a new <API key> object with the input String (tab-separated string * copy-pasted from Excel) and the Contest of the proposal in question. */ public <API key>(String tabSeparatedString, ProposalWrapper proposal, ContestWrapper contest) { this.tabSeparatedString = tabSeparatedString; this.proposal = proposal; this.contest = contest; } public <API key> parse() throws <API key> { String[] inputLines = getLines(tabSeparatedString); List<String> <API key> = <API key>(inputLines); List<Long> iterationYears = <API key>(inputLines); return parseExcelData(Arrays.copyOfRange(inputLines, 2, inputLines.length), <API key>, iterationYears); } private List<String> <API key>(String[] inputLines) throws <API key> { if (ArrayUtils.isEmpty(inputLines)) { return null; } String headLine = inputLines[0]; List<String> seriesTypes = new ArrayList<>(); for (String headLineColumn : getTabbedStrings(headLine)) { // Ignore empty columns (tabs) if (headLineColumn != null) { // Try to match excelSeriesType from input boolean foundMatch = false; for (Map.Entry<String, String> entry : <API key>.entrySet()) { if (headLineColumn.contains(entry.getKey())) { String seriesType = entry.getValue(); seriesTypes.add(seriesType); foundMatch = true; break; } } if (!foundMatch) { throw new <API key>( "Could not match data column '" + headLineColumn + "'"); } } } return seriesTypes; } private String[] getTabbedStrings(String inputLine) { return inputLine.split("\\t", -1); } private List<Long> <API key>(String[] inputLines) { if (ArrayUtils.isEmpty(inputLines)) { return null; } String iterationYearLine = inputLines[1]; List<Long> iterationYears = new ArrayList<>(); for (String iterationYearColumn : getTabbedStrings(iterationYearLine)) { // Ignore empty columns (tabs) if (iterationYearColumn != null) { try { long iterationYear = Long.parseLong(iterationYearColumn); // Ignore duplicates if (iterationYears.contains(iterationYear)) { break; } iterationYears.add(iterationYear); } catch (<API key> e) { _log.error("Could not parse string to iteration year '{}' of line 1 '{}'", iterationYearColumn, iterationYearLine, e); throw e; } } } return iterationYears; } private <API key> parseExcelData(String[] inputLines, List<String> <API key>, List<Long> iterationYears) throws <API key> { <API key> seriesList = new <API key>(this.contest, this.proposal); ProposalImpactUtil proposalImpactUtil = new ProposalImpactUtil(contest); OntologyTermWrapper regionTerm = null; int inputLineNumber = 2; for (String inputLine : inputLines) { String[] dataStrings = getTabbedStrings(inputLine); // We need at least the region+sector and one full iteration of years if (ArrayUtils.isNotEmpty(dataStrings) && dataStrings.length >= 2 + iterationYears .size()) { OntologyTermWrapper sectorTerm; try { // Some of the first columns are empty - use old region term instead if (dataStrings[0] != null) { regionTerm = <API key>(dataStrings[0]); } sectorTerm = <API key>(dataStrings[1]); } catch (<API key> e) { _log.error("{} on line {}", e.getMessage(), inputLineNumber); throw new <API key>(e); } FocusAreaWrapper focusArea = proposalImpactUtil.<API key>(sectorTerm, regionTerm); <API key> <API key> = new <API key>(contest, proposal, focusArea); // Write the new impact series values for (int idx = 2; idx < dataStrings.length; idx++) { String dataString = dataStrings[idx]; String currentSeriesType = <API key>.get(((idx - 2) / iterationYears.size())); // If the seriesType is not set we just ignore all upcoming values if (currentSeriesType == null) { idx += iterationYears.size() - 1; continue; } // Empty lines are not tolerated - abort if (dataString == null) { throw new <API key>( "Empty data column detected in line '" + inputLine); } long year = iterationYears.get((idx - 2) % iterationYears.size()); try { <API key>(<API key>, ImpactSeriesType.valueOf(currentSeriesType), year, dataString); } catch (<API key> e) { _log.error("Could not parse string '{}' on line {} to double value", dataString, inputLineNumber); throw new <API key>( "\"Could not parse string '" + dataString + "' to double value\"", e); } catch (<API key> e) { _log.error("Input Line {}: {}", inputLineNumber, e.getMessage()); throw e; } } seriesList.<API key>(<API key>); } else { throw new <API key>( "Could not parse data line '" + StringUtils.join(dataStrings, ",") + "'; line too short"); } inputLineNumber++; } return seriesList; } private void <API key>(<API key> <API key>, ImpactSeriesType seriesType, long year, String valueString) throws <API key> { double value = parseDataValue(seriesType, valueString); <API key>.<API key>(seriesType, (int) year, value); } private double parseDataValue(ImpactSeriesType seriesType, String valueString) throws <API key> { // Remove comma-thousand separators String decimalStringValue = valueString.replaceAll(",", ""); // percentage value if (decimalStringValue.contains("%")) { double value = Double.parseDouble( decimalStringValue.substring(0, decimalStringValue.length() - 1)); if (value < 0 || value > 100) { throw new <API key>( "Percentage value '" + value + "' out of bounds!"); } return value; } else { double value = Double.parseDouble(decimalStringValue); // Interpret impact reduction and adoption values as ratios if ((seriesType.equals(ImpactSeriesType.IMPACT_REDUCTION) || seriesType.equals(ImpactSeriesType.<API key>))) { return value * 100.; // impact reduction and adoption rate values are stored as percentage values (0-100%) } else { return value; } } } private OntologyTermWrapper <API key>(String name) throws <API key> { // Use mapped name value if it exists if (<API key>.get(name) != null) { name = <API key>.get(name); } List<OntologyTermWrapper> ontologyTerms = <API key>.getOntologyClient() .<API key>(name); if (ontologyTerms == null || ontologyTerms.isEmpty()) { throw new <API key>( "Could not match ontology term with name '" + name + "'"); } return ontologyTerms.get(0); } private String[] getLines(String inputLines) { return inputLines.split("\\n", -1); } }
package ExV4; import java.util.Scanner; public class ExV4 { public static void main(String[] args) { // TODO Auto-generated method stub @SuppressWarnings("resource") Scanner s = new Scanner(System.in); double m; double r; double r2; double r3; System.out.print("quantidade de reais: "); m = s.nextDouble(); r= m *1.80; r2 = m *2.0; r3 = m *1.57; System.out.print("\t Valor em dólar: "+r); System.out.print("\tValor em marco alemão: "+r2 ); System.out.print("\tValor em libra esterlina: "+r3); } }
using System; using System.Collections.Generic; using System.Linq; using System.Web; <summary> TODO: Make new Model for the Categories! </summary> namespace Skoodle.Models { public class Topic { public int ID { get; set; } public string Name { get; set; } public virtual Cathegory Category { get; set; } public byte[] Image { get; set; } } }
<?php /** * ALIPAY API: koubei.marketing.campaign.activity.offline request * * @author auto create * @since 1.0, 2017-08-07 18:10:20 */ class <API key> { private $bizContent; private $apiParas = array(); private $terminalType; private $terminalInfo; private $prodCode; private $apiVersion="1.0"; private $notifyUrl; private $returnUrl; private $needEncrypt=false; public function setBizContent($bizContent) { $this->bizContent = $bizContent; $this->apiParas["biz_content"] = $bizContent; } public function getBizContent() { return $this->bizContent; } public function getApiMethodName() { return "koubei.marketing.campaign.activity.offline"; } public function setNotifyUrl($notifyUrl) { $this->notifyUrl=$notifyUrl; } public function getNotifyUrl() { return $this->notifyUrl; } public function setReturnUrl($returnUrl) { $this->returnUrl=$returnUrl; } public function getReturnUrl() { return $this->returnUrl; } public function getApiParas() { return $this->apiParas; } public function getTerminalType() { return $this->terminalType; } public function setTerminalType($terminalType) { $this->terminalType = $terminalType; } public function getTerminalInfo() { return $this->terminalInfo; } public function setTerminalInfo($terminalInfo) { $this->terminalInfo = $terminalInfo; } public function getProdCode() { return $this->prodCode; } public function setProdCode($prodCode) { $this->prodCode = $prodCode; } public function setApiVersion($apiVersion) { $this->apiVersion=$apiVersion; } public function getApiVersion() { return $this->apiVersion; } public function setNeedEncrypt($needEncrypt) { $this->needEncrypt=$needEncrypt; } public function getNeedEncrypt() { return $this->needEncrypt; } }
<?php // Moodle is free software: you can redistribute it and/or modify // (at your option) any later version. // Moodle is distributed in the hope that it will be useful, // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the defined('MOODLE_INTERNAL') || die(); $plugin->component = 'mod_neurok'; $plugin->version = 2015101300; $plugin->release = 'v0.0'; $plugin->requires = 2013111800; $plugin->maturity = MATURITY_ALPHA; $plugin->cron = 0; $plugin->dependencies = array();
module Diamond (diamond) where diamond :: Char -> Maybe [String] diamond = error "You need to implement this function"
{% extends '../layouts/template.html' %} {% block title %}Check your State Pension - {{mvpversion}}{% endblock %} {% block serviceName %}Check your State Pension{% endblock %} {% block main %} <a href="javascript:window.history.back();" class="example-back-link">Back</a> <div class="grid-row"> <div class="column-two-thirds"> <h1 class="heading-xlarge" style="margin: 1em 0 0"> <h2 class="heading-large">Gaps in your National Insurance record</h2> <p><a href="#">View all years</a></p> <!--<table><tr style="border: #5;"><td style width="80px"><a href="">Change date <br>order</a></td><td><a href="">Order gaps by cost</a></td></tr></table>--> <dl class="accordion2"> <!-- 2014 --> <dt> <div class="ni-wrapper"> <div class="ni-years2">2016-17</div> <div class="ni-full">Your record for this year is not available yet</div> </div> </dt> <dt> <div class="ni-wrapper"> <div class="ni-years2">2013-14</div> <div class="ni-notfull">Year is not full</div> <div class="ni-action"><a href="#">View details</a></div> </div> </dt> <dd> <div class="<API key>"> <div class="panel-indent" style="margin-top: 0"><p>We are checking this year to see if it counts towards your pension. We'll update your record when this is finished, you do not need to do anything.</p></div> </div> </dd> <!-- year end --> <!-- 2007 --> <!-- gap 4 --> <dt> <div class="ni-wrapper"> <div class="ni-years2">2006-07</div> <div class="ni-notfull">Year is not full</div> <div class="ni-action"><a href="#">View details</a></div> </div> </dt> <dd> <div class="<API key>"> <p class="<API key>">You did not make any contributions this year</p> <p>Find out more about <a href="ni-check">gaps in your record and how to check them</a>.</p> <div class="panel-indent"> <p>It's too late to pay for this year. You can usually only pay for the last 6 years.</p> </div> </div> </dd> <!-- gap 5 --> <dt> <div class="ni-wrapper"> <div class="ni-years2">2005-06</div> <div class="ni-notfull">Year is not full</div> <div class="ni-action"><a href="#">View details</a></div> </div> </dt> <dd> <div class="<API key>"> <p class="<API key>">You did not make any contributions this year</p> <p>Find out more about <a href="ni-record-check">gaps in your record and how to check them</a>.</p> <div class="panel-indent"> <p>It's too late to pay for this year. You can usually only pay for the last 6 years.</p> </div> </div> </dd> <!-- gap 5 --> <dt> <div class="ni-wrapper"> <div class="ni-years2">2004-05</div> <div class="ni-notfull">Year is not full</div> <div class="ni-action"><a href="#">View details</a></div> </div> </dt> <dd> <div class="<API key>"> <p class="<API key>">You did not make any contributions this year</p> <p>Find out more about <a href="ni-record-check">gaps in your record and how to check them</a>.</p> <div class="panel-indent"> <p>It's too late to pay for this year. You can usually only pay for the last 6 years.</p> </div> </div> </dd> <!-- gap 5 --> <dt> <div class="ni-wrapper"> <div class="ni-years2">2003-04</div> <div class="ni-notfull">Year is not full</div> <div class="ni-action"><a href="#">View details</a></div> </div> </dt> <dd> <div class="<API key>"> <p class="<API key>">You did not make any contributions this year</p> <p>Find out more about <a href="ni-record-check">gaps in your record and how to check them</a>.</p> <div class="panel-indent"> <p>It's too late to pay for this year. You can usually only pay for the last 6 years.</p> </div> </div> </dd> <!-- gap 5 --> <dt> <div class="ni-wrapper"> <div class="ni-years2">2002-03</div> <div class="ni-notfull">Year is not full</div> <div class="ni-action"><a href="#">View details</a></div> </div> </dt> <dd> <div class="<API key>"> <p class="<API key>">You did not make any contributions this year</p> <p>Find out more about <a href="ni-record-check">gaps in your record and how to check them</a>.</p> <div class="panel-indent"> <p>It's too late to pay for this year. You can usually only pay for the last 6 years.</p> </div> </div> </dd> <!-- gap 5 --> <dt> <div class="ni-wrapper"> <div class="ni-years2">2001-02</div> <div class="ni-notfull">Year is not full</div> <div class="ni-action"><a href="#">View details</a></div> </div> </dt> <dd> <div class="<API key>"> <p class="<API key>">You did not make any contributions this year</p> <p>Find out more about <a href="ni-record-check">gaps in your record and how to check them</a>.</p> <div class="panel-indent"> <p>It's too late to pay for this year. You can usually only pay for the last 6 years.</p> </div> </div> </dd> <!-- gap 5 --> <dt> <div class="ni-wrapper"> <div class="ni-years2">2000-01</div> <div class="ni-notfull">Year is not full</div> <div class="ni-action"><a href="#">View details</a></div> </div> </dt> <dd> <div class="<API key>"> <p class="<API key>">You did not make any contributions this year</p> <p>Find out more about <a href="ni-record-check">gaps in your record and how to check them</a>.</p> <div class="panel-indent"> <p>It's too late to pay for this year. You can usually only pay for the last 6 years.</p> </div> </div> </dd> <!-- gap 5 --> <dt> <div class="ni-wrapper"> <div class="ni-years2">1999-2000</div> <div class="ni-notfull">Year is not full</div> <div class="ni-action"><a href="#">View details</a></div> </div> </dt> <dd> <div class="<API key>"> <p class="<API key>">You did not make any contributions this year</p> <p>Find out more about <a href="ni-record-check">gaps in your record and how to check them</a>.</p> <div class="panel-indent"> <p>It's too late to pay for this year. You can usually only pay for the last 6 years.</p> </div> </div> </dd> <!-- gap 5 --> <dt> <div class="ni-wrapper"> <div class="ni-years2">1998-99</div> <div class="ni-notfull">Year is not full</div> <div class="ni-action"><a href="#">View details</a></div> </div> </dt> <dd> <div class="<API key>"> <p class="<API key>">You did not make any contributions this year</p> <p>Find out more about <a href="ni-record-check">gaps in your record and how to check them</a>.</p> <div class="panel-indent"> <p>It's too late to pay for this year. You can usually only pay for the last 6 years.</p> </div> </div> </dd> </dl> <a href="javascript:window.history.back();" class="example-back-link">Back</a> </div><!-- /.column-two-thirds --> <div class="column-third"> <div class="related" id="related"> <div class="inner group related-subsection"> {% include './ni_side_bar_mqp.html' %} </div> </div> </div> <!-- /.column-third --> </div><!-- /.grid-row --> </div><!-- /.grid-row --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script type="text/javascript"> // $(document).ready(function(){ // var allPanels = $('.accordion > dd').hide(); // $('.accordion > dt').click(function(){ // if(!$(this).parent().parent().hasClass("active")){ // // allPanels.prev().removeClass("active"); // $(this).parent().parent().addClass("active"); // // $(this).parent().parent().next().slideDown(); // return false; // }else{ // $(this).parent().parent().removeClass("active"); // return false; var allPanels = $('.accordion2 > dd').hide(), allHeaders = $('.accordion2 > dt'); $('.accordion2 > dt').click(function() { // $(this).parent().children("dd") // // .hide() // // .removeClass('active'); // $(this).parent().children("dt") // .children('span') // .removeClass('down'); if(!$(this).hasClass('active')) { // $(this).parent().children("dt") // .removeClass('active'); $(this) .addClass('active') .next() .show(); $(this).find("a").text("Hide details"); $(this) .children('span') .addClass('down'); } else{ $(this) .removeClass('active') .next() .hide(); $(this).find("a").text("View details"); } return false; }); </script> {% endblock %}
/** * \file reseau.h * \brief Fichier de gestion reseau pour l'envoi et reception de scores en ligne. * \author Demingeon Cyril */ #include <windows.h> #include <curl.h> #include <stdio.h> #include <stdlib.h> #include <string.h> char* url="http://ogizanagi.fr/dk/dk.php"; // new url size_t writer( char* ptr, size_t size, size_t nmemb, char **userdata); int score_send(char* name,char* score); char* encode(char* a,char* b); void <API key>(SDL_Surface *ecran, Menustruct *GestionMenus); int score_get(){ CURL *curl; CURLcode res; FILE* score; if( remove( "score.txt" ) != 0 ) printf( "Error deleting file\n" ); if((score = fopen( "score.txt", "w+"))==NULL){ printf("Couldn't open score.txt"); MessageBox(0,"Couldn't open score.txt", "Error", MB_OK ); return 1; } curl = curl_easy_init();//on initialise Curl pour l'envois if(curl)//si il est bien initialis... { curl_easy_setopt(curl, CURLOPT_URL, url);//url des scores /* Now specify the POST data */ curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "str=1"); //specifie the output curl_easy_setopt(curl, <API key>, fwrite); curl_easy_setopt(curl, CURLOPT_WRITEDATA, score); /* Perform the request, res will get the return code */ if((res = curl_easy_perform(curl))!=0){ printf("Error in request:\n"); printf("%s",curl_easy_strerror(res)); MessageBox(0,"Error in request:\nServer Unreachable", "Error", MB_OK ); }else{ //si le score bien t envoy //(le rsultat contient uploaded ou updated) printf("Score loaded\n"); fclose(score); return 0; } /* always cleanup */ curl_easy_cleanup(curl); }else{ printf("Couldn't load curl"); MessageBox(0,"Couldn't load curl", "Error", MB_OK ); } fclose(score); return 1; } int score_send(char* name,char* score) { CURL *curl; CURLcode res; char* crypted=encode(name,score); char data[120]="name="; char *buffer = NULL; char *Score_Updated = "checksum valid =>Score Updated"; char *Score_Uploaded = "checksum valid =>Score Uploaded"; //on construit la requte POST strcat(data,name); strcat(data,"&score="); strcat(data,score); strcat(data,"&checksum="); strcat(data,crypted); //affichage de la requete pour le debug ... printf("Sending...\n"); curl = curl_easy_init();//on initialise Curl pour l'envois if(curl)//si il est bien initialis... { curl_easy_setopt(curl, CURLOPT_URL, url);//url des scores /* Now specify the POST data */ curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data); //specifie the output curl_easy_setopt(curl, <API key>, writer); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &buffer); /* Perform the request, res will get the return code */ if((res = curl_easy_perform(curl))!=0){ printf("Error in request:\n"); printf("%s",curl_easy_strerror(res)); MessageBox(0,"Error in request, could not upload score", "Error in request", MB_OK ); }else{ //si le score bien t envoy //(le rsultat contient uploaded ou updated) printf("Result:\n /*if(strcmp(buffer, Score_Updated)!=0 && strcmp(buffer, Score_Uploaded)!=0)//si l'upload n'a pas march MessageBox(0,buffer, "score error", MB_OK );//on affiche une popup d'erreur. */ return 0; } /* always cleanup */ curl_easy_cleanup(curl); }else{ MessageBox(0,buffer, "Unable to load curl :S", MB_OK ); } return 1; } //what we write-length times we write where we write size_t writer( char* ptr, size_t size, size_t nmemb, char **userdata) { int length=size*nmemb,i; *userdata=(char* ) realloc(userdata,length); *userdata=ptr; userdata[length]='\0'; return length; } char* encode(char* a,char* b){ char* swap; char tmp,retour[20]; int i; //si a est plus long que b on inverse if(strlen(b)>strlen(a)){ swap=a; a=b; b=swap; } /* initialize random seed: */ srand ( time(NULL) ); //on remplis de random chars for(i=0;i<20;i++){ tmp=rand()%26+97; retour[i]=tmp; } //on cr le checksum for(i=0;i<strlen(a);i++){//pour chaque chars du plus grand tmp=((int) ((int) a[i]+7)^((int) b[i%strlen(b)]-7))%26+97;//on fait un xor avec quelques chiffres speciaux... retour[i%20]=tmp;//on insere dans retour } retour[20]='\0';//on rajoute le caractre de fin de chaine return retour; } void <API key>(SDL_Surface *ecran, Menustruct *GestionMenus) { FILE* score; int numb=0; TTF_Font *police= TTF_OpenFont("arial.ttf", 17); SDL_Color couleurNoire{0,0,0}; char name[40];//les nom seront inscrit ici unsigned int value;//les scores l char score_char[11]; score_get(); if((score = fopen( "score.txt", "r"))==NULL){//on ouvre le fichier des scores //MessageBox(0,"Couldn't open score.txt", "Error", MB_OK ); printf("Couldn't open score.txt"); return ; } rewind(score); SDL_BlitSurface(GestionMenus->Menu, NULL, ecran, &GestionMenus->positionMenu); while(!feof(score)){ fscanf(score,"%s %u\n", name, &value); sprintf(score_char, "%d", value);//converion int to char SDL_Surface *Score_surf= <API key>(police, score_char, couleurNoire);//on crer la structure pour le score SDL_Surface *Name= <API key>(police, name, couleurNoire);//idem pour le nom SDL_Rect positionName{413,231+numb*26.7}; SDL_Rect positionScore{760,231+numb*26.7}; numb++; SDL_BlitSurface(Name, NULL, ecran, &positionName); SDL_BlitSurface(Score_surf, NULL, ecran, &positionScore); printf("Player: %s make score: %d\n",name,value); SDL_FreeSurface(Score_surf); SDL_FreeSurface(Name); } fclose(score); }
package ch.qos.logback.core.sift; import org.junit.runner.RunWith; import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; @RunWith(Suite.class) @SuiteClasses({AppenderTrackerTest.class}) public class PackageTest { }
#pragma warning disable 1591 // <auto-generated> // This code was generated by a tool. // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> [assembly: global::Android.Runtime.<API key>("MonkeySays.Droid.Resource", IsApplication=true)] namespace MonkeySays.Droid { [System.CodeDom.Compiler.<API key>("Xamarin.Android.Build.Tasks", "1.0.0.0")] public partial class Resource { static Resource() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } public static void UpdateIdValues() { global::CustomBalloon.Resource.Attribute.accentColor = global::MonkeySays.Droid.Resource.Attribute.accentColor; global::CustomBalloon.Resource.Attribute.balloonColor = global::MonkeySays.Droid.Resource.Attribute.balloonColor; global::CustomBalloon.Resource.Attribute.showEmoji = global::MonkeySays.Droid.Resource.Attribute.showEmoji; global::CustomBalloon.Resource.Attribute.text = global::MonkeySays.Droid.Resource.Attribute.text; global::CustomBalloon.Resource.Attribute.textColor = global::MonkeySays.Droid.Resource.Attribute.textColor; global::CustomBalloon.Resource.Attribute.textSize = global::MonkeySays.Droid.Resource.Attribute.textSize; global::CustomBalloon.Resource.Attribute.triangleHeight = global::MonkeySays.Droid.Resource.Attribute.triangleHeight; global::CustomBalloon.Resource.Styleable.MyBalloonView = global::MonkeySays.Droid.Resource.Styleable.MyBalloonView; global::CustomBalloon.Resource.Styleable.<API key> = global::MonkeySays.Droid.Resource.Styleable.<API key>; global::CustomBalloon.Resource.Styleable.<API key> = global::MonkeySays.Droid.Resource.Styleable.<API key>; global::CustomBalloon.Resource.Styleable.<API key> = global::MonkeySays.Droid.Resource.Styleable.<API key>; global::CustomBalloon.Resource.Styleable.MyBalloonView_text = global::MonkeySays.Droid.Resource.Styleable.MyBalloonView_text; global::CustomBalloon.Resource.Styleable.<API key> = global::MonkeySays.Droid.Resource.Styleable.<API key>; global::CustomBalloon.Resource.Styleable.<API key> = global::MonkeySays.Droid.Resource.Styleable.<API key>; global::CustomBalloon.Resource.Styleable.<API key> = global::MonkeySays.Droid.Resource.Styleable.<API key>; } public partial class Attribute { // aapt resource value: 0x7f010002 public const int accentColor = 2130771970; // aapt resource value: 0x7f010003 public const int balloonColor = 2130771971; // aapt resource value: 0x7f010000 public const int showEmoji = 2130771968; // aapt resource value: 0x7f010005 public const int text = 2130771973; // aapt resource value: 0x7f010004 public const int textColor = 2130771972; // aapt resource value: 0x7f010006 public const int textSize = 2130771974; // aapt resource value: 0x7f010001 public const int triangleHeight = 2130771969; static Attribute() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Attribute() { } } public partial class Color { // aapt resource value: 0x7f04002c public const int AliceBlue = 2130968620; // aapt resource value: 0x7f040022 public const int AntiqueWhite = 2130968610; // aapt resource value: 0x7f04007c public const int Aqua = 2130968700; // aapt resource value: 0x7f040061 public const int Aquamarine = 2130968673; // aapt resource value: 0x7f04002a public const int Azure = 2130968618; // aapt resource value: 0x7f040027 public const int Beige = 2130968615; // aapt resource value: 0x7f04000d public const int Bisque = 2130968589; // aapt resource value: 0x7f04008b public const int Black = 2130968715; // aapt resource value: 0x7f04000b public const int BlanchedAlmond = 2130968587; // aapt resource value: 0x7f040087 public const int Blue = 2130968711; // aapt resource value: 0x7f04005a public const int BlueViolet = 2130968666; // aapt resource value: 0x7f04004e public const int Brown = 2130968654; // aapt resource value: 0x7f040034 public const int BurlyWood = 2130968628; // aapt resource value: 0x7f04006c public const int CadetBlue = 2130968684; // aapt resource value: 0x7f040062 public const int Chartreuse = 2130968674; // aapt resource value: 0x7f04003e public const int Chocolate = 2130968638; // aapt resource value: 0x7f040017 public const int Coral = 2130968599; // aapt resource value: 0x7f04006b public const int CornflowerBlue = 2130968683; // aapt resource value: 0x7f040007 public const int Cornsilk = 2130968583; // aapt resource value: 0x7f040037 public const int Crimson = 2130968631; // aapt resource value: 0x7f04007d public const int Cyan = 2130968701; // aapt resource value: 0x7f040089 public const int DarkBlue = 2130968713; // aapt resource value: 0x7f040083 public const int DarkCyan = 2130968707; // aapt resource value: 0x7f040046 public const int DarkGoldenrod = 2130968646; // aapt resource value: 0x7f04004d public const int DarkGray = 2130968653; // aapt resource value: 0x7f040086 public const int DarkGreen = 2130968710; // aapt resource value: 0x7f040043 public const int DarkKhaki = 2130968643; // aapt resource value: 0x7f040058 public const int DarkMagenta = 2130968664; // aapt resource value: 0x7f04006d public const int DarkOliveGreen = 2130968685; // aapt resource value: 0x7f040016 public const int DarkOrange = 2130968598; // aapt resource value: 0x7f040051 public const int DarkOrchid = 2130968657; // aapt resource value: 0x7f040059 public const int DarkRed = 2130968665; // aapt resource value: 0x7f040031 public const int DarkSalmon = 2130968625; // aapt resource value: 0x7f040056 public const int DarkSeaGreen = 2130968662; // aapt resource value: 0x7f040070 public const int DarkSlateBlue = 2130968688; // aapt resource value: 0x7f040076 public const int DarkSlateGray = 2130968694; // aapt resource value: 0x7f040081 public const int DarkTurquoise = 2130968705; // aapt resource value: 0x7f040053 public const int DarkViolet = 2130968659; // aapt resource value: 0x7f04001b public const int DeepPink = 2130968603; // aapt resource value: 0x7f040082 public const int DeepSkyBlue = 2130968706; // aapt resource value: 0x7f040069 public const int DimGray = 2130968681; // aapt resource value: 0x7f04007a public const int DodgerBlue = 2130968698; // aapt resource value: 0x7f040047 public const int FireBrick = 2130968647; // aapt resource value: 0x7f040005 public const int FloralWhite = 2130968581; // aapt resource value: 0x7f040078 public const int ForestGreen = 2130968696; // aapt resource value: 0x7f04001c public const int Fuchsia = 2130968604; // aapt resource value: 0x7f040036 public const int Gainsboro = 2130968630; // aapt resource value: 0x7f040024 public const int GhostWhite = 2130968612; // aapt resource value: 0x7f040011 public const int Gold = 2130968593; // aapt resource value: 0x7f040039 public const int Goldenrod = 2130968633; // aapt resource value: 0x7f04005d public const int Gray = 2130968669; // aapt resource value: 0x7f040085 public const int Green = 2130968709; // aapt resource value: 0x7f04004b public const int GreenYellow = 2130968651; // aapt resource value: 0x7f04002b public const int Honeydew = 2130968619; // aapt resource value: 0x7f040018 public const int HotPink = 2130968600; // aapt resource value: 0x7f040040 public const int IndianRed = 2130968640; // aapt resource value: 0x7f04006e public const int Indigo = 2130968686; // aapt resource value: 0x7f040001 public const int Ivory = 2130968577; // aapt resource value: 0x7f04002d public const int Khaki = 2130968621; // aapt resource value: 0x7f040032 public const int Lavender = 2130968626; // aapt resource value: 0x7f040009 public const int LavenderBlush = 2130968585; // aapt resource value: 0x7f040063 public const int LawnGreen = 2130968675; // aapt resource value: 0x7f040006 public const int LemonChiffon = 2130968582; // aapt resource value: 0x7f04004c public const int LightBlue = 2130968652; // aapt resource value: 0x7f04002e public const int LightCoral = 2130968622; // aapt resource value: 0x7f040033 public const int LightCyan = 2130968627; // aapt resource value: 0x7f040020 public const int <API key> = 2130968608; // aapt resource value: 0x7f040055 public const int LightGreen = 2130968661; // aapt resource value: 0x7f04003c public const int LightGrey = 2130968636; // aapt resource value: 0x7f040013 public const int LightPink = 2130968595; // aapt resource value: 0x7f040015 public const int LightSalmon = 2130968597; // aapt resource value: 0x7f040079 public const int LightSeaGreen = 2130968697; // aapt resource value: 0x7f04005b public const int LightSkyBlue = 2130968667; // aapt resource value: 0x7f040065 public const int LightSlateGray = 2130968677; // aapt resource value: 0x7f040049 public const int LightSteelBlue = 2130968649; // aapt resource value: 0x7f040002 public const int LightYellow = 2130968578; // aapt resource value: 0x7f04007f public const int Lime = 2130968703; // aapt resource value: 0x7f040075 public const int LimeGreen = 2130968693; // aapt resource value: 0x7f040021 public const int Linen = 2130968609; // aapt resource value: 0x7f04001d public const int Magenta = 2130968605; // aapt resource value: 0x7f040060 public const int Maroon = 2130968672; // aapt resource value: 0x7f04006a public const int MediumAquamarine = 2130968682; // aapt resource value: 0x7f040088 public const int MediumBlue = 2130968712; // aapt resource value: 0x7f040045 public const int MediumOrchid = 2130968645; // aapt resource value: 0x7f040054 public const int MediumPurple = 2130968660; // aapt resource value: 0x7f040074 public const int MediumSeaGreen = 2130968692; // aapt resource value: 0x7f040064 public const int MediumSlateBlue = 2130968676; // aapt resource value: 0x7f040080 public const int MediumSpringGreen = 2130968704; // aapt resource value: 0x7f04006f public const int MediumTurquoise = 2130968687; // aapt resource value: 0x7f040041 public const int MediumVioletRed = 2130968641; // aapt resource value: 0x7f04007b public const int MidnightBlue = 2130968699; // aapt resource value: 0x7f040025 public const int MintCream = 2130968613; // aapt resource value: 0x7f04000c public const int MistyRose = 2130968588; // aapt resource value: 0x7f04000e public const int Moccasin = 2130968590; // aapt resource value: 0x7f04000f public const int NavajoWhite = 2130968591; // aapt resource value: 0x7f04008a public const int Navy = 2130968714; // aapt resource value: 0x7f04001f public const int OldLace = 2130968607; // aapt resource value: 0x7f04005e public const int Olive = 2130968670; // aapt resource value: 0x7f040067 public const int OliveDrab = 2130968679; // aapt resource value: 0x7f040014 public const int Orange = 2130968596; // aapt resource value: 0x7f04001a public const int OrangeRed = 2130968602; // aapt resource value: 0x7f04003a public const int Orchid = 2130968634; // aapt resource value: 0x7f04002f public const int PaleGoldenrod = 2130968623; // aapt resource value: 0x7f040052 public const int PaleGreen = 2130968658; // aapt resource value: 0x7f04004a public const int PaleTurquoise = 2130968650; // aapt resource value: 0x7f040038 public const int PaleVioletRed = 2130968632; // aapt resource value: 0x7f04000a public const int PapayaWhip = 2130968586; // aapt resource value: 0x7f040010 public const int PeachPuff = 2130968592; // aapt resource value: 0x7f04003f public const int Peru = 2130968639; // aapt resource value: 0x7f040012 public const int Pink = 2130968594; // aapt resource value: 0x7f040035 public const int Plum = 2130968629; // aapt resource value: 0x7f040048 public const int PowderBlue = 2130968648; // aapt resource value: 0x7f04005f public const int Purple = 2130968671; // aapt resource value: 0x7f04001e public const int Red = 2130968606; // aapt resource value: 0x7f040044 public const int RosyBrown = 2130968644; // aapt resource value: 0x7f040072 public const int RoyalBlue = 2130968690; // aapt resource value: 0x7f040057 public const int SaddleBrown = 2130968663; // aapt resource value: 0x7f040023 public const int Salmon = 2130968611; // aapt resource value: 0x7f040029 public const int SandyBrown = 2130968617; // aapt resource value: 0x7f040077 public const int SeaGreen = 2130968695; // aapt resource value: 0x7f040008 public const int Seashell = 2130968584; // aapt resource value: 0x7f04004f public const int Sienna = 2130968655; // aapt resource value: 0x7f040042 public const int Silver = 2130968642; // aapt resource value: 0x7f04005c public const int SkyBlue = 2130968668; // aapt resource value: 0x7f040068 public const int SlateBlue = 2130968680; // aapt resource value: 0x7f040066 public const int SlateGray = 2130968678; // aapt resource value: 0x7f040004 public const int Snow = 2130968580; // aapt resource value: 0x7f04007e public const int SpringGreen = 2130968702; // aapt resource value: 0x7f040071 public const int SteelBlue = 2130968689; // aapt resource value: 0x7f04003d public const int Tan = 2130968637; // aapt resource value: 0x7f040084 public const int Teal = 2130968708; // aapt resource value: 0x7f04003b public const int Thistle = 2130968635; // aapt resource value: 0x7f040019 public const int Tomato = 2130968601; // aapt resource value: 0x7f040073 public const int Turquoise = 2130968691; // aapt resource value: 0x7f040030 public const int Violet = 2130968624; // aapt resource value: 0x7f040028 public const int Wheat = 2130968616; // aapt resource value: 0x7f040000 public const int White = 2130968576; // aapt resource value: 0x7f040026 public const int WhiteSmoke = 2130968614; // aapt resource value: 0x7f040003 public const int Yellow = 2130968579; // aapt resource value: 0x7f040050 public const int YellowGreen = 2130968656; static Color() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Color() { } } public partial class Drawable { // aapt resource value: 0x7f020000 public const int Icon = 2130837504; // aapt resource value: 0x7f020001 public const int Monkey = 2130837505; static Drawable() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Drawable() { } } public partial class Id { // aapt resource value: 0x7f060000 public const int MonkeyBalloon = 2131099648; static Id() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Id() { } } public partial class Layout { // aapt resource value: 0x7f030000 public const int Main = 2130903040; static Layout() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Layout() { } } public partial class String { // aapt resource value: 0x7f050000 public const int ApplicationName = 2131034112; static String() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private String() { } } public partial class Styleable { public static int[] MyBalloonView = new int[] { 2130771968, 2130771969, 2130771970, 2130771971, 2130771972, 2130771973, 2130771974}; // aapt resource value: 2 public const int <API key> = 2; // aapt resource value: 3 public const int <API key> = 3; // aapt resource value: 0 public const int <API key> = 0; // aapt resource value: 5 public const int MyBalloonView_text = 5; // aapt resource value: 4 public const int <API key> = 4; // aapt resource value: 6 public const int <API key> = 6; // aapt resource value: 1 public const int <API key> = 1; static Styleable() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Styleable() { } } } } #pragma warning restore 1591
# REST Some soft guidelines for designing a REST architecture: 1Do not use "physical" URLs A physical URL points at something physical -- e.g., an XML file: "http: A logical URL does not imply a physical file: "http: - Sure, even with the .xml extension, the content could be dynamically generated. But it should be "humanly visible" that the URL is logical and not physical. 2Do not return an **overload** of data Queries should not return an overload of data. If needed, provide a paging mechanism. For example, a "product list" GET request should return the first n products (e.g., the first 10), with next/prev links. 3Well documented Even though the REST response can be anything, make sure it's well documented, and do not change the output format lightly (since it will break existing clients). - Remember, even if the output is human-readable, your clients aren't human users. - If the output is in XML, make sure you document it with a schema or a DTD. 4Include the actual URLs with REST responses Rather than letting clients construct URLs for additional actions, include the actual URLs with REST responses. For example, a "product list" request could return an ID per product, and the specification says that you should use http: That's bad design. Rather, the response should include the actual URL with each item: http: - Yes, this means that the output is larger. But it also means that you can easily direct clients to new URLs as needed, without requiring a change in client code. 5GET access requests should never cause a state change Anything that changes the server state should be a POST request (or other HTTP verbs, such as DELETE). Which of the following statements are true about REST? Pick ONE or More options. - A. Logical URLs should be used instead of physical URLs - B. Actual URLs must always be used in REST response - C. A paging technique should used if the output data is small - D. Get requests must be read only - E. Output format can be changed - F. Post requests must be read only A(yes), B(yes), C(no), D(yes), E(no), F(no) - [9. REST Design Guidelines](http://rest.elkstein.org/2008/02/<API key>.html)
# <API key>: true FactoryGirl.define do trait :has_random_dates do created_at { Faker::Time.between(from: 4.years.ago, to: Time.current) } updated_at { rand(3).zero? ? created_at : Faker::Time.between(from: created_at, to: Time.current) } end end
import os import re import sys import logging import json from glob import iglob from collections import defaultdict import numpy as np from settings import CACHE_DIR, REF_DIR from utils import set_up_logging from utils import mkdir_p log = set_up_logging('describe', loglevel=logging.DEBUG) def describe_dos(options): if options.get('loglevel', None): log.setLevel(options['loglevel']) OUT_DIR = os.path.join(REF_DIR, 'dos') if not os.path.exists(OUT_DIR): mkdir_p(OUT_DIR) sql_to_dtype = { 'VARCHAR': 'object', 'INT': 'int64', 'MONEY': 'float64' } sep_regx = re.compile('^-+$') def _parse_field_line(field_line): m = re.match(r'^([A-Z0-9]+)\s+(VARCHAR|INT|MONEY).*$', field_line) name, sql_type = m.groups() return name, sql_type def _parse_readme(fileloc): tables = [] with open(fileloc, 'r') as readme: header = [readme.next() for i in xrange(2)] sys.stderr.write('\n'.join(header)) nextline = readme.next().strip() while True: if not sep_regx.match(nextline): prevline = nextline[:] try: nextline = readme.next().strip() except StopIteration: break elif nextline: table_data = {} sys.stderr.write('found the sep for {}\n'.format(prevline)) table_data['title'] = prevline table_data['pandas_dtypes'] = {} table_data['sql_types'] = {} table_data['columns'] = [] nextline = readme.next().strip() while True: name, sql_type = _parse_field_line(nextline) table_data['columns'].append(name) table_data['pandas_dtypes'][name] = sql_to_dtype[sql_type] table_data['sql_types'][name] = sql_type try: nextline = readme.next().strip() except StopIteration: break else: if not nextline: break tables.append(table_data) else: print "uhhh" return tables readme_data = defaultdict(dict) for floc in iglob(os.path.join(CACHE_DIR, 'dos', '*', '*', 'readme.txt')): year, report_cycle = os.path.split(floc)[0].split(os.sep)[-2:] readme_data[year][report_cycle] = _parse_readme(floc) with open(os.path.join(OUT_DIR, 'dos_metadata.json'), 'w') as fout: json.dump(readme_data, fout, indent=2)
<?php defined('BASEPATH') OR exit('No direct script access allowed'); require_once __DIR__ . '/../third_party/wxpay/WxPay.Api.php'; require_once __DIR__ . '/../helpers/cloud.php'; use \LeanCloud\Engine\LeanEngine; use \LeanCloud\Engine\Cloud; use \LeanCloud\Client; use \LeanCloud\Storage\CookieStorage; /* * Define cloud functions and hooks on LeanCloud */ // /1.1/functions/sayHello Cloud::define("pay", function($params, $user) { // var_dump($user); $openid = $user->get('authData')["lc_weapp"]["openid"]; $input = new WxPayUnifiedOrder(); $input->SetBody($params['body']); // demo $input->SetOut_trade_no($params['tradeNo']); // demo11 $input->SetTotal_fee($params['totalFee']); $input->SetNotify_url("https://lendoo.leanapp.cn/WXPay/notify"); $input->SetTrade_type("JSAPI"); $input->SetOpenid($openid); // orderarray $order = WxPayApi::unifiedOrder($input); // json header("Content-Type: application/json"); // var_dump($order); return getJsApiParameters($order); // return "hello {$params['name']}"; }); function getJsApiParameters($UnifiedOrderResult) { if(!array_key_exists("appid", $UnifiedOrderResult) || !array_key_exists("prepay_id", $UnifiedOrderResult) || $UnifiedOrderResult['prepay_id'] == "") { throw new WxPayException(""); } $jsapi = new WxPayJsApiPay(); $jsapi->SetAppid($UnifiedOrderResult["appid"]); $timeStamp = time(); $jsapi->SetTimeStamp("$timeStamp"); $jsapi->SetNonceStr(WxPayApi::getNonceStr()); $jsapi->SetPackage("prepay_id=" . $UnifiedOrderResult['prepay_id']); $jsapi->SetSignType("MD5"); $jsapi->SetPaySign($jsapi->MakeSign()); $parameters = json_encode($jsapi->GetValues()); return $parameters; } class CIEngine extends LeanEngine { function __invoke() { $this->dispatch($_SERVER['REQUEST_METHOD'], $_SERVER['REQUEST_URI']); } } $hook['pre_system'] = function() { // AppId, AppKey, MasterKey //Client::initialize("<API key>", "<API key>" ,"<API key>"); Client::initialize("<API key>", "<API key>" ,"<API key>"); Client::useMasterKey(true); Client::setStorage(new CookieStorage()); Client::setDebug(true); $engine = new CIEngine(); $engine(); };
import _ from 'lodash' import React, { Component } from 'react' import YTSearch from 'youtube-api-search' import SearchBar from './search_bar' import VideoList from './preview_list' import VideoDetail from './video_detail' const API_KEY = '<Google Api>' class App extends Component { constructor(props) { super(props) this.state = { videos: [], selectedVideo: null} this.videoSearch('surfboards') } videoSearch(term) { YTSearch({key: API_KEY, term}, videos => { this.setState({ videos, selectedVideo: videos[0] }) }) } render() { const videoSearch = _.debounce((term) => { this.videoSearch(term) }, 300) return ( <div> <SearchBar onSearchTermChange={videoSearch} /> <VideoDetail video={this.state.selectedVideo}/> <VideoList onVideoSelect={selectedVideo => this.setState({selectedVideo})} videos={this.state.videos} /> </div> ) } } export default App
# this one is like your scripts with argv def print_two(*args): arg1,arg2 = args print "arg1: %r, arg2: %r" % (arg1, arg2) # ok, that *args is actually pointless, we can just do this def print_two_again(arg1, arg2): print "arg1: %r, arg2: %r" % (arg1, arg2) # this just takes one arguments def print_one(arg1): print "arg1: %r" % arg1 # this just takes no arguments def print_none(): print "I got nothin'." print_two("Zed", "Shaw") print_two_again("Zed", "Shaw") print_one("First") print_none()
using System.Collections.Concurrent; using VocaDb.Model.Domain; namespace VocaDb.Model.Service { public class <API key> : <API key> { private readonly <API key><GlobalEntryId, string> cachedNames = new <API key><GlobalEntryId, string>(); public string GetUrlFriendlyName(IEntryWithNames entry) { ParamIs.NotNull(() => entry); return cachedNames.GetOrAdd(new GlobalEntryId(entry.EntryType, entry.Id), _ => entry.Names.GetUrlFriendlyName()); } } public interface <API key> { string GetUrlFriendlyName(IEntryWithNames entry); } }
'''@file main.py this function is used to run distributed training on a local cluster''' import os import atexit import subprocess import tensorflow as tf def local_cluster(expdir, class_type): '''main function''' #read the cluster file clusterfile = os.path.join(expdir, 'cluster', 'cluster') machines = dict() machines['worker'] = [] machines['ps'] = [] with open(clusterfile) as fid: for line in fid: if len(line.strip()) > 0: split = line.strip().split(',') machines[split[0]].append( (split[1], int(split[2]), split[3])) #start all the jobs processes = [] for job in machines: task_index = 0 for _ in machines[job]: processes.append(subprocess.Popen( ['python', '-u', 'train_%s.py' % class_type, '--clusterfile=%s' % clusterfile, '--job_name=%s' % job, '--task_index=%d' % task_index, '--ssh_command=None', '--expdir=%s' % expdir])) task_index += 1 for process in processes: atexit.register(process.terminate) for process in processes: process.wait() if __name__ == '__main__': tf.app.flags.DEFINE_string('expdir', 'expdir', 'The experiments directory') tf.app.flags.DEFINE_string('type', 'asr', 'one of asr or lm, the training type') FLAGS = tf.app.flags.FLAGS local_cluster(FLAGS.expdir, FLAGS.type)
from __future__ import print_function import argparse import os import stat import sys # find the import for catkin's python package - either from source space or from an installed underlay if os.path.exists(os.path.join('/opt/ros/groovy/share/catkin/cmake', 'catkinConfig.cmake.in')): sys.path.insert(0, os.path.join('/opt/ros/groovy/share/catkin/cmake', '..', 'python')) try: from catkin.environment_cache import <API key> except ImportError: # search for catkin package in all workspaces and prepend to path for workspace in "/opt/ros/groovy".split(';'): python_path = os.path.join(workspace, 'lib/python2.7/dist-packages') if os.path.isdir(os.path.join(python_path, 'catkin')): sys.path.insert(0, python_path) break from catkin.environment_cache import <API key> code = <API key>('/projects/ros/surfer-main/lab3/angPos_PID/build/devel/env.sh') output_filename = '/projects/ros/surfer-main/lab3/angPos_PID/build/catkin_generated/setup_cached.sh' with open(output_filename, 'w') as f: #print('Generate script for cached setup "%s"' % output_filename) f.write('\n'.join(code)) mode = os.stat(output_filename).st_mode os.chmod(output_filename, mode | stat.S_IXUSR)
#define linit_c #define LUA_LIB #include "lua.h" #include "lualib.h" #include "lauxlib.h" static const luaL_Reg lualibs[] = { { "", luaopen_base }, { LUA_LOADLIBNAME, luaopen_package }, { LUA_TABLIBNAME, luaopen_table }, { LUA_IOLIBNAME, luaopen_io }, { LUA_OSLIBNAME, luaopen_os }, { LUA_STRLIBNAME, luaopen_string }, { LUA_MATHLIBNAME, luaopen_math }, { LUA_DBLIBNAME, luaopen_debug }, { LUA_JITLIBNAME, luaopen_jit }, #if <API key> { LUA_MARSHALLIBNAME, luaopen_marshal }, #endif #if LUAXS_ADDLIB_BUFFER { LUA_BUFFERLIBNAME, luaopen_buffer }, #endif #if LUAXS_ADDLIB_GAME { LUA_GAMELIBNAME, luaopen_game }, #endif #if <API key> { <API key>, luaopen_container }, #endif { NULL, NULL } }; LUALIB_API void luaL_openlibs(lua_State *L) { const luaL_Reg *lib = lualibs; for (; lib->func; lib++) { lua_pushcfunction(L, lib->func); lua_pushstring(L, lib->name); lua_call(L, 1, 0); } }
<html> <head> <title>Angular QuickStart</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="styles.css"> <!-- 1. Load libraries --> <!-- Polyfill for older browsers --> <script src="node_modules/core-js/client/shim.min.js"></script> <script src="node_modules/zone.js/dist/zone.js"></script> <script src="node_modules/reflect-metadata/Reflect.js"></script> <script src="node_modules/systemjs/dist/system.src.js"></script> <!-- 2. Configure SystemJS --> <script src="systemjs.config.js"></script> <script> System.import('app').catch(function(err){ console.error(err); }); </script> </head> <!-- 3. Display the application --> <body> <my-app>Loading...</my-app> </body> </html>
class CreateUsers < ActiveRecord::Migration def change create_table :users do |t| t.string 'api_key', limit:36, null:false t.string 'full_name' t.string 'email' t.timestamps null:false end add_index :users, :api_key, unique:true end end
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Word = NetOffice.WordApi; using NetOffice.WordApi.Enums; using NetOffice.WordApi; using System.Windows.Media.Imaging; namespace Gherkin.Util { public class LaTex2PNG : IDisposable { private Application _wordApp; private Document _doc; private Range _range; private string _saveName; private string _extractPath; public LaTex2PNG() { _wordApp = new Word.Application() { DisplayAlerts = WdAlertLevel.wdAlertsNone }; Guid _guid = Guid.NewGuid(); string guidToString = _guid.ToString("N"); string saveNameBase = System.IO.Path.Combine(System.IO.Path.GetTempPath(), guidToString); _saveName = saveNameBase + ".html"; _extractPath = saveNameBase + @".files\image001.png"; _wordApp.Visible = false; _doc = _wordApp.Documents.Add(); _range = _doc.Range(); _range.Text = "5"; _doc.OMaths.Add(_range); } public BitmapImage ToBitmapImage(string latex) { foreach (var ac in _wordApp.OMathAutoCorrect.Entries) { if (latex.Contains(ac.Name)) { latex = latex.Replace(ac.Name, ac.Value); } } _range.Text = latex; _doc.OMaths.BuildUp(); _doc.SaveAs(_saveName, WdSaveFormat.wdFormatHTML, Type.Missing, Type.Missing, false, Type.Missing, null, false); return Util.BitmapImageFromFile(_extractPath); } public void Dispose() { _range = null; _doc = null; _wordApp.Documents.Close(WdSaveOptions.wdDoNotSaveChanges); _wordApp.Quit(false); _wordApp = null; System.IO.File.Delete(_saveName); for (int i = 0; i < 2; i++) { GC.Collect(); GC.<API key>(); } } } }
import React from 'react' import { Input } from 'reactstrap' import TextareaAutosize from '<API key>' import RichTextEditor from 'components/RichTextEditor' import ColorInput from 'components/ColorInput' import DateInput from 'components/DateInput' import UrlInput from 'components/UrlInput' import preventEnterSubmit from 'utils/preventEnterSubmit' function inputProps (type, defaultValue) { switch (type) { case 'float': return { type: 'number', step: '0.01' } case 'integer': return { type: 'number', step: '1' } case 'boolean': return { type: 'checkbox', defaultChecked: defaultValue } case 'collection': return { type: 'select' } default: return { type: 'text' } } } export default function AtomInput ({ field, atom, index, onChange, onValueChange }) { const { structure } = atom.record.meta const key = field const type = structure[key].type const defaultValue = atom.record.data[key] React.useEffect(() => { if (type === 'collection') { const { collection } = structure[key] if (collection && !defaultValue && defaultValue !== collection[0][1]) { onValueChange(index, collection[0][1], key) } } }, [type, onValueChange, defaultValue, key, structure, index]) if (type === 'richtext') { return ( <RichTextEditor name={key} defaultValue={defaultValue} onChange={(html) => onValueChange(index, html, key)} invalid={Boolean(atom.errors[key])} scrollTarget='.<API key>' /> ) } if (type === 'color') { return ( <ColorInput name={key} defaultValue={defaultValue} onChange={(colorString) => onValueChange(index, colorString, key)} invalid={Boolean(atom.errors[key])} type={type} /> ) } if (type === 'url') { return ( <UrlInput name={key} defaultValue={defaultValue} onValueChange={(url) => onValueChange(index, url, key)} onChange={(e) => onChange(e, index, key)} onKeyPress={preventEnterSubmit} invalid={Boolean(atom.errors[key])} /> ) } if (type === 'date' || type === 'datetime') { return ( <DateInput name={key} defaultValue={defaultValue} onChange={(date) => onValueChange(index, date, key)} invalid={Boolean(atom.errors[key])} type={type} /> ) } if (type === 'collection') { return ( <Input {...inputProps(type, atom.record.data[key])} name={key} defaultValue={defaultValue} onChange={(e) => onChange(e, index, key)} onKeyPress={preventEnterSubmit} invalid={Boolean(atom.errors[key])} > {structure[key].collection.map((ary) => ( <option key={ary[1] || ''} value={ary[1] || ''}>{ary[0]}</option> ))} </Input> ) } if (type === 'text' || type === 'code') { const classNames = ['form-control'] if (type === 'code') { classNames.push('text-monospace') } if (atom.errors[key]) { classNames.push('is-invalid') } return ( <TextareaAutosize name={key} defaultValue={defaultValue} onChange={(e) => onValueChange(index, e.currentTarget.value, key)} type={type} className={classNames.join(' ')} rows={2} async /> ) } return ( <Input {...inputProps(type, atom.record.data[key])} name={key} defaultValue={defaultValue} onChange={(e) => onChange(e, index, key)} onKeyPress={preventEnterSubmit} invalid={Boolean(atom.errors[key])} /> ) }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1"> <title>Abot Web Widget</title> </head> <body style="background: #555;"> <script src="widget.js"></script> <script> AbotChat.init({ server: 'http://localhost:4200' }); </script> </body> </html>
#!/bin/bash fastafile="/home/akimitsu/database/gencode.v19.<API key>.fa" filename=`basename ${fastafile} .fa` fasta-get-markov -m 3 ${filename}.fa ${filename}<API key>.txt
using UnityEngine; using UnityEngine.UI; using System.Collections; using System.Collections.Generic; using Fungus; namespace Fungus { public abstract class TweenUI : Command { [Tooltip("List of objects to be affected by the tween")] public List<GameObject> targetObjects = new List<GameObject>(); [Tooltip("Type of tween easing to apply")] public LeanTweenType tweenType = LeanTweenType.easeOutQuad; [Tooltip("Wait until this command completes before continuing execution")] public BooleanData waitUntilFinished = new BooleanData(true); [Tooltip("Time for the tween to complete")] public FloatData duration = new FloatData(1f); public override void OnEnter() { if (targetObjects.Count == 0) { Continue(); return; } ApplyTween(); if (!waitUntilFinished) { Continue(); } } protected virtual void ApplyTween() { foreach (GameObject targetObject in targetObjects) { if (targetObject == null) { continue; } ApplyTween(targetObject); } if (waitUntilFinished) { LeanTween.value(gameObject, 0f, 1f, duration).setOnComplete(OnComplete); } } protected abstract void ApplyTween(GameObject go); protected virtual void OnComplete() { Continue(); } public override void OnCommandAdded(Block parentBlock) { // Add an empty slot by default. Saves an unnecessary user click. if (targetObjects.Count == 0) { targetObjects.Add(null); } } protected virtual string GetSummaryValue() { return ""; } public override string GetSummary() { if (targetObjects.Count == 0) { return "Error: No targetObjects selected"; } else if (targetObjects.Count == 1) { if (targetObjects[0] == null) { return "Error: No targetObjects selected"; } return targetObjects[0].name + " = " + GetSummaryValue(); } string objectList = ""; foreach (GameObject gameObject in targetObjects) { if (gameObject == null) { continue; } if (objectList == "") { objectList += gameObject.name; } else { objectList += ", " + gameObject.name; } } return objectList + " = " + GetSummaryValue(); } public override Color GetButtonColor() { return new Color32(180, 250, 250, 255); } public override bool IsReorderableArray(string propertyName) { if (propertyName == "targetObjects") { return true; } return false; } } }
# Bosh ## Status The following features are currently implemented Session Initializes a BOSH session with an XMPP server and returns the session identifier and request identifier. Session identifier and request identifier are typically used to attach another client side session with the XMPP server Ex: http://strophe.im/strophejs/doc/1.0.2/files2/strophe-js.html#Strophe.Connection.attach ## Installation Add this line to your application's Gemfile: gem 'bosh4r' And then execute: $ bundle Or install it yourself as: $ gem install bosh4r ## Usage Bosh4r::Session.new('gg@air.local', 'password').sid ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Added some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request Copyright (C) 2012 Ganesh Gunasegaran Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- Helpers, mainly for plugins. rpc.command("broadcast", function(chan, msg) -- Just basic broadcast. event.fire("chan:"..chan, "server", "*", msg) end) rpc.command("send", function(chan, name, msg) -- Similar to broadcast, except targeting a user. event.fire("chan:"..chan, "server", name, msg) end)
require 'test_helper' class PlacesEngineTest < ActiveSupport::TestCase test "truth" do assert_kind_of Module, PlacesEngine end end
# Middleman-Syntax `middleman-syntax` is an extension for the [Middleman] static site generator that adds syntax highlighting via [Rouge](https://github.com/jayferd/rouge). [![Gem Version](https://badge.fury.io/rb/middleman-syntax.png)][gem] [![Build Status](https://travis-ci.org/middleman/middleman-syntax.png)][travis] [![Dependency Status](https://gemnasium.com/middleman/middleman-syntax.png?travis)][gemnasium] [![Code Quality](https://codeclimate.com/github/middleman/middleman-syntax.png)][codeclimate] ## Installation If you're just getting started, install the `middleman` gem and generate a new project: bash gem install middleman middleman init MY_PROJECT If you already have a Middleman project: Add `gem "middleman-syntax"` to your `Gemfile` and run `bundle install`. **This plugin will not work on Ruby 1.8!** Rouge requires 1.9+, so we do too. ## Configuration ruby activate :syntax You can also pass options to Rouge: ruby activate :syntax, :line_numbers => true The full set of options can be seen on your preview server's `/__middleman/config/` page. ## Helper The extension adds a new `code` helper to Middleman that you can use from your templates. It will produce syntax-highlighted HTML wrapped in `<pre class="highlight language-name"><code>...html...</code></pre>`. In Erb, use `<%` tags (not `<%=` tags): erb <% code("ruby") do %> def my_cool_method(message) puts message end <% end %> In Haml, use `=`, not `-`: haml = code('ruby') do puts "hello" For more on Haml syntax, see the "Haml" section below. In Slim: slim = code('ruby') do | puts 'hello' ## CSS On a default (i.e. unstyled) Middleman project, it will appear as if `middleman-syntax` isn't working, since obviously no CSS has been applied to color your code. You can use any Pygments-compatible stylesheet to style your code. You can also let Rouge generate some CSS for you by creating a new stylesheet with a `.css.erb` extension in your Middleman project, and then including: erb <%= Rouge::Themes::ThankfulEyes.render(:scope => '.highlight') %> Rouge has `ThankfulEyes`, `Colorful`, `Github`, `Base16`, `Base16::Solarized` (like Octopress), `Base16::Monokai`, and `Monokai` themes. ## Markdown The extension also makes code blocks in Markdown produce highlighted code. Make sure you're using RedCarpet or Kramdown as your Markdown engine (in `config.rb`): ruby set :markdown_engine, :redcarpet set :markdown, :fenced_code_blocks => true, :smartypants => true set :markdown_engine, :kramdown Now your Markdown will work just like it does [on GitHub](http://github.github.com/<API key>/) - you can write something like this with Redcarpet: <pre> ruby def my_cool_method(message) puts message end </pre> or with Kramdown: <pre> ruby def my_cool_method(message) puts message end </pre> ## Haml When using Haml, a `:code` filter is exposed for outputting highlighted code. Because Haml filters don't allow arguments, you must use a special comment to indicate the language of the code to be highlighted (or let Rouge guess): haml #example :code # lang: ruby def foo puts 'bar' end With the special `# lang: <language tag>` comment on the first line, the `:code` filter is just like calling the `code` helper, but without the indentation problems that Haml might otherwise have. However, if you prefer, you can use the `code` helper along with the `:preserve` filter, as explained below. ## Indentation Problems Some templating languages, like Haml, will indent your HTML for you, which will mess up code formatted in `<pre>` tags. When using Haml, either use the `:code` filter (recommended), use the [`:preserve`](http://haml.info/docs/yardoc/file.REFERENCE.html#preserve-filter) filter, or add `set :haml, { ugly: true }` in your `config.rb` to turn off Haml's automatic indentation. Example of using `:preserve`: haml - code('ruby') do :preserve def foo puts 'bar' end ## Community The official community forum is available at: http://forum.middlemanapp.com ## Bug Reports Github Issues are used for managing bug reports and feature requests. If you run into issues, please search the issues and submit new problems: https://github.com/middleman/middleman-syntax/issues The best way to get quick responses to your issues and swift fixes to your bugs is to submit detailed bug reports, include test cases and respond to developer questions in a timely manner. Even better, if you know Ruby, you can submit [Pull Requests](https://help.github.com/articles/using-pull-requests) containing Cucumber Features which describe how your feature should work or exploit the bug you are submitting. ## How to Run Cucumber Tests 1. Checkout Repository: `git clone https://github.com/middleman/middleman-syntax.git` 2. Install Bundler: `gem install bundler` 3. Run `bundle install` inside the project root to install the gem dependencies. 4. Run test cases: `bundle exec rake test` ## Donate [Click here to lend your support to Middleman](https://spacebox.io/s/4dXbHBorC3) Copyright (c) 2012-2014 Benjamin Hollis. MIT Licensed, see [LICENSE] for details. [middleman]: http://middlemanapp.com [gem]: https://rubygems.org/gems/middleman-syntax [travis]: http://travis-ci.org/middleman/middleman-syntax [gemnasium]: https://gemnasium.com/middleman/middleman-syntax [codeclimate]: https://codeclimate.com/github/middleman/middleman-syntax [LICENSE]: https:
*{ margin: 0; padding: 0; font-family: "Arial","Microsoft YaHei","","",sans-serif; } body{ min-width: 1350px; } ul{ list-style: none; } body,div{ margin:0; padding:0; } .clear{ clear: both; } .blue{ color:rgb(87,87,123); } .right{ float: right; } .left{ float: left; } .view-container{ width: 1300px; height: 100%; margin: 0 auto; position: relative; padding-top: 1px; } #back-pink-center .view-container{ height: 100%; } .decorate{ background-position: center; background-repeat: no-repeat; background-size: cover; height: 180px; } #left-decorate{ background-image: url("../images/left-decorate.png"); float: left; width: 130px; } #right-decorate{ background-image: url("../images/right-decorate.png"); float: right; width: 200px; } #center-decorate{ margin: 0 200px 0 130px; height: 180px; } .site-topbar{ width: 100%; height:18%; border: thin solid grey; } .site-header{ width: 100%; height: 82%; zoom:1; overflow: hidden; position: relative; } .logo{ background-image: url("../images/logo.png"); background-position: center; background-repeat: no-repeat; background-size: contain; width: 100px; height: 100px; display: inline-block; vertical-align: middle; } .section{ width:100%; min-width: 1350px; height:800px; border: thin solid grey; position: relative; } .bd .section:nth-child(2){ background-color: rgb(247,247,247); } .bd .section:nth-child(3){ background-color: rgb(103,103,135); } .bd .section:nth-child(4){ background-color: rgb(228,228,230); } .bd .section:nth-child(5){ background-color: rgb(103,103,135); } .bd .section:nth-child(6){ background-color: rgb(247,247,247); } .bd .section:nth-child(7){ background: linear-gradient(0deg,rgb(103,103,135) 28% ,transparent 30% ); } .title{ position: absolute; top:20px; left: 40px; } #cn-detail{ font-size: 1.5rem; font-weight: 600; letter-spacing: 0.1rem; } #en-detail{ font-size: 1rem; } .detail{ min-height: 2rem; line-height: 2rem; display: inline-block; vertical-align: middle; } .tags{ list-style: none; padding-right: 40px; position: absolute; right: 0; bottom: 10px; } .tags li{ float: left; padding: 0 20px; } #back-pink-center{ background-image: url("../images/back-pink-center.png"); background-position: center; background-repeat: no-repeat; background-size: cover; width: 100%; height:75%; position: relative; } .pic-container{ height: 80%; width: 55%; position: absolute; top:50%; left:35%; -webkit-transform:translateY(-50%); transform:translateY(-50%); background-image: url("../images/back-photo-1.png"); background-position: center; background-repeat: no-repeat; background-size: cover; border: 4px solid white; border-radius: 5px; } .pic-info{ height:60px; width: 60%; position: absolute; right: 0; bottom: 20%; background-color: rgba(0,0,0,0.9); background:linear-gradient(140deg,transparent 50px,rgba(0,0,0,0.9) 10px); text-align: right; line-height: 60px; color: white; font-size: 1.5rem; } .blind-container{ min-height:25px; min-width:35px; height:8%; width:8%; position: absolute; left: 35%; top:9%; margin-left: 715px; background-image: url("../images/for-blind.png"); background-position: center; background-repeat: no-repeat; background-size: contain; } #decorate-bottom{ width: 50%; height: 40px; position: absolute; bottom: 12%; left:50%; -webkit-transform:translateX(-50%); transform:translateX(-50%); background-image: url("../images/bottom-decorate.png"); background-position: center; background-repeat: no-repeat; background-size:cover; } .pic-tags{ list-style: none; position: absolute; left:35%; margin-left: -445px; top:50%; -webkit-transform:translateY(-50%); transform:translateY(-50%); } .pic-tags li{ height:90px; width: 445px; margin-top: 10px; background-color: rgba(0,0,0, 0.4); } .pic-tags li:nth-child(4){ background:linear-gradient(110deg,transparent 86px,rgba(0,0,0,0.9) 10px); } .pic-tags li:nth-child(3){ background:linear-gradient(110deg,transparent 120px,rgba(0,0,0,0.9) 10px); } .pic-tags li:nth-child(2){ background:linear-gradient(110deg,transparent 155px,rgba(0,0,0,0.9) 10px); } .pic-tags li:nth-child(1){ background:linear-gradient(110deg,transparent 190px,rgba(0,0,0,0.9) 10px); } .pic-tags li.active{ background:linear-gradient(110deg,transparent 56px,rgba(0,0,0,0.9) 10px); width: 480px; } .pic-tags li:before{ content:''; height: 100%; display:inline-block; vertical-align: middle; } .tags-pic{ display: inline-block; vertical-align: middle; height:70px; width: 130px; /*background-image: url("../images/back-photo-1.png");*/ background:linear-gradient(110deg,rgba(0,0,0,0.8) 30px, transparent 0px), linear-gradient(290deg,rgba(0,0,0,0.9) 30px, transparent 0px),url("../images/pic-tags-3.png"); background:linear-gradient(110deg,rgba(0,0,0,0.8) 30px, transparent 0px), linear-gradient(290deg,rgba(0,0,0,0.9) 30px, transparent 0px),url("../images/pic-tags-3.png"); background-position:top left,top,bottom right; background-repeat: no-repeat; background-size: cover; } .pic-tags li:nth-child(1) .tags-pic{ margin-left: 200px; } .pic-tags li:nth-child(2) .tags-pic{ margin-left: 160px; } .pic-tags li:nth-child(3) .tags-pic{ margin-left: 122px; } .pic-tags li:nth-child(4) .tags-pic{ margin-left: 90px; } .pic-tags li.active .tags-pic{ margin-left: 56px; width: 200px; } .tags-info{ display: inline-block; vertical-align: middle; color: white; width:150px; text-align: center; } .cn-info{ font-size: 1.1rem; letter-spacing: 0.1rem; } .en-info{ font-size: 0.9rem; } #point-left{ width: 50%; padding-right: 20px; vertical-align: top; } #new-right{ width: 40%; padding-top: 40px; vertical-align: top; } #pic-think{ height:100px; width: 100px; background-image: url("../images/thinker.png"); background-position: center; background-repeat: no-repeat; background-size: cover; } #point-area{ margin-left: 100px; } #point-title{ box-sizing:border-box; padding-left: 20px; height: 80px; line-height: 80px; font-size: 1.6rem; } #point-detail{ width: 90%; height:350px; box-shadow: 30px 0px 0px rgb(103,103,135),inset 5px 5px 15px rgb(215,213,213) ; border-radius: 15px; box-sizing:border-box; padding: 30px; position: relative; } .more-point{ text-align: center; position: absolute; right:3%; bottom: 3%; font-size: 1.2rem; color: rgb(103,103,135); } .tips{ height:90px; margin-left: 30px; background-color: rgb(103,103,135); border-radius: 0 0 0 40px; } .tips-head{ height: 110px; width:110px; border-radius:55px; background-color: rgb(103,103,135); margin-left: -5px; } .tips-head .pic-head{ height: 90px; width: 90px; margin: auto; margin-top: 10px; box-sizing:border-box; border: 5px solid white; border-radius: 45px; background-image: url("../images/pic-tags-3.png"); background-position: center; background-repeat: no-repeat; background-size: cover; } .tips-content{ height:70px; width: 400px; overflow-y: scroll; margin: 10px 0; } #new-right .left-background{ background-color: rgb(103,103,135); background: linear-gradient(100deg,transparent 10px,rgb(103,103,135) 10px) ,linear-gradient(280deg,transparent 10px,rgb(103,103,135) 10px); background: linear-gradient(100deg,transparent 10px,rgb(103,103,135) 10px) ,linear-gradient(280deg,transparent 10px,rgb(103,103,135) 10px); background-size: 70%,70%; background-position: left, right; background-repeat: no-repeat; } #new-right .right-background{ background-color: rgb(103,103,135); background: linear-gradient(100deg,transparent 10px,rgb(103,103,135) 10px) ,linear-gradient(240deg,transparent 20px,rgb(103,103,135) 10px); background: linear-gradient(100deg,transparent 10px,rgb(103,103,135) 10px) ,linear-gradient(240deg,transparent 20px,rgb(103,103,135) 10px); background-size: 70%,70%; background-position: left, right; background-repeat: no-repeat; } #news-area{ width:90%; min-height:300px; background-color: white; } #news-pic{ width: 170px; height: 120px; margin: 0 5px 5px 12px; border-left: 3px solid white; border-bottom: 3px solid white; box-shadow: -8px 8px 0 rgb(103,103,135); background-image: url("../images/news-pic.png"); background-position: center; background-repeat: no-repeat; background-size: cover; } #news-info{ text-decoration: underline; line-height: 1.5rem; } .news-more .mr-container{ width: 90px; height: 25px; background-color: rgb(103,103,135); background: linear-gradient(70deg,transparent 10px,rgb(103,103,135) 10px) ,linear-gradient(290deg,transparent 10px,rgb(103,103,135) 10px); background: linear-gradient(70deg,transparent 10px,rgb(103,103,135) 10px) ,linear-gradient(290deg,transparent 10px,rgb(103,103,135) 10px); background-size: 85%,85%; background-position: left, right; background-repeat: no-repeat; line-height: 25px; margin-top: -2px; } #mr-more{ margin: 0 auto; padding-left:25px; } .news-more .ud-container{ width:400px; height: 20px; border-top:5px solid rgb(103,103,135); margin-right: -5px; } #campus-boy{ height:250px; width: 250px; background-image: url("../images/campus-boy.png"); background-position: center; background-repeat: no-repeat; background-size: cover; position: absolute; left:0; bottom: 0; } #r-publish{ padding-left: 250px; padding-right: 20px; vertical-align: top; } #r-achive{ vertical-align: top; padding-left: 20px; } .publish-title{ height: 30px; line-height: 30px; vertical-align: middle; } .left-background{ width: 40px; height: 30px; background-color: white; background: linear-gradient(100deg,transparent 10px,white 10px) ,linear-gradient(280deg,transparent 10px,white 10px); background: linear-gradient(100deg,transparent 10px,white 10px) ,linear-gradient(280deg,transparent 10px,white 10px); background-position:left, right; background-repeat: no-repeat; background-size: 70% 70%; vertical-align: middle; } .right-background{ width: 80px; height: 30px; background-color: white; background: linear-gradient(100deg,transparent 10px,white 10px) ,linear-gradient(240deg,transparent 20px,white 10px); background: linear-gradient(100deg,transparent 10px,white 10px) ,linear-gradient(240deg,transparent 20px,white 10px); background-position:left, right; background-repeat: no-repeat; background-size: 70% 70%; vertical-align: middle; } .publish-title .publish-cn{ font-size: 1.3rem; letter-spacing: 0.1rem; } .publish-title .publish-en{ font-size: 1.3rem; } .publish-pic{ width: 150px; height: 100px; background-color: white; box-shadow: 10px 10px 5px rgb(79,75,95); } .publish-info{ width: 350px; height: 100px; padding-left: 40px; box-sizing:border-box; position: relative; } .publish-info span{ text-decoration: underline; position: absolute; top: 50%; -webkit-transform:translateY(-50%); transform:translateY(-50%); } #r-publish ul,#r-achive ul{ margin: 0 auto; } #r-publish li,#r-achive li{ margin-top: 20px; } .cs-container{ width: 49%; box-sizing:border-box; padding:40px 50px; } #font-cloud{ height:300px; background-image: url("../images/font-cloud.png"); background-position: center; background-repeat: no-repeat; background-size: contain; } #contact{ margin-left: 70px; padding:0 0 10px 5px; border-left: 2px solid black; } #contact-title{ font-size: 1.5rem; padding-bottom: 10px; } .right.cs-container ul{ list-style: none; } .right.cs-container li{ display: inline-block; padding: 0; margin: 0; } .right.cs-container li.active .item-pic{ border: 3px solid white; box-sizing:border-box; } .cs-item{ } #right-bottom{ border-bottom: 2px solid rgb(206,208,209); border-right: 2px solid rgb(206,208,209); } #bottom-left{ margin-left: -5px; border-bottom: 2px solid rgb(206,208,209); border-left: 2px solid rgb(206,208,209); } #top-right{ border-top: 2px solid rgb(206,208,209); border-right: 2px solid rgb(206,208,209); } #left-top{ margin-left: -5px; border-top: 2px solid rgb(206,208,209); border-left: 2px solid rgb(206,208,209); } .item-pic{ width: 150px; height:120px; margin: 20px auto; margin-bottom: 10px; background-image: url("../images/project-album.png"); background-position: center; background-repeat: no-repeat; background-size: cover; position: relative; } .item-info{ width: 210px; height: 70px; padding: 0 10px; overflow: hidden; white-space: nowrap; word-break:keep-all; text-overflow:ellipsis; font-size: 0.7rem; } .item-alt{ position: absolute; left:50%; top: 50%; -webkit-transform:translateX(-50%); transform:translateX(-50%); text-align: center; font-size: 0.8rem; } .white{ color: white; } #back-little-girl{ width: 200px; height: 350px; background-image: url("../images/little-girl.png"); background-position: center; background-repeat: no-repeat; background-size: cover; } .mid-container{ width: 100%; position: absolute; top:50%; -webkit-transform:translateY(-50%); transform:translateY(-50%); } .mid-container .adaption-container{ margin: 0 200px; margin-right:0; height: 350px; background-image: url("../images/temp-websites.png"); background-position: center; background-repeat: no-repeat; background-size: cover; } .return-icon{ width: 100px; height: 100px; position: absolute; left:50%; top: 0; margin-left: -50px; margin-top: -50px; background-image: url("../images/return-top.png"); background-position: center; background-repeat: no-repeat; background-size: cover; } .left-title{ width: 500px; text-align: left; padding-left: 100px; padding-top: 100px; line-height: 3rem; } .cn{ font-size: 3rem; letter-spacing: 0.1rem; } .en{ font-size: 2rem; } .inline{ display: inline-block; } .top-line{ width: 42%; margin-left: -10px; border-bottom: 5px solid grey; } .container{ height:400px; width: 80%; min-width: 600px; margin: 0 auto; } .under-line{ margin-right: 250px; height:40px; margin-left: 200px; border-bottom: 5px solid grey; } #detail-unique{ width: 150px; height: 40px; line-height: 40px; color: white; background:linear-gradient(120deg ,transparent 18px,rgb(118,118,118) 10px); margin-right:100px; margin-top:5px; } #detail-unique div{ margin-left: 45px; text-align: center; } .container .pic-list{ height:100%; width: 90%; background-image: url("../images/cooperative-partner.png"); background-position: center; background-repeat: no-repeat; background-size: contain; } .team-quote{ height: 20%; width: 40%; background-image: url("../images/footer-decorate.png"); background-position: center; background-repeat: no-repeat; background-size: contain; margin: 280px auto; margin-bottom: 0; } .team-mates{ height:30%; width:70%; margin: 0 auto; background-image: url("../images/member-album.png"); background-position: center; background-repeat: no-repeat; background-size: contain; } .more-detail{ position: absolute; right:2%; bottom: 20%; } .common-detail{ right: 5%; bottom: 8%; } .arrow-icon{ display: inline-block; height:50px; width: 100px; background-position: center; background-repeat: no-repeat; background-size: cover; vertical-align: middle; } .arrow-info{ font-size: 1.2rem; display: inline-block; vertical-align: middle; } .arrow-black{ background-image: url("../images/arrow-black.png"); } .arrow-white{ background-image: url("../images/arrow-white.png"); } .site-footer{ padding:20px 0px; background: rgb(57,57,78); } .site-footer .view-container{ height: auto; } #footer-1,#footer-2,#footer-3{ height: 300px; display: inline-block; border-left: thin solid rgb(112,102,127); box-sizing:border-box; position: relative; } #footer-1{ width: 23%; margin-left: 100px; } #footer-1 ul{ width: 300px; position: absolute; left: 50%; top: 50%; -webkit-transform:translate(-50%,-50%); transform:translate(-50%,-50%); text-align: center; } #footer-1 ul li{ width: 50%; margin: 15px 0; } #footer-2{ width: 35%; } #footer-3{ width: 30%; } .logo-pic{ width: 400px; height: 300px; position: absolute; left: 50%; top:50%; margin-left: -200px; margin-top: -150px; background-image: url("../images/footer-logo.png"); background-position: center; background-repeat: no-repeat; background-size: contain; } .qr-pic{ width: 200px; height: 200px; position: absolute; left: 50%; top:50%; margin-left: -100px; margin-top: -100px; background-image: url("../images/qr-code.png"); background-position: center; background-repeat: no-repeat; background-size: contain; } .site-info{ height: 35px; background-color: rgb(48,48,48); } .site-info-area{ height: 35px; line-height: 35px; text-align: center; } .site-info-item{ border-right: 2px solid rgb(148,148,147); line-height: 25px; padding: 0 10px; color:rgb(148,148,147); }
import React, { Component } from 'react' import SearchBar from '../containers/search_bar' import WeatherList from '../containers/weather_list' export default class App extends Component { render () { return ( <div> <div><SearchBar/></div> <div><WeatherList/></div> </div> ) } }
package com.app.android.tensel.utility; import android.content.Context; import android.content.SharedPreferences; import android.support.annotation.NonNull; public class PrefManager { SharedPreferences pref; SharedPreferences.Editor editor; Context _context; // shared pref mode int PRIVATE_MODE = 0; // Shared preferences file name private static final String PREF_NAME = "androidhive-welcome"; private static final String <API key> = "IsFirstTimeLaunch"; public PrefManager(Context context) { this._context = context; pref = _context.<API key>(PREF_NAME, PRIVATE_MODE); editor = pref.edit(); } public void setFirstTimeLaunch(boolean isFirstTime) { editor.putBoolean(<API key>, isFirstTime); editor.commit(); } public void <API key>(int duration){ editor.putInt(Utils.<API key>, duration) .commit(); } public int <API key>(){ return pref.getInt(Utils.<API key>, 10); } public boolean isFirstTimeLaunch() { return pref.getBoolean(<API key>, true); } public boolean getShouldShowHints() { return pref.getBoolean(Utils.PREF_SHOW_HINTS, true); } public void setShouldShowHints(boolean val){ editor.putBoolean(Utils.PREF_SHOW_HINTS, val) .commit(); } public void setShowPvHints(boolean val){ editor.putBoolean(Utils.PREF_SHOW_PV_HINTS, val) .commit(); } public boolean getShowPvHints(){ return pref.getBoolean(Utils.PREF_SHOW_PV_HINTS, true); } /** * Set a boolean preference * @param key the key to use for this preference * @param value the value set at * @return whether result is saved or not */ public boolean <API key>(@NonNull String key, boolean value){ return pref.edit().putBoolean(key, value).commit(); } /** * Retrieve a boolean preference * @param key key of preference * @param def default value to use * @return boolean preference */ public boolean <API key>(@NonNull String key, boolean def){ return pref.getBoolean(key, def); } }
<?php namespace Tests; use GrahamCampbell\TestBench\<API key>; use Mockery; use Orbas\Stage\ServiceProvider; class StageTestCase extends <API key> { protected function <API key>($app) { return ServiceProvider::class; } protected function getEnvironmentSetUp($app) { parent::getEnvironmentSetUp($app); $app->config->set('stage.global', require 'config/global.php'); } /** * @param string $class * @param string|null $abstract * * @return Mockery\MockInterface */ public function initMock($class, $abstract = null) { if (!$abstract) { $abstract = $class; } $mock = Mockery::mock($class); $this->app->instance($abstract, $mock); return $mock; } protected function tearDown() { parent::tearDown(); $this->tearDownMockery(); } }
exports.checkAuth = function(req, res, next) { if (!req.isAuthenticated()) { res.send('You are not authorized to view this page, please <a href="/signin">sign in</a>.'); } else { next(); } } exports.createHash = function(bcrypt, username, password, db, done){ bcrypt.hash(password, bcrypt.genSaltSync(10), function(err, hash) { if (err) return done(err); db.collection('User').findOneAndUpdate({ username: username }, {$set: { password: hash }}, function (err) { if (err) return done(err); }); return done(null, hash); }); } exports.authHash = function(bcrypt, username, password, db, done) { var hash; db.collection('User').findOne({ username: username }, function (err, user) { if (err) return done(err); if (!user) return done(null, false); hash = user.password; bcrypt.compare(password, hash, function(err, match) { if (err) return done(err); done(null, user, match); }); }); }
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_73) on Thu Mar 24 14:34:21 PDT 2016 --> <title>Translator (continuum-core 0.1.2 API)</title> <meta name="date" content="2016-03-24"> <link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../script.js"></script> </head> <body> <script type="text/javascript"><! try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Translator (continuum-core 0.1.2 API)"; } } catch(err) { } var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar.top"> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../deprecated-list.html">Deprecated</a></li> <li><a href="../../index-all.html">Index</a></li> <li><a href="../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../continuum/slab/Slab.html" title="interface in continuum.slab"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li>Next&nbsp;Class</li> </ul> <ul class="navList"> <li><a href="../../index.html?continuum/slab/Translator.html" target="_top">Frames</a></li> <li><a href="Translator.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> </a></div> <div class="header"> <div class="subTitle">continuum.slab</div> <h2 title="Interface Translator" class="title">Interface Translator&lt;T&gt;</h2> </div> <div class="contentContainer"> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Known Implementing Classes:</dt> <dd><a href="../../continuum/core/slab/AtomTranslator.html" title="class in continuum.core.slab">AtomTranslator</a></dd> </dl> <hr> <br> <pre>public interface <span class="typeNameLabel">Translator&lt;T&gt;</span></pre> <div class="block">Serde. Time data slab marshaller / demarshaller.</div> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="method.summary"> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code><a href="../../continuum/slab/Iterator.html" title="interface in continuum.slab">Iterator</a>&lt;<a href="../../continuum/slab/Translator.html" title="type parameter in Translator">T</a>&gt;</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../continuum/slab/Translator.html#iterator--">iterator</a></span>()</code> <div class="block">Get an iterator for the data store.</div> </td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code><a href="../../continuum/slab/Iterator.html" title="interface in continuum.slab">Iterator</a>&lt;<a href="../../continuum/slab/Translator.html" title="type parameter in Translator">T</a>&gt;</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../continuum/slab/Translator.html#iterator-boolean-">iterator</a></span>(boolean&nbsp;streaming)</code> <div class="block">Get an iterator for the data store.</div> </td> </tr> <tr id="i2" class="altColor"> <td class="colFirst"><code><a href="../../continuum/slab/Translator.html" title="type parameter in Translator">T</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../continuum/slab/Translator.html#read-continuum.atom.AtomID-">read</a></span>(<a href="../../continuum/atom/AtomID.html" title="interface in continuum.atom">AtomID</a>&nbsp;id)</code> <div class="block">Retreive a single atom by ID from the datastore</div> </td> </tr> <tr id="i3" class="rowColor"> <td class="colFirst"><code><a href="../../continuum/slab/Slab.html" title="interface in continuum.slab">Slab</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../continuum/slab/Translator.html#slab--">slab</a></span>()</code> <div class="block">The underlying slab storage resource for this translator</div> </td> </tr> <tr id="i4" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../continuum/slab/Translator.html#write-T-">write</a></span>(<a href="../../continuum/slab/Translator.html" title="type parameter in Translator">T</a>&nbsp;t)</code> <div class="block">Write a datapoint to the slab storage</div> </td> </tr> </table> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="method.detail"> </a> <h3>Method Detail</h3> <a name="write-java.lang.Object-"> </a><a name="write-T-"> </a> <ul class="blockList"> <li class="blockList"> <h4>write</h4> <pre>void&nbsp;write(<a href="../../continuum/slab/Translator.html" title="type parameter in Translator">T</a>&nbsp;t) throws java.lang.Exception</pre> <div class="block">Write a datapoint to the slab storage</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>t</code> - atom to write</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>java.lang.Exception</code> - error writing atom</dd> </dl> </li> </ul> <a name="read-continuum.atom.AtomID-"> </a> <ul class="blockList"> <li class="blockList"> <h4>read</h4> <pre><a href="../../continuum/slab/Translator.html" title="type parameter in Translator">T</a>&nbsp;read(<a href="../../continuum/atom/AtomID.html" title="interface in continuum.atom">AtomID</a>&nbsp;id) throws java.lang.Exception</pre> <div class="block">Retreive a single atom by ID from the datastore</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>id</code> - to retrieve for</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>atom for given ID or null if not exist</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>java.lang.Exception</code> - on underlying slabs failure</dd> </dl> </li> </ul> <a name="iterator </a> <ul class="blockList"> <li class="blockList"> <h4>iterator</h4> <pre><a href="../../continuum/slab/Iterator.html" title="interface in continuum.slab">Iterator</a>&lt;<a href="../../continuum/slab/Translator.html" title="type parameter in Translator">T</a>&gt;&nbsp;iterator()</pre> <div class="block">Get an iterator for the data store. WARN Caller MUST Call close() Available exclusively to caller until close() is called.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>new iterator</dd> </dl> </li> </ul> <a name="iterator-boolean-"> </a> <ul class="blockList"> <li class="blockList"> <h4>iterator</h4> <pre><a href="../../continuum/slab/Iterator.html" title="interface in continuum.slab">Iterator</a>&lt;<a href="../../continuum/slab/Translator.html" title="type parameter in Translator">T</a>&gt;&nbsp;iterator(boolean&nbsp;streaming)</pre> <div class="block">Get an iterator for the data store. WARN Caller MUST Call close() Available exclusively to caller until close() is called.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>new iterator</dd> </dl> </li> </ul> <a name="slab </a> <ul class="blockListLast"> <li class="blockList"> <h4>slab</h4> <pre><a href="../../continuum/slab/Slab.html" title="interface in continuum.slab">Slab</a>&nbsp;slab()</pre> <div class="block">The underlying slab storage resource for this translator</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>this slab storage</dd> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <div class="bottomNav"><a name="navbar.bottom"> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../deprecated-list.html">Deprecated</a></li> <li><a href="../../index-all.html">Index</a></li> <li><a href="../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../continuum/slab/Slab.html" title="interface in continuum.slab"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li>Next&nbsp;Class</li> </ul> <ul class="navList"> <li><a href="../../index.html?continuum/slab/Translator.html" target="_top">Frames</a></li> <li><a href="Translator.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> </a></div> </body> </html>
package blue.lapis.pore.launch; import blue.lapis.pore.util.classloader.PoreClassLoader; import com.google.inject.Inject; import com.google.inject.Injector; import org.apache.commons.lang3.StringUtils; import org.spongepowered.api.event.Subscribe; import org.spongepowered.api.event.state.<API key>; import org.spongepowered.api.event.state.<API key>; import org.spongepowered.api.event.state.ServerStartingEvent; import org.spongepowered.api.event.state.ServerStoppingEvent; import org.spongepowered.api.plugin.Plugin; import java.net.<API key>; import java.net.URL; @Plugin(id = "pore", name = "Pore") public class PoreBootstrap { private static final String <API key> = "blue.lapis.pore.Pore"; private final PoreEventManager pore; @Inject public PoreBootstrap(Injector injector) { URL location = getClass().getProtectionDomain().getCodeSource().getLocation(); String path = location.getPath(); if (location.getProtocol().equals("jar")) { int pos = path.lastIndexOf('!'); if (pos >= 0) { path = path.substring(0, pos + 2); } } else { path = StringUtils.removeEnd(path, getClass().getName().replace('.', '/') + ".class"); } try { ClassLoader loader = new PoreClassLoader(getClass().getClassLoader(), new URL(location.getProtocol(), location.getHost(), location.getPort(), path)); Class<?> poreClass = Class.forName(<API key>, true, loader); this.pore = (PoreEventManager) injector.getInstance(poreClass); } catch (<API key> e) { throw new RuntimeException("Failed to load Pore implementation", e); } catch (<API key> e) { throw new RuntimeException("Failed to load Pore implementation", e); } } @Subscribe public void onPreInit(<API key> event) throws Exception { pore.onPreInit(event); } @Subscribe public void onAboutToStart(<API key> event) throws Exception { pore.onAboutToStart(event); } @Subscribe public void onStarting(ServerStartingEvent event) throws Exception { pore.onStarting(event); } @Subscribe public void onShutdown(ServerStoppingEvent event) throws Exception { pore.onShutdown(event); } }
package net.etowns.vine.jUtils; import java.io.File; import java.io.IOException; import java.util.Iterator; import java.util.Properties; import java.util.Set; import java.util.Map.Entry; import java.util.jar.JarEntry; import java.util.jar.JarFile; import java.util.Enumeration; public class jarUtil { Properties sysProp = System.getProperties(); FileUtil myFile = new FileUtil(); String jarFile = ""; String workDir = ""; /** * extractDocs from jar file * @return document root path */ public String extractDocs(){ // sun.java.command Set<Entry<Object, Object>> set = sysProp.entrySet(); Iterator<Entry<Object, Object>> itr = set.iterator(); while (itr.hasNext()) { Entry<Object, Object> me = itr.next(); if (me.getKey().toString().equals("sun.java.command")){ jarFile = me.getValue().toString(); if (! jarFile.endsWith(".jar")){ return "/docs"; } break; } } // get tmpDir workDir = myFile.setWorkDir(0); try { JarFile jar = new java.util.jar.JarFile(jarFile); Enumeration<JarEntry> e = jar.entries(); while (e.hasMoreElements()) { JarEntry file = (JarEntry) e.nextElement(); if (file.toString().startsWith("docs")||file.toString().startsWith("templates")){ File f = new java.io.File(workDir + File.separator + file.getName()); if (file.isDirectory()) { f.mkdir(); continue; } java.io.InputStream is = jar.getInputStream(file); // get the input stream java.io.FileOutputStream fos = new java.io.FileOutputStream(f); while (is.available() > 0) { // write contents of 'is' to 'fos' fos.write(is.read()); } fos.close(); is.close(); } } jar.close(); } catch (IOException e) { e.printStackTrace(); } return workDir + File.separator + "docs"; } }
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import json import logging import sys from lfmconf.lfmconf import get_lastfm_conf from lfmdb import lfmdb from stats.stats import process_track, <API key>, \ <API key> from queries.inserts import <API key> logging.basicConfig( level=logging.INFO, format=f'%(asctime)s %(levelname)s %(message)s' ) conf = get_lastfm_conf() <API key> = <API key>() nb_plays_in_db = <API key>() nb_plays_to_insert = <API key> - nb_plays_in_db query = """ select id, json from (select id, json from json_track order by id desc limit %s) tmp order by id """ if nb_plays_to_insert == 0: logging.info('Nothing new!') sys.exit(0) new_plays = lfmdb.select(query % nb_plays_to_insert) connection = lfmdb.create_connection() cursor = connection.cursor() parameters = [] for (track_id, json_track) in new_plays: logging.info('Track %s' % track_id) track = json.loads(json_track) transformed_track = process_track(track) artist_name = transformed_track['artist_text'] album_name = transformed_track['album_text'] track_name = transformed_track['name'] # Cut artist name if too long. if len(artist_name) > 512: artist_name = artist_name[:512] # Cut track name if too long. if len(track_name) > 512: track_name = track_name[:512] try: insert_query = <API key>() lfmdb.insert(connection, cursor, insert_query, (artist_name, transformed_track['artist_mbid'], album_name, transformed_track['album_mbid'], track_name, transformed_track['mbid'], transformed_track['url'], transformed_track['date_uts'], transformed_track['date_uts'] )) except Exception as e: logging.exception( 'An error occurred when inserting play into database!') logging.error(track_name, ', ', artist_name) sys.exit(1) cursor.close() connection.close()
<?php namespace PhpSpec\Matcher; use PhpSpec\Formatter\Presenter\PresenterInterface; use PhpSpec\Exception\Example\FailureException; /** * Class ArrayContainMatcher * @package PhpSpec\Matcher */ class ArrayContainMatcher extends BasicMatcher { /** * @var \PhpSpec\Formatter\Presenter\PresenterInterface */ private $presenter; /** * @param PresenterInterface $presenter */ public function __construct(PresenterInterface $presenter) { $this->presenter = $presenter; } /** * @param string $name * @param mixed $subject * @param array $arguments * * @return bool */ public function supports($name, $subject, array $arguments) { return 'contain' === $name && 1 == count($arguments) && is_array($subject) ; } /** * @param mixed $subject * @param array $arguments * * @return bool */ protected function matches($subject, array $arguments) { return in_array($arguments[0], $subject, true); } /** * @param string $name * @param mixed $subject * @param array $arguments * * @return FailureException */ protected function getFailureException($name, $subject, array $arguments) { return new FailureException(sprintf( 'Expected %s to contain %s, but it does not.', $this->presenter->presentValue($subject), $this->presenter->presentValue($arguments[0]) )); } /** * @param string $name * @param mixed $subject * @param array $arguments * * @return FailureException */ protected function <API key>($name, $subject, array $arguments) { return new FailureException(sprintf( 'Expected %s not to contain %s, but it does.', $this->presenter->presentValue($subject), $this->presenter->presentValue($arguments[0]) )); } }
layout: post title: androidTab category: android keywords: actionBar,android,Horizontalpaging ![image](https://raw.githubusercontent.com/MurphyNeo/murphyneo.github.io/master/_posts/android/weixintab.png) github [bottom tab](https://github.com/MurphyNeo/Android)
import { <API key>, removePlanner } from '../<API key>/crud-controller/planner/methods'; import { <API key> } from '../<API key>/crud-controller/semester/methods'; import { <API key> } from '../<API key>/crud-controller/module/methods'; export const <API key> = function <API key>() { const userIDs = '9f91pejfj912ras'; const plannerNames = ['testPlanner', 'testPlannerTwo', 'testPlannerThree', 'testPlannerFour', 'testPlannerFive']; const focusAreas = [['Com Graphics'], ['Com Graphics', 'Security'], ['Com Graphics'], ['Algorithms'], ['Com Graphics']]; const academicYear = ['AY 2013/2014', 'AY 2013/2014', 'AY 2014/2015', 'AY 2014/2015', 'AY 2015/2016', 'AY 2015/2016', 'AY 2016/2017', 'AY 2016/2017']; const semesterNum = [1, 2, 1, 2, 1, 2, 1, 2]; const semesterIndex = [0, 1, 2, 3, 4, 5, 6, 7]; const modules = ['CS1010', 'CS1020', 'CS2010', 'CS3230']; const modulesTwo = ['CS1010X', 'CS1020', 'CS2010']; const modulesThree = ['IS1103', 'CS2101']; const modulesFour = ['MA1301', 'MA1521', 'MA1101R', 'PC1221X', 'LSM1301', 'ST2131', 'ST2132']; const modulesFive = ['CS3283', 'CS3284']; const plannerIDs = []; plannerIDs.push(<API key>(plannerNames[0], focusAreas[0], userIDs)); plannerIDs.push(<API key>(plannerNames[1], focusAreas[1], userIDs)); plannerIDs.push(<API key>(plannerNames[2], focusAreas[2], userIDs)); plannerIDs.push(<API key>(plannerNames[3], focusAreas[3], userIDs)); plannerIDs.push(<API key>(plannerNames[4], focusAreas[4], userIDs)); // create semesters populateSemesters(semesterIndex, academicYear, semesterNum, plannerIDs[0]); populateSemesters(semesterIndex, academicYear, semesterNum, plannerIDs[1]); populateSemesters(semesterIndex, academicYear, semesterNum, plannerIDs[2]); populateSemesters(semesterIndex, academicYear, semesterNum, plannerIDs[3]); populateSemesters(semesterIndex, academicYear, semesterNum, plannerIDs[4]); // for each semester, insert a module into the semester <API key>(semesterIndex, modules, plannerIDs[0]); <API key>(semesterIndex, modulesTwo, plannerIDs[1]); <API key>(semesterIndex, modulesThree, plannerIDs[2]); <API key>(semesterIndex, modulesFour, plannerIDs[3]); <API key>(semesterIndex, modulesFive, plannerIDs[4]); return plannerIDs; } export const <API key> = function <API key>() { const userIDs = '9f91pejfj912ras'; const modulesOne = ['CP3880']; const modulesTwo = ['CP3200']; const plannerNames = ['testPlanner', 'testPlannerTwo']; const focusAreas = [['Com Graphics'], ['Com Graphics', 'Security']]; const plannerIDs = []; const academicYear = ['AY 2016/2017', 'AY 2016/2017']; const semesterNum = [1, 2]; const semesterIndex = [0, 1]; plannerIDs.push(<API key>(plannerNames[0], focusAreas[0], userIDs)); plannerIDs.push(<API key>(plannerNames[1], focusAreas[1], userIDs)); populateSemesters(semesterIndex, academicYear, semesterNum, plannerIDs[0]); populateSemesters(semesterIndex, academicYear, semesterNum, plannerIDs[1]); <API key>(semesterIndex, modulesOne, plannerIDs[0]); <API key>(semesterIndex, modulesTwo, plannerIDs[1]); return plannerIDs; } export const populateULRFixture = function populateULRFixture() { const userIDs = '9f91pejfj912ras'; const modulesOne = ['GEH1001', 'GEQ1917', 'GER1000', 'GES1002', 'GET1006']; const plannerNames = ['testPlanner']; const focusAreas = [['Com Graphics']]; const plannerIDs = []; const academicYear = ['AY 2016/2017', 'AY 2016/2017']; const semesterNum = [1, 2]; const semesterIndex = [0, 1]; plannerIDs.push(<API key>(plannerNames[0], focusAreas[0], userIDs)); populateSemesters(semesterIndex, academicYear, semesterNum, plannerIDs[0]); <API key>(semesterIndex, modulesOne, plannerIDs[0]); return plannerIDs; } export const <API key> = function <API key>() { const userIDs = '9f91pejfj912ras'; const modulesOne = ['GEK1002', 'GEK1901', 'ES1541', 'JS2230', 'SSA2214']; const modulesTwo = ['GEK1002', 'GEK1901', 'ES1541', 'CS1010', 'SSA2214']; const plannerNames = ['testPlanner', 'testPlanner2']; const focusAreas = [['Com Graphics']]; const plannerIDs = []; const academicYear = ['AY 2014/2015']; const semesterNum = [1]; const semesterIndex = [0]; plannerIDs.push(<API key>(plannerNames[0], focusAreas[0], userIDs)); plannerIDs.push(<API key>(plannerNames[1], focusAreas[0], userIDs)); populateSemesters(semesterIndex, academicYear, semesterNum, plannerIDs[0]); populateSemesters(semesterIndex, academicYear, semesterNum, plannerIDs[1]); <API key>(semesterIndex, modulesOne, plannerIDs[0]); <API key>(semesterIndex, modulesTwo, plannerIDs[1]); return plannerIDs; } export const <API key> = function <API key>() { const userIDs = '9f91pejfj912ras'; const modulesOne = ['CS3241', 'CS3247', 'CS4247', 'CS4246', 'CS5240', 'CS4350']; const plannerNames = ['testPlanner']; const focusAreas = [['Com Graphics']]; const plannerIDs = []; const academicYear = ['AY 2016/2017', 'AY 2016/2017']; const semesterNum = [1, 2]; const semesterIndex = [0, 1]; plannerIDs.push(<API key>(plannerNames[0], focusAreas[0], userIDs)); populateSemesters(semesterIndex, academicYear, semesterNum, plannerIDs[0]); <API key>(semesterIndex, modulesOne, plannerIDs[0]); return plannerIDs; } export const <API key> = function <API key>() { const userIDs = '9f91pejfj912ras'; const mathSciModules = ['MA1301', 'MA1521', 'MA1101R', 'PC1221X', 'LSM1301', 'ST2131', 'ST2132', 'LSM1302']; const plannerNames = ['testPlanner']; const focusAreas = [['Com Graphics']]; const plannerIDs = []; const academicYear = ['AY 2015/2016', 'AY 2015/2016']; const semesterNum = [1, 2]; const semesterIndex = [0, 1]; plannerIDs.push(<API key>(plannerNames[0], focusAreas[0], userIDs)); populateSemesters(semesterIndex, academicYear, semesterNum, plannerIDs[0]); <API key>(semesterIndex, mathSciModules, plannerIDs[0]); return plannerIDs; } export const <API key> = function <API key>(plannerIDs) { for (var i = 0; i<plannerIDs.length; i++) { removePlanner(plannerIDs[i]); } } const populateSemesters = function populateSemesters(semesterIndex, academicYear, semesterNum, plannerID) { for (var i=0; i< semesterIndex.length; i++) { <API key>(academicYear[i], semesterNum[i], plannerID); } } const <API key> = function <API key>(semesterIndex, modules, plannerID) { for (var i = 0; i< semesterIndex.length; i++) { for (var j = 0; j < modules.length; j++) { <API key>(i, modules[j], plannerID); } } }
MIT License Copyright (c) 2017 sunny-lan-coder Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
require_relative "spec_helper" module Vend describe Resource do describe "#has_many" do it "returns the same instance of ResourceCollection" do class Widget < RemoteResource attribute :name, String end resource = Class.new(RemoteResource) do attribute :id, Integer has_many :widgets, ->{ Widget } end i = resource.new widgets: [{ name: "Knob" }] widgets = i.widgets widgets.send(:records).size.must_equal 1 i.widgets << Widget.new(name: "Flange") widgets.send(:records).size.must_equal 2 end end end end
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <markdowncell> # # netCDF File Visualization Case Study # - netCDF # - WMO GRIB metadata # - Map projections # - xray data analysis library # - cartopy visualization library # <markdowncell> # # Crack Open the File # <codecell> import xray ds = xray.open_dataset('https://motherlode.ucar.edu/repository/opendap/<API key>/entry.das', decode_times=False) print(ds) # <markdowncell> # # Dimensions, Coordinates, Data Variables # As far as the dimensions and coordinates go, the most relevant and important coordinates variables are `x` and `y`. We can see the data variables, such as, temperature (`t`), mixing ratio (`mr`), and potential temperature (`th`), are mostly on a 1901 x 1801 grid. There is also the mysterious `nav` dimension and associated data variables which we will be examining later. # The first step is to get more information concerning the variables we are interested in. For example, let's look at _potential temperature_ or `th`. # <codecell> print(ds['th']) # <markdowncell> # # potential temperature (`th`) # Let's grab the data array for potential temperature (`th`). # <codecell> th = ds['th'].values[0][0] print(th) # <markdowncell> # # To Visualize the Data, We have to Decrypt the Projection # In order, to visualize the data that are contained within a two-dimensional array onto a map that represents a three-dimensional globe, we need to understand the projection of the data. # We can make an educated guess these are contained in the data variables with the `nav` cooridinate variable. # Specifically, # - `grid_type` # - `grid_type_code` # - `x_dim` # - `y_dim` # - `La1` # - `Lo1` # - `LoV` # - `Latin1` # - `Latin2` # **But what are these??** # <headingcell level=1> # For Grins, Let's Scrutinize the `grid_type_code` # <codecell> print(ds['grid_type_code']) # <markdowncell> # # Google to the Rescue # A simple Google search of `GRIB-1 GDS data representation type` takes us to # <codecell> print(ds['grid_type_code'].values[0]) # <markdowncell> # # What is `grid_type_code` of `5`? # <headingcell level=1> # Next up `grid_type` # <codecell> grid_type = ds['grid_type'].values print('The grid type is ', grid_type[0]) # <markdowncell> # # Uh oh! Polar Stereographic or Lambert Conformal?? # _Note that this newest piece of information relating to a Lambert Conformal projection disagrees with the earlier projection information about a Polar Stereographic projection._ There is a **bug** in the metadata description of the projection. # <markdowncell> # # Moving on Anyway, next `Nx` and `Ny` # According to the grib documentation `Nx` and `Ny` represent the number grid points along the x and y axes. Let's grab those. # <codecell> nx, ny = ds['Nx'].values[0], ds['Ny'].values[0] print(nx, ny) # <markdowncell> # # `La1` and `Lo1` # Next let's get `La1` and `Lo1` which are defined as the "first grid points" These are probably the latitude and longitude for one of the corners of the grid. # <codecell> la1, lo1 = ds['La1'].values[0], ds['Lo1'].values[0] print(la1, lo1) # <markdowncell> # # `Latin1` and `Latin2` # Next up are the rather mysteriously named `Latin1` and `Latin2` variables. When I first saw these identifiers, I thought they referred to a Unicode block, but in fact they relate to the secants of the projection cone. I do not know why they are called "Latin" and this name is confusing. **At any rate, we can feel comfortable that we are dealing with Lambert Conformal rather than Polar Stereographic.** # <codecell> latin1, latin2 = ds['Latin1'].values[0], ds['Latin2'].values[0] print(latin1, latin2) # <markdowncell> # # The Central Meridian for the Lambert Conformal Projection, `LoV` # If we are defining a Lambert Conformal projection, we will require the central meridian that the GRIB documentation refers to as `LoV`. # <codecell> lov = ds['LoV'].values[0] print(lov) # <markdowncell> # # `Dx` and `Dy` # Finally, let's look at the grid increments. In particular, we need to find the units. # <codecell> print(ds['Dx']) print(ds['Dy']) # <markdowncell> # # Units for `Dx` and `Dy` # The units for the deltas are in meters. # <codecell> dx,dy = ds['Dx'].values[0],ds['Dy'].values[0] print(dx,dy) # <markdowncell> # # Let's Review What We Have # We now have all the information we need to understand the Lambert projection: # - The secants of the Lambert Conformal projection (`Latin1`, `Latin2`) # - The central meridian of the projection (`LoV`) # Moreover, we have additional information that shows how the data grid relates to the projection: # - The number of grid points in x and y (`Nx`, `Ny`) # - The delta in meters between grid point (`Dx`, `Dy`) # - The first latitude and longitude of the data (`first latitude`, `first longitude`). # <markdowncell> # # We are Ready for Visualization (almost)! # Let's import **cartopy** and **matplotlib**. # <codecell> %matplotlib inline import cartopy.crs as ccrs import matplotlib.pyplot as plt import matplotlib as mpl # <headingcell level=1> # Define the Lambert Conformal Projection with Cartopy # <codecell> proj = ccrs.LambertConformal(central_longitude=lov,standard_parallels=(latin1,latin2)) # <markdowncell> # # Lambert Conformal Grid Extents # - To plot the data we need the `left`,`right`,`bottom`,`top` extents of the grid **expressed in Lambert Conformal # coordinates**. # - __**Key point**: The projection coordinate systems have flat topology and Euclidean distance.__ # <markdowncell> # # Calculating the Extents # Remember, we have: # - The number of grid points in x and y (`Nx`, `Ny`) # - The delta in meters between grid point (`Dx`, `Dy`) # - The first latitude and longitude of the data (`first latitude`, `first longitude`). # We have one of the corners in latitude and longitude, but we need to convert it LC coordinates and derive the other corner. # <markdowncell> # <markdowncell> # <headingcell level=1> # Create the PlatteCarre Cartopy Projection # <codecell> pc = ccrs.PlateCarree() # <markdowncell> # # Convert Corner from Lat/Lon PlatteCarre to LC # The `transform_point` method translates coordinates from one projection coordinate system to the other. # <codecell> left,bottom = proj.transform_point(lo1,la1,pc) print(left,bottom) # <markdowncell> # # Derive Opposite Corner # Derive the opposite corner from the number of points and the delta. **Again**, we can do this because the projection coordinate systems have flat topology and Euclidean distance. # <codecell> right,top = left + nx*dx,bottom + ny*dy print(right,top) # <markdowncell> # # Plot It Up! # We now have the extents, we are ready to plot. # <codecell> #Define the figure fig = plt.figure(figsize=(12, 12)) # Define the extents and add the data ax = plt.axes(projection=proj) extents = (left, right, bottom, top) ax.contourf(th, origin='lower', extent=extents, transform=proj) # Add bells and whistles ax.coastlines(resolution='50m', color='black', linewidth=2) ax.add_feature(ccrs.cartopy.feature.NaturalEarthFeature(category='cultural', name='<API key>', scale='50m',facecolor='none')) ax.add_feature(ccrs.cartopy.feature.BORDERS, linewidth='1', edgecolor='black') ax.gridlines() plt.show() # <markdowncell> # # Exercises for the Reader # - The extents are actually not perfect and snip the image. Why? Fix. # - Add a colorbar and jazz up the plot. # - Trick question: Can you label the axes with latitude and longitudes? # - Try a different projection which should be fairly easy with Cartopy. # <codecell> th.shape # <codecell> th[0,0] # <codecell>
'use strict'; angular.module('app', []). controller('ctrl', function($scope) { $scope.rowList = [{ col1: {value: 'r1c1'}, col2: {value: 'r1c2'} }, { col1: {value: 'r2c1'}, col2: {value: 'r2c2'} }, { col1: {value: 'r3c1'}, col2: {value: 'r3c2'} }]; });
'use strict'; /* Controllers */ angular.module('myApp.controllers', []) .controller('ChartController', ['$scope', 'SampleDataService', function ($scope, SampleDataService) { if ($scope.chartData == undefined) { $scope.chartData = [ { "year": "2001", "europe": 1.5, "namerica": 1.5, "asia": 4.1, "lamerica": 5.3, "meast": 2.2, "africa": 3.1 }, { "year": "2004", "europe": 2.6, "namerica": 6.7, "asia": 1.2, "lamerica": 9.3, "meast": 6.3, "africa": 2.1 }, { "year": "2005", "europe": 1.8, "namerica": 3.9, "asia": 0.4, "lamerica": 5.3, "meast": 3.3, "africa": 1.1 } ]; } //mock service - loads data after 1 second delay SampleDataService .activityData() .then(function (data) { $scope.chartData = data.chartData; $scope.categoryField = data.categoryField; $scope.plotAreaBorderAlpha = data.plotAreaBorderAlpha; }); }]) .controller('MyCtrl2', ['$scope', 'SampleDataService', function ($scope, SampleDataService) { }]);
/* Thing > Intangible > StructuredValue > <API key> - A structured value providing information about the opening hours of a place or a certain service inside a place.. Generated automatically by the reactGenerator. */ var <API key>= React.createClass({displayName: "<API key>", getDefaultProps: function(){ return { } }, render: function(){ var props = this.props.props; var dayOfWeek; if( props.dayOfWeek ){ if( props.dayOfWeek instanceof Array ){ dayOfWeek = [ (React.createElement("div", {key: "header", "data-advice": "HTML for the *head* of the section"})) ] dayOfWeek = dayOfWeek.concat( props.dayOfWeek.map( function(result, index){ return ( React.createElement(DayOfWeek, React.__spread({}, result, {key: index})) ) }) ); dayOfWeek.push( ( React.createElement("div", {key: "footer", "data-advice": "HTML for the *footer* of the section"}) ) ); } else { dayOfWeek = ( React.createElement(DayOfWeek, {props: props.dayOfWeek}) ); } } var closes; if( props.closes ){ if( props.closes instanceof Array ){ closes = [ (React.createElement("div", {key: "header", "data-advice": "HTML for the *head* of the section"})) ] closes = closes.concat( props.closes.map( function(result, index){ return ( React.createElement(Time, React.__spread({}, result, {key: index})) ) }) ); closes.push( ( React.createElement("div", {key: "footer", "data-advice": "HTML for the *footer* of the section"}) ) ); } else { closes = ( React.createElement(Time, {props: props.closes}) ); } } var potentialAction; if( props.potentialAction ){ if( props.potentialAction instanceof Array ){ potentialAction = [ (React.createElement("div", {key: "header", "data-advice": "HTML for the *head* of the section"})) ] potentialAction = potentialAction.concat( props.potentialAction.map( function(result, index){ return ( React.createElement(Action, React.__spread({}, result, {key: index})) ) }) ); potentialAction.push( ( React.createElement("div", {key: "footer", "data-advice": "HTML for the *footer* of the section"}) ) ); } else { potentialAction = ( React.createElement(Action, {props: props.potentialAction}) ); } } var description; if( props.description ){ if( props.description instanceof Array ){ description = [ (React.createElement("div", {key: "header", "data-advice": "HTML for the *head* of the section"})) ] description = description.concat( props.description.map( function(result, index){ return ( React.createElement("div", {key: index, "data-advice": "Put your HTML here. description is a Text."}) ) }) ); description.push( ( React.createElement("div", {key: "footer", "data-advice": "HTML for the *footer* of the section"}) ) ); } else { description = ( React.createElement("div", {"data-advice": "Put your HTML here. description is a Text."}) ); } } var sameAs; if( props.sameAs ){ if( props.sameAs instanceof Array ){ sameAs = [ (React.createElement("div", {key: "header", "data-advice": "HTML for the *head* of the section"})) ] sameAs = sameAs.concat( props.sameAs.map( function(result, index){ return ( React.createElement("div", {key: index, "data-advice": "Put your HTML here. sameAs is a URL."}) ) }) ); sameAs.push( ( React.createElement("div", {key: "footer", "data-advice": "HTML for the *footer* of the section"}) ) ); } else { sameAs = ( React.createElement("div", {"data-advice": "Put your HTML here. sameAs is a URL."}) ); } } var image; if( props.image ){ if( props.image instanceof Array ){ image = [ (React.createElement("div", {key: "header", "data-advice": "HTML for the *head* of the section"})) ] image = image.concat( props.image.map( function(result, index){ return ( React.createElement("div", {key: index, "data-advice": "Put your HTML here. image is a URL or" + ' ' + "ImageObject."}) ) }) ); image.push( ( React.createElement("div", {key: "footer", "data-advice": "HTML for the *footer* of the section"}) ) ); } else { image = ( React.createElement("div", {"data-advice": "Put your HTML here. image is a URL or" + ' ' + "ImageObject."}) ); } } var url; if( props.url ){ if( props.url instanceof Array ){ url = [ (React.createElement("div", {key: "header", "data-advice": "HTML for the *head* of the section"})) ] url = url.concat( props.url.map( function(result, index){ return ( React.createElement("div", {key: index, "data-advice": "Put your HTML here. url is a URL."}) ) }) ); url.push( ( React.createElement("div", {key: "footer", "data-advice": "HTML for the *footer* of the section"}) ) ); } else { url = ( React.createElement("div", {"data-advice": "Put your HTML here. url is a URL."}) ); } } var validThrough; if( props.validThrough ){ if( props.validThrough instanceof Array ){ validThrough = [ (React.createElement("div", {key: "header", "data-advice": "HTML for the *head* of the section"})) ] validThrough = validThrough.concat( props.validThrough.map( function(result, index){ return ( React.createElement(DateTime, React.__spread({}, result, {key: index})) ) }) ); validThrough.push( ( React.createElement("div", {key: "footer", "data-advice": "HTML for the *footer* of the section"}) ) ); } else { validThrough = ( React.createElement(DateTime, {props: props.validThrough}) ); } } var mainEntityOfPage; if( props.mainEntityOfPage ){ if( props.mainEntityOfPage instanceof Array ){ mainEntityOfPage = [ (React.createElement("div", {key: "header", "data-advice": "HTML for the *head* of the section"})) ] mainEntityOfPage = mainEntityOfPage.concat( props.mainEntityOfPage.map( function(result, index){ return ( React.createElement("div", {key: index, "data-advice": "Put your HTML here. mainEntityOfPage is a CreativeWork or" + ' ' + "URL."}) ) }) ); mainEntityOfPage.push( ( React.createElement("div", {key: "footer", "data-advice": "HTML for the *footer* of the section"}) ) ); } else { mainEntityOfPage = ( React.createElement("div", {"data-advice": "Put your HTML here. mainEntityOfPage is a CreativeWork or" + ' ' + "URL."}) ); } } var additionalType; if( props.additionalType ){ if( props.additionalType instanceof Array ){ additionalType = [ (React.createElement("div", {key: "header", "data-advice": "HTML for the *head* of the section"})) ] additionalType = additionalType.concat( props.additionalType.map( function(result, index){ return ( React.createElement("div", {key: index, "data-advice": "Put your HTML here. additionalType is a URL."}) ) }) ); additionalType.push( ( React.createElement("div", {key: "footer", "data-advice": "HTML for the *footer* of the section"}) ) ); } else { additionalType = ( React.createElement("div", {"data-advice": "Put your HTML here. additionalType is a URL."}) ); } } var alternateName; if( props.alternateName ){ if( props.alternateName instanceof Array ){ alternateName = [ (React.createElement("div", {key: "header", "data-advice": "HTML for the *head* of the section"})) ] alternateName = alternateName.concat( props.alternateName.map( function(result, index){ return ( React.createElement("div", {key: index, "data-advice": "Put your HTML here. alternateName is a Text."}) ) }) ); alternateName.push( ( React.createElement("div", {key: "footer", "data-advice": "HTML for the *footer* of the section"}) ) ); } else { alternateName = ( React.createElement("div", {"data-advice": "Put your HTML here. alternateName is a Text."}) ); } } var validFrom; if( props.validFrom ){ if( props.validFrom instanceof Array ){ validFrom = [ (React.createElement("div", {key: "header", "data-advice": "HTML for the *head* of the section"})) ] validFrom = validFrom.concat( props.validFrom.map( function(result, index){ return ( React.createElement(DateTime, React.__spread({}, result, {key: index})) ) }) ); validFrom.push( ( React.createElement("div", {key: "footer", "data-advice": "HTML for the *footer* of the section"}) ) ); } else { validFrom = ( React.createElement(DateTime, {props: props.validFrom}) ); } } var opens; if( props.opens ){ if( props.opens instanceof Array ){ opens = [ (React.createElement("div", {key: "header", "data-advice": "HTML for the *head* of the section"})) ] opens = opens.concat( props.opens.map( function(result, index){ return ( React.createElement(Time, React.__spread({}, result, {key: index})) ) }) ); opens.push( ( React.createElement("div", {key: "footer", "data-advice": "HTML for the *footer* of the section"}) ) ); } else { opens = ( React.createElement(Time, {props: props.opens}) ); } } var name; if( props.name ){ if( props.name instanceof Array ){ name = [ (React.createElement("div", {key: "header", "data-advice": "HTML for the *head* of the section"})) ] name = name.concat( props.name.map( function(result, index){ return ( React.createElement("div", {key: index, "data-advice": "Put your HTML here. name is a Text."}) ) }) ); name.push( ( React.createElement("div", {key: "footer", "data-advice": "HTML for the *footer* of the section"}) ) ); } else { name = ( React.createElement("div", {"data-advice": "Put your HTML here. name is a Text."}) ); } } return (React.createElement("div", {title: "<API key>", className: "<API key> entity"}, dayOfWeek, closes, potentialAction, description, sameAs, image, url, validThrough, mainEntityOfPage, additionalType, alternateName, validFrom, opens, name )); } });
// OnkyoKit.h // OnkyoKit #import "ONKCharacteristic.h" #import "<API key>.h" #import "ONKReceiver.h" #import "ONKReceiverBrowser.h" #import "ONKReceiverSession.h" #import "ONKService.h" #import "EISCPPacket.h" #import "ISCPMessage.h"
#ifndef <API key> #define <API key> namespace RemotePC { class ScreenshotSpreader : public mc::CommonImpl< IClientHandler > { public: // IClientHandler section virtual void Handle(const Client& client, mc::IProtocolRef protocol, IServerControlRef server); }; } #endif // !<API key>
#!/usr/bin/env python # encoding: utf-8 class Solution(object): def myAtoi(self, str): """ :type str: str :rtype: int """ if len(str) < 1: return 0 str = str.strip() str_valid = '' for i in range(len(str)): if str[i] not in '01234567890': if i == 0 and (str[i] == '-' or str[i] == '+') and len(str) > 1: str_valid += str[i] continue else: break else: str_valid += str[i] if len(str_valid) == 1 and (str_valid == '+' or str_valid == '-') or len(str_valid) == 0: return 0 res = int(str_valid) MAX = 2**31-1 if res > MAX: return MAX if res < -MAX-1: return -MAX-1 return res def main(): solution = Solution() print solution.myAtoi("-2147483648") if __name__ == '__main__': main()
# gpsproject An android app for tracking location, and calculating distance and fare of a taxi.
package com.shopstyle.api; import com.shopstyle.bo.Retailer; public class <API key> { private Retailer[] retailers; public Retailer[] getRetailers() { return retailers; } public void setRetailers(Retailer[] retailers) { this.retailers = retailers; } }
layout: post microblog: true category: photo date: '2012-11-08T13:42:47' title: "" slug: '12110812134247' location: '' mf-photo: - https://cdn.ericalba.com/blog-images/_ig-photos/photos/201211/<API key>.jpg Reading Star Trek: TNG 365 book, surprised by pgs 250/251. Thanks Paula/Terry for nice words/pic. <img src="https://cdn.ericalba.com/blog-images/_ig-photos/photos/201211/<API key>.jpg" />
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Distributed.Parsing { public interface IMember { <summary> A collection of attributes targeting the member. </summary> IEnumerable<IAttribute> Attributes { get; } <summary> A collection of required using statements for a given member to be compilable. </summary> IEnumerable<string> UsingDirectives { get; } } }
.logo { position:absolute; top:1%; z-index:9999999; left:1%; } .logo img{ height:200px; width:300px; } .businfos{ position:absolute; top:300px; z-index:9999999; right:2%; } .notif{ position:absolute; top:1%; width:273px; height:121px; z-index:9999999; right:2%; } .progress{ position:absolute; top:400px; z-index:9999999; left:1%; } .container { width:100%; margin:0; padding:0; background: #000; } .player_ iframe{ min-height:300px; width:100%; } .player_{ min-height:300px; margin:0; padding:0; position:relative; top:-5px; float:left; width:33%; } .player_.player_0 { top:0px; min-height: 500px; width: 100%; } .player_.player_0 iframe{ min-height: 500px; width: 100%; }
package gov.nist.sip.proxy.gui; import java.io.*; import java.util.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.net.*; import gov.nist.sip.proxy.*; import gov.nist.sip.proxy.Proxy; import tools.tracesviewer.*; import gov.nist.sip.proxy.registrar.*; public class ListenerProxy { protected ProxyLauncher proxyLauncher; protected ConfigurationFrame configurationFrame; protected HelpBox helpBox; protected boolean PROXY_STARTED; protected Process rmiregistryProcess; protected TracesViewer tracesViewer; public boolean isProxyStarted() { return PROXY_STARTED; } public ListenerProxy(ProxyLauncher proxyLauncher) { this.proxyLauncher=proxyLauncher; PROXY_STARTED=false; try{ configurationFrame=new ConfigurationFrame(proxyLauncher,"Configuration"); helpBox=new HelpBox(); // First, we have to start a registry for logging the traces //startRMIregistry(); } catch(Exception e) { e.printStackTrace(); } } public void <API key>(ActionEvent em){ try{ // Open the help page: Point point=proxyLauncher.getLocation(); configurationFrame.setLocation(point.x,point.y); configurationFrame.show(); } catch(Exception e) { e.printStackTrace(); } } public void helpMenuMouseEvent(MouseEvent ev) { try{ // Open the help page: Point point=proxyLauncher.getLocation(); helpBox.setLocation(point.x,point.y); helpBox.show(); } catch(Exception e) { e.printStackTrace(); } } public void startRMIregistry() { // Launches the rmiregistry: try{ rmiregistryProcess=null; Runtime runtime=Runtime.getRuntime(); // The root directory File file=new File("../../.."); String localRootDirectory=file.getAbsolutePath(); String javaHome= System.getProperty("java.home")+"/bin/"; String localSeparator= System.getProperty("path.separator"); String <API key>= localRootDirectory+"/classes"+localSeparator+ localRootDirectory+"/lib/antlr/antlrall.jar"+localSeparator+ localRootDirectory+"/lib/xerces/xerces.jar"; // The command to execute String commandLine=javaHome+"rmiregistry -J-Denv.class.path="+<API key>; ProxyDebug.println("Starting the rmiregistry:"); ProxyDebug.println(commandLine); rmiregistryProcess=runtime.exec(commandLine); } catch (Exception e) { ProxyDebug.println("ERROR, starting the rmiregistry, exception raised:"+e.getMessage()); //e.printStackTrace(); } } public void <API key>(ActionEvent ev) { try{ if (! PROXY_STARTED) { ProxyDebug.println("\n*****************************************************\n"); // First thing to do, get the configurations. Proxy proxy=new Proxy(proxyLauncher.<API key>()); proxyLauncher.setProxy(proxy); Registrar registrar=proxy.getRegistrar(); if (registrar!=null) { ProxyDebug.println("DEBUG, GUI chained to the registrar"); registrar.<API key>(proxyLauncher.registrationsList); } if (proxy.getConfiguration()!=null && proxy.getConfiguration().<API key>()) { proxy.start(); PROXY_STARTED=true; proxyLauncher.proxyButton.setBackground(new Color(51,153,255)); proxyLauncher.proxyButton.setText("Stop the proxy"); } else { new AlertFrame("ERROR: the configuration parameters are not correct!", JOptionPane.ERROR_MESSAGE); } ProxyDebug.println("\n*****************************************************\n"); } else stopProxy(); } catch(Exception e) { ProxyDebug.println("ERROR trying to start the proxy, exception raised:"+e.getMessage()); //e.printStackTrace(); } } public void stopProxy() { try{ ProxyDebug.println("\n*****************************************************\n"); ProxyDebug.println("Stopping the proxy"); PROXY_STARTED=false; proxyLauncher.proxyButton.setBackground(ProxyLauncher.<API key>); proxyLauncher.proxyButton.setText("Start the proxy"); Proxy proxy=proxyLauncher.getProxy(); RegistrationsList registrationsList=proxyLauncher.<API key>(); registrationsList.clean(); if (tracesViewer!=null) { try{ tracesViewer.close(); tracesViewer=null; ProxyDebug.println("DEBUG, traces viewer closed."); } catch(Exception e) { ProxyDebug.println("DEBUG, traces viewer"+ " not closed, exception raised:"); e.printStackTrace(); } } if (proxy!=null) { proxy.stop(); proxy=null; ProxyDebug.println("Proxy stopped"); } ProxyDebug.println("\n*****************************************************\n"); } catch(Exception e) { ProxyDebug.println("ERROR trying to stop the proxy, exception raised:"+e.getMessage()); e.printStackTrace(); } } public void <API key>(ActionEvent evt){ try{ if (! PROXY_STARTED) { new AlertFrame("ERROR: Start the proxy before viewing the traces!", JOptionPane.ERROR_MESSAGE); return; } if (tracesViewer!=null) { tracesViewer.show(); return; } Proxy proxy=proxyLauncher.getProxy(); if (proxy==null) { new AlertFrame("ERROR: Start the proxy before viewing the traces!", JOptionPane.ERROR_MESSAGE); return; } Configuration configuration=proxy.getConfiguration(); if (configuration==null ) { new AlertFrame("ERROR: Configure the proxy before viewing the traces!", JOptionPane.ERROR_MESSAGE); return; } if( configuration.stackIPAddress==null ) { new AlertFrame("ERROR: Specify the stack IP address!", JOptionPane.ERROR_MESSAGE); return; } /* String back="./tools/tracesviewer/images/back.gif"; String faces="../../tools/tracesviewer/images/faces.jpg"; String actors="../../tools/tracesviewer/images/comp.gif"; String logoNist="../../tools/tracesviewer/images/nistBanner.jpg"; */ String back="images/back.gif"; String faces="images/faces.jpg"; String actors="images/comp.gif"; String logoNist="images/nistBanner.jpg"; //tracesViewer=new TracesViewer("Proxy Traces Viewer", //configuration.stackIPAddress,"0",configuration.stackName,back,faces,actors,logoNist); if (configuration.serverLogFile!=null) { String fileName = configuration.serverLogFile; LogFileParser parser = new LogFileParser(); Hashtable traces = parser.parseLogsFromFile(fileName); tracesViewer=new TracesViewer (configuration.serverLogFile,traces,parser.logName,parser.logDescription, parser.auxInfo,"Proxy Traces Viewer", back,faces,actors,logoNist); tracesViewer.show(); } else { new AlertFrame("ERROR: Specify a server log file before viewing the traces!", JOptionPane.ERROR_MESSAGE); return; } } catch(Exception e) { ProxyDebug.println("ERROR, unable to see the traces, exception raised:"); e.printStackTrace(); } } }
function rcube_text_editor(k,m){var h=this,p=location.href.replace(/[?#].*$/,"").replace(/\/$/,""),l={selector:"#"+($("#"+m).is(".mce_editor")?m:"fake-editor-id"),cache_suffix:"s=4010900",theme:"modern",language:k.lang,content_css:rcmail.assets_path("program/js/tinymce/roundcube/content.css"),menubar:!1,statusbar:!1,toolbar_items_size:"small",<API key>:"font[face|size|color|style],span[id|class|align|style]",relative_urls:!1,remove_script_host:!1,convert_urls:!1,image_description:!1, paste_webkit_style:"color font-size font-family",paste_data_images:!0,browser_spellcheck:!0};this.spellcheck_observer=function(){};k.spellchecker&&(this.spellchecker=k.spellchecker,k.spellcheck_observer&&(this.spellchecker.<API key>=this.spellcheck_observer=k.spellcheck_observer));tinymce.<API key>||(tinymce.<API key>=!0,tinymce.util.XHR.on("beforeSend",function(b){b.xhr.setRequestHeader("X-Roundcube-Request",rcmail.env.request_token);b.settings&&b.settings.data&& /^method=addToDictionary/.test(b.settings.data)&&!/&lang=/.test(b.settings.data)&&(b.settings.data+="&lang="+h.editor.plugins.spellchecker.getLanguage())}));"identity"==k.mode?$.extend(l,{plugins:"autolink charmap code colorpicker hr image link paste tabfocus textcolor",toolbar:"bold italic underline alignleft aligncenter alignright alignjustify | outdent indent charmap hr link unlink image code forecolor | fontselect fontsizeselect",<API key>:function(b,a,d,c){h.<API key>(b, a,d)},<API key>:"image"}):$.extend(l,{plugins:"autolink charmap code colorpicker directionality emoticons link image media nonbreaking paste table tabfocus textcolor searchreplace"+(k.spellcheck?" spellchecker":""),toolbar:"bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent ltr rtl blockquote | forecolor backcolor | fontselect fontsizeselect | link unlink table | emoticons charmap image media | code searchreplace undo redo",<API key>:p+ "/?_task=utils&_action=spell_html&_remote=1",<API key>:rcmail.env.spell_lang,accessibility_focus:!1,<API key>:function(b,a,d,c){h.<API key>(b,a,d)},<API key>:"image media"});window.<API key>&&$.extend(l,window.<API key>);l.setup=function(b){b.on("init",function(a){h.init_callback(a)});b.on("SpellcheckStart SpellcheckEnd",function(a){h.spellcheck_active="spellcheckstart"==a.type;h.spellcheck_observer()});b.on("keypress", function(){rcmail.<API key>++})};this.id=m;this.editor=null;tinymce.init(l);this.init_callback=function(b){this.editor=b.target;if("compose"==rcmail.env.action){var a=$("#"+this.id),d=$("div.mce-toolbar-grp:first",a.parent()).height();if(200<d||d>a.height())return setTimeout(function(){h.init_callback(b)},300);var a={},d=rcube_find_object("_from"),c=rcmail.env.compose_focus_elem;rcmail.env.default_font&&(a["font-family"]=rcmail.env.default_font);rcmail.env.default_font_size&&(a["font-size"]= rcmail.env.default_font_size);(a["font-family"]||a["font-size"])&&$(this.editor.getBody()).css(a);d&&"select-one"==d.type&&(rcmail.env.<API key>||rcmail.change_identity(d),c&&c.id!=this.id&&(window.focus(),c.focus(),rcmail.env.compose_focus_elem=null));h.tabindex(c&&c.id==h.id);$(window).resize()}};this.tabindex=function(b){if("mail"==rcmail.env.task&&this.editor){var a=this.editor.getElement(),d=this.editor.getBody(),c=this.editor.<API key>().childNodes[0];a&&c&&(c.tabIndex= a.tabIndex);if(0<a.tabIndex){var f=null,c=[":prev",":next"],a=tinymce.DOM.select("*[tabindex="+a.tabIndex+"]:not(iframe)");tinymce.each(a,function(a,b){if(a.id==h.id)return f=b,!1});null!==f&&(a[f-1]&&a[f-1].id&&(c[0]=a[f-1].id),a[f+1]&&a[f+1].id&&(c[1]=a[f+1].id),this.editor.settings.tabfocus_elements=c.join(","))}bw.mz&&25>bw.vendver&&$(d).prop("contenteditable",!1).prop("contenteditable",!0);b&&d.focus()}};this.toggle=function(b,a){var d,c,f=$("#"+this.id),e=rcmail.env.identity?rcmail.env.signatures[rcmail.env.identity]: null,g=e&&e.text&&1<e.text.length;this.spellcheck_stop();if(b)c=f.val(),g&&(c=c.replace(/\r\n/,"\n"),c=c.replace(e.text.replace(/\r\n/,"\n"),"\u0002\u0003")),d=function(a){g&&(a=a.replace("\u0002\u0003",'<div id="_rc_sig">'+e.html+"</div>"));f.val(a);tinymce.execCommand("mceAddEditor",!1,h.id);h.editor&&(a=$(h.editor.getBody()),h.tabindex(!0),h.editor.selection.setCursorLocation(a.children().first().get(0)))},a?(d(c),c=!0):c=rcmail.plain2html(c,d);else if(this.editor){if(g){if(d=this.editor.dom.get("_rc_sig"))d= d.innerHTML;this.editor.dom.setHTML("_rc_sig","\u0002\u0003")}c=this.editor.getContent();var n=function(a){tinymce.execCommand("mceRemoveEditor",!1,h.id);h.editor=null;g&&(a=a.replace("\u0002\u0003","\n"+e.text));f.val(a).focus();rcmail.set_caret_pos(f.get(0),0)};a?(n(f.val()),c=!0):c=rcmail.html2plain(c,n);!c&&d&&this.editor.dom.setHTML("_rc_sig",d)}return c};this.spellcheck_start=function(){this.editor?(tinymce.execCommand("mceSpellCheck",!0),this.spellcheck_observer()):this.spellchecker&&this.spellchecker.spellCheck&& this.spellchecker.spellCheck()};this.spellcheck_stop=function(){var b=this.editor;b?b.plugins&&b.plugins.spellchecker&&this.spellcheck_active&&(b.execCommand("mceSpellCheck",!1),this.spellcheck_observer()):(b=this.spellchecker)&&b.state&&"ready"!=b.state&&"no_error_found"!=b.state&&$(b.spell_span).trigger("click")};this.spellcheck_state=function(){var b;if(this.editor)return this.spellcheck_active;if((b=this.spellchecker)&&b.state)return"ready"!=b.state&&"no_error_found"!=b.state};this.spellcheck_resume= function(b){var a=this.editor;if(a)a.plugins.spellchecker.markErrors(b);else if(a=this.spellchecker)a.prepare(!1,!0),a.processData(b)};this.get_language=function(){if(this.editor)return this.editor.settings.<API key>||rcmail.env.spell_lang;if(this.spellchecker)return GOOGIE_CUR_LANG};this.set_language=function(b){var a=this.editor;a&&(a.settings.<API key>=b);(a=this.spellchecker)&&a.setCurrentLanguage(b)};this.replace=function(b){var a=this.editor;if(a)a.getWin().focus(),a.selection.setContent(rcmail.quote_html(b).replace(/\r?\n/g, "<br/>"),{format:"text"});else if(a=rcube_find_object(this.id)){var d=$(a).is(":focus")?rcmail.get_input_selection(a):{start:0,end:0},c=a.value;pre=c.substring(0,d.start);end=c.substring(d.end,c.length);a.value=pre+b+end;rcmail.set_caret_pos(a,d.start+b.length);a.focus()}};this.get_content=function(b){var a=this.editor,d="",c=!1;b=$.extend({refresh:!0,selection:!1,nosig:!1,format:"html"},b);b.refresh&&this.spellcheck_stop();if(a)a.getWin().focus(),b.selection&&(d=a.selection.getContent({format:b.format})), d||(d=a.getContent({format:b.format}),c="text"==b.format);else if(a=rcube_find_object(this.id))b.selection&&$(a).is(":focus")&&(d=rcmail.get_input_selection(a).text),d||(d=a.value,c=!0);c&&b.nosig&&(b=d.indexOf("-- \n"),0<b&&(d=d.substring(0,b)));return d};this.change_signature=function(b,a){var d,c;c=-1;var f=$("#"+this.id),e=f.val(),g=rcmail.env.identity;this.editor?a&&rcmail.env.signatures?(f=this.editor.dom.get("_rc_sig"),f||(e=this.editor.getBody(),f=$('<div id="_rc_sig"></div>').get(0),rcmail.env.top_posting&& !rcmail.env.sig_below&&(1<e.childNodes.length||$(e).text())?(this.editor.getWin().focus(),g=this.editor.selection.getNode(),$(f).insertBefore("BODY"==g.nodeName?e.firstChild:g.nextSibling),$("<p>").append($("<br>")).insertBefore(f)):(e.appendChild(f),d=rcmail.env.top_posting?e.firstChild:$(f).prev())),f.innerHTML=rcmail.env.signatures[b]?rcmail.env.signatures[b].html:""):rcmail.env.top_posting||(d=$(this.editor.getBody()).children().last()):(a&&g&&rcmail.env.signatures&&rcmail.env.signatures[g]&& (g=rcmail.env.signatures[g].text,g=g.replace(/\r\n/g,"\n"),c=rcmail.env.top_posting?e.indexOf(g):e.lastIndexOf(g),0<=c&&(e=e.substring(0,c)+e.substring(c+g.length,e.length))),a&&rcmail.env.signatures&&rcmail.env.signatures[b]?(g=rcmail.env.signatures[b].text,g=g.replace(/\r\n/g,"\n"),0<=c?(e=e.substring(0,c)+g+e.substring(c,e.length),c-=1):e?rcmail.env.top_posting&&!rcmail.env.sig_below?(pos=rcmail.get_caret_pos(f.get(0)))?(e=e.substring(0,pos)+"\n"+g+"\n\n"+e.substring(pos,e.length),c=pos):(e="\n\n"+ g+"\n\n"+e.replace(/^[\r\n]+/,""),c=0):(e=e.replace(/[\r\n]+$/,""),c=!rcmail.env.top_posting&&e.length?e.length+1:0,e+="\n\n"+g):(e="\n\n"+g,c=0)):c=rcmail.env.top_posting?0:e.length,f.val(e),rcmail.set_caret_pos(f.get(0),c));this.editor&&d&&d.length&&(this.editor.selection.setCursorLocation(d.get(0)),this.editor.getWin().scroll(0,d.offset().top))};this.save=function(){this.editor&&this.editor.save()};this.focus=function(){(this.editor||rcube_find_object(this.id)).focus()};this.<API key>= function(b,a,d){var c,f,e,g=[];a=this.editor.windowManager.open({title:rcmail.gettext("select"+d),width:500,height:300,html:'<div id="image-selector-list"><ul></ul></div><div id="image-selector-form"><div id="image-upload-button" class="mce-widget mce-btn" role="button" tabindex="0"></div></div>',buttons:[{text:"Cancel",onclick:function(){h.file_browser_close()}}]});rcmail.env.file_browser_field=b;rcmail.env.file_browser_type=d;for(c in rcmail.env.attachments)(f=h.file_browser_entry(c,rcmail.env.attachments[c]))&& g.push(f);g.length&&$("#image-selector-list > ul").append(g).find("li:first").focus();$("div.mce-abs-end",a.getEl()).append($('<div class="hint">').text($("div.hint",rcmail.gui_objects.uploadform).text()));f=$("#image-upload-button").append($("<span>").text(rcmail.gettext("add"+d)));e=f.parents(".mce-panel").find("button:last").parent();f.keydown(function(a){if(9==a.which)return rcube_event.get_modifier(a)==SHIFT_KEY?$("#image-selector-list li:last").focus():e.focus(),!1});e.keydown(function(a){if(9== a.which)return rcube_event.get_modifier(a)==SHIFT_KEY?f.focus():$("#image-selector-list li:first").focus(),!1});this.hack_file_input(f,rcmail.gui_objects.uploadform);if(window.XMLHttpRequest&&XMLHttpRequest.prototype&&XMLHttpRequest.prototype.sendAsBinary||window.FormData)rcmail.env.filedrop||(rcmail.env.filedrop={}),rcmail.gui_objects.filedrop&&(rcmail.env.old_file_drop=rcmail.gui_objects.filedrop),rcmail.gui_objects.filedrop=$("#image-selector-form"),rcmail.gui_objects.filedrop.addClass("droptarget").bind("dragover dragleave", function(a){a.preventDefault();a.stopPropagation();$(this)["dragover"==a.type?"addClass":"removeClass"]("hover")}).get(0).addEventListener("drop",function(a){return rcmail.file_dropped(a)},!1);rcmail.env.file_dialog_event||(rcmail.env.file_dialog_event=!0,rcmail.addEventListener("fileuploaded",function(a){if(a=h.file_browser_entry(a.name,a.attachment))$("#image-selector-list > ul").prepend(a),a.focus()}))};this.file_browser_close=function(b){var a=$("#"+rcmail.env.file_browser_field);b&&a.val(b); this.editor.windowManager.close();a.focus();rcmail.env.old_file_drop&&(rcmail.gui_objects.filedrop=rcmail.env.old_file_drop)};this.file_browser_entry=function(b,a){if(a.complete&&a.mimetype){rcmail.file_upload_id&&rcmail.set_busy(!1,null,rcmail.file_upload_id);var d,c;switch(rcmail.env.file_browser_type){case "image":d=/^image\//i;break;case "media":d=/^video\//i;c="program/js/tinymce/roundcube/video.png";break;default:return}if(d.test(a.mimetype))return d=rcmail.env.comm_path+"&_from="+rcmail.env.action+ (rcmail.env.compose_id?"&_id="+rcmail.env.compose_id+"&_action=display-attachment":"&_action=upload-display")+"&_file="+b,c=$("<img>").attr({title:a.name,src:c?c:d+"&_thumbnail=1"}),$("<li>").attr({tabindex:0}).data("url",d).append($('<span class="img">').append(c)).append($('<span class="name">').text(a.name)).click(function(){h.file_browser_close($(this).data("url"))}).keydown(function(a){if(13==a.which)h.file_browser_close($(this).data("url"));else if(9==a.which)return rcube_event.get_modifier(a)== SHIFT_KEY?$(this).prev().focus().length||$("#image-upload-button").parents(".mce-panel").find("button:last").parent().focus():$(this).next().focus().length||$("#image-upload-button").focus(),!1})}};this.hack_file_input=function(b,a){function d(a){f.css({top:a.pageY-g.top-10+"px",left:a.pageX-g.left-10+"px"})}var c=$(b),f=$("<input>").attr("name","_file[]"),e=$("<form>").attr({method:"post",enctype:"multipart/form-data"}),g=c.offset();a&&(f.attr("name",$('input[type="file"]',a).attr("name")),e.attr("action", $(a).attr("action")).append($("<input>").attr({type:"hidden",name:"_token",value:rcmail.env.request_token})));f.attr({type:"file",multiple:"multiple",size:5,title:"",tabindex:-1}).change(function(){rcmail.upload_file(e,"upload")}).click(function(){setTimeout(function(){c.mouseleave()},20)}).css({opacity:0,cursor:"pointer",position:"relative",outline:"none"}).appendTo(e);navigator.userAgent.match(/Firefox|MSIE/)&&f.css({marginLeft:"-80px"});c.css({overflow:"hidden",cursor:"pointer"}).mouseenter(function(){this.__active= !0}).mousemove(function(a){this.__active?d(a):$(this).mouseleave()}).mouseleave(function(){f.css({top:"-10000px",left:"-10000px"});this.__active=!1}).click(function(a){this.__active||(this.__active=!0,d(a),f.trigger(a))}).keydown(function(a){13==a.which&&f.trigger("click")}).mouseleave().append(e)}};
Imports System.IO Imports Grasshopper.Kernel.Parameters Public Class FileWatcher Inherits OwlComponentBase Sub New() MyBase.New("File Watch", "Watcher", "Watch file for changes", "Owl", "Scripting") Me.Message = DateTime.Now.ToLongTimeString End Sub Protected Overrides ReadOnly Property Icon As Bitmap Get Return My.Resources.Icons_new_06 End Get End Property Public Overrides ReadOnly Property ComponentGuid As Guid Get Return New Guid("{<API key>}") End Get End Property Public Overrides ReadOnly Property Exposure As GH_Exposure Get Return GH_Exposure.primary End Get End Property Protected Overrides Sub RegisterInputParams(pManager As <API key>) pManager.AddParameter(New Param_FilePath, "Directory", "D", "Directory to watch", GH_ParamAccess.tree) Me.Params.Input(0).Optional = True End Sub Protected Overrides Sub <API key>(pManager As <API key>) pManager.AddTextParameter("Path", "P", "Path will be outputted here whenever a change happens", GH_ParamAccess.item) End Sub Public Overrides Sub RemovedFromDocument(document As GH_Document) MyBase.RemovedFromDocument(document) RemoveWatcher() End Sub Dim watcher As FileSystemWatcher = Nothing Dim filename As String = "" Protected Overrides Sub SolveInstance(DA As IGH_DataAccess) Me.Message = DateTime.Now.ToLongTimeString Dim FilePath As String = GetInput(DA) If FilePath = "" Then If watcher IsNot Nothing Then RemoveWatcher() filename = "" End If Else If FilePath <> filename Then RemoveWatcher() filename = FilePath AddWatcher(filename) DA.SetData(0, filename) Else If IsFileReady(filename) Then DA.SetData(0, filename) Else DA.<API key>() End If End If End If End Sub Private Function GetInput(DA As IGH_DataAccess) As String Dim ghs As New GH_Structure(Of GH_String) If Not DA.GetDataTree(0, ghs) Then Return "" Dim str As GH_String = TryCast(ghs.AllData(True)(0), GH_String) If str Is Nothing Then Return "" Return str.Value End Function Private Sub AddWatcher(FilePath As String) Dim pth As String = Path.GetDirectoryName(FilePath) Dim fname As String = Path.GetFileName(FilePath) Dim watch As FileSystemWatcher = Nothing watch = New FileSystemWatcher(pth) AddHandler watch.Created, AddressOf FileChanged AddHandler watch.Changed, AddressOf FileChanged AddHandler watch.Deleted, AddressOf FileChanged AddHandler watch.Renamed, AddressOf FileChanged watch.EnableRaisingEvents = True watcher = watch End Sub Private Sub RemoveWatcher() If watcher Is Nothing Then Return RemoveHandler watcher.Created, AddressOf FileChanged RemoveHandler watcher.Changed, AddressOf FileChanged RemoveHandler watcher.Deleted, AddressOf FileChanged RemoveHandler watcher.Renamed, AddressOf FileChanged watcher.Dispose() End Sub Dim act As New Action(AddressOf Exp) Private Sub EvalComponent() Rhino.RhinoApp.<API key>.Invoke(act) End Sub Private Sub Exp() ExpireSolution(True) Message = DateTime.Now.ToLongTimeString End Sub Private Sub FileChanged(sender As Object, e As FileSystemEventArgs) If Path.GetFileName(e.FullPath) <> Path.GetFileName(filename) Then Return Dim flags As WatcherChangeTypes = WatcherChangeTypes.Created + WatcherChangeTypes.Renamed + WatcherChangeTypes.Changed If e.ChangeType & flags Then If IsFileReady(filename) Then EvalComponent() End If If e.ChangeType = WatcherChangeTypes.Deleted Then RemoveWatcher() EvalComponent() End If End If End Sub Private Function IsFileReady(Path As String) As Boolean Try Using str = File.Open(Path, FileMode.Open, FileAccess.ReadWrite) Return True End Using Catch ex As Exception Return False End Try End Function End Class
/*global angular, CustomJsSlider, Integers, CheckRange*/ angular.module('modules.directives', []) .directive('customJsSlider', CustomJsSlider) .directive('integers', Integers) .directive('checkRange', CheckRange);
<?php namespace webignition\Tests\Model\Stripe; use webignition\Model\Stripe\Coupon; use webignition\Model\Stripe\Discount; use webignition\Model\Stripe\Period; class DiscountTest extends AbstractBaseTest { public function <API key>() { $discount = new Discount($this->loadFixture('/Discount/discount.json')); $this->assertEquals('cus_4ZpdOIgXTGsiax', $discount->getCustomerId()); $period = $discount->getPeriod(); $this->assertInstanceOf(Period::class, $period); $this->assertEquals(1407852586, $period->getStart()); $this->assertEquals(null, $period->getEnd()); $coupon = $discount->getCoupon(); $this->assertInstanceOf(Coupon::class, $coupon); $this->assertEquals('TMS', $coupon->getId()); } }
ractive-rails ========== Server side In your `Gemfile`: ruby gem 'ractive-rails', github: 'kivikakk/ractive-rails' You can choose from the following Ractive versions: * `ractive` -- no support for older browsers; lets you generate Ractive templates in the browser * `ractive.runtime` -- no support for older browsers; does not let you generate templates browser-side * `ractive-legacy` -- with support for older browsers; lets you generate Ractive templates in the browser * `ractive-legacy.runtime` -- with support for older browsers; does not let you generate templates browser-side Include the desired Ractive distribution in the asset pipeline, along with your view templates: javascript //= require ractive //= require_tree ./views Extensions supported template.rac template.ractive Client side javascript var template = RactiveTemplates["path/to/your/template"]; The templates are compiled, so you only need a `.runtime` distribution if you use only templates compiled by `ractive-rails`.
# -*- coding: utf-8 -*- from datetime import datetime __author__ = u"Tomas Holub" __email__ = u"tomas.holub@olc.cz" class Message(object): u"""Basic class for Messages that goes into the Queue""" MESSAGE_TYPE = u"basic" STATUS_NEW = u"new" STATUS_QUEUED = u"queued" STATUS_DEQUEUED = u"dequeued" def __init__(self): u""" Class constructor """ self.__status = self.STATUS_NEW self.__queuedDate = None self.__dequeuedDate = None def setQueued(self): u""" Mark message as queued """ self.__status = self.STATUS_QUEUED self.__queuedDate = datetime.now() def setDequeued(self): u""" Mark message that it was removed from the queue """ self.__status = self.STATUS_DEQUEUED self.__dequeuedDate = datetime.now() @property def status(self): u""" Returns message status :rtype : unicode """ return self.__status @property def queuedDate(self): u""" Returns date when was message put in the queue :rtype : datetime """ return self.__queuedDate @property def dequeuedDate(self): u""" Returns date when message was removed from the queue :rtype : datetime """ return self.__dequeuedDate