code
stringlengths
3
1.05M
repo_name
stringlengths
4
116
path
stringlengths
3
942
language
stringclasses
30 values
license
stringclasses
15 values
size
int32
3
1.05M
#encoding:UTF-8 # ISS017 - Character Improve 1.1 #==============================================================================# # ** ISS - Character Improve #==============================================================================# # ** Date Created : 08/04/2011 # ** Date Modified : 08/10/2011 # ** Created By : IceDragon # ** For Game : Code JIFZ # ** ID : 017 # ** Version : 1.1 # ** Requires : ISS000 - Core(1.9 or above) #==============================================================================# ($imported ||= {})["ISS-CharacterImprove"] = true #==============================================================================# # ** ISS #==============================================================================# module ISS install_script(17, :system) end #==============================================================================# # ** Game_Character #==============================================================================# class Game_Character #--------------------------------------------------------------------------# # * Public Instance Variables #--------------------------------------------------------------------------# attr_accessor :sox, :soy, :soz #--------------------------------------------------------------------------# # * alias-method :initialize #--------------------------------------------------------------------------# alias :iss017_gmc_initialize :initialize unless $@ def initialize(*args, &block) @sox, @soy, @soz = 0, 0, 0 iss017_gmc_initialize(*args, &block) end #--------------------------------------------------------------------------# # * alias-method :screen_x #--------------------------------------------------------------------------# alias :iss017_gmc_screen_x :screen_x unless $@ def screen_x(*args, &block) return iss017_gmc_screen_x(*args, &block) + @sox end #--------------------------------------------------------------------------# # * alias-method :screen_y #--------------------------------------------------------------------------# alias :iss017_gmc_screen_y :screen_y unless $@ def screen_y(*args, &block) return iss017_gmc_screen_y(*args, &block) + @soy end #--------------------------------------------------------------------------# # * alias-method :screen_z #--------------------------------------------------------------------------# alias :iss017_gmc_screen_z :screen_z unless $@ def screen_z(*args, &block) return iss017_gmc_screen_z(*args, &block) + @soz end end #=*==========================================================================*=# # ** END OF FILE #=*==========================================================================*=#
Archeia/Kread-Ex-Scripts
IceDragon2000/lib/iss/017_character_improve.rb
Ruby
mit
2,756
# mozaik-ext-sheets List rows from Google Sheets in Mozaïk dashboard. The extension can be handy for various use cases where data is maintained in Google Sheets: - List events (including dates etc) - Show game results - Show event participants, company vacation listing - Etc. ![preview](https://raw.githubusercontent.com/SC5/mozaik-ext-sheets/master/preview.png) - The widget tries to provide a generic but easy-to-use way to show content in dashboard. - You can also utilise the Sheets functions as the outcome is shown in widget - Use format functions to format some cell data - Use filter function to leave out some results ## Setup - Install module ```bash npm install --save mozaik-ext-sheets ``` - Create a project and service account in Google Developer Console - Enable API: Drive API - Collect service email and .p12 file - Convert .p12 file into .PEM - Configure service key and .PEM file into dashboard ``config.js`` file and environment variables / ``.env`` file: ```javascript api: { sheets: { googleServiceEmail: process.env.GOOGLE_SERVICE_EMAIL, googleServiceKeypath: process.env.GOOGLE_SERVICE_KEYPATH } } ``` - Done. ## Widget: List Show cell contents in a listing. Use dashboard theme to customize the outcome to match with your requirements. ### parameters key | required | description --------------|----------|--------------- `documentId` | yes | *Sheets document id, taken form web UI* `sheetNo` | no | *Sheet order number, starting from 0. Defaults to first: `0`* `range` | no | *Range from where to list data. Example: `A2:C10` or `A2:`. Defaults to full sheet* `fields` | no | *Columns to list, using advanced formatting* `format` | no | *Custom formating functions in object, where key is name of the formatter and used like {COLUMNLETTER!formatter}. See usage for examples* `filter` | no | *Filter some rows out of the outcome by implementing the function. See usage for examples* ### usage Imaginary example of Google Sheet document cells: ``` | A | B | C | D | 1 | 2015-01-28 | React.js Conf | Facebook HQ | | 2 | 2015-07-02 | ReactEurope | Paris, France | | ``` One widget in dashboard config: ```javascript // widget in config.js { type: 'sheets.list', // You can find the documentId in sheet URL documentId: 'abasdfsdfafsd123123', range: 'A1:D10', // Values (cells) to show on each row. Use one or multiple column letters: // Uses https://www.npmjs.com/package/string-format for formatting fields: [ 'Event date: {A!date}', '{B!uppercase}', '{C} {D}' ], // Custom formatter functions, name must match with the usage: !method // NOTE: Call method.toString() to every function! // NOTE: `moment` is available format: { // !date formatter date: function(s){ return new moment(s).format('YYYY-MM-DD'); }.toString(), // !uppercase formatter uppercase: function(s) { return s.toUpperCase(); }.toString() }, // Custom function to filter some results rows // If defined, each row is processed through it. // Return `false` if you want to filter the row out and `true` // for inclusion. // NOTE: Only one variable is passed, containing all columns from current row // NOTE: Variable `columns` does not contain the columns out of the range // NOTE: Call method.toString() to every function! filter: function(columns){ var eventStart = moment(columns.B, ['YYYY-MM-DD']); // Filter out the results that are in past if (eventStart.isBefore(new moment())) { return false; } return true; }.toString(), columns: 1, rows: 2, x: 0, y: 0 } ``` ## License Module is MIT -licensed ## Credit Module is backed by: <a href="http://sc5.io"> <img src="http://logo.sc5.io/78x33.png" style="padding: 4px 0;"> </a>
jtbonhomme/mozaik-ext-sheets
README.md
Markdown
mit
3,954
function* generatorFn() { yield 'foo'; yield 'bar'; return 'baz'; } let generatorObject1 = generatorFn(); let generatorObject2 = generatorFn(); console.log(generatorObject1.next()); // { done: false, value: 'foo' } console.log(generatorObject2.next()); // { done: false, value: 'foo' } console.log(generatorObject2.next()); // { done: false, value: 'bar' } console.log(generatorObject1.next()); // { done: false, value: 'bar' } GeneratorYieldExample03.js
msfrisbie/pjwd-src
Chapter7IteratorsAndGenerators/Generators/InterruptingExecutionWithYield/InterruptingExecutionWithYieldExample03.js
JavaScript
mit
472
<div class="four wide column center aligned votes"> <div class="ui statistic"> <div class="value"> {{ article.votes }} </div> <div class="label"> Points </div> </div> </div> <div class="twelve wide column"> <a class="ui large header" href="{{ article.link }}"> {{ article.title }} </a> <div class="meta">({{ article.domain() }})</div> <ul class="ui big horizontal list votes"> <li class="item"> <a href="" (click)="voteUp()"> <i class="arrow up icon"></i> upvote </a> <li class="item"> <a href="" (click)="voteDown()"> <i class="arrow up icon"></i> downvote </a> </li> </ul> </div>
twolun/ng-book-4
angular4-reddit/src/app/article/article.component.html
HTML
mit
640
#pragma once #include "animations/display.h" #include "animations/AnimationProgram.h" #include "animations/PaintPixel.h" #include "blewiz/BLECharacteristic.h" #include "freertos/task.h" class BadgeService : public BLEService { public: BadgeService(Display &display, AnimationProgram &animationProgram); virtual ~BadgeService(); void init(); void setPaintPixel(PaintPixel *paintPixel) { this->paintPixel = paintPixel; } void onStarted() override; void onConnect() override; void onDisconnect() override; private: Display &display; AnimationProgram &animationProgram; PaintPixel *paintPixel; BLECharacteristic batteryCharacteristic; BLEDescriptor batteryNotifyDesciptor; BLECharacteristic brightnessCharacteristic; BLECharacteristic programCharacteristic; BLECharacteristic downloadCharacteristic; BLECharacteristic paintPixelCharacteristic; BLECharacteristic paintFrameCharacteristic; BLECharacteristic appVersionCharacteristic; BLECharacteristic frameDumpCharacteristic; static void batteryTask(void *parameters); TaskHandle_t taskHandle; std::vector<uint8_t> paintFrame; };
fweiss/badge
main/BadgeService.h
C
mit
1,174
/* Document : colors Author : Little Neko Description: template colors */ /* Table of Content ================================================== #BOOSTRAP CUSTOMIZATION #TYPOGRAPHY #LINKS AND BUTTONS #HEADER #MAIN MENU #FOOTER #SLIDERS #PORTFOLIO #MISCELANIOUS #NEKO CSS FRAMEWORK */ /* BOOSTRAP CUSTOMIZATION ================================================== */ /** tabs **/ .panel-default>.panel-heading {background:#EB7F37; } .panel-default>.panel-heading:hover {background:#fff; } .panel-default>.panel-heading:hover a {color:#EB7F37; } .panel-title>a {color:#fff;} .panel-title>a:hover {text-decoration: none;} /* END BOOSTRAP CUSTOMIZATION ================================================== */ /* TYPOGRAPHY ================================================== */ body { color:#777; background: #fff; } blockquote small { color:inherit; } h1, h2, h3, h4, h5, h6 { color:#222; } h2 { color:#888; } h2 i {color:#999} h2.subTitle:after, h1.noSubtitle:after{ background-color:#EB7F37; } /*** parallax sections ***/ .paralaxText blockquote:before, .paralaxText blockquote:after { color:#fff; } #home, #paralaxSlice1, #paralaxSlice2, #paralaxSlice3, #paralaxSlice4 { background-color:#EB7F37; } #home { background-image:url('../images/theme-pics/paralax-grey-3.jpg'); } #paralaxSlice1 { background-image: url('../images/theme-pics/paralax-1.jpg'); } #paralaxSlice2 { background-image: url('../images/theme-pics/paralax-grey-2.jpg'); } #paralaxSlice3 { background-image: url('../images/theme-pics/paralax-grey-3.jpg'); } #paralaxSlice4 { background-image: url('../images/theme-pics/paralax-4.jpg'); } .paralaxText blockquote, .paralaxText h1, .paralaxText h2, .paralaxText h3, .paralaxText p, .paralaxText i{ color:#fff; } /* END TYPOGRAPHY ================================================== */ /* LINKS AND BUTTONS ================================================== */ a { color:#EB7F37; } a:hover, .scrollspyNav .active a { color:#EB7F37; } ul.iconsList li a { color:#555 } ul.iconsList li a:hover, ul.iconsList i { color:#EB7F37 } /*** buttons ***/ .btn { background:#EB7F37; color:#fff; border:2px solid #fff; } .btn:hover { color:#EB7F37; border-color:#eee; text-shadow:none; background:#fff } .btn-primary { background: #006dcc; } .btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .btn-primary.disabled, .btn-primary[disabled] { background: #555; } .btn-info { background: #49AFCD; } .btn-success { background: #5BB75B; } .btn-warning { background: #FAA732; } .btn-danger { background: #DA4F49; } .btn-link, .btn-link:active, .btn-link[disabled], .btn-link:hover { background:none; border:none; -moz-box-shadow: none; -webkit-box-shadow:none; box-shadow: none; color:#49AFCD; } .btnWrapper { border:1px solid #ccc; } /* END LINKS AND BUTTONS ================================================== */ /* MAIN MENU ================================================== */ #mainHeader{ background-color: white; -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); -moz-box-shadow: 0 1px 10px rgba(0,0,0,.1); box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); } #mainMenu ul li a, #resMainMenu ul li a { color:#444; } .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav>li>a:hover, .navbar-default .navbar-nav>li>a:focus, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus { background: #EB7F37; color:#fff; } /* END MAIN MENU ================================================== */ /* FOOTER ================================================== */ footer { color:#777; background:#eee; } #footerRights { background-color:#fff; color:#999; } p.credits { color:#555; } p.credits a { color:#EB7F37; } /* END FOOTER ================================================== */ /* HOME ================================================== */ #home h1 {color:#FFFFFF;} /* END HOME ================================================== */ /* SLIDERS ================================================== */ /*** FLEX ***/ .flexslider { box-shadow:none; } .slides .txt div { background:#444; color:#FFFFFF; } .flexslider .flex-direction-nav a { background-color:#EB7F37; } .flexslider .flex-control-paging li a:hover, #sliderWrapper .flex-control-paging li a.flex-active{ background: #fff; border:2px solid #fff; } .flexslider .flex-control-paging li a { background: transparent; border:2px solid rgba(255,255,255,0.5); } .flexslider .flex-control-nav { background:transparent; } .flexslider h1 { color:#fff; background-color:#EB7F37; } .flexslider h2 { color:#fff; background-color:#333; } .flexslider .caption p { background-color:#fff; color:#555 } /*** flexHome ***/ #flexHome h1 { color:#fff; background:none; } #flexHome h2 { color:#fff; background:none; } /*** END FLEX SLIDER ***/ /* END SLIDERS ================================================== */ /* PORTFOLIO ================================================== */ nav#filter a { background-color: #EEE; color:#555; } nav#filter a:hover, nav#filter a.current { background-color: #EB7F37; color:#fff; } li.filterTitle { color:#4F6266; } section#projectDescription { background-color:#F8F8F8 } .mask{background-color: #EB7F37;} /* END PORTFOLIO ================================================== */ /* MISCELANIOUS ================================================== */ /*** hover images ***/ .iconLinks a span {color:#fff;} /*** pricing table ***/ .pricingBloc { background-color:#fff; border:1px solid rgba(0, 0, 0, 0.2); } .pricingBloc ul li { border-bottom:1px solid #ddd; color:#444!important; } .pricingBloc ul li:last-child { border-bottom:none; } .pricingBloc h2 { background-color:#555; color:#888!important; border:none; } .pricingBloc h3 { background-color:#777; color:#fff!important; } .pricingBloc p { background-color:#eee; color:#444!important; } .pricingBloc.focusPlan { margin-top:0; border-color:#D1D1D1; } .pricingBloc.focusPlan h2{ background-color:#333; color:#fff!important; } .pricingBloc.focusPlan h3 { background-color:#EB7F37; padding:1.25em; color:#fff!important; } /*** Form ***/ .form-control:focus{ border: none; background-color:#ddd; box-shadow:none; -webkit-box-shadow:none; -moz-box-shadow:none; } .form-control { color: #444; background-color:#ededed; border:none; } .error {color: #B94A48; background-color: #F2DEDE; border-color: #EED3D7;} label.error {color:#fff; background-color: #B94A48; border:none} #projectQuote, #projectQuote h3{background:#ddd;color:#444;} /* END MISCELANIOUS ================================================== */ /* NEKO CSS FRAMEWORK ================================================== */ /*** Feature box **/ .boxFeature i{color:#EB7F37;} /*** slices ***/ .slice{ background-color:#fff; } /*** call to action ***/ .ctaBox {border:2px solid rgba(0,0,0,0.05);} .ctaBoxFullwidth{border:none} .ctaBox blockquote { color:#fff; } /*color1*/ .color1, .slice.color1, .bulle.color1, .ctaBox.color1{ background-color:#F7F7F7; color:#444; } .color1 h1, .color1 h2, .color1 h3, .color1 h4, .color1 blockquote, .color1 a{ color:#444; } .color1 a.btn{color:#fff;} .color1 a.btn:hover{color:#EB7F37;} /*color4*/ .color4, .slice.color4, .bulle.color4, .ctaBox.color4{ background-color:#EB7F37; color:#fff; } .color4 h1, .color4 h2, .color4 h3, .color4 h4, .color4 blockquote, .color4 a { color:#fff; } .color4 h2.subTitle:after, .color4 h1.noSubtitle:after { background:#fff; } /*** icons ***/ .iconRounded {border:2px solid #EB7F37;color:#EB7F37;background-color:#fff;} .iconRounded:hover, .color1 .iconRounded:hover{background-color:#EB7F37;color:#fff;} .color1 .iconRounded {color:#EB7F37;} .color4 .iconRounded {background-color:#FFF;color:#EB7F37;} /* END NEKO CSS FRAMEWORK ================================================== */
peihsi/www_taichung_m_s_pub
One_page/css/orange.css
CSS
mit
7,897
<?xml version="1.0" ?><!DOCTYPE TS><TS language="vi_VN" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About bitcoinlite</source> <translation type="unfinished"/> </message> <message> <location line="+39"/> <source>&lt;b&gt;bitcoinlite&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 bitcoinlite 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://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young ([email protected]) and UPnP software written by Thomas Bernard.</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation>Tạo một địa chỉ mới</translation> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation type="unfinished"/> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation type="unfinished"/> </message> <message> <location line="-46"/> <source>These are your bitcoinlite 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 type="unfinished"/> </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 bitcoinlite 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 type="unfinished"/> </message> <message> <location line="-14"/> <source>Verify a message to ensure it was signed with a specified bitcoinlite 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 type="unfinished"/> </message> <message> <location filename="../addressbookpage.cpp" line="+65"/> <source>Copy &amp;Label</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Edit</source> <translation type="unfinished"/> </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 type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+0"/> <source>Address</source> <translation type="unfinished"/> </message> <message> <location line="+36"/> <source>(no label)</source> <translation type="unfinished"/> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+15"/> <source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+103"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation type="unfinished"/> </message> <message> <location line="-133"/> <location line="+60"/> <source>Wallet encrypted</source> <translation type="unfinished"/> </message> <message> <location line="-58"/> <source>bitcoinlite 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 type="unfinished"/> </message> <message> <location line="-56"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <location line="+50"/> <source>The supplied passphrases do not match.</source> <translation type="unfinished"/> </message> <message> <location line="-38"/> <source>Wallet unlock failed</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+12"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation type="unfinished"/> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation type="unfinished"/> </message> </context> <context> <name>BitcoinGUI</name> <message> <location filename="../bitcoingui.cpp" line="+280"/> <source>Sign &amp;message...</source> <translation type="unfinished"/> </message> <message> <location line="+242"/> <source>Synchronizing with network...</source> <translation type="unfinished"/> </message> <message> <location line="-308"/> <source>&amp;Overview</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>&amp;Transactions</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+1"/> <source>Quit application</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Show information about bitcoinlite</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>&amp;Encrypt Wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+250"/> <source>~%n block(s) remaining</source> <translation type="unfinished"><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 bitcoinlite address</source> <translation type="unfinished"/> </message> <message> <location line="+45"/> <source>Modify configuration options for bitcoinlite</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 type="unfinished"/> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>&amp;Debug window</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation type="unfinished"/> </message> <message> <location line="-5"/> <source>&amp;Verify message...</source> <translation type="unfinished"/> </message> <message> <location line="-200"/> <source>bitcoinlite</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+178"/> <source>&amp;About bitcoinlite</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+8"/> <source>&amp;Settings</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>&amp;Help</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Tabs toolbar</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Actions toolbar</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <location line="+9"/> <source>[testnet]</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <location line="+60"/> <source>bitcoinlite client</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+70"/> <source>%n active connection(s) to bitcoinlite network</source> <translation type="unfinished"><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></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></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n hour(s) ago</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s) ago</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+6"/> <source>Up to date</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Catching up...</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+1"/> <source>Incoming transaction</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation type="unfinished"/> </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 bitcoinlite 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 type="unfinished"/> </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 type="unfinished"/> </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></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n minute(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n hour(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation type="unfinished"><numerusform></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. bitcoinlite 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 type="unfinished"/> </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 type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+5"/> <source>Label</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Address</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Confirmations</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Confirmed</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Priority</source> <translation type="unfinished"/> </message> <message> <location filename="../coincontroldialog.cpp" line="-515"/> <source>Copy address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+26"/> <source>Copy amount</source> <translation type="unfinished"/> </message> <message> <location line="-25"/> <source>Copy transaction ID</source> <translation type="unfinished"/> </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 type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation type="unfinished"/> </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 type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+4"/> <source>New sending address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation type="unfinished"/> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation type="unfinished"/> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid bitcoinlite address.</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation type="unfinished"/> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+420"/> <location line="+12"/> <source>bitcoinlite-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 type="unfinished"/> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation type="unfinished"/> </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 bitcoinlite after logging in to the system.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Start bitcoinlite 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 type="unfinished"/> </message> <message> <location line="+6"/> <source>Automatically open the bitcoinlite 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 type="unfinished"/> </message> <message> <location line="+7"/> <source>Connect to the bitcoinlite 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 type="unfinished"/> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation type="unfinished"/> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting bitcoinlite.</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Whether to show bitcoinlite 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 type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation type="unfinished"/> </message> <message> <location filename="../optionsdialog.cpp" line="+55"/> <source>default</source> <translation type="unfinished"/> </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 bitcoinlite.</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation type="unfinished"/> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation type="unfinished"/> </message> <message> <location line="+33"/> <location line="+231"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the bitcoinlite 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 type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation type="unfinished"/> </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 type="unfinished"/> </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 type="unfinished"/> </message> </context> <context> <name>QRCodeDialog</name> <message> <location filename="../forms/qrcodedialog.ui" line="+14"/> <source>QR Code Dialog</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <source>Request Payment</source> <translation type="unfinished"/> </message> <message> <location line="+56"/> <source>Amount:</source> <translation 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 type="unfinished"/> </message> <message> <location line="+10"/> <location line="+23"/> <location line="+26"/> <location line="+23"/> <location line="+23"/> <location line="+36"/> <location line="+53"/> <location line="+23"/> <location line="+23"/> <location filename="../rpcconsole.cpp" line="+348"/> <source>N/A</source> <translation type="unfinished"/> </message> <message> <location line="-217"/> <source>Client version</source> <translation type="unfinished"/> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation type="unfinished"/> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation type="unfinished"/> </message> <message> <location line="+49"/> <source>Startup time</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>Network</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>On testnet</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Block chain</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Last block time</source> <translation type="unfinished"/> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Show the bitcoinlite-Qt help message to get a list with possible bitcoinlite 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 type="unfinished"/> </message> <message> <location line="-260"/> <source>Build date</source> <translation type="unfinished"/> </message> <message> <location line="-104"/> <source>bitcoinlite - Debug window</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>bitcoinlite Core</source> <translation type="unfinished"/> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Open the bitcoinlite debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation type="unfinished"/> </message> <message> <location line="+102"/> <source>Clear console</source> <translation type="unfinished"/> </message> <message> <location filename="../rpcconsole.cpp" line="-33"/> <source>Welcome to the bitcoinlite 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 type="unfinished"/> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation type="unfinished"/> </message> </context> <context> <name>SendCoinsDialog</name> <message> <location filename="../forms/sendcoinsdialog.ui" line="+14"/> <location filename="../sendcoinsdialog.cpp" line="+182"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+6"/> <location line="+5"/> <location line="+5"/> <source>Send Coins</source> <translation type="unfinished"/> </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 type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation type="unfinished"/> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>Balance:</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation type="unfinished"/> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-173"/> <source>Enter a bitcoinlite address (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</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 type="unfinished"/> </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 type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Error: Transaction creation failed.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> <message> <location line="+251"/> <source>WARNING: Invalid bitcoinlite address</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>(no label)</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+9"/> <source>&amp;Label:</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>The address to send the payment to (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</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 type="unfinished"/> </message> <message> <location line="+7"/> <source>Paste address from clipboard</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Remove this recipient</source> <translation type="unfinished"/> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a bitcoinlite address (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source> <translation type="unfinished"/> </message> </context> <context> <name>SignVerifyMessageDialog</name> <message> <location filename="../forms/signverifymessagedialog.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <location line="+124"/> <source>&amp;Sign Message</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</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 type="unfinished"/> </message> <message> <location line="-193"/> <source>Paste address from clipboard</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Enter the message you want to sign here</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>Copy the current signature to the system clipboard</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this bitcoinlite address</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Reset all sign message fields</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation type="unfinished"/> </message> <message> <location line="-87"/> <location line="+70"/> <source>&amp;Verify Message</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source> <translation type="unfinished"/> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified bitcoinlite address</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Reset all verify message fields</source> <translation type="unfinished"/> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a bitcoinlite address (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Enter bitcoinlite signature</source> <translation type="unfinished"/> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation type="unfinished"/> </message> <message> <location line="-81"/> <location line="+8"/> <location line="+73"/> <location line="+8"/> <source>Please check the address and try again.</source> <translation type="unfinished"/> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation type="unfinished"/> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+19"/> <source>Open until %1</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-2"/> <source>Open for %n block(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+8"/> <source>conflicted</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1/offline</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>Status</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Source</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Generated</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation type="unfinished"/> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>label</source> <translation type="unfinished"/> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation type="unfinished"/> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation type="unfinished"/> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Net amount</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Message</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Comment</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Generated coins must mature 20 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 type="unfinished"/> </message> <message> <location line="+8"/> <source>Transaction</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Inputs</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>true</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>false</source> <translation type="unfinished"/> </message> <message> <location line="-211"/> <source>, has not been successfully broadcast yet</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>unknown</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+226"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Type</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Address</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Amount</source> <translation type="unfinished"/> </message> <message> <location line="+60"/> <source>Open until %1</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Confirmed (%1 confirmations)</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-15"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></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 type="unfinished"/> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation type="unfinished"/> </message> <message> <location line="+42"/> <source>Received with</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Received from</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Sent to</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Mined</source> <translation type="unfinished"/> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation type="unfinished"/> </message> <message> <location line="+190"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+55"/> <location line="+16"/> <source>All</source> <translation type="unfinished"/> </message> <message> <location line="-15"/> <source>Today</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This week</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This month</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Last month</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This year</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Range...</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Received with</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Sent to</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>To yourself</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Mined</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Other</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Min amount</source> <translation type="unfinished"/> </message> <message> <location line="+34"/> <source>Copy address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Edit label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation type="unfinished"/> </message> <message> <location line="+144"/> <source>Export Transaction Data</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Type</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>ID</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+8"/> <source>to</source> <translation type="unfinished"/> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+206"/> <source>Sending...</source> <translation type="unfinished"/> </message> </context> <context> <name>bitcoin-core</name> <message> <location filename="../bitcoinstrings.cpp" line="+33"/> <source>bitcoinlite version</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Usage:</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Send command to -server or bitcoinlited</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>List commands</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Get help for a command</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Options:</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify configuration file (default: bitcoinlite.conf)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Specify pid file (default: bitcoinlited.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 type="unfinished"/> </message> <message> <location line="+2"/> <source>Set database cache size in megabytes (default: 25)</source> <translation type="unfinished"/> </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: 21347 or testnet: 31347)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Specify your own public address</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+1"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation type="unfinished"/> </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: 21348 or testnet: 31348)</source> <translation type="unfinished"/> </message> <message> <location line="-11"/> <source>Accept command line and JSON-RPC commands</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+1"/> <source>Use the test network</source> <translation type="unfinished"/> </message> <message> <location line="-24"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation type="unfinished"/> </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 type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+61"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong bitcoinlite 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 type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="-30"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Block creation options:</source> <translation type="unfinished"/> </message> <message> <location line="-62"/> <source>Connect only to the specified node(s)</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation type="unfinished"/> </message> <message> <location line="+94"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation type="unfinished"/> </message> <message> <location line="-16"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation type="unfinished"/> </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 type="unfinished"/> </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 type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="-29"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation type="unfinished"/> </message> <message> <location line="-42"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="-1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation type="unfinished"/> </message> <message> <location line="-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 type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="-48"/> <source>wallet.dat corrupt, salvage failed</source> <translation type="unfinished"/> </message> <message> <location line="-54"/> <source>Password for JSON-RPC connections</source> <translation type="unfinished"/> </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=bitcoinliterpc 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;bitcoinlite Alert&quot; [email protected] </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 type="unfinished"/> </message> <message> <location line="+1"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation type="unfinished"/> </message> <message> <location line="+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 type="unfinished"/> </message> <message> <location line="+1"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Rescan the block chain for missing wallet transactions</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+1"/> <source>Server certificate file (default: server.cert)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation type="unfinished"/> </message> <message> <location line="+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 type="unfinished"/> </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. bitcoinlite is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="-98"/> <source>bitcoinlite</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 type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+122"/> <source>Loading addresses...</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+4"/> <source>Error loading wallet.dat: Wallet requires newer version of bitcoinlite</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Wallet needed to be rewritten: restart bitcoinlite to complete</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="-16"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="-24"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+1"/> <source>Insufficient funds</source> <translation type="unfinished"/> </message> <message> <location line="-34"/> <source>Loading block index...</source> <translation type="unfinished"/> </message> <message> <location line="-103"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation type="unfinished"/> </message> <message> <location line="+122"/> <source>Unable to bind to %s on this computer. bitcoinlite 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 type="unfinished"/> </message> <message> <location line="+8"/> <source>Cannot downgrade wallet</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+1"/> <source>Rescanning...</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Done loading</source> <translation type="unfinished"/> </message> <message> <location line="-167"/> <source>To use the %s option</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Error</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> </context> </TS>
bitcoin-lite/BitcoinLite
src/qt/locale/bitcoin_vi_VN.ts
TypeScript
mit
107,042
// var isWaiting = false; // var isRunning = false; // var seconds = 10; // var countdownTimer; // var finalCountdown = false; function GameTimer(game) { this.seconds = game.timelimit; this.secondPassed = function() { if (this.seconds === 0 && !game.gameOver) { game.endGame(); } else if (!game.gameOver) { this.seconds--; $("#timer_num").html(this.seconds); } } var countdownTimer = setInterval('t.secondPassed()', 1000); }
alanflorendo/syllabgl
public/js/timer.js
JavaScript
mit
457
Click With Me Now ============== This is an integration between Interactive Intelligence's CIC platform and Click With Me Now. See the [wiki](https://github.com/InteractiveIntelligence/ClickWithMeNow/wiki) for more information. Visit CWMN at http://clickwithmenow.com
T-Boss/ClickWithMeNow
README.md
Markdown
mit
271
package uk.gov.prototype.vitruvius.parser.validator; import java.util.List; public class ValidationMessage { private String message; private ValidationType type; public ValidationMessage() { } public ValidationMessage(String message, ValidationType type) { this.message = message; this.type = type; } public String getMessage() { return message; } public ValidationType getType() { return type; } @Override public String toString() { return "ValidationMessage{" + "message='" + message + '\'' + ", type=" + type + '}'; } public enum ValidationType { ERROR, WARNING } public static ValidationMessage createErrorMessage(String message) { return new ValidationMessage(message, ValidationType.ERROR); } public static ValidationMessage createWarning(String message) { return new ValidationMessage(message, ValidationType.WARNING); } public static boolean hasErrors(List<ValidationMessage> messages) { for (ValidationMessage validationMessage : messages) { if (validationMessage.getType() == ValidationType.ERROR) { return true; } } return false; } }
alphagov/vitruvius
vitruvius.markdown/src/main/java/uk/gov/prototype/vitruvius/parser/validator/ValidationMessage.java
Java
mit
1,327
/* global Cervus */ const material = new Cervus.materials.PhongMaterial({ requires: [ Cervus.components.Render, Cervus.components.Transform ], texture: Cervus.core.image_loader('../textures/4.png'), normal_map: Cervus.core.image_loader('../textures/normal2.jpg') }); const phong_material = new Cervus.materials.PhongMaterial({ requires: [ Cervus.components.Render, Cervus.components.Transform ] }); const game = new Cervus.core.Game({ width: window.innerWidth, height: window.innerHeight, // clear_color: 'f0f' // fps: 1 }); game.camera.get_component(Cervus.components.Move).keyboard_controlled = true; // game.camera.get_component(Cervus.components.Move).mouse_controlled = true; // By default all entities face the user. // Rotate the camera to see the scene. const camera_transform = game.camera.get_component(Cervus.components.Transform); camera_transform.position = [0, 2, 5]; camera_transform.rotate_rl(Math.PI); // game.camera.keyboard_controlled = true; const plane = new Cervus.shapes.Plane(); const plane_transform = plane.get_component(Cervus.components.Transform); const plane_render = plane.get_component(Cervus.components.Render); plane_transform.scale = [100, 1, 100]; plane_render.material = phong_material; plane_render.color = "#eeeeee"; game.add(plane); const cube = new Cervus.shapes.Box(); const cube_transform = cube.get_component(Cervus.components.Transform); const cube_render = cube.get_component(Cervus.components.Render); cube_render.material = material; cube_render.color = "#00ff00"; cube_transform.position = [0, 0.5, -1]; const group = new Cervus.core.Entity({ components: [ new Cervus.components.Transform() ] }); game.add(group); group.add(cube); // game.on('tick', () => { // group.get_component(Cervus.components.Transform).rotate_rl(16/1000); game.light.get_component(Cervus.components.Transform).position = game.camera.get_component(Cervus.components.Transform).position; });
michalbe/cervus
_example/5/game.js
JavaScript
mit
1,969
#!/bin/mksh # (c) alexh 2016 set -eu printf "%s\n\n" 'Content-type: text/plain' # Optional with use of 'check_interval' WANTED_INTERVAL='10' USER="$( /usr/bin/whoami )" HOMES_DIR='/home' WWW_DIR="/var/www/virtual/${USER}" HOME="${HOMES_DIR}/${USER}" VAR_DIR="${HOME}/var/git-publish" SRC_DIR="${HOME}/git" function identify_service { case "${HTTP_USER_AGENT}" in send_post_manual) printf "%s\n" 'Service identified as send_post_manual. Hi!' . "${VAR_DIR}"/read_post_manual ;; GitHub-Hookshot/*) printf "%s\n" 'Service identified as GitHub.' . "${VAR_DIR}"/read_post_github ;; *) printf "%s\n" "I don't know service ${HTTP_USER_AGENT}." exit 73 ;; esac } POST="$(cat)" if [ -z "${POST}" ]; then printf "%s\n" 'POST empty' exit 70 fi function check_signature { get_sig if [ "${SIGNATURE}" == "${POST_SIG}" ]; then printf "%s\n" 'POST body: Good signature' else printf "%s\n" 'POST body: Wrong signature' exit 79 fi } function id_values { ID_VALUES="$( /bin/grep -E "^${ID}\ " "${VAR_DIR}"/list.txt )" REPO="$( /bin/awk '{print $1}'<<<"${ID_VALUES}" )" BRANCH="$( /bin/awk '{print $2}'<<<"${ID_VALUES}" )" BUILD_FUNCTION="$( /bin/awk '{print $3}'<<<"${ID_VALUES}" )" URL="$( /bin/awk '{print $4}'<<<"${ID_VALUES}" )" SECRET_TOKEN="$( /bin/awk '{print $5}'<<<"${ID_VALUES}" )" REPO_DIR="${VAR_DIR}/${REPO}" if [ ! -d "${REPO_DIR}" ]; then mkdir -p "${REPO_DIR}" fi } function check_interval { CALLTIME="$( /bin/date +%s )" if [ ! -f "${REPO_DIR}"/last.txt ];then printf "%d\n" '0' >"${REPO_DIR}"/last.txt fi LAST_CALLTIME="$( <"${REPO_DIR}"/last.txt )" INTERVAL="$(( ${CALLTIME} - ${LAST_CALLTIME} ))" TIME_LEFT="$(( ${WANTED_INTERVAL} - ${INTERVAL} ))" if [ ! -f "${REPO_DIR}"/waiting.txt ];then printf "%d\n" '0' >"${REPO_DIR}"/waiting.txt fi WAITING="$( <"${REPO_DIR}"/waiting.txt )" if [ "${WAITING}" == 1 ]; then CASE='waiting' else if (( "${INTERVAL}" > "${WANTED_INTERVAL}" )); then CASE='ready' else CASE='too_soon' fi fi } function update { cd "${SRC_DIR}"/"${REPO}" printf "%s" "Git checkout: " /usr/bin/git checkout "${BRANCH}" printf "%s" "Git pull: " /usr/bin/git pull . "${VAR_DIR}"/"${BUILD_FUNCTION}" build rsync -qaP --del --exclude-from='.gitignore' dest/ "${WWW_DIR}"/"${URL}"/ printf "%s\n" 'Synced' } function update_stuff { case "${CASE}" in waiting) printf "Update in queue. %d seconds left.\n" "${TIME_LEFT}" exit 72 ;; ready) printf "%s\n" "${CALLTIME}" >"${REPO_DIR}"/last.txt ;; too_soon) printf "%d\n" '1' >"${REPO_DIR}"/waiting.txt TIME_LEFT="$(( ${WANTED_INTERVAL} - ${INTERVAL} ))" printf "Waiting for %d seconds.\n" "${TIME_LEFT}" sleep "${TIME_LEFT}" ;; esac if [ ! -f "${REPO_DIR}"/progress.txt ]; then printf "%d\n" '0' >"${REPO_DIR}"/progress.txt fi progress="$(<"${REPO_DIR}"/progress.txt)" while (( "${progress}" == '1' )); do progress="$(<"${REPO_DIR}"/last.txt)" printf "%s\n" 'Earlier update in progress. Waiting...' sleep 1 done printf "%s\n" 'Ready' printf "%d\n" '1' >"${REPO_DIR}"/progress.txt update printf "%s\n" "${CALLTIME}" >"${REPO_DIR}"/last.txt printf "%d\n" '0' >"${REPO_DIR}"/progress.txt printf "%d\n" '0' >"${REPO_DIR}"/waiting.txt } identify_service read_post id_values check_signature CASE='ready' check_interval update_stuff
alexh-name/git-publish
git-publish.sh
Shell
mit
3,479
#!/usr/bin/env python import pygame pygame.display.init() pygame.font.init() modes_list = pygame.display.list_modes() #screen = pygame.display.set_mode(modes_list[0], pygame.FULLSCREEN) # the highest resolution with fullscreen screen = pygame.display.set_mode(modes_list[-1]) # the lowest resolution background_color = (255, 255, 255) screen.fill(background_color) font = pygame.font.Font(pygame.font.get_default_font(), 22) text_surface = font.render("Hello world!", True, (0,0,0)) screen.blit(text_surface, (0,0)) # paste the text at the top left corner of the window pygame.display.flip() # display the image while True: # main loop (event loop) event = pygame.event.wait() if(event.type == pygame.QUIT or (event.type == pygame.KEYDOWN and event.key == pygame.K_ESCAPE)): break
jeremiedecock/snippets
python/pygame/hello_text.py
Python
mit
882
// // Copyright(c) 2017-2018 Paweł Księżopolski ( pumexx ) // // 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. // #pragma once #include <memory> #include <vector> #include <mutex> #include <vulkan/vulkan.h> #include <pumex/Export.h> #include <pumex/PerObjectData.h> namespace pumex { class Descriptor; class RenderContext; struct PUMEX_EXPORT DescriptorValue { enum Type { Undefined, Image, Buffer }; DescriptorValue(); DescriptorValue(VkBuffer buffer, VkDeviceSize offset, VkDeviceSize range); DescriptorValue(VkSampler sampler, VkImageView imageView, VkImageLayout imageLayout); Type vType; union { VkDescriptorBufferInfo bufferInfo; VkDescriptorImageInfo imageInfo; }; }; // Resource is an object stored in a descriptor ( SampledImage, UniformBuffer, etc. ) class PUMEX_EXPORT Resource : public std::enable_shared_from_this<Resource> { public: Resource(PerObjectBehaviour perObjectBehaviour, SwapChainImageBehaviour swapChainImageBehaviour); virtual ~Resource(); void addDescriptor(std::shared_ptr<Descriptor> descriptor); void removeDescriptor(std::shared_ptr<Descriptor> descriptor); // invalidateDescriptors() is called to inform the scenegraph that validate() needs to be called virtual void invalidateDescriptors(); // notifyDescriptors() is called from within validate() when some serious change in resource occured // ( getDescriptorValue() will return new values, so vkUpdateDescriptorSets must be called by DescriptorSet ). virtual void notifyDescriptors(const RenderContext& renderContext); virtual std::pair<bool,VkDescriptorType> getDefaultDescriptorType(); virtual void validate(const RenderContext& renderContext) = 0; virtual DescriptorValue getDescriptorValue(const RenderContext& renderContext) = 0; protected: mutable std::mutex mutex; std::vector<std::weak_ptr<Descriptor>> descriptors; PerObjectBehaviour perObjectBehaviour; SwapChainImageBehaviour swapChainImageBehaviour; uint32_t activeCount; }; }
pumexx/pumex
include/pumex/Resource.h
C
mit
3,289
<!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 `from_u32_unchecked` fn in crate `std`."> <meta name="keywords" content="rust, rustlang, rust-lang, from_u32_unchecked"> <title>std::char::from_u32_unchecked - Rust</title> <link rel="stylesheet" type="text/css" href="../../rustdoc.css"> <link rel="stylesheet" type="text/css" href="../../main.css"> <link rel="shortcut icon" href="https://doc.rust-lang.org/favicon.ico"> </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]--> <nav class="sidebar"> <a href='../../std/index.html'><img src='https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png' alt='logo' width='100'></a> <p class='location'><a href='../index.html'>std</a>::<wbr><a href='index.html'>char</a></p><script>window.sidebarCurrent = {name: 'from_u32_unchecked', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script> </nav> <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 fn"> <h1 class='fqn'><span class='in-band'>Function <a href='../index.html'>std</a>::<wbr><a href='index.html'>char</a>::<wbr><a class='fn' href=''>from_u32_unchecked</a></span><span class='out-of-band'><span class='since' title='Stable since Rust version 1.5.0'>1.5.0</span><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-34245' class='srclink' href='https://doc.rust-lang.org/nightly/core/char/fn.from_u32_unchecked.html?gotosrc=34245' title='goto source code'>[src]</a></span></h1> <pre class='rust fn'>pub unsafe fn from_u32_unchecked(i: <a class='primitive' href='../primitive.u32.html'>u32</a>) -&gt; <a class='primitive' href='../primitive.char.html'>char</a></pre><div class='docblock'><p>Converts a <code>u32</code> to a <code>char</code>, ignoring validity.</p> <p>Note that all <a href="../../std/primitive.char.html"><code>char</code></a>s are valid <a href="../../std/primitive.u32.html"><code>u32</code></a>s, and can be casted to one with <a href="../../book/casting-between-types.html#as"><code>as</code></a>:</p> <span class='rusttest'>fn main() { let c = &#39;💯&#39;; let i = c as u32; assert_eq!(128175, i); }</span><pre class='rust rust-example-rendered'> <span class='kw'>let</span> <span class='ident'>c</span> <span class='op'>=</span> <span class='string'>&#39;💯&#39;</span>; <span class='kw'>let</span> <span class='ident'>i</span> <span class='op'>=</span> <span class='ident'>c</span> <span class='kw'>as</span> <span class='ident'>u32</span>; <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='number'>128175</span>, <span class='ident'>i</span>);<a class='test-arrow' target='_blank' href=''>Run</a></pre> <p>However, the reverse is not true: not all valid <a href="../../std/primitive.u32.html"><code>u32</code></a>s are valid <a href="../../std/primitive.char.html"><code>char</code></a>s. <code>from_u32_unchecked()</code> will ignore this, and blindly cast to <a href="../../std/primitive.char.html"><code>char</code></a>, possibly creating an invalid one.</p> <h1 id='safety' class='section-header'><a href='#safety'>Safety</a></h1> <p>This function is unsafe, as it may construct invalid <code>char</code> values.</p> <p>For a safe version of this function, see the <a href="fn.from_u32.html"><code>from_u32()</code></a> function.</p> <h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1> <p>Basic usage:</p> <span class='rusttest'>fn main() { use std::char; let c = unsafe { char::from_u32_unchecked(0x2764) }; assert_eq!(&#39;❤&#39;, c); }</span><pre class='rust rust-example-rendered'> <span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>char</span>; <span class='kw'>let</span> <span class='ident'>c</span> <span class='op'>=</span> <span class='kw'>unsafe</span> { <span class='ident'>char</span>::<span class='ident'>from_u32_unchecked</span>(<span class='number'>0x2764</span>) }; <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='string'>&#39;❤&#39;</span>, <span class='ident'>c</span>);<a class='test-arrow' target='_blank' href=''>Run</a></pre> </div></section> <section id='search' class="content hidden"></section> <section class="footer"></section> <aside id="help" class="hidden"> <div> <h1 class="hidden">Help</h1> <div class="shortcuts"> <h2>Keyboard Shortcuts</h2> <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> <dt>+</dt> <dd>Collapse/expand all sections</dd> </dl> </div> <div class="infos"> <h2>Search Tricks</h2> <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>type</code>, <code>macro</code>, and <code>const</code>. </p> <p> Search functions by type signature (e.g. <code>vec -> usize</code> or <code>* -> vec</code>) </p> </div> </div> </aside> <script> window.rootPath = "../../"; window.currentCrate = "std"; window.playgroundUrl = "https://play.rust-lang.org/"; </script> <script src="../../jquery.js"></script> <script src="../../main.js"></script> <script src="../../playpen.js"></script> <script defer src="../../search-index.js"></script> </body> </html>
liigo/liigo.github.io
tmp/rust/inline-sidebar-items/std/char/fn.from_u32_unchecked.html
HTML
mit
7,081
/*! normalize.css v2.1.2 | MIT License | git.io/normalize */ /* ========================================================================== HTML5 display definitions ========================================================================== */ /** * Correct `block` display not defined in IE 8/9. */ /* line 11, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { display: block; } /** * Correct `inline-block` display not defined in IE 8/9. */ /* line 30, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ audio, canvas, video { display: inline-block; } /** * Prevent modern browsers from displaying `audio` without controls. * Remove excess height in iOS 5 devices. */ /* line 41, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ audio:not([controls]) { display: none; height: 0; } /** * Address `[hidden]` styling not present in IE 8/9. * Hide the `template` element in IE, Safari, and Firefox < 22. */ /* line 51, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ [hidden], template { display: none; } /* line 56, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ script { display: none !important; } /* ========================================================================== Base ========================================================================== */ /** * 1. Set default font family to sans-serif. * 2. Prevent iOS text size adjust after orientation change, without disabling * user zoom. */ /* line 70, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ html { font-family: sans-serif; /* 1 */ -ms-text-size-adjust: 100%; /* 2 */ -webkit-text-size-adjust: 100%; /* 2 */ } /** * Remove default margin. */ /* line 80, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ body { margin: 0; } /* ========================================================================== Links ========================================================================== */ /** * Remove the gray background color from active links in IE 10. */ /* line 92, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ a { background: transparent; } /** * Address `outline` inconsistency between Chrome and other browsers. */ /* line 100, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ a:focus { outline: thin dotted; } /** * Improve readability when focused and also mouse hovered in all browsers. */ /* line 108, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ a:active, a:hover { outline: 0; } /* ========================================================================== Typography ========================================================================== */ /** * Address variable `h1` font-size and margin within `section` and `article` * contexts in Firefox 4+, Safari 5, and Chrome. */ /* line 122, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ h1 { font-size: 2em; margin: 0.67em 0; } /** * Address styling not present in IE 8/9, Safari 5, and Chrome. */ /* line 131, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ abbr[title] { border-bottom: 1px dotted; } /** * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. */ /* line 139, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ b, strong { font-weight: bold; } /** * Address styling not present in Safari 5 and Chrome. */ /* line 148, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ dfn { font-style: italic; } /** * Address differences between Firefox and other browsers. */ /* line 156, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ hr { -moz-box-sizing: content-box; box-sizing: content-box; height: 0; } /** * Address styling not present in IE 8/9. */ /* line 166, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ mark { background: #ff0; color: #000; } /** * Correct font family set oddly in Safari 5 and Chrome. */ /* line 175, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ code, kbd, pre, samp { font-family: monospace, serif; font-size: 1em; } /** * Improve readability of pre-formatted text in all browsers. */ /* line 187, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ pre { white-space: pre-wrap; } /** * Set consistent quote types. */ /* line 195, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ q { quotes: "\201C" "\201D" "\2018" "\2019"; } /** * Address inconsistent and variable font size in all browsers. */ /* line 203, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ small { font-size: 80%; } /** * Prevent `sub` and `sup` affecting `line-height` in all browsers. */ /* line 211, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } /* line 219, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ sup { top: -0.5em; } /* line 223, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ sub { bottom: -0.25em; } /* ========================================================================== Embedded content ========================================================================== */ /** * Remove border when inside `a` element in IE 8/9. */ /* line 235, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ img { border: 0; } /** * Correct overflow displayed oddly in IE 9. */ /* line 243, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ svg:not(:root) { overflow: hidden; } /* ========================================================================== Figures ========================================================================== */ /** * Address margin not present in IE 8/9 and Safari 5. */ /* line 255, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ figure { margin: 0; } /* ========================================================================== Forms ========================================================================== */ /** * Define consistent border, margin, and padding. */ /* line 267, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ fieldset { border: 1px solid #c0c0c0; margin: 0 2px; padding: 0.35em 0.625em 0.75em; } /** * 1. Correct `color` not being inherited in IE 8/9. * 2. Remove padding so people aren't caught out if they zero out fieldsets. */ /* line 278, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ legend { border: 0; /* 1 */ padding: 0; /* 2 */ } /** * 1. Correct font family not being inherited in all browsers. * 2. Correct font size not being inherited in all browsers. * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. */ /* line 289, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ button, input, select, textarea { font-family: inherit; /* 1 */ font-size: 100%; /* 2 */ margin: 0; /* 3 */ } /** * Address Firefox 4+ setting `line-height` on `input` using `!important` in * the UA stylesheet. */ /* line 303, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ button, input { line-height: normal; } /** * Address inconsistent `text-transform` inheritance for `button` and `select`. * All other form control elements do not inherit `text-transform` values. * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+. * Correct `select` style inheritance in Firefox 4+ and Opera. */ /* line 315, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ button, select { text-transform: none; } /** * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` * and `video` controls. * 2. Correct inability to style clickable `input` types in iOS. * 3. Improve usability and consistency of cursor style between image-type * `input` and others. */ /* line 328, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; /* 2 */ cursor: pointer; /* 3 */ } /** * Re-set default cursor for disabled elements. */ /* line 340, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ button[disabled], html input[disabled] { cursor: default; } /** * 1. Address box sizing set to `content-box` in IE 8/9. * 2. Remove excess padding in IE 8/9. */ /* line 350, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ input[type="checkbox"], input[type="radio"] { box-sizing: border-box; /* 1 */ padding: 0; /* 2 */ } /** * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome * (include `-moz` to future-proof). */ /* line 362, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ input[type="search"] { -webkit-appearance: textfield; /* 1 */ -moz-box-sizing: content-box; -webkit-box-sizing: content-box; /* 2 */ box-sizing: content-box; } /** * Remove inner padding and search cancel button in Safari 5 and Chrome * on OS X. */ /* line 374, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } /** * Remove inner padding and border in Firefox 4+. */ /* line 383, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } /** * 1. Remove default vertical scrollbar in IE 8/9. * 2. Improve readability and alignment in all browsers. */ /* line 394, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ textarea { overflow: auto; /* 1 */ vertical-align: top; /* 2 */ } /* ========================================================================== Tables ========================================================================== */ /** * Remove most spacing between table cells. */ /* line 407, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ table { border-collapse: collapse; border-spacing: 0; }
namho102/business-site
stylesheets/foundation/normalize.css
CSS
mit
11,327
yii-lazy-image ============== Lazy image loader for the Yii framework. It is implemented as a static class which leverages [jQuery Unveil](http://luis-almeida.github.io/unveil/) to load images lazily. The interface is the same as `CHtml::image()` so existing code can easily be adapted to use it. ## Usage Require the project in your `composer.json`, then use it like this: ```php echo \yiilazyimage\components\LazyImage::image($url, $alt, $htmlOptions); ``` ## License This project is licensed under the MIT license
Jalle19/yii-lazy-image
README.md
Markdown
mit
524
/* Zepto v1.1.4 - zepto event ajax form ie - zeptojs.com/license */ var Zepto = (function() { var undefined, key, $, classList, emptyArray = [], slice = emptyArray.slice, filter = emptyArray.filter, document = window.document, elementDisplay = {}, classCache = {}, cssNumber = { 'column-count': 1, 'columns': 1, 'font-weight': 1, 'line-height': 1,'opacity': 1, 'z-index': 1, 'zoom': 1 }, fragmentRE = /^\s*<(\w+|!)[^>]*>/, singleTagRE = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, rootNodeRE = /^(?:body|html)$/i, capitalRE = /([A-Z])/g, // special attributes that should be get/set via method calls methodAttributes = ['val', 'css', 'html', 'text', 'data', 'width', 'height', 'offset'], adjacencyOperators = [ 'after', 'prepend', 'before', 'append' ], table = document.createElement('table'), tableRow = document.createElement('tr'), containers = { 'tr': document.createElement('tbody'), 'tbody': table, 'thead': table, 'tfoot': table, 'td': tableRow, 'th': tableRow, '*': document.createElement('div') }, readyRE = /complete|loaded|interactive/, simpleSelectorRE = /^[\w-]*$/, class2type = {}, toString = class2type.toString, zepto = {}, camelize, uniq, tempParent = document.createElement('div'), propMap = { 'tabindex': 'tabIndex', 'readonly': 'readOnly', 'for': 'htmlFor', 'class': 'className', 'maxlength': 'maxLength', 'cellspacing': 'cellSpacing', 'cellpadding': 'cellPadding', 'rowspan': 'rowSpan', 'colspan': 'colSpan', 'usemap': 'useMap', 'frameborder': 'frameBorder', 'contenteditable': 'contentEditable' }, isArray = Array.isArray || function(object){ return object instanceof Array } zepto.matches = function(element, selector) { if (!selector || !element || element.nodeType !== 1) return false var matchesSelector = element.webkitMatchesSelector || element.mozMatchesSelector || element.oMatchesSelector || element.matchesSelector if (matchesSelector) return matchesSelector.call(element, selector) // fall back to performing a selector: var match, parent = element.parentNode, temp = !parent if (temp) (parent = tempParent).appendChild(element) match = ~zepto.qsa(parent, selector).indexOf(element) temp && tempParent.removeChild(element) return match } function type(obj) { return obj == null ? String(obj) : class2type[toString.call(obj)] || "object" } function isFunction(value) { return type(value) == "function" } function isWindow(obj) { return obj != null && obj == obj.window } function isDocument(obj) { return obj != null && obj.nodeType == obj.DOCUMENT_NODE } function isObject(obj) { return type(obj) == "object" } function isPlainObject(obj) { return isObject(obj) && !isWindow(obj) && Object.getPrototypeOf(obj) == Object.prototype } function likeArray(obj) { return typeof obj.length == 'number' } function compact(array) { return filter.call(array, function(item){ return item != null }) } function flatten(array) { return array.length > 0 ? $.fn.concat.apply([], array) : array } camelize = function(str){ return str.replace(/-+(.)?/g, function(match, chr){ return chr ? chr.toUpperCase() : '' }) } function dasherize(str) { return str.replace(/::/g, '/') .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2') .replace(/([a-z\d])([A-Z])/g, '$1_$2') .replace(/_/g, '-') .toLowerCase() } uniq = function(array){ return filter.call(array, function(item, idx){ return array.indexOf(item) == idx }) } function classRE(name) { return name in classCache ? classCache[name] : (classCache[name] = new RegExp('(^|\\s)' + name + '(\\s|$)')) } function maybeAddPx(name, value) { return (typeof value == "number" && !cssNumber[dasherize(name)]) ? value + "px" : value } function defaultDisplay(nodeName) { var element, display if (!elementDisplay[nodeName]) { element = document.createElement(nodeName) document.body.appendChild(element) display = getComputedStyle(element, '').getPropertyValue("display") element.parentNode.removeChild(element) display == "none" && (display = "block") elementDisplay[nodeName] = display } return elementDisplay[nodeName] } function children(element) { return 'children' in element ? slice.call(element.children) : $.map(element.childNodes, function(node){ if (node.nodeType == 1) return node }) } // `$.zepto.fragment` takes a html string and an optional tag name // to generate DOM nodes nodes from the given html string. // The generated DOM nodes are returned as an array. // This function can be overriden in plugins for example to make // it compatible with browsers that don't support the DOM fully. zepto.fragment = function(html, name, properties) { var dom, nodes, container // A special case optimization for a single tag if (singleTagRE.test(html)) dom = $(document.createElement(RegExp.$1)) if (!dom) { if (html.replace) html = html.replace(tagExpanderRE, "<$1></$2>") if (name === undefined) name = fragmentRE.test(html) && RegExp.$1 if (!(name in containers)) name = '*' container = containers[name] container.innerHTML = '' + html dom = $.each(slice.call(container.childNodes), function(){ container.removeChild(this) }) } if (isPlainObject(properties)) { nodes = $(dom) $.each(properties, function(key, value) { if (methodAttributes.indexOf(key) > -1) nodes[key](value) else nodes.attr(key, value) }) } return dom } // `$.zepto.Z` swaps out the prototype of the given `dom` array // of nodes with `$.fn` and thus supplying all the Zepto functions // to the array. Note that `__proto__` is not supported on Internet // Explorer. This method can be overriden in plugins. zepto.Z = function(dom, selector) { dom = dom || [] dom.__proto__ = $.fn dom.selector = selector || '' return dom } // `$.zepto.isZ` should return `true` if the given object is a Zepto // collection. This method can be overriden in plugins. zepto.isZ = function(object) { return object instanceof zepto.Z } // `$.zepto.init` is Zepto's counterpart to jQuery's `$.fn.init` and // takes a CSS selector and an optional context (and handles various // special cases). // This method can be overriden in plugins. zepto.init = function(selector, context) { var dom // If nothing given, return an empty Zepto collection if (!selector) return zepto.Z() // Optimize for string selectors else if (typeof selector == 'string') { selector = selector.trim() // If it's a html fragment, create nodes from it // Note: In both Chrome 21 and Firefox 15, DOM error 12 // is thrown if the fragment doesn't begin with < if (selector[0] == '<' && fragmentRE.test(selector)) dom = zepto.fragment(selector, RegExp.$1, context), selector = null // If there's a context, create a collection on that context first, and select // nodes from there else if (context !== undefined) return $(context).find(selector) // If it's a CSS selector, use it to select nodes. else dom = zepto.qsa(document, selector) } // If a function is given, call it when the DOM is ready else if (isFunction(selector)) return $(document).ready(selector) // If a Zepto collection is given, just return it else if (zepto.isZ(selector)) return selector else { // normalize array if an array of nodes is given if (isArray(selector)) dom = compact(selector) // Wrap DOM nodes. else if (isObject(selector)) dom = [selector], selector = null // If it's a html fragment, create nodes from it else if (fragmentRE.test(selector)) dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null // If there's a context, create a collection on that context first, and select // nodes from there else if (context !== undefined) return $(context).find(selector) // And last but no least, if it's a CSS selector, use it to select nodes. else dom = zepto.qsa(document, selector) } // create a new Zepto collection from the nodes found return zepto.Z(dom, selector) } // `$` will be the base `Zepto` object. When calling this // function just call `$.zepto.init, which makes the implementation // details of selecting nodes and creating Zepto collections // patchable in plugins. $ = function(selector, context){ return zepto.init(selector, context) } function extend(target, source, deep) { for (key in source) if (deep && (isPlainObject(source[key]) || isArray(source[key]))) { if (isPlainObject(source[key]) && !isPlainObject(target[key])) target[key] = {} if (isArray(source[key]) && !isArray(target[key])) target[key] = [] extend(target[key], source[key], deep) } else if (source[key] !== undefined) target[key] = source[key] } // Copy all but undefined properties from one or more // objects to the `target` object. $.extend = function(target){ var deep, args = slice.call(arguments, 1) if (typeof target == 'boolean') { deep = target target = args.shift() } args.forEach(function(arg){ extend(target, arg, deep) }) return target } // `$.zepto.qsa` is Zepto's CSS selector implementation which // uses `document.querySelectorAll` and optimizes for some special cases, like `#id`. // This method can be overriden in plugins. zepto.qsa = function(element, selector){ var found, maybeID = selector[0] == '#', maybeClass = !maybeID && selector[0] == '.', nameOnly = maybeID || maybeClass ? selector.slice(1) : selector, // Ensure that a 1 char tag name still gets checked isSimple = simpleSelectorRE.test(nameOnly) return (isDocument(element) && isSimple && maybeID) ? ( (found = element.getElementById(nameOnly)) ? [found] : [] ) : (element.nodeType !== 1 && element.nodeType !== 9) ? [] : slice.call( isSimple && !maybeID ? maybeClass ? element.getElementsByClassName(nameOnly) : // If it's simple, it could be a class element.getElementsByTagName(selector) : // Or a tag element.querySelectorAll(selector) // Or it's not simple, and we need to query all ) } function filtered(nodes, selector) { return selector == null ? $(nodes) : $(nodes).filter(selector) } $.contains = document.documentElement.contains ? function(parent, node) { return parent !== node && parent.contains(node) } : function(parent, node) { while (node && (node = node.parentNode)) if (node === parent) return true return false } function funcArg(context, arg, idx, payload) { return isFunction(arg) ? arg.call(context, idx, payload) : arg } function setAttribute(node, name, value) { value == null ? node.removeAttribute(name) : node.setAttribute(name, value) } // access className property while respecting SVGAnimatedString function className(node, value){ var klass = node.className, svg = klass && klass.baseVal !== undefined if (value === undefined) return svg ? klass.baseVal : klass svg ? (klass.baseVal = value) : (node.className = value) } // "true" => true // "false" => false // "null" => null // "42" => 42 // "42.5" => 42.5 // "08" => "08" // JSON => parse if valid // String => self function deserializeValue(value) { var num try { return value ? value == "true" || ( value == "false" ? false : value == "null" ? null : !/^0/.test(value) && !isNaN(num = Number(value)) ? num : /^[\[\{]/.test(value) ? $.parseJSON(value) : value ) : value } catch(e) { return value } } $.type = type $.isFunction = isFunction $.isWindow = isWindow $.isArray = isArray $.isPlainObject = isPlainObject $.isEmptyObject = function(obj) { var name for (name in obj) return false return true } $.inArray = function(elem, array, i){ return emptyArray.indexOf.call(array, elem, i) } $.camelCase = camelize $.trim = function(str) { return str == null ? "" : String.prototype.trim.call(str) } // plugin compatibility $.uuid = 0 $.support = { } $.expr = { } $.map = function(elements, callback){ var value, values = [], i, key if (likeArray(elements)) for (i = 0; i < elements.length; i++) { value = callback(elements[i], i) if (value != null) values.push(value) } else for (key in elements) { value = callback(elements[key], key) if (value != null) values.push(value) } return flatten(values) } $.each = function(elements, callback){ var i, key if (likeArray(elements)) { for (i = 0; i < elements.length; i++) if (callback.call(elements[i], i, elements[i]) === false) return elements } else { for (key in elements) if (callback.call(elements[key], key, elements[key]) === false) return elements } return elements } $.grep = function(elements, callback){ return filter.call(elements, callback) } if (window.JSON) $.parseJSON = JSON.parse // Populate the class2type map $.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { class2type[ "[object " + name + "]" ] = name.toLowerCase() }) // Define methods that will be available on all // Zepto collections $.fn = { // Because a collection acts like an array // copy over these useful array functions. forEach: emptyArray.forEach, reduce: emptyArray.reduce, push: emptyArray.push, sort: emptyArray.sort, indexOf: emptyArray.indexOf, concat: emptyArray.concat, // `map` and `slice` in the jQuery API work differently // from their array counterparts map: function(fn){ return $($.map(this, function(el, i){ return fn.call(el, i, el) })) }, slice: function(){ return $(slice.apply(this, arguments)) }, ready: function(callback){ // need to check if document.body exists for IE as that browser reports // document ready when it hasn't yet created the body element if (readyRE.test(document.readyState) && document.body) callback($) else document.addEventListener('DOMContentLoaded', function(){ callback($) }, false) return this }, get: function(idx){ return idx === undefined ? slice.call(this) : this[idx >= 0 ? idx : idx + this.length] }, toArray: function(){ return this.get() }, size: function(){ return this.length }, remove: function(){ return this.each(function(){ if (this.parentNode != null) this.parentNode.removeChild(this) }) }, each: function(callback){ emptyArray.every.call(this, function(el, idx){ return callback.call(el, idx, el) !== false }) return this }, filter: function(selector){ if (isFunction(selector)) return this.not(this.not(selector)) return $(filter.call(this, function(element){ return zepto.matches(element, selector) })) }, add: function(selector,context){ return $(uniq(this.concat($(selector,context)))) }, is: function(selector){ return this.length > 0 && zepto.matches(this[0], selector) }, not: function(selector){ var nodes=[] if (isFunction(selector) && selector.call !== undefined) this.each(function(idx){ if (!selector.call(this,idx)) nodes.push(this) }) else { var excludes = typeof selector == 'string' ? this.filter(selector) : (likeArray(selector) && isFunction(selector.item)) ? slice.call(selector) : $(selector) this.forEach(function(el){ if (excludes.indexOf(el) < 0) nodes.push(el) }) } return $(nodes) }, has: function(selector){ return this.filter(function(){ return isObject(selector) ? $.contains(this, selector) : $(this).find(selector).size() }) }, eq: function(idx){ return idx === -1 ? this.slice(idx) : this.slice(idx, + idx + 1) }, first: function(){ var el = this[0] return el && !isObject(el) ? el : $(el) }, last: function(){ var el = this[this.length - 1] return el && !isObject(el) ? el : $(el) }, find: function(selector){ var result, $this = this if (!selector) result = [] else if (typeof selector == 'object') result = $(selector).filter(function(){ var node = this return emptyArray.some.call($this, function(parent){ return $.contains(parent, node) }) }) else if (this.length == 1) result = $(zepto.qsa(this[0], selector)) else result = this.map(function(){ return zepto.qsa(this, selector) }) return result }, closest: function(selector, context){ var node = this[0], collection = false if (typeof selector == 'object') collection = $(selector) while (node && !(collection ? collection.indexOf(node) >= 0 : zepto.matches(node, selector))) node = node !== context && !isDocument(node) && node.parentNode return $(node) }, parents: function(selector){ var ancestors = [], nodes = this while (nodes.length > 0) nodes = $.map(nodes, function(node){ if ((node = node.parentNode) && !isDocument(node) && ancestors.indexOf(node) < 0) { ancestors.push(node) return node } }) return filtered(ancestors, selector) }, parent: function(selector){ return filtered(uniq(this.pluck('parentNode')), selector) }, children: function(selector){ return filtered(this.map(function(){ return children(this) }), selector) }, contents: function() { return this.map(function() { return slice.call(this.childNodes) }) }, siblings: function(selector){ return filtered(this.map(function(i, el){ return filter.call(children(el.parentNode), function(child){ return child!==el }) }), selector) }, empty: function(){ return this.each(function(){ this.innerHTML = '' }) }, // `pluck` is borrowed from Prototype.js pluck: function(property){ return $.map(this, function(el){ return el[property] }) }, show: function(){ return this.each(function(){ this.style.display == "none" && (this.style.display = '') if (getComputedStyle(this, '').getPropertyValue("display") == "none") this.style.display = defaultDisplay(this.nodeName) }) }, replaceWith: function(newContent){ return this.before(newContent).remove() }, wrap: function(structure){ var func = isFunction(structure) if (this[0] && !func) var dom = $(structure).get(0), clone = dom.parentNode || this.length > 1 return this.each(function(index){ $(this).wrapAll( func ? structure.call(this, index) : clone ? dom.cloneNode(true) : dom ) }) }, wrapAll: function(structure){ if (this[0]) { $(this[0]).before(structure = $(structure)) var children // drill down to the inmost element while ((children = structure.children()).length) structure = children.first() $(structure).append(this) } return this }, wrapInner: function(structure){ var func = isFunction(structure) return this.each(function(index){ var self = $(this), contents = self.contents(), dom = func ? structure.call(this, index) : structure contents.length ? contents.wrapAll(dom) : self.append(dom) }) }, unwrap: function(){ this.parent().each(function(){ $(this).replaceWith($(this).children()) }) return this }, clone: function(){ return this.map(function(){ return this.cloneNode(true) }) }, hide: function(){ return this.css("display", "none") }, toggle: function(setting){ return this.each(function(){ var el = $(this) ;(setting === undefined ? el.css("display") == "none" : setting) ? el.show() : el.hide() }) }, prev: function(selector){ return $(this.pluck('previousElementSibling')).filter(selector || '*') }, next: function(selector){ return $(this.pluck('nextElementSibling')).filter(selector || '*') }, html: function(html){ return 0 in arguments ? this.each(function(idx){ var originHtml = this.innerHTML $(this).empty().append( funcArg(this, html, idx, originHtml) ) }) : (0 in this ? this[0].innerHTML : null) }, text: function(text){ return 0 in arguments ? this.each(function(idx){ var newText = funcArg(this, text, idx, this.textContent) this.textContent = newText == null ? '' : ''+newText }) : (0 in this ? this[0].textContent : null) }, attr: function(name, value){ var result return (typeof name == 'string' && !(1 in arguments)) ? (!this.length || this[0].nodeType !== 1 ? undefined : (!(result = this[0].getAttribute(name)) && name in this[0]) ? this[0][name] : result ) : this.each(function(idx){ if (this.nodeType !== 1) return if (isObject(name)) for (key in name) setAttribute(this, key, name[key]) else setAttribute(this, name, funcArg(this, value, idx, this.getAttribute(name))) }) }, removeAttr: function(name){ return this.each(function(){ this.nodeType === 1 && setAttribute(this, name) }) }, prop: function(name, value){ name = propMap[name] || name return (1 in arguments) ? this.each(function(idx){ this[name] = funcArg(this, value, idx, this[name]) }) : (this[0] && this[0][name]) }, data: function(name, value){ var attrName = 'data-' + name.replace(capitalRE, '-$1').toLowerCase() var data = (1 in arguments) ? this.attr(attrName, value) : this.attr(attrName) return data !== null ? deserializeValue(data) : undefined }, val: function(value){ return 0 in arguments ? this.each(function(idx){ this.value = funcArg(this, value, idx, this.value) }) : (this[0] && (this[0].multiple ? $(this[0]).find('option').filter(function(){ return this.selected }).pluck('value') : this[0].value) ) }, offset: function(coordinates){ if (coordinates) return this.each(function(index){ var $this = $(this), coords = funcArg(this, coordinates, index, $this.offset()), parentOffset = $this.offsetParent().offset(), props = { top: coords.top - parentOffset.top, left: coords.left - parentOffset.left } if ($this.css('position') == 'static') props['position'] = 'relative' $this.css(props) }) if (!this.length) return null var obj = this[0].getBoundingClientRect() return { left: obj.left + window.pageXOffset, top: obj.top + window.pageYOffset, width: Math.round(obj.width), height: Math.round(obj.height) } }, css: function(property, value){ if (arguments.length < 2) { var element = this[0], computedStyle = getComputedStyle(element, '') if(!element) return if (typeof property == 'string') return element.style[camelize(property)] || computedStyle.getPropertyValue(property) else if (isArray(property)) { var props = {} $.each(isArray(property) ? property: [property], function(_, prop){ props[prop] = (element.style[camelize(prop)] || computedStyle.getPropertyValue(prop)) }) return props } } var css = '' if (type(property) == 'string') { if (!value && value !== 0) this.each(function(){ this.style.removeProperty(dasherize(property)) }) else css = dasherize(property) + ":" + maybeAddPx(property, value) } else { for (key in property) if (!property[key] && property[key] !== 0) this.each(function(){ this.style.removeProperty(dasherize(key)) }) else css += dasherize(key) + ':' + maybeAddPx(key, property[key]) + ';' } return this.each(function(){ this.style.cssText += ';' + css }) }, index: function(element){ return element ? this.indexOf($(element)[0]) : this.parent().children().indexOf(this[0]) }, hasClass: function(name){ if (!name) return false return emptyArray.some.call(this, function(el){ return this.test(className(el)) }, classRE(name)) }, addClass: function(name){ if (!name) return this return this.each(function(idx){ classList = [] var cls = className(this), newName = funcArg(this, name, idx, cls) newName.split(/\s+/g).forEach(function(klass){ if (!$(this).hasClass(klass)) classList.push(klass) }, this) classList.length && className(this, cls + (cls ? " " : "") + classList.join(" ")) }) }, removeClass: function(name){ return this.each(function(idx){ if (name === undefined) return className(this, '') classList = className(this) funcArg(this, name, idx, classList).split(/\s+/g).forEach(function(klass){ classList = classList.replace(classRE(klass), " ") }) className(this, classList.trim()) }) }, toggleClass: function(name, when){ if (!name) return this return this.each(function(idx){ var $this = $(this), names = funcArg(this, name, idx, className(this)) names.split(/\s+/g).forEach(function(klass){ (when === undefined ? !$this.hasClass(klass) : when) ? $this.addClass(klass) : $this.removeClass(klass) }) }) }, scrollTop: function(value){ if (!this.length) return var hasScrollTop = 'scrollTop' in this[0] if (value === undefined) return hasScrollTop ? this[0].scrollTop : this[0].pageYOffset return this.each(hasScrollTop ? function(){ this.scrollTop = value } : function(){ this.scrollTo(this.scrollX, value) }) }, scrollLeft: function(value){ if (!this.length) return var hasScrollLeft = 'scrollLeft' in this[0] if (value === undefined) return hasScrollLeft ? this[0].scrollLeft : this[0].pageXOffset return this.each(hasScrollLeft ? function(){ this.scrollLeft = value } : function(){ this.scrollTo(value, this.scrollY) }) }, position: function() { if (!this.length) return var elem = this[0], // Get *real* offsetParent offsetParent = this.offsetParent(), // Get correct offsets offset = this.offset(), parentOffset = rootNodeRE.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset() // Subtract element margins // note: when an element has margin: auto the offsetLeft and marginLeft // are the same in Safari causing offset.left to incorrectly be 0 offset.top -= parseFloat( $(elem).css('margin-top') ) || 0 offset.left -= parseFloat( $(elem).css('margin-left') ) || 0 // Add offsetParent borders parentOffset.top += parseFloat( $(offsetParent[0]).css('border-top-width') ) || 0 parentOffset.left += parseFloat( $(offsetParent[0]).css('border-left-width') ) || 0 // Subtract the two offsets return { top: offset.top - parentOffset.top, left: offset.left - parentOffset.left } }, offsetParent: function() { return this.map(function(){ var parent = this.offsetParent || document.body while (parent && !rootNodeRE.test(parent.nodeName) && $(parent).css("position") == "static") parent = parent.offsetParent return parent }) } } // for now $.fn.detach = $.fn.remove // Generate the `width` and `height` functions ;['width', 'height'].forEach(function(dimension){ var dimensionProperty = dimension.replace(/./, function(m){ return m[0].toUpperCase() }) $.fn[dimension] = function(value){ var offset, el = this[0] if (value === undefined) return isWindow(el) ? el['inner' + dimensionProperty] : isDocument(el) ? el.documentElement['scroll' + dimensionProperty] : (offset = this.offset()) && offset[dimension] else return this.each(function(idx){ el = $(this) el.css(dimension, funcArg(this, value, idx, el[dimension]())) }) } }) function traverseNode(node, fun) { fun(node) for (var i = 0, len = node.childNodes.length; i < len; i++) traverseNode(node.childNodes[i], fun) } // Generate the `after`, `prepend`, `before`, `append`, // `insertAfter`, `insertBefore`, `appendTo`, and `prependTo` methods. adjacencyOperators.forEach(function(operator, operatorIndex) { var inside = operatorIndex % 2 //=> prepend, append $.fn[operator] = function(){ // arguments can be nodes, arrays of nodes, Zepto objects and HTML strings var argType, nodes = $.map(arguments, function(arg) { argType = type(arg) return argType == "object" || argType == "array" || arg == null ? arg : zepto.fragment(arg) }), parent, copyByClone = this.length > 1 if (nodes.length < 1) return this return this.each(function(_, target){ parent = inside ? target : target.parentNode // convert all methods to a "before" operation target = operatorIndex == 0 ? target.nextSibling : operatorIndex == 1 ? target.firstChild : operatorIndex == 2 ? target : null var parentInDocument = $.contains(document.documentElement, parent) nodes.forEach(function(node){ if (copyByClone) node = node.cloneNode(true) else if (!parent) return $(node).remove() parent.insertBefore(node, target) if (parentInDocument) traverseNode(node, function(el){ if (el.nodeName != null && el.nodeName.toUpperCase() === 'SCRIPT' && (!el.type || el.type === 'text/javascript') && !el.src) window['eval'].call(window, el.innerHTML) }) }) }) } // after => insertAfter // prepend => prependTo // before => insertBefore // append => appendTo $.fn[inside ? operator+'To' : 'insert'+(operatorIndex ? 'Before' : 'After')] = function(html){ $(html)[operator](this) return this } }) zepto.Z.prototype = $.fn // Export internal API functions in the `$.zepto` namespace zepto.uniq = uniq zepto.deserializeValue = deserializeValue $.zepto = zepto return $ })() window.Zepto = Zepto window.$ === undefined && (window.$ = Zepto) ;(function($){ var _zid = 1, undefined, slice = Array.prototype.slice, isFunction = $.isFunction, isString = function(obj){ return typeof obj == 'string' }, handlers = {}, specialEvents={}, focusinSupported = 'onfocusin' in window, focus = { focus: 'focusin', blur: 'focusout' }, hover = { mouseenter: 'mouseover', mouseleave: 'mouseout' } specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = 'MouseEvents' function zid(element) { return element._zid || (element._zid = _zid++) } function findHandlers(element, event, fn, selector) { event = parse(event) if (event.ns) var matcher = matcherFor(event.ns) return (handlers[zid(element)] || []).filter(function(handler) { return handler && (!event.e || handler.e == event.e) && (!event.ns || matcher.test(handler.ns)) && (!fn || zid(handler.fn) === zid(fn)) && (!selector || handler.sel == selector) }) } function parse(event) { var parts = ('' + event).split('.') return {e: parts[0], ns: parts.slice(1).sort().join(' ')} } function matcherFor(ns) { return new RegExp('(?:^| )' + ns.replace(' ', ' .* ?') + '(?: |$)') } function eventCapture(handler, captureSetting) { return handler.del && (!focusinSupported && (handler.e in focus)) || !!captureSetting } function realEvent(type) { return hover[type] || (focusinSupported && focus[type]) || type } function add(element, events, fn, data, selector, delegator, capture){ var id = zid(element), set = (handlers[id] || (handlers[id] = [])) events.split(/\s/).forEach(function(event){ if (event == 'ready') return $(document).ready(fn) var handler = parse(event) handler.fn = fn handler.sel = selector // emulate mouseenter, mouseleave if (handler.e in hover) fn = function(e){ var related = e.relatedTarget if (!related || (related !== this && !$.contains(this, related))) return handler.fn.apply(this, arguments) } handler.del = delegator var callback = delegator || fn handler.proxy = function(e){ e = compatible(e) if (e.isImmediatePropagationStopped()) return e.data = data var result = callback.apply(element, e._args == undefined ? [e] : [e].concat(e._args)) if (result === false) e.preventDefault(), e.stopPropagation() return result } handler.i = set.length set.push(handler) if ('addEventListener' in element) element.addEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture)) }) } function remove(element, events, fn, selector, capture){ var id = zid(element) ;(events || '').split(/\s/).forEach(function(event){ findHandlers(element, event, fn, selector).forEach(function(handler){ delete handlers[id][handler.i] if ('removeEventListener' in element) element.removeEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture)) }) }) } $.event = { add: add, remove: remove } $.proxy = function(fn, context) { var args = (2 in arguments) && slice.call(arguments, 2) if (isFunction(fn)) { var proxyFn = function(){ return fn.apply(context, args ? args.concat(slice.call(arguments)) : arguments) } proxyFn._zid = zid(fn) return proxyFn } else if (isString(context)) { if (args) { args.unshift(fn[context], fn) return $.proxy.apply(null, args) } else { return $.proxy(fn[context], fn) } } else { throw new TypeError("expected function") } } $.fn.bind = function(event, data, callback){ return this.on(event, data, callback) } $.fn.unbind = function(event, callback){ return this.off(event, callback) } $.fn.one = function(event, selector, data, callback){ return this.on(event, selector, data, callback, 1) } var returnTrue = function(){return true}, returnFalse = function(){return false}, ignoreProperties = /^([A-Z]|returnValue$|layer[XY]$)/, eventMethods = { preventDefault: 'isDefaultPrevented', stopImmediatePropagation: 'isImmediatePropagationStopped', stopPropagation: 'isPropagationStopped' } function compatible(event, source) { if (source || !event.isDefaultPrevented) { source || (source = event) $.each(eventMethods, function(name, predicate) { var sourceMethod = source[name] event[name] = function(){ this[predicate] = returnTrue return sourceMethod && sourceMethod.apply(source, arguments) } event[predicate] = returnFalse }) if (source.defaultPrevented !== undefined ? source.defaultPrevented : 'returnValue' in source ? source.returnValue === false : source.getPreventDefault && source.getPreventDefault()) event.isDefaultPrevented = returnTrue } return event } function createProxy(event) { var key, proxy = { originalEvent: event } for (key in event) if (!ignoreProperties.test(key) && event[key] !== undefined) proxy[key] = event[key] return compatible(proxy, event) } $.fn.delegate = function(selector, event, callback){ return this.on(event, selector, callback) } $.fn.undelegate = function(selector, event, callback){ return this.off(event, selector, callback) } $.fn.live = function(event, callback){ $(document.body).delegate(this.selector, event, callback) return this } $.fn.die = function(event, callback){ $(document.body).undelegate(this.selector, event, callback) return this } $.fn.on = function(event, selector, data, callback, one){ var autoRemove, delegator, $this = this if (event && !isString(event)) { $.each(event, function(type, fn){ $this.on(type, selector, data, fn, one) }) return $this } if (!isString(selector) && !isFunction(callback) && callback !== false) callback = data, data = selector, selector = undefined if (isFunction(data) || data === false) callback = data, data = undefined if (callback === false) callback = returnFalse return $this.each(function(_, element){ if (one) autoRemove = function(e){ remove(element, e.type, callback) return callback.apply(this, arguments) } if (selector) delegator = function(e){ var evt, match = $(e.target).closest(selector, element).get(0) if (match && match !== element) { evt = $.extend(createProxy(e), {currentTarget: match, liveFired: element}) return (autoRemove || callback).apply(match, [evt].concat(slice.call(arguments, 1))) } } add(element, event, callback, data, selector, delegator || autoRemove) }) } $.fn.off = function(event, selector, callback){ var $this = this if (event && !isString(event)) { $.each(event, function(type, fn){ $this.off(type, selector, fn) }) return $this } if (!isString(selector) && !isFunction(callback) && callback !== false) callback = selector, selector = undefined if (callback === false) callback = returnFalse return $this.each(function(){ remove(this, event, callback, selector) }) } $.fn.trigger = function(event, args){ event = (isString(event) || $.isPlainObject(event)) ? $.Event(event) : compatible(event) event._args = args return this.each(function(){ // items in the collection might not be DOM elements if('dispatchEvent' in this) this.dispatchEvent(event) else $(this).triggerHandler(event, args) }) } // triggers event handlers on current element just as if an event occurred, // doesn't trigger an actual event, doesn't bubble $.fn.triggerHandler = function(event, args){ var e, result this.each(function(i, element){ e = createProxy(isString(event) ? $.Event(event) : event) e._args = args e.target = element $.each(findHandlers(element, event.type || event), function(i, handler){ result = handler.proxy(e) if (e.isImmediatePropagationStopped()) return false }) }) return result } // shortcut methods for `.bind(event, fn)` for each event type ;('focusin focusout load resize scroll unload click dblclick '+ 'mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave '+ 'change select keydown keypress keyup error').split(' ').forEach(function(event) { $.fn[event] = function(callback) { return callback ? this.bind(event, callback) : this.trigger(event) } }) ;['focus', 'blur'].forEach(function(name) { $.fn[name] = function(callback) { if (callback) this.bind(name, callback) else this.each(function(){ try { this[name]() } catch(e) {} }) return this } }) $.Event = function(type, props) { if (!isString(type)) props = type, type = props.type var event = document.createEvent(specialEvents[type] || 'Events'), bubbles = true if (props) for (var name in props) (name == 'bubbles') ? (bubbles = !!props[name]) : (event[name] = props[name]) event.initEvent(type, bubbles, true) return compatible(event) } })(Zepto) ;(function($){ var jsonpID = 0, document = window.document, key, name, rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, scriptTypeRE = /^(?:text|application)\/javascript/i, xmlTypeRE = /^(?:text|application)\/xml/i, jsonType = 'application/json', htmlType = 'text/html', blankRE = /^\s*$/ // trigger a custom event and return false if it was cancelled function triggerAndReturn(context, eventName, data) { var event = $.Event(eventName) $(context).trigger(event, data) return !event.isDefaultPrevented() } // trigger an Ajax "global" event function triggerGlobal(settings, context, eventName, data) { if (settings.global) return triggerAndReturn(context || document, eventName, data) } // Number of active Ajax requests $.active = 0 function ajaxStart(settings) { if (settings.global && $.active++ === 0) triggerGlobal(settings, null, 'ajaxStart') } function ajaxStop(settings) { if (settings.global && !(--$.active)) triggerGlobal(settings, null, 'ajaxStop') } // triggers an extra global event "ajaxBeforeSend" that's like "ajaxSend" but cancelable function ajaxBeforeSend(xhr, settings) { var context = settings.context if (settings.beforeSend.call(context, xhr, settings) === false || triggerGlobal(settings, context, 'ajaxBeforeSend', [xhr, settings]) === false) return false triggerGlobal(settings, context, 'ajaxSend', [xhr, settings]) } function ajaxSuccess(data, xhr, settings, deferred) { var context = settings.context, status = 'success' settings.success.call(context, data, status, xhr) if (deferred) deferred.resolveWith(context, [data, status, xhr]) triggerGlobal(settings, context, 'ajaxSuccess', [xhr, settings, data]) ajaxComplete(status, xhr, settings) } // type: "timeout", "error", "abort", "parsererror" function ajaxError(error, type, xhr, settings, deferred) { var context = settings.context settings.error.call(context, xhr, type, error) if (deferred) deferred.rejectWith(context, [xhr, type, error]) triggerGlobal(settings, context, 'ajaxError', [xhr, settings, error || type]) ajaxComplete(type, xhr, settings) } // status: "success", "notmodified", "error", "timeout", "abort", "parsererror" function ajaxComplete(status, xhr, settings) { var context = settings.context settings.complete.call(context, xhr, status) triggerGlobal(settings, context, 'ajaxComplete', [xhr, settings]) ajaxStop(settings) } // Empty function, used as default callback function empty() {} $.ajaxJSONP = function(options, deferred){ if (!('type' in options)) return $.ajax(options) var _callbackName = options.jsonpCallback, callbackName = ($.isFunction(_callbackName) ? _callbackName() : _callbackName) || ('jsonp' + (++jsonpID)), script = document.createElement('script'), originalCallback = window[callbackName], responseData, abort = function(errorType) { $(script).triggerHandler('error', errorType || 'abort') }, xhr = { abort: abort }, abortTimeout if (deferred) deferred.promise(xhr) $(script).on('load error', function(e, errorType){ clearTimeout(abortTimeout) $(script).off().remove() if (e.type == 'error' || !responseData) { ajaxError(null, errorType || 'error', xhr, options, deferred) } else { ajaxSuccess(responseData[0], xhr, options, deferred) } window[callbackName] = originalCallback if (responseData && $.isFunction(originalCallback)) originalCallback(responseData[0]) originalCallback = responseData = undefined }) if (ajaxBeforeSend(xhr, options) === false) { abort('abort') return xhr } window[callbackName] = function(){ responseData = arguments } script.src = options.url.replace(/\?(.+)=\?/, '?$1=' + callbackName) document.head.appendChild(script) if (options.timeout > 0) abortTimeout = setTimeout(function(){ abort('timeout') }, options.timeout) return xhr } $.ajaxSettings = { // Default type of request type: 'GET', // Callback that is executed before request beforeSend: empty, // Callback that is executed if the request succeeds success: empty, // Callback that is executed the the server drops error error: empty, // Callback that is executed on request complete (both: error and success) complete: empty, // The context for the callbacks context: null, // Whether to trigger "global" Ajax events global: true, // Transport xhr: function () { return new window.XMLHttpRequest() }, // MIME types mapping // IIS returns Javascript as "application/x-javascript" accepts: { script: 'text/javascript, application/javascript, application/x-javascript', json: jsonType, xml: 'application/xml, text/xml', html: htmlType, text: 'text/plain' }, // Whether the request is to another domain crossDomain: false, // Default timeout timeout: 0, // Whether data should be serialized to string processData: true, // Whether the browser should be allowed to cache GET responses cache: true } function mimeToDataType(mime) { if (mime) mime = mime.split(';', 2)[0] return mime && ( mime == htmlType ? 'html' : mime == jsonType ? 'json' : scriptTypeRE.test(mime) ? 'script' : xmlTypeRE.test(mime) && 'xml' ) || 'text' } function appendQuery(url, query) { if (query == '') return url return (url + '&' + query).replace(/[&?]{1,2}/, '?') } // serialize payload and append it to the URL for GET requests function serializeData(options) { if (options.processData && options.data && $.type(options.data) != "string") options.data = $.param(options.data, options.traditional) if (options.data && (!options.type || options.type.toUpperCase() == 'GET')) options.url = appendQuery(options.url, options.data), options.data = undefined } $.ajax = function(options){ var settings = $.extend({}, options || {}), deferred = $.Deferred && $.Deferred() for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key] ajaxStart(settings) if (!settings.crossDomain) settings.crossDomain = /^([\w-]+:)?\/\/([^\/]+)/.test(settings.url) && RegExp.$2 != window.location.host if (!settings.url) settings.url = window.location.toString() serializeData(settings) var dataType = settings.dataType, hasPlaceholder = /\?.+=\?/.test(settings.url) if (hasPlaceholder) dataType = 'jsonp' if (settings.cache === false || ( (!options || options.cache !== true) && ('script' == dataType || 'jsonp' == dataType) )) settings.url = appendQuery(settings.url, '_=' + Date.now()) if ('jsonp' == dataType) { if (!hasPlaceholder) settings.url = appendQuery(settings.url, settings.jsonp ? (settings.jsonp + '=?') : settings.jsonp === false ? '' : 'callback=?') return $.ajaxJSONP(settings, deferred) } var mime = settings.accepts[dataType], headers = { }, setHeader = function(name, value) { headers[name.toLowerCase()] = [name, value] }, protocol = /^([\w-]+:)\/\//.test(settings.url) ? RegExp.$1 : window.location.protocol, xhr = settings.xhr(), nativeSetHeader = xhr.setRequestHeader, abortTimeout if (deferred) deferred.promise(xhr) if (!settings.crossDomain) setHeader('X-Requested-With', 'XMLHttpRequest') setHeader('Accept', mime || '*/*') if (mime = settings.mimeType || mime) { if (mime.indexOf(',') > -1) mime = mime.split(',', 2)[0] xhr.overrideMimeType && xhr.overrideMimeType(mime) } if (settings.contentType || (settings.contentType !== false && settings.data && settings.type.toUpperCase() != 'GET')) setHeader('Content-Type', settings.contentType || 'application/x-www-form-urlencoded') if (settings.headers) for (name in settings.headers) setHeader(name, settings.headers[name]) xhr.setRequestHeader = setHeader xhr.onreadystatechange = function(){ if (xhr.readyState == 4) { xhr.onreadystatechange = empty clearTimeout(abortTimeout) var result, error = false if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304 || (xhr.status == 0 && protocol == 'file:')) { dataType = dataType || mimeToDataType(settings.mimeType || xhr.getResponseHeader('content-type')) result = xhr.responseText try { // http://perfectionkills.com/global-eval-what-are-the-options/ if (dataType == 'script') (1,eval)(result) else if (dataType == 'xml') result = xhr.responseXML else if (dataType == 'json') result = blankRE.test(result) ? null : $.parseJSON(result) } catch (e) { error = e } if (error) ajaxError(error, 'parsererror', xhr, settings, deferred) else ajaxSuccess(result, xhr, settings, deferred) } else { ajaxError(xhr.statusText || null, xhr.status ? 'error' : 'abort', xhr, settings, deferred) } } } if (ajaxBeforeSend(xhr, settings) === false) { xhr.abort() ajaxError(null, 'abort', xhr, settings, deferred) return xhr } if (settings.xhrFields) for (name in settings.xhrFields) xhr[name] = settings.xhrFields[name] var async = 'async' in settings ? settings.async : true xhr.open(settings.type, settings.url, async, settings.username, settings.password) for (name in headers) nativeSetHeader.apply(xhr, headers[name]) if (settings.timeout > 0) abortTimeout = setTimeout(function(){ xhr.onreadystatechange = empty xhr.abort() ajaxError(null, 'timeout', xhr, settings, deferred) }, settings.timeout) // avoid sending empty string (#319) xhr.send(settings.data ? settings.data : null) return xhr } // handle optional data/success arguments function parseArguments(url, data, success, dataType) { if ($.isFunction(data)) dataType = success, success = data, data = undefined if (!$.isFunction(success)) dataType = success, success = undefined return { url: url , data: data , success: success , dataType: dataType } } $.get = function(/* url, data, success, dataType */){ return $.ajax(parseArguments.apply(null, arguments)) } $.post = function(/* url, data, success, dataType */){ var options = parseArguments.apply(null, arguments) options.type = 'POST' return $.ajax(options) } $.getJSON = function(/* url, data, success */){ var options = parseArguments.apply(null, arguments) options.dataType = 'json' return $.ajax(options) } $.fn.load = function(url, data, success){ if (!this.length) return this var self = this, parts = url.split(/\s/), selector, options = parseArguments(url, data, success), callback = options.success if (parts.length > 1) options.url = parts[0], selector = parts[1] options.success = function(response){ self.html(selector ? $('<div>').html(response.replace(rscript, "")).find(selector) : response) callback && callback.apply(self, arguments) } $.ajax(options) return this } var escape = encodeURIComponent function serialize(params, obj, traditional, scope){ var type, array = $.isArray(obj), hash = $.isPlainObject(obj) $.each(obj, function(key, value) { type = $.type(value) if (scope) key = traditional ? scope : scope + '[' + (hash || type == 'object' || type == 'array' ? key : '') + ']' // handle data in serializeArray() format if (!scope && array) params.add(value.name, value.value) // recurse into nested objects else if (type == "array" || (!traditional && type == "object")) serialize(params, value, traditional, key) else params.add(key, value) }) } $.param = function(obj, traditional){ var params = [] params.add = function(k, v){ this.push(escape(k) + '=' + escape(v)) } serialize(params, obj, traditional) return params.join('&').replace(/%20/g, '+') } })(Zepto) ;(function($){ $.fn.serializeArray = function() { var result = [], el $([].slice.call(this.get(0).elements)).each(function(){ el = $(this) var type = el.attr('type') if (this.nodeName.toLowerCase() != 'fieldset' && !this.disabled && type != 'submit' && type != 'reset' && type != 'button' && ((type != 'radio' && type != 'checkbox') || this.checked)) result.push({ name: el.attr('name'), value: el.val() }) }) return result } $.fn.serialize = function(){ var result = [] this.serializeArray().forEach(function(elm){ result.push(encodeURIComponent(elm.name) + '=' + encodeURIComponent(elm.value)) }) return result.join('&') } $.fn.submit = function(callback) { if (callback) this.bind('submit', callback) else if (this.length) { var event = $.Event('submit') this.eq(0).trigger(event) if (!event.isDefaultPrevented()) this.get(0).submit() } return this } })(Zepto) ;(function($){ // __proto__ doesn't exist on IE<11, so redefine // the Z function to use object extension instead if (!('__proto__' in {})) { $.extend($.zepto, { Z: function(dom, selector){ dom = dom || [] $.extend(dom, $.fn) dom.selector = selector || '' dom.__Z = true return dom }, // this is a kludge but works isZ: function(object){ return $.type(object) === 'array' && '__Z' in object } }) } // getComputedStyle shouldn't freak out when called // without a valid element as argument try { getComputedStyle(undefined) } catch(e) { var nativeGetComputedStyle = getComputedStyle; window.getComputedStyle = function(element){ try { return nativeGetComputedStyle(element) } catch(e) { return null } } } })(Zepto) // Zepto.js // (c) 2010-2014 Thomas Fuchs // Zepto.js may be freely distributed under the MIT license. ;(function($){ var touch = {}, touchTimeout, tapTimeout, swipeTimeout, longTapTimeout, longTapDelay = 750, gesture function swipeDirection(x1, x2, y1, y2) { return Math.abs(x1 - x2) >= Math.abs(y1 - y2) ? (x1 - x2 > 0 ? 'Left' : 'Right') : (y1 - y2 > 0 ? 'Up' : 'Down') } function longTap() { longTapTimeout = null if (touch.last) { touch.el.trigger('longTap') touch = {} } } function cancelLongTap() { if (longTapTimeout) clearTimeout(longTapTimeout) longTapTimeout = null } function cancelAll() { if (touchTimeout) clearTimeout(touchTimeout) if (tapTimeout) clearTimeout(tapTimeout) if (swipeTimeout) clearTimeout(swipeTimeout) if (longTapTimeout) clearTimeout(longTapTimeout) touchTimeout = tapTimeout = swipeTimeout = longTapTimeout = null touch = {} } function isPrimaryTouch(event){ return (event.pointerType == 'touch' || event.pointerType == event.MSPOINTER_TYPE_TOUCH) && event.isPrimary } function isPointerEventType(e, type){ return (e.type == 'pointer'+type || e.type.toLowerCase() == 'mspointer'+type) } $(document).ready(function(){ var now, delta, deltaX = 0, deltaY = 0, firstTouch, _isPointerType if ('MSGesture' in window) { gesture = new MSGesture() gesture.target = document.body } $(document) .bind('MSGestureEnd', function(e){ var swipeDirectionFromVelocity = e.velocityX > 1 ? 'Right' : e.velocityX < -1 ? 'Left' : e.velocityY > 1 ? 'Down' : e.velocityY < -1 ? 'Up' : null; if (swipeDirectionFromVelocity) { touch.el.trigger('swipe') touch.el.trigger('swipe'+ swipeDirectionFromVelocity) } }) .on('touchstart MSPointerDown pointerdown', function(e){ if((_isPointerType = isPointerEventType(e, 'down')) && !isPrimaryTouch(e)) return firstTouch = _isPointerType ? e : e.touches[0] if (e.touches && e.touches.length === 1 && touch.x2) { // Clear out touch movement data if we have it sticking around // This can occur if touchcancel doesn't fire due to preventDefault, etc. touch.x2 = undefined touch.y2 = undefined } now = Date.now() delta = now - (touch.last || now) touch.el = $('tagName' in firstTouch.target ? firstTouch.target : firstTouch.target.parentNode) touchTimeout && clearTimeout(touchTimeout) touch.x1 = firstTouch.pageX touch.y1 = firstTouch.pageY if (delta > 0 && delta <= 250) touch.isDoubleTap = true touch.last = now longTapTimeout = setTimeout(longTap, longTapDelay) // adds the current touch contact for IE gesture recognition if (gesture && _isPointerType) gesture.addPointer(e.pointerId); }) .on('touchmove MSPointerMove pointermove', function(e){ if((_isPointerType = isPointerEventType(e, 'move')) && !isPrimaryTouch(e)) return firstTouch = _isPointerType ? e : e.touches[0] cancelLongTap() touch.x2 = firstTouch.pageX touch.y2 = firstTouch.pageY deltaX += Math.abs(touch.x1 - touch.x2) deltaY += Math.abs(touch.y1 - touch.y2) }) .on('touchend MSPointerUp pointerup', function(e){ if((_isPointerType = isPointerEventType(e, 'up')) && !isPrimaryTouch(e)) return cancelLongTap() // swipe if ((touch.x2 && Math.abs(touch.x1 - touch.x2) > 30) || (touch.y2 && Math.abs(touch.y1 - touch.y2) > 30)) swipeTimeout = setTimeout(function() { touch.el.trigger('swipe') touch.el.trigger('swipe' + (swipeDirection(touch.x1, touch.x2, touch.y1, touch.y2))) touch = {} }, 0) // normal tap else if ('last' in touch) // don't fire tap when delta position changed by more than 30 pixels, // for instance when moving to a point and back to origin if (deltaX < 30 && deltaY < 30) { // delay by one tick so we can cancel the 'tap' event if 'scroll' fires // ('tap' fires before 'scroll') tapTimeout = setTimeout(function() { // trigger universal 'tap' with the option to cancelTouch() // (cancelTouch cancels processing of single vs double taps for faster 'tap' response) var event = $.Event('tap') event.cancelTouch = cancelAll touch.el.trigger(event) // trigger double tap immediately if (touch.isDoubleTap) { if (touch.el) touch.el.trigger('doubleTap') touch = {} } // trigger single tap after 250ms of inactivity else { touchTimeout = setTimeout(function(){ touchTimeout = null if (touch.el) touch.el.trigger('singleTap') touch = {} }, 250) } }, 0) } else { touch = {} } deltaX = deltaY = 0 }) // when the browser window loses focus, // for example when a modal dialog is shown, // cancel all ongoing events .on('touchcancel MSPointerCancel pointercancel', cancelAll) // scrolling the window indicates intention of the user // to scroll, not tap or swipe, so cancel all ongoing events $(window).on('scroll', cancelAll) }) ;['swipe', 'swipeLeft', 'swipeRight', 'swipeUp', 'swipeDown', 'doubleTap', 'tap', 'singleTap', 'longTap'].forEach(function(eventName){ $.fn[eventName] = function(callback){ return this.on(eventName, callback) } }) })(Zepto)
picacure/_sandBox
photoGallery/flux/js/zepto.js
JavaScript
mit
62,392
import asyncio import asyncio.subprocess import datetime import logging from collections import OrderedDict, defaultdict from typing import Any, Awaitable, Dict, List, Optional, Union # noqa from urllib.parse import urlparse from aiohttp import web import yacron.version from yacron.config import ( JobConfig, parse_config, ConfigError, parse_config_string, WebConfig, ) from yacron.job import RunningJob, JobRetryState from crontab import CronTab # noqa logger = logging.getLogger("yacron") WAKEUP_INTERVAL = datetime.timedelta(minutes=1) def naturaltime(seconds: float, future=False) -> str: assert future if seconds < 120: return "in {} second{}".format( int(seconds), "s" if seconds >= 2 else "" ) minutes = seconds / 60 if minutes < 120: return "in {} minute{}".format( int(minutes), "s" if minutes >= 2 else "" ) hours = minutes / 60 if hours < 48: return "in {} hour{}".format(int(hours), "s" if hours >= 2 else "") days = hours / 24 return "in {} day{}".format(int(days), "s" if days >= 2 else "") def get_now(timezone: Optional[datetime.tzinfo]) -> datetime.datetime: return datetime.datetime.now(timezone) def next_sleep_interval() -> float: now = get_now(datetime.timezone.utc) target = now.replace(second=0) + WAKEUP_INTERVAL return (target - now).total_seconds() def create_task(coro: Awaitable) -> asyncio.Task: return asyncio.get_event_loop().create_task(coro) def web_site_from_url(runner: web.AppRunner, url: str) -> web.BaseSite: parsed = urlparse(url) if parsed.scheme == "http": assert parsed.hostname is not None assert parsed.port is not None return web.TCPSite(runner, parsed.hostname, parsed.port) elif parsed.scheme == "unix": return web.UnixSite(runner, parsed.path) else: logger.warning( "Ignoring web listen url %s: scheme %r not supported", url, parsed.scheme, ) raise ValueError(url) class Cron: def __init__( self, config_arg: Optional[str], *, config_yaml: Optional[str] = None ) -> None: # list of cron jobs we /want/ to run self.cron_jobs = OrderedDict() # type: Dict[str, JobConfig] # list of cron jobs already running # name -> list of RunningJob self.running_jobs = defaultdict( list ) # type: Dict[str, List[RunningJob]] self.config_arg = config_arg if config_arg is not None: self.update_config() if config_yaml is not None: # config_yaml is for unit testing config, _, _ = parse_config_string(config_yaml, "") self.cron_jobs = OrderedDict((job.name, job) for job in config) self._wait_for_running_jobs_task = None # type: Optional[asyncio.Task] self._stop_event = asyncio.Event() self._jobs_running = asyncio.Event() self.retry_state = {} # type: Dict[str, JobRetryState] self.web_runner = None # type: Optional[web.AppRunner] self.web_config = None # type: Optional[WebConfig] async def run(self) -> None: self._wait_for_running_jobs_task = create_task( self._wait_for_running_jobs() ) startup = True while not self._stop_event.is_set(): try: web_config = self.update_config() await self.start_stop_web_app(web_config) except ConfigError as err: logger.error( "Error in configuration file(s), so not updating " "any of the config.:\n%s", str(err), ) except Exception: # pragma: nocover logger.exception("please report this as a bug (1)") await self.spawn_jobs(startup) startup = False sleep_interval = next_sleep_interval() logger.debug("Will sleep for %.1f seconds", sleep_interval) try: await asyncio.wait_for(self._stop_event.wait(), sleep_interval) except asyncio.TimeoutError: pass logger.info("Shutting down (after currently running jobs finish)...") while self.retry_state: cancel_all = [ self.cancel_job_retries(name) for name in self.retry_state ] await asyncio.gather(*cancel_all) await self._wait_for_running_jobs_task if self.web_runner is not None: logger.info("Stopping http server") await self.web_runner.cleanup() def signal_shutdown(self) -> None: logger.debug("Signalling shutdown") self._stop_event.set() def update_config(self) -> Optional[WebConfig]: if self.config_arg is None: return None config, web_config = parse_config(self.config_arg) self.cron_jobs = OrderedDict((job.name, job) for job in config) return web_config async def _web_get_version(self, request: web.Request) -> web.Response: return web.Response(text=yacron.version.version) async def _web_get_status(self, request: web.Request) -> web.Response: out = [] for name, job in self.cron_jobs.items(): running = self.running_jobs.get(name, None) if running: out.append( { "job": name, "status": "running", "pid": [ runjob.proc.pid for runjob in running if runjob.proc is not None ], } ) else: crontab = job.schedule # type: Union[CronTab, str] now = get_now(job.timezone) out.append( { "job": name, "status": "scheduled", "scheduled_in": ( crontab.next(now=now, default_utc=job.utc) if isinstance(crontab, CronTab) else str(crontab) ), } ) if request.headers.get("Accept") == "application/json": return web.json_response(out) else: lines = [] for jobstat in out: # type: Dict[str, Any] if jobstat["status"] == "running": status = "running (pid: {pid})".format( pid=", ".join(str(pid) for pid in jobstat["pid"]) ) else: status = "scheduled ({})".format( ( jobstat["scheduled_in"] if type(jobstat["scheduled_in"]) is str else naturaltime( jobstat["scheduled_in"], future=True ) ) ) lines.append( "{name}: {status}".format( name=jobstat["job"], status=status ) ) return web.Response(text="\n".join(lines)) async def _web_start_job(self, request: web.Request) -> web.Response: name = request.match_info["name"] try: job = self.cron_jobs[name] except KeyError: raise web.HTTPNotFound() await self.maybe_launch_job(job) return web.Response() async def start_stop_web_app(self, web_config: Optional[WebConfig]): if self.web_runner is not None and ( web_config is None or web_config != self.web_config ): # assert self.web_runner is not None logger.info("Stopping http server") await self.web_runner.cleanup() self.web_runner = None if ( web_config is not None and web_config["listen"] and self.web_runner is None ): app = web.Application() app.add_routes( [ web.get("/version", self._web_get_version), web.get("/status", self._web_get_status), web.post("/jobs/{name}/start", self._web_start_job), ] ) self.web_runner = web.AppRunner(app) await self.web_runner.setup() for addr in web_config["listen"]: site = web_site_from_url(self.web_runner, addr) logger.info("web: started listening on %s", addr) try: await site.start() except ValueError: pass self.web_config = web_config async def spawn_jobs(self, startup: bool) -> None: for job in self.cron_jobs.values(): if self.job_should_run(startup, job): await self.launch_scheduled_job(job) @staticmethod def job_should_run(startup: bool, job: JobConfig) -> bool: if ( startup and isinstance(job.schedule, str) and job.schedule == "@reboot" ): logger.debug( "Job %s (%s) is scheduled for startup (@reboot)", job.name, job.schedule_unparsed, ) return True elif isinstance(job.schedule, CronTab): crontab = job.schedule # type: CronTab if crontab.test(get_now(job.timezone).replace(second=0)): logger.debug( "Job %s (%s) is scheduled for now", job.name, job.schedule_unparsed, ) return True else: logger.debug( "Job %s (%s) not scheduled for now", job.name, job.schedule_unparsed, ) return False else: return False async def launch_scheduled_job(self, job: JobConfig) -> None: await self.cancel_job_retries(job.name) assert job.name not in self.retry_state retry = job.onFailure["retry"] logger.debug("Job %s retry config: %s", job.name, retry) if retry["maximumRetries"]: retry_state = JobRetryState( retry["initialDelay"], retry["backoffMultiplier"], retry["maximumDelay"], ) self.retry_state[job.name] = retry_state await self.maybe_launch_job(job) async def maybe_launch_job(self, job: JobConfig) -> None: if self.running_jobs[job.name]: logger.warning( "Job %s: still running and concurrencyPolicy is %s", job.name, job.concurrencyPolicy, ) if job.concurrencyPolicy == "Allow": pass elif job.concurrencyPolicy == "Forbid": return elif job.concurrencyPolicy == "Replace": for running_job in self.running_jobs[job.name]: await running_job.cancel() else: raise AssertionError # pragma: no cover logger.info("Starting job %s", job.name) running_job = RunningJob(job, self.retry_state.get(job.name)) await running_job.start() self.running_jobs[job.name].append(running_job) logger.info("Job %s spawned", job.name) self._jobs_running.set() # continually watches for the running jobs, clean them up when they exit async def _wait_for_running_jobs(self) -> None: # job -> wait task wait_tasks = {} # type: Dict[RunningJob, asyncio.Task] while self.running_jobs or not self._stop_event.is_set(): try: for jobs in self.running_jobs.values(): for job in jobs: if job not in wait_tasks: wait_tasks[job] = create_task(job.wait()) if not wait_tasks: try: await asyncio.wait_for(self._jobs_running.wait(), 1) except asyncio.TimeoutError: pass continue self._jobs_running.clear() # wait for at least one task with timeout done_tasks, _ = await asyncio.wait( wait_tasks.values(), timeout=1.0, return_when=asyncio.FIRST_COMPLETED, ) done_jobs = set() for job, task in list(wait_tasks.items()): if task in done_tasks: done_jobs.add(job) for job in done_jobs: task = wait_tasks.pop(job) try: task.result() except Exception: # pragma: no cover logger.exception("please report this as a bug (2)") jobs_list = self.running_jobs[job.config.name] jobs_list.remove(job) if not jobs_list: del self.running_jobs[job.config.name] fail_reason = job.fail_reason logger.info( "Job %s exit code %s; has stdout: %s, " "has stderr: %s; fail_reason: %r", job.config.name, job.retcode, str(bool(job.stdout)).lower(), str(bool(job.stderr)).lower(), fail_reason, ) if fail_reason is not None: await self.handle_job_failure(job) else: await self.handle_job_success(job) except asyncio.CancelledError: raise except Exception: # pragma: no cover logger.exception("please report this as a bug (3)") await asyncio.sleep(1) async def handle_job_failure(self, job: RunningJob) -> None: if self._stop_event.is_set(): return if job.stdout: logger.info( "Job %s STDOUT:\n%s", job.config.name, job.stdout.rstrip() ) if job.stderr: logger.info( "Job %s STDERR:\n%s", job.config.name, job.stderr.rstrip() ) await job.report_failure() # Handle retries... state = job.retry_state if state is None or state.cancelled: await job.report_permanent_failure() return logger.debug( "Job %s has been retried %i times", job.config.name, state.count ) if state.task is not None: if state.task.done(): await state.task else: state.task.cancel() retry = job.config.onFailure["retry"] if ( state.count >= retry["maximumRetries"] and retry["maximumRetries"] != -1 ): await self.cancel_job_retries(job.config.name) await job.report_permanent_failure() else: retry_delay = state.next_delay() state.task = create_task( self.schedule_retry_job( job.config.name, retry_delay, state.count ) ) async def schedule_retry_job( self, job_name: str, delay: float, retry_num: int ) -> None: logger.info( "Cron job %s scheduled to be retried (#%i) " "in %.1f seconds", job_name, retry_num, delay, ) await asyncio.sleep(delay) try: job = self.cron_jobs[job_name] except KeyError: logger.warning( "Cron job %s was scheduled for retry, but " "disappeared from the configuration", job_name, ) await self.maybe_launch_job(job) async def handle_job_success(self, job: RunningJob) -> None: await self.cancel_job_retries(job.config.name) await job.report_success() async def cancel_job_retries(self, name: str) -> None: try: state = self.retry_state.pop(name) except KeyError: return state.cancelled = True if state.task is not None: if state.task.done(): await state.task else: state.task.cancel()
gjcarneiro/yacron
yacron/cron.py
Python
mit
16,835
--- layout: single title: "将数组分成和相等的三个部分" date: 2018-10-10 21:30:00 +0800 categories: [Leetcode] tags: [Greedy, Array] permalink: /problems/partition-array-into-three-parts-with-equal-sum/ --- ## 1013. 将数组分成和相等的三个部分 (Easy) {% raw %} <p>给你一个整数数组 <code>arr</code>,只有可以将其划分为三个和相等的 <strong>非空</strong> 部分时才返回 <code>true</code>,否则返回 <code>false</code>。</p> <p>形式上,如果可以找出索引 <code>i + 1 < j</code> 且满足 <code>(arr[0] + arr[1] + ... + arr[i] == arr[i + 1] + arr[i + 2] + ... + arr[j - 1] == arr[j] + arr[j + 1] + ... + arr[arr.length - 1])</code> 就可以将数组三等分。</p> <p> </p> <p><strong>示例 1:</strong></p> <pre> <strong>输入:</strong>arr = [0,2,1,-6,6,-7,9,1,2,0,1] <strong>输出:</strong>true <strong>解释:</strong>0 + 2 + 1 = -6 + 6 - 7 + 9 + 1 = 2 + 0 + 1 </pre> <p><strong>示例 2:</strong></p> <pre> <strong>输入:</strong>arr = [0,2,1,-6,6,7,9,-1,2,0,1] <strong>输出:</strong>false </pre> <p><strong>示例 3:</strong></p> <pre> <strong>输入:</strong>arr = [3,3,6,5,-2,2,5,1,-9,4] <strong>输出:</strong>true <strong>解释:</strong>3 + 3 = 6 = 5 - 2 + 2 + 5 + 1 - 9 + 4 </pre> <p> </p> <p><strong>提示:</strong></p> <ul> <li><code>3 <= arr.length <= 5 * 10<sup>4</sup></code></li> <li><code>-10<sup>4</sup> <= arr[i] <= 10<sup>4</sup></code></li> </ul> {% endraw %} ### 相关话题 [[贪心](https://github.com/awesee/leetcode/tree/main/tag/greedy/README.md)] [[数组](https://github.com/awesee/leetcode/tree/main/tag/array/README.md)] --- ## [解法](https://github.com/awesee/leetcode/tree/main/problems/partition-array-into-three-parts-with-equal-sum)
openset/openset.github.io
_posts/2018-10-10-partition-array-into-three-parts-with-equal-sum.md
Markdown
mit
1,823
const SELECTOR_BOOK_IMAGE = '#default > div > div > div > div > section > div:nth-child(2) > ol > li:nth-child(1) > article > div.image_container > a > img'; const puppeteer = require('puppeteer'); let scrapeSite1 = async (browser) => { const page = await browser.newPage(); await page.goto('http://books.toscrape.com/'); await page.waitFor(1000); await page.click(SELECTOR_BOOK_IMAGE); await page.waitFor(2000); const result = await page.evaluate(() => { let title = document.querySelector('h1').innerText; let price = document.querySelector('.price_color').innerText; return { title, price } }); return result; } let scrape = async () => { const browser = await puppeteer.launch({ headless: false }); const result = await Promise.all([ scrapeSite1(browser), scrapeSite1(browser), scrapeSite1(browser), scrapeSite1(browser), scrapeSite1(browser) ]); await browser.close(); return result; }; scrape().then((value) => { console.log(value); // Success! });
yogendra/yogendra.me
source/_posts/2017/10/28/puppeteer-no-strings-attached/scrape-multi.js
JavaScript
mit
1,035
# Command Bus - [Introduction](#introduction) - [Creating Commamnds](#creating-commands) - [Dispatching Commamnds](#dispatching-commands) - [Queued Commands](#queued-commands) <a name="introduction"></a> ## Introduction The Laravel command bus provides a convenient method of encapsulating tasks your application needs to perform into simple, easy to understand "commands". To help us understand the purpose of commands, let's pretend we are building an application that allows users to purchase podcasts. When a user purchases a podcast, there are a variety of things that need to happen. For example, we may need to charge the user's credit card, add a record to our database that represents the purchase, and send a confirmation e-mail of the purchase. Perhaps we also need to perform some kind of validation as to whether the user is allowed to purchase podcasts. We could put all of this logic inside a controller method; however, this has several disadvantages. The first disadvantage is that our controller probably handles several other incoming HTTP actions, and including complicated logic in each controller method will soon bloat our controller and make it harder to read. Secondly, it is difficult to re-use the purchase podcast logic outside of the controller context. Thirdly, it is more difficult to unit-test the command as we must also generate a stub HTTP request and make a full request to the application to test the purchase podcast logic. Instead of putting this logic in the controller, we may choose to encapsulte it within a "command" object, such as a `PurchasePodcast` command. <a name="creating-commands"></a> ## Creating Commands The Artisan CLI can generate new command classes using the `make:command` command: php artisan make:command PurchasePodcast The newly generated class will be placed in the `app/Commands` directory. By default, the command contains two methods: the constructor and the `handle` method. Of course, the constructor allows you to pass any relevant objects to the command, while the `handle` method executes the command. For example: class PurchasePodcast extends Command implements SelfHandling { protected $user, $podcast; /** * Create a new command instance. * * @return void */ public function __construct(User $user, Podcast $pocast) { $this->user = $user; $this->podcast = $podcast; } /** * Execute the command. * * @return void */ public function handle() { // Handle the logic to purchase the podcast... event(new PodcastWasPurchased($this->user, $this->podcast)); } } The `handle` method may also type-hint dependencies, and they will be automatically injected by the [IoC container](/docs/master/container). For example: /** * Execute the command. * * @return void */ public function handle(BillingGateway $billing) { // Handle the logic to purchase the podcast... } <a name="dispatching-commands"></a> ## Dispatching Commands So, once we have created a command, how do we dispatch it? Of course, we could call the `handle` method directly; however, dispatching the command through the Laravel "command bus" has several advantages which we will discuss later. If you glance at your application's base controller, you will see the `DispatchesCommands` trait. This trait allows us to call the `dispatch` method from any of our controllers. For example: public function purchasePodcast($podcastId) { $this->dispatch( new PurchasePodcast(Auth::user(), Podcast::findOrFail($podcastId)) ); } The command bus will take care of executing the command and calling the IoC container to inject any needed dependencies into the `handle` method. You may add the `Illuminate\Foundation\Bus\DispatchesCommands` trait to any class you wish. If you would like to receive a command bus instance through the constructor of any of your classes, you may type-hint the `Illuminate\Contracts\Bus\Dispatcher` interface. Finally, you may also use the `Bus` facade to quickly dispatch commands: Bus::dispatch( new PurchasePodcast(Auth::user(), Podcast::findOrFail($podcastId)) ); ### Mapping Command Properties From Requests It is very common to map HTTP request variables into commands. So, instead of forcing you to do this manually for each request, Laravel provides some helper methods to make it a cinch. Let's take a look at the `dispatchFrom` method available on the `DispatchesCommands` trait: $this->dispatchFrom('Command\Class\Name', $request); This method will examine the constructor of the command class it is given, and then extract variables from the HTTP request (or any other `ArrayAccess` object) to fill the needed constructor parameters of the command. So, if our command class accepts a `firstName` variable in its constructor, the command bus will attempt to pull the `firstName` parameter from the HTTP request. You may also pass an array as the third argument to the `dispatchFrom` method. This array will be used to fill any constructor parameters that are not available on the request: $this->dispatchFrom('Command\Class\Name', $request, [ 'firstName' => 'Taylor', ]); <a name="queued-commands"></a> ## Queued Commands The command bus is not just for synchronous jobs that run during the current request cycle, but also serves as the primary way to build queued jobs in Laravel. So, how do we instruct command bus to queue our job for background processing instead of running it synchronously? It's easy. Firstly, when generating a new command, just add the `--queued` flag to the command: php artisan make:command PurchasePodcast --queued As you will see, this adds a few more features to the command, namely the `Illuminate\Contracts\Queue\ShouldBeQueued` interface and the `SerializesModels` trait. These instruct the command bus to queue the command, as well as gracefully serialize and deserialize any Eloquent models your command stores as properties. If you would like to convert an existing command into a queued command, simply implement the `Illuminate\Contracts\Queue\ShouldBeQueued` interface on the class manually. It contains no methods, and merely serves as a "marker interface" for the dispatcher. Then, just write your command normally. When you dispatch it to the bus that bus will automatically queue the command for background processing. It doesn't get any easier than that. For more information on interacting with queued commands, view the full [queue documentation](/docs/master/queues).
laravel-tr/docs
bus.md
Markdown
mit
6,517
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="robots" content="index, follow, all" /> <title>Soluble\FlexStore\Source\QueryableSourceInterface | Soluble API</title> <link rel="stylesheet" type="text/css" href="../../../css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="../../../css/bootstrap-theme.min.css"> <link rel="stylesheet" type="text/css" href="../../../css/sami.css"> <script src="../../../js/jquery-1.11.1.min.js"></script> <script src="../../../js/bootstrap.min.js"></script> <script src="../../../js/typeahead.min.js"></script> <script src="../../../sami.js"></script> </head> <body id="class" data-name="class:Soluble_FlexStore_Source_QueryableSourceInterface" data-root-path="../../../"> <div id="content"> <div id="left-column"> <div id="control-panel"> <form id="search-form" action="../../../search.html" method="GET"> <span class="glyphicon glyphicon-search"></span> <input name="search" class="typeahead form-control" type="search" placeholder="Search"> </form> </div> <div id="api-tree"></div> </div> <div id="right-column"> <nav id="site-nav" class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-elements"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="../../../index.html">Soluble API</a> </div> <div class="collapse navbar-collapse" id="navbar-elements"> <ul class="nav navbar-nav"> <li><a href="../../../classes.html">Classes</a></li> <li><a href="../../../namespaces.html">Namespaces</a></li> <li><a href="../../../interfaces.html">Interfaces</a></li> <li><a href="../../../traits.html">Traits</a></li> <li><a href="../../../doc-index.html">Index</a></li> <li><a href="../../../search.html">Search</a></li> </ul> </div> </div> </nav> <div class="namespace-breadcrumbs"> <ol class="breadcrumb"> <li><span class="label label-default">interface</span></li> <li><a href="../../../Soluble.html">Soluble</a></li> <li><a href="../../../Soluble/FlexStore.html">FlexStore</a></li> <li><a href="../../../Soluble/FlexStore/Source.html">Source</a></li> <li>QueryableSourceInterface</li> </ol> </div> <div id="page-content"> <div class="page-header"> <h1>QueryableSourceInterface</h1> </div> <p> interface <strong>QueryableSourceInterface</strong></p> <h2>Methods</h2> <div class="container-fluid underlined"> <div class="row"> <div class="col-md-2 type"> string </div> <div class="col-md-8 type"> <a href="#method_getQueryString">getQueryString</a>() <p>Return underlying query (sql) string</p> </div> <div class="col-md-2"></div> </div> </div> <h2>Details</h2> <div id="method-details"> <div class="method-item"> <h3 id="method_getQueryString"> <div class="location">at line 10</div> <code> string <strong>getQueryString</strong>()</code> </h3> <div class="details"> <div class="method-description"> <p>Return underlying query (sql) string</p> </div> <div class="tags"> <h4>Return Value</h4> <table class="table table-condensed"> <tr> <td>string</td> <td> </td> </tr> </table> </div> </div> </div> </div> </div> <div id="footer"> Generated by <a href="http://sami.sensiolabs.org/">Sami, the API Documentation Generator</a>. </div> </div> </div> </body> </html>
belgattitude/solublecomponents
docs/sphinx/source/_static/API/SAMI/Soluble/FlexStore/Source/QueryableSourceInterface.html
HTML
mit
5,087
<?php class Symfony2EpamCi_Sniffs_Functions_DisallowedFunctionsSniff implements PHP_CodeSniffer_Sniff { private static $disallowedFunctionNames = array( 'var_dump', 'print_r', 'var_export', 'trigger_error', 'header', 'fastcgi_finish_request', 'xdebug_debug_zval', 'xdebug_debug_zval_stdout', 'xdebug_var_dump', 'xdebug_break', 'set_error_handler', 'set_exception_handler', ); /** * Returns an array of tokens this test wants to listen for. * * @return array */ public function register() { return array( T_STRING, ); } /** * Processes this test, when one of its tokens is encountered. * * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. * @param int $stackPtr The position of the current token in * the stack passed in $tokens. * * @return void */ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) { $tokens = $phpcsFile->getTokens(); $content = $tokens[$stackPtr]['content']; if (in_array(strtolower($content), self::$disallowedFunctionNames)) { //Checking previous token as it could be a static method or object method $previousTokenPtr = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, $stackPtr - 1, null, true); if (!is_null($previousTokenPtr)) { switch($tokens[$previousTokenPtr]['code']) { case T_OBJECT_OPERATOR: case T_DOUBLE_COLON: return; } } $error = 'Disallowed function "%s" was called'; $data = array($content); $phpcsFile->addError($error, $stackPtr, 'DisallowedFunctionCalled', $data); } } }
epam-php-solutions/EpamCiBundle
Resources/configs/phpcs/Standards/Symfony2EpamCi/Sniffs/Functions/DisallowedFunctionsSniff.php
PHP
mit
1,954
using System; using System.Globalization; using System.IO; using System.Windows.Data; namespace MailUI.Converters { [ValueConversion(typeof(DirectoryInfo), typeof(FileInfo[]))] public class FilesInDirectoryConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (value == null) { return null; } if (value is DirectoryInfo) { return ((DirectoryInfo) value).GetFiles(); } return null; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } }
ALEX-ANV/GSMail
MailUI/Converters/FilesInDirectoryConverter.cs
C#
mit
795
#region Lock Object against files #region Initial File Creation $File = 'C:\users\proxb\desktop\test.log' '1,2,3,4' | Out-File $File #endregion Initial File Creation #region Take lock and attempt to update file in runspace $LockTaken = $null [System.Threading.Monitor]::TryEnter($File, [ref]$LockTaken) If ($LockTaken) { [powershell]::Create().AddScript({ Param($File,$RSHost) $LockTaken = $Null [System.Threading.Monitor]::TryEnter($File,1000,[ref]$LockTaken) If ($LockTaken) { '5,6,7,8' | Out-File $File -Append } Else { $RSHost.ui.WriteWarningLine("[RUNSPACE1] Unable to take lock and update file!") } }).AddArgument($File).AddArgument($Host).Invoke() [System.Threading.Monitor]::Exit($File) } #endregion Take lock and attempt to update file in runspace #region Take lock in Runspace and update file [powershell]::Create().AddScript({ Param($File,$RSHost) $LockTaken = $Null [System.Threading.Monitor]::TryEnter($File,[ref]$LockTaken) If ($LockTaken) { '9,10,11,12' | Out-File $File -Append } Else { $RSHost.ui.WriteWarningLine("[RUNSPACE2] Unable to take lock and update file!") } }).AddArgument($File).AddArgument($Host).Invoke() $LockTaken = $null [System.Threading.Monitor]::TryEnter($File,1000,[ref]$LockTaken) If ($LockTaken) { '13,14,15,16' | Out-File $File -Append } Else { Write-Warning "[HOST] Unable to take lock and update file!" } #endregion Take lock in Runspace and update file #endregion Lock Object against files
proxb/Presentations
Tampa - A Look at PowerShell Runspaces/3_3_3_RunSpacesDemo_TryLockLogFile.ps1
PowerShell
mit
1,578
<?php namespace GS\UsuarioBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * Lecturaconproposito * * @ORM\Table(name="lecturaconproposito", indexes={@ORM\Index(name="bibliografia_lecturaConProposito_idx", columns={"bibliografia"})}) * @ORM\Entity */ class Lecturaconproposito { /** * @var string * * @ORM\Column(name="idlecturaConProposito", type="string", length=10, nullable=false) * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") */ private $idlecturaconproposito; /** * @var string * * @ORM\Column(name="propositoGeneral", type="text", nullable=false) */ private $propositogeneral; /** * @var string * * @ORM\Column(name="tituloSubcapitulos", type="text", nullable=true) */ private $titulosubcapitulos; /** * @var boolean * * @ORM\Column(name="resumen", type="boolean", nullable=false) */ private $resumen; /** * @var boolean * * @ORM\Column(name="preguntasFinalCapitulo", type="boolean", nullable=false) */ private $preguntasfinalcapitulo; /** * @var boolean * * @ORM\Column(name="glosario", type="boolean", nullable=false) */ private $glosario; /** * @var string * * @ORM\Column(name="secciones", type="text", nullable=true) */ private $secciones; /** * @var string * * @ORM\Column(name="descripcionIlustraciones", type="text", nullable=true) */ private $descripcionilustraciones; /** * @var string * * @ORM\Column(name="resumenLectura", type="text", nullable=true) */ private $resumenlectura; /** * @var string * * @ORM\Column(name="lecturaProposito", type="text", nullable=true) */ private $lecturaproposito; /** * @var string * * @ORM\Column(name="resumenSeccion", type="text", nullable=true) */ private $resumenseccion; /** * @var string * * @ORM\Column(name="preguntas", type="text", nullable=true) */ private $preguntas; /** * @var string * * @ORM\Column(name="recomendaciones", type="text", nullable=true) */ private $recomendaciones; /** * @var \DateTime * * @ORM\Column(name="fechaRegistro", type="datetime", nullable=false) */ private $fecharegistro; /** * @var \Bibliografia * * @ORM\ManyToOne(targetEntity="Bibliografia") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="bibliografia", referencedColumnName="idbibliografia") * }) */ private $bibliografia; /** * Get idlecturaconproposito * * @return string */ public function getIdlecturaconproposito() { return $this->idlecturaconproposito; } /** * Set propositogeneral * * @param string $propositogeneral * @return Lecturaconproposito */ public function setPropositogeneral($propositogeneral) { $this->propositogeneral = $propositogeneral; return $this; } /** * Get propositogeneral * * @return string */ public function getPropositogeneral() { return $this->propositogeneral; } /** * Set titulosubcapitulos * * @param string $titulosubcapitulos * @return Lecturaconproposito */ public function setTitulosubcapitulos($titulosubcapitulos) { $this->titulosubcapitulos = $titulosubcapitulos; return $this; } /** * Get titulosubcapitulos * * @return string */ public function getTitulosubcapitulos() { return $this->titulosubcapitulos; } /** * Set resumen * * @param boolean $resumen * @return Lecturaconproposito */ public function setResumen($resumen) { $this->resumen = $resumen; return $this; } /** * Get resumen * * @return boolean */ public function getResumen() { return $this->resumen; } /** * Set preguntasfinalcapitulo * * @param boolean $preguntasfinalcapitulo * @return Lecturaconproposito */ public function setPreguntasfinalcapitulo($preguntasfinalcapitulo) { $this->preguntasfinalcapitulo = $preguntasfinalcapitulo; return $this; } /** * Get preguntasfinalcapitulo * * @return boolean */ public function getPreguntasfinalcapitulo() { return $this->preguntasfinalcapitulo; } /** * Set glosario * * @param boolean $glosario * @return Lecturaconproposito */ public function setGlosario($glosario) { $this->glosario = $glosario; return $this; } /** * Get glosario * * @return boolean */ public function getGlosario() { return $this->glosario; } /** * Set secciones * * @param string $secciones * @return Lecturaconproposito */ public function setSecciones($secciones) { $this->secciones = $secciones; return $this; } /** * Get secciones * * @return string */ public function getSecciones() { return $this->secciones; } /** * Set descripcionilustraciones * * @param string $descripcionilustraciones * @return Lecturaconproposito */ public function setDescripcionilustraciones($descripcionilustraciones) { $this->descripcionilustraciones = $descripcionilustraciones; return $this; } /** * Get descripcionilustraciones * * @return string */ public function getDescripcionilustraciones() { return $this->descripcionilustraciones; } /** * Set resumenlectura * * @param string $resumenlectura * @return Lecturaconproposito */ public function setResumenlectura($resumenlectura) { $this->resumenlectura = $resumenlectura; return $this; } /** * Get resumenlectura * * @return string */ public function getResumenlectura() { return $this->resumenlectura; } /** * Set lecturaproposito * * @param string $lecturaproposito * @return Lecturaconproposito */ public function setLecturaproposito($lecturaproposito) { $this->lecturaproposito = $lecturaproposito; return $this; } /** * Get lecturaproposito * * @return string */ public function getLecturaproposito() { return $this->lecturaproposito; } /** * Set resumenseccion * * @param string $resumenseccion * @return Lecturaconproposito */ public function setResumenseccion($resumenseccion) { $this->resumenseccion = $resumenseccion; return $this; } /** * Get resumenseccion * * @return string */ public function getResumenseccion() { return $this->resumenseccion; } /** * Set preguntas * * @param string $preguntas * @return Lecturaconproposito */ public function setPreguntas($preguntas) { $this->preguntas = $preguntas; return $this; } /** * Get preguntas * * @return string */ public function getPreguntas() { return $this->preguntas; } /** * Set recomendaciones * * @param string $recomendaciones * @return Lecturaconproposito */ public function setRecomendaciones($recomendaciones) { $this->recomendaciones = $recomendaciones; return $this; } /** * Get recomendaciones * * @return string */ public function getRecomendaciones() { return $this->recomendaciones; } /** * Set fecharegistro * * @param \DateTime $fecharegistro * @return Lecturaconproposito */ public function setFecharegistro($fecharegistro) { $this->fecharegistro = $fecharegistro; return $this; } /** * Get fecharegistro * * @return \DateTime */ public function getFecharegistro() { return $this->fecharegistro; } /** * Set bibliografia * * @param \GS\UsuarioBundle\Entity\Bibliografia $bibliografia * @return Lecturaconproposito */ public function setBibliografia(\GS\UsuarioBundle\Entity\Bibliografia $bibliografia = null) { $this->bibliografia = $bibliografia; return $this; } /** * Get bibliografia * * @return \GS\UsuarioBundle\Entity\Bibliografia */ public function getBibliografia() { return $this->bibliografia; } }
mdoviedor/WEBsimon
src/GS/UsuarioBundle/Entity/Lecturaconproposito.php
PHP
mit
8,898
import pytest @pytest.fixture def genetic_modification(testapp, lab, award): item = { 'award': award['@id'], 'lab': lab['@id'], 'modified_site_by_coordinates': { 'assembly': 'GRCh38', 'chromosome': '11', 'start': 20000, 'end': 21000 }, 'purpose': 'repression', 'category': 'deletion', 'method': 'CRISPR', 'zygosity': 'homozygous' } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def genetic_modification_RNAi(testapp, lab, award): item = { 'award': award['@id'], 'lab': lab['@id'], 'modified_site_by_coordinates': { 'assembly': 'GRCh38', 'chromosome': '11', 'start': 20000, 'end': 21000 }, 'purpose': 'repression', 'category': 'deletion', 'method': 'RNAi' } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def genetic_modification_source(testapp, lab, award, source, gene): item = { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'introduced_gene': gene['@id'], 'purpose': 'expression', 'method': 'CRISPR', 'reagents': [ { 'source': source['@id'], 'identifier': 'sigma:ABC123' } ] } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def crispr_deletion(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'deletion', 'purpose': 'repression', 'method': 'CRISPR' } @pytest.fixture def crispr_deletion_1(testapp, lab, award, target): item = { 'lab': lab['@id'], 'award': award['@id'], 'category': 'deletion', 'purpose': 'repression', 'method': 'CRISPR', 'modified_site_by_target_id': target['@id'], 'guide_rna_sequences': ['ACCGGAGA'] } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def tale_deletion(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'deletion', 'purpose': 'repression', 'method': 'TALEN', 'zygosity': 'heterozygous' } @pytest.fixture def crispr_tag(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'tagging', 'method': 'CRISPR' } @pytest.fixture def bombardment_tag(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'tagging', 'nucleic_acid_delivery_method': ['bombardment'] } @pytest.fixture def recomb_tag(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'tagging', 'method': 'site-specific recombination' } @pytest.fixture def transfection_tag(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'tagging', 'nucleic_acid_delivery_method': ['stable transfection'] } @pytest.fixture def crispri(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'interference', 'purpose': 'repression', 'method': 'CRISPR' } @pytest.fixture def rnai(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'interference', 'purpose': 'repression', 'method': 'RNAi' } @pytest.fixture def mutagen(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'mutagenesis', 'purpose': 'repression', 'method': 'mutagen treatment' } @pytest.fixture def tale_replacement(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'replacement', 'purpose': 'characterization', 'method': 'TALEN', 'zygosity': 'heterozygous' } @pytest.fixture def mpra(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'characterization', 'nucleic_acid_delivery_method': ['transduction'] } @pytest.fixture def starr_seq(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'episome', 'purpose': 'characterization', 'nucleic_acid_delivery_method': ['transient transfection'] } @pytest.fixture def introduced_elements(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'episome', 'purpose': 'characterization', 'nucleic_acid_delivery_method': ['transient transfection'], 'introduced_elements': 'genomic DNA regions' } @pytest.fixture def crispr_tag_1(testapp, lab, award, ctcf): item = { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'tagging', 'method': 'CRISPR', 'modified_site_by_gene_id': ctcf['@id'], 'introduced_tags': [{'name': 'mAID-mClover', 'location': 'C-terminal'}] } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def mpra_1(testapp, lab, award): item = { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'characterization', 'nucleic_acid_delivery_method': ['transduction'], 'introduced_elements': 'synthesized DNA', 'modified_site_nonspecific': 'random' } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def recomb_tag_1(testapp, lab, award, target, treatment_5, document): item = { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'tagging', 'method': 'site-specific recombination', 'modified_site_by_target_id': target['@id'], 'modified_site_nonspecific': 'random', 'category': 'insertion', 'treatments': [treatment_5['@id']], 'documents': [document['@id']], 'introduced_tags': [{'name': 'eGFP', 'location': 'C-terminal'}] } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def rnai_1(testapp, lab, award, source, target): item = { 'lab': lab['@id'], 'award': award['@id'], 'category': 'interference', 'purpose': 'repression', 'method': 'RNAi', 'reagents': [{'source': source['@id'], 'identifier': 'addgene:12345'}], 'rnai_sequences': ['ATTACG'], 'modified_site_by_target_id': target['@id'] } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def genetic_modification_1(lab, award): return { 'modification_type': 'deletion', 'award': award['uuid'], 'lab': lab['uuid'], 'modifiction_description': 'some description' } @pytest.fixture def genetic_modification_2(lab, award): return { 'modification_type': 'deletion', 'award': award['uuid'], 'lab': lab['uuid'], 'modification_description': 'some description', 'modification_zygocity': 'homozygous', 'modification_purpose': 'tagging', 'modification_treatments': [], 'modification_genome_coordinates': [{ 'chromosome': '11', 'start': 5309435, 'end': 5309451 }] } @pytest.fixture def crispr_gm(lab, award, source): return { 'lab': lab['uuid'], 'award': award['uuid'], 'source': source['uuid'], 'guide_rna_sequences': [ "ACA", "GCG" ], 'insert_sequence': 'TCGA', 'aliases': ['encode:crispr_technique1'], '@type': ['Crispr', 'ModificationTechnique', 'Item'], '@id': '/crisprs/79c1ec08-c878-4419-8dba-66aa4eca156b/', 'uuid': '79c1ec08-c878-4419-8dba-66aa4eca156b' } @pytest.fixture def genetic_modification_5(lab, award, crispr_gm): return { 'modification_type': 'deletion', 'award': award['uuid'], 'lab': lab['uuid'], 'description': 'blah blah description blah', 'zygosity': 'homozygous', 'treatments': [], 'source': 'sigma', 'product_id': '12345', 'modification_techniques': [crispr_gm], 'modified_site': [{ 'assembly': 'GRCh38', 'chromosome': '11', 'start': 5309435, 'end': 5309451 }] } @pytest.fixture def genetic_modification_6(lab, award, crispr_gm, source): return { 'purpose': 'validation', 'category': 'deeltion', 'award': award['uuid'], 'lab': lab['uuid'], 'description': 'blah blah description blah', "method": "CRISPR", "modified_site_by_target_id": "/targets/FLAG-ZBTB43-human/", "reagents": [ { "identifier": "placeholder_id", "source": source['uuid'] } ] } @pytest.fixture def genetic_modification_7_invalid_reagent(lab, award, crispr_gm): return { 'purpose': 'characterization', 'category': 'deletion', 'award': award['uuid'], 'lab': lab['uuid'], 'description': 'blah blah description blah', "method": "CRISPR", "modified_site_by_target_id": "/targets/FLAG-ZBTB43-human/", "reagents": [ { "identifier": "placeholder_id", "source": "/sources/sigma/" } ] } @pytest.fixture def genetic_modification_7_valid_reagent(lab, award, crispr_gm): return { 'purpose': 'characterization', 'category': 'deletion', 'award': award['uuid'], 'lab': lab['uuid'], 'description': 'blah blah description blah', "method": "CRISPR", "modified_site_by_target_id": "/targets/FLAG-ZBTB43-human/", "reagents": [ { "identifier": "ABC123", "source": "/sources/sigma/" } ] } @pytest.fixture def genetic_modification_7_addgene_source(testapp): item = { 'name': 'addgene', 'title': 'Addgene', 'status': 'released' } return testapp.post_json('/source', item).json['@graph'][0] @pytest.fixture def genetic_modification_7_multiple_matched_identifiers(lab, award, crispr_gm): return { 'purpose': 'characterization', 'category': 'deletion', 'award': award['uuid'], 'lab': lab['uuid'], 'description': 'blah blah description blah', "method": "CRISPR", "modified_site_by_target_id": "/targets/FLAG-ZBTB43-human/", "reagents": [ { "identifier": "12345", "source": "/sources/addgene/" } ] } @pytest.fixture def genetic_modification_7_multiple_reagents(lab, award, crispr_gm): return { 'purpose': 'characterization', 'category': 'deletion', 'award': award['uuid'], 'lab': lab['uuid'], 'description': 'blah blah description blah', "method": "CRISPR", "modified_site_by_target_id": "/targets/FLAG-ZBTB43-human/", "reagents": [ { "identifier": "12345", "source": "/sources/addgene/", "url": "http://www.addgene.org" }, { "identifier": "67890", "source": "/sources/addgene/", "url": "http://www.addgene.org" } ] } @pytest.fixture def genetic_modification_8(lab, award): return { 'purpose': 'analysis', 'category': 'interference', 'award': award['uuid'], 'lab': lab['uuid'], "method": "CRISPR", } @pytest.fixture def construct_genetic_modification( testapp, lab, award, document, target_ATF5_genes, target_promoter): item = { 'award': award['@id'], 'documents': [document['@id']], 'lab': lab['@id'], 'category': 'insertion', 'purpose': 'tagging', 'nucleic_acid_delivery_method': ['stable transfection'], 'introduced_tags': [{'name':'eGFP', 'location': 'C-terminal', 'promoter_used': target_promoter['@id']}], 'modified_site_by_target_id': target_ATF5_genes['@id'] } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def construct_genetic_modification_N( testapp, lab, award, document, target): item = { 'award': award['@id'], 'documents': [document['@id']], 'lab': lab['@id'], 'category': 'insertion', 'purpose': 'tagging', 'nucleic_acid_delivery_method': ['stable transfection'], 'introduced_tags': [{'name':'eGFP', 'location': 'N-terminal'}], 'modified_site_by_target_id': target['@id'] } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def interference_genetic_modification( testapp, lab, award, document, target): item = { 'award': award['@id'], 'documents': [document['@id']], 'lab': lab['@id'], 'category': 'interference', 'purpose': 'repression', 'method': 'RNAi', 'modified_site_by_target_id': target['@id'] } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def crispr_knockout(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'knockout', 'purpose': 'characterization', 'method': 'CRISPR' } @pytest.fixture def recombination_knockout(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'knockout', 'purpose': 'repression', 'method': 'site-specific recombination', 'modified_site_by_coordinates': { "assembly": "GRCh38", "chromosome": "11", "start": 60000, "end": 62000 } } @pytest.fixture def characterization_insertion_transfection(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'characterization', 'nucleic_acid_delivery_method': ['stable transfection'], 'modified_site_nonspecific': 'random', 'introduced_elements': 'synthesized DNA' } @pytest.fixture def characterization_insertion_CRISPR(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'characterization', 'method': 'CRISPR', 'modified_site_nonspecific': 'random', 'introduced_elements': 'synthesized DNA' } @pytest.fixture def disruption_genetic_modification(testapp, lab, award): item = { 'lab': lab['@id'], 'award': award['@id'], 'category': 'CRISPR cutting', 'purpose': 'characterization', 'method': 'CRISPR' } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def activation_genetic_modification(testapp, lab, award): item = { 'lab': lab['@id'], 'award': award['@id'], 'category': 'CRISPRa', 'purpose': 'characterization', 'method': 'CRISPR' } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def binding_genetic_modification(testapp, lab, award): item = { 'lab': lab['@id'], 'award': award['@id'], 'category': 'CRISPR dCas', 'purpose': 'characterization', 'method': 'CRISPR' } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def HR_knockout(lab, award, target): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'knockout', 'purpose': 'repression', 'method': 'homologous recombination', 'modified_site_by_target_id': target['@id'] } @pytest.fixture def CRISPR_introduction(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'expression', 'nucleic_acid_delivery_method': ['transient transfection'] } @pytest.fixture def genetic_modification_9(lab, award, human_donor_1): return { 'lab': lab['@id'], 'award': award['@id'], 'donor': human_donor_1['@id'], 'category': 'insertion', 'purpose': 'expression', 'method': 'transient transfection' } @pytest.fixture def transgene_insertion(testapp, lab, award, ctcf): item = { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'in vivo enhancer characterization', 'nucleic_acid_delivery_method': ['mouse pronuclear microinjection'], 'modified_site_by_gene_id': ctcf['@id'], 'introduced_sequence': 'ATCGTA' } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def guides_transduction_GM(testapp, lab, award): item = { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'expression', 'nucleic_acid_delivery_method': ['transduction'], 'introduced_elements': 'gRNAs and CRISPR machinery', 'MOI': 'high', 'guide_type': 'sgRNA' } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def genetic_modification_10(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'expression', 'nucleic_acid_delivery_method': ['transduction'], 'introduced_elements': 'gRNAs and CRISPR machinery', } @pytest.fixture def genetic_modification_11(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'disruption', 'purpose': 'characterization', 'method': 'CRISPR' } @pytest.fixture def transgene_insertion_2(testapp, lab, award, ctcf): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'transgene insertion', 'purpose': 'in vivo enhancer characterization', 'nucleic_acid_delivery_method': ['mouse pronuclear microinjection'], 'modified_site_by_gene_id': ctcf['@id'], 'introduced_sequence': 'ATCGTA' } @pytest.fixture def activation_genetic_modification_2(testapp, lab, award): return{ 'lab': lab['@id'], 'award': award['@id'], 'category': 'activation', 'purpose': 'characterization', 'method': 'CRISPR' } @pytest.fixture def binding_genetic_modification_2(testapp, lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'binding', 'purpose': 'characterization', 'method': 'CRISPR' }
ENCODE-DCC/encoded
src/encoded/tests/fixtures/schemas/genetic_modification.py
Python
mit
19,673
--- layout: page title: Poole 20th Anniversary date: 2016-05-24 author: Austin Wilkerson tags: weekly links, java status: published summary: Mauris efficitur orci ac volutpat congue. banner: images/banner/meeting-01.jpg booking: startDate: 07/19/2017 endDate: 07/24/2017 ctyhocn: RIFUTHX groupCode: P2A published: true --- In consectetur luctus diam sed ultrices. Etiam commodo dui in mauris congue, id facilisis velit pulvinar. Quisque scelerisque est purus, sed volutpat urna ornare sit amet. Duis ac mauris erat. Ut scelerisque a turpis non laoreet. Morbi ac mauris et nisl vehicula semper vel at lectus. Mauris ornare vestibulum nisl in consequat. Duis non mi eu arcu luctus tempus eget at velit. Nulla in sapien et mauris egestas pellentesque eget a ligula. Pellentesque convallis ipsum a diam tincidunt tempor. Sed ut pellentesque ligula. Suspendisse fermentum massa sapien, ac aliquam enim maximus sit amet. Vestibulum ligula odio, efficitur sit amet quam nec, imperdiet tempor tortor. Etiam porta sem vel dolor fringilla interdum at vitae augue. Cras finibus nisl sed tempor condimentum. Praesent ultrices est sed laoreet porta. Vestibulum convallis nulla in erat egestas, vel dignissim ipsum aliquam. Nam congue ipsum vitae elit iaculis malesuada. Nullam vel ex dignissim, varius metus nec, mollis mauris. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vivamus pharetra mattis scelerisque. Nam in dapibus sem. Vestibulum ac libero arcu. Mauris nec dolor sagittis, placerat nisi id, tempor risus. Ut commodo, mauris eget feugiat aliquet, lacus tortor fringilla ligula, quis ullamcorper metus leo ac lorem. Maecenas aliquet mi in dapibus consequat. Nulla malesuada dui metus, non cursus urna mollis ac. Maecenas efficitur nisl ut hendrerit imperdiet. * Duis at velit consequat, pellentesque leo non, lobortis nisi * In tincidunt ante ultricies quam pharetra molestie * Duis egestas neque in magna iaculis, mattis vestibulum justo ornare * Maecenas semper lorem ut turpis vulputate mollis * Proin eget eros tincidunt, porta orci eget, egestas magna. Maecenas hendrerit, nunc in eleifend tincidunt, urna libero dignissim ipsum, ut condimentum odio lorem vel mauris. Praesent a vehicula dui. Pellentesque elementum efficitur urna in ultricies. Etiam ultricies purus nec mauris sagittis, quis faucibus elit elementum. Vestibulum volutpat sapien et ullamcorper auctor. Vivamus porttitor eu lacus eget sollicitudin. Pellentesque eleifend consequat ullamcorper. Nullam egestas, justo id tempor finibus, tellus purus pretium lacus, vel convallis dolor neque vitae lorem. Pellentesque mollis interdum neque, sed rhoncus ante scelerisque in.
KlishGroup/prose-pogs
pogs/R/RIFUTHX/P2A/index.md
Markdown
mit
2,696
--- layout: page title: River Shadow Logistics Seminar date: 2016-05-24 author: Julia Hogan tags: weekly links, java status: published summary: Phasellus ac lacus tincidunt, euismod nulla sed. banner: images/banner/leisure-03.jpg booking: startDate: 08/28/2016 endDate: 08/29/2016 ctyhocn: CLECCHX groupCode: RSLS published: true --- Ut aliquet lorem justo, nec tempor metus tempor eu. Maecenas dapibus, dui ut consectetur iaculis, nulla urna iaculis eros, sed faucibus arcu augue nec sapien. Nam volutpat ante eget fringilla suscipit. Suspendisse pharetra mattis nunc a ullamcorper. Praesent a nisl eget dui sodales rutrum at eget nibh. Aliquam volutpat nisi sem, quis sollicitudin ipsum bibendum sit amet. Aliquam quis vestibulum tellus. Nam sit amet sodales neque, ac commodo enim. Nullam eget bibendum libero, id lobortis dolor. Aliquam elit odio, lacinia ac erat ac, ultricies ultricies est. Sed consequat leo odio, in aliquet quam eleifend quis. * Mauris sollicitudin orci eget diam venenatis ultricies * Nunc at leo ut sem dapibus aliquet. Vivamus vitae faucibus nisl, ut imperdiet libero. Suspendisse eu venenatis lectus, eget ullamcorper eros. Etiam at erat sit amet nisl sodales sollicitudin vitae et lacus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse a facilisis felis. Nulla vestibulum mattis nisl in porttitor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Integer lobortis, elit hendrerit commodo molestie, arcu ante aliquam odio, porta tempor eros quam at neque. Donec rutrum sed eros et vehicula. Aenean augue odio, condimentum eu arcu dapibus, sagittis sollicitudin metus. Etiam a risus ligula. Nullam orci felis, tempor nec euismod a, congue sed magna. In et congue dui, ac laoreet est. Praesent nec tempor velit, non dictum sapien. Quisque rhoncus auctor consequat. Nunc vehicula mollis mi, vitae pretium arcu tincidunt nec. Vestibulum tellus justo, fringilla vel ipsum vel, consequat pretium nibh. Sed diam felis, blandit ut vestibulum ut, sollicitudin in arcu. Etiam ut tellus et augue dapibus interdum in non diam. Nunc iaculis suscipit ex id sagittis. Cras efficitur maximus arcu et finibus. Quisque sed neque velit. Vestibulum aliquam vestibulum nulla molestie hendrerit. Suspendisse maximus mauris ligula, a elementum urna molestie fermentum. Sed lacinia lorem vitae enim faucibus cursus.
KlishGroup/prose-pogs
pogs/C/CLECCHX/RSLS/index.md
Markdown
mit
2,430
--- layout: page title: Schmitt Llc. Dinner date: 2016-05-24 author: Gerald Golden tags: weekly links, java status: published summary: Sed hendrerit, dui a ullamcorper dignissim. banner: images/banner/office-01.jpg booking: startDate: 03/17/2016 endDate: 03/22/2016 ctyhocn: YQLLEHX groupCode: SLD published: true --- Nullam in maximus sapien. Quisque congue imperdiet eros, fermentum pharetra lorem euismod non. Ut iaculis leo vitae massa maximus, ut malesuada nibh ornare. Suspendisse vehicula mollis nunc ut tincidunt. Mauris imperdiet mattis nunc, et tempor est euismod vel. Nulla et erat a lectus iaculis ultricies. Morbi vestibulum velit sem, vitae porttitor urna vestibulum a. Nullam mattis ut odio eget feugiat. Aliquam convallis lectus quis magna tempor, quis ultricies ligula faucibus. Fusce ut diam iaculis, varius felis nec, pulvinar turpis. Donec nisl ligula, ullamcorper vel risus eu, vehicula tristique tortor. Etiam feugiat ante in nunc lacinia bibendum nec ac arcu. Aenean in viverra dui, non tincidunt nibh. Nullam neque felis, laoreet quis ex non, pulvinar ultrices ex. Duis eu lacus vitae dolor euismod dapibus nec sit amet arcu. Curabitur id mauris sit amet mi feugiat imperdiet in eget risus. 1 Integer iaculis ante ut metus pellentesque viverra 1 Sed a nisi at urna condimentum dapibus a at eros 1 Mauris non arcu tincidunt, gravida nulla in, facilisis diam 1 Aliquam rhoncus ante vel fringilla interdum. In hac habitasse platea dictumst. Fusce in dictum orci. Nullam lacinia in mi nec accumsan. Mauris condimentum mi lorem, ac pharetra massa scelerisque scelerisque. Proin mattis euismod ipsum sit amet accumsan. Suspendisse ut ipsum non velit sollicitudin dictum. Etiam quis ligula vitae neque placerat ultrices ac et dolor. Vestibulum convallis orci vestibulum iaculis dapibus. Sed maximus mauris sed augue consequat, ac ornare orci egestas. Cras dictum, quam at sollicitudin tempor, urna lorem porta sapien, id faucibus mi libero a libero. Sed ut est ut lectus sollicitudin gravida sit amet vel orci. Sed consectetur tortor vel sollicitudin maximus. Suspendisse ut ornare quam. Suspendisse lobortis tortor id mi venenatis, in ornare libero lacinia. In diam libero, sollicitudin et consectetur et, vehicula ac velit. Sed in nulla orci.
KlishGroup/prose-pogs
pogs/Y/YQLLEHX/SLD/index.md
Markdown
mit
2,272
class SessionsController < ApplicationController def new end def create user = User.find_by(email: params[:session][:email]) if user && user.authenticate(params[:session][:password]) log_in(user) redirect_to user else render :new end end def destroy log_out redirect_to root_url end end
WuJoo/simple-blog
app/controllers/sessions_controller.rb
Ruby
mit
345
<!DOCTYPE html> <html lang="zh-CN" xmlns:th="http://www.thymeleaf.org"> <head> <meta charset="utf-8"/> </head> <body> <div id="wrapper"> <div id="page-wrapper"> <div class="row"> <div class="col-lg-12"> <h1 class="page-header">实习教师分配 - <small>批量分配</small> <small class="pull-right"> <button type="button" class="btn btn-primary" id="page_back">返回</button> </small> </h1> </div> <!-- /.col-lg-12 --> </div> <!-- /.row --> <div class="row"> <div class="col-lg-12 col-md-12"> <form id="demoform" role="form"> <div class="form-group" id="valid_organize"> <label>班级</label> <select multiple="multiple" size="10" name="duallistbox_demo1[]" id="select_organize"> </select> <p class="text-danger hidden" id="organize_error_msg"></p> </div> <div class="form-group" id="valid_teacher"> <label>教职工</label> <select multiple="multiple" size="10" name="duallistbox_demo2[]" id="select_teacher"> </select> <p class="text-danger hidden" id="teacher_error_msg"></p> </div> <div class="form-group" id="valid_exclude_internship_release"> <label>排除以下实习中已分配学生</label> <select multiple="multiple" size="10" name="duallistbox_demo3[]" id="exclude_internship_release"> </select> <p class="text-danger hidden" id="exclude_internship_release_error_msg"></p> </div> <br/> <div class="text-center"> <button type="button" id="save" class="btn btn-default btn-block">确认分配</button> </div> </form> </div> </div> <!-- /.row --> <footer class="footer" th:include="footer::footer"> <p class="text-muted">&copy; Company 2016</p> </footer> <!-- /.footer --> <script id="organize-template" type="text/x-handlebars-template"> {{#each listResult}} <option value="{{organize_value}}">{{organize_name}}</option> {{/each}} </script> <script id="teacher-template" type="text/x-handlebars-template"> {{#each listResult}} <option value="{{teacher_value}}">{{teacher_name}}</option> {{/each}} </script> <script id="exclude-internship-release-template" type="text/x-handlebars-template"> {{#each listResult}} <option value="{{internshipReleaseId}}">{{internship_title}}</option> {{/each}} </script> <script th:inline="javascript"> /*页面参数*/ var init_page_param = { 'internshipReleaseId': /*[[${internshipReleaseId}]]*/ '' }; </script> <input type="hidden" class="dy_script" value="/js/internship/distribution/internship_batch_distribution.js"/> </div> <!-- /#page-wrapper --> </div> <!-- /#wrapper --> </body> </html>
zbeboy/ISY
src/main/resources/templates/web/internship/distribution/internship_batch_distribution.html
HTML
mit
3,478
package com.longluo.demo.widget.swipelistview; import android.content.Context; import android.content.res.TypedArray; import android.database.DataSetObserver; import android.support.v4.view.MotionEventCompat; import android.support.v4.view.ViewConfigurationCompat; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; import android.view.ViewConfiguration; import android.view.ViewGroup; import android.widget.ListAdapter; import android.widget.ListView; import com.longluo.demo.R; import java.util.List; /** * ListView subclass that provides the swipe functionality */ public class SwipeListView extends ListView { /** * log tag */ public final static String TAG = "SwipeListView"; /** * whether debug */ public final static boolean DEBUG = false; /** * Used when user want change swipe list mode on some rows */ public final static int SWIPE_MODE_DEFAULT = -1; /** * Disables all swipes */ public final static int SWIPE_MODE_NONE = 0; /** * Enables both left and right swipe */ public final static int SWIPE_MODE_BOTH = 1; /** * Enables right swipe */ public final static int SWIPE_MODE_RIGHT = 2; /** * Enables left swipe */ public final static int SWIPE_MODE_LEFT = 3; /** * Binds the swipe gesture to reveal a view behind the row (Drawer style) */ public final static int SWIPE_ACTION_REVEAL = 0; /** * Dismisses the cell when swiped over */ public final static int SWIPE_ACTION_DISMISS = 1; /** * Marks the cell as checked when swiped and release */ public final static int SWIPE_ACTION_CHOICE = 2; /** * No action when swiped */ public final static int SWIPE_ACTION_NONE = 3; /** * Default ids for front view */ public final static String SWIPE_DEFAULT_FRONT_VIEW = "swipelist_frontview"; /** * Default id for back view */ public final static String SWIPE_DEFAULT_BACK_VIEW = "swipelist_backview"; /** * Indicates no movement */ private final static int TOUCH_STATE_REST = 0; /** * State scrolling x position */ private final static int TOUCH_STATE_SCROLLING_X = 1; /** * State scrolling y position */ private final static int TOUCH_STATE_SCROLLING_Y = 2; private int touchState = TOUCH_STATE_REST; private float lastMotionX; private float lastMotionY; private int touchSlop; int swipeFrontView = 0; int swipeBackView = 0; /** * Internal listener for common swipe events */ private SwipeListViewListener swipeListViewListener; /** * Internal touch listener */ private SwipeListViewTouchListener touchListener; /** * If you create a View programmatically you need send back and front identifier * * @param context Context * @param swipeBackView Back Identifier * @param swipeFrontView Front Identifier */ public SwipeListView(Context context, int swipeBackView, int swipeFrontView) { super(context); this.swipeFrontView = swipeFrontView; this.swipeBackView = swipeBackView; init(null); } /** * @see android.widget.ListView#ListView(android.content.Context, android.util.AttributeSet) */ public SwipeListView(Context context, AttributeSet attrs) { super(context, attrs); init(attrs); } /** * @see android.widget.ListView#ListView(android.content.Context, android.util.AttributeSet, int) */ public SwipeListView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(attrs); } /** * Init ListView * * @param attrs AttributeSet */ private void init(AttributeSet attrs) { int swipeMode = SWIPE_MODE_BOTH; boolean swipeOpenOnLongPress = true; boolean swipeCloseAllItemsWhenMoveList = true; long swipeAnimationTime = 0; float swipeOffsetLeft = 0; float swipeOffsetRight = 0; int swipeDrawableChecked = 0; int swipeDrawableUnchecked = 0; int swipeActionLeft = SWIPE_ACTION_REVEAL; int swipeActionRight = SWIPE_ACTION_REVEAL; if (attrs != null) { TypedArray styled = getContext().obtainStyledAttributes(attrs, R.styleable.SwipeListView); swipeMode = styled.getInt(R.styleable.SwipeListView_swipeMode, SWIPE_MODE_BOTH); swipeActionLeft = styled.getInt(R.styleable.SwipeListView_swipeActionLeft, SWIPE_ACTION_REVEAL); swipeActionRight = styled.getInt(R.styleable.SwipeListView_swipeActionRight, SWIPE_ACTION_REVEAL); swipeOffsetLeft = styled.getDimension(R.styleable.SwipeListView_swipeOffsetLeft, 0); swipeOffsetRight = styled.getDimension(R.styleable.SwipeListView_swipeOffsetRight, 0); swipeOpenOnLongPress = styled.getBoolean(R.styleable.SwipeListView_swipeOpenOnLongPress, true); swipeAnimationTime = styled.getInteger(R.styleable.SwipeListView_swipeAnimationTime, 0); swipeCloseAllItemsWhenMoveList = styled.getBoolean(R.styleable.SwipeListView_swipeCloseAllItemsWhenMoveList, true); swipeDrawableChecked = styled.getResourceId(R.styleable.SwipeListView_swipeDrawableChecked, 0); swipeDrawableUnchecked = styled.getResourceId(R.styleable.SwipeListView_swipeDrawableUnchecked, 0); swipeFrontView = styled.getResourceId(R.styleable.SwipeListView_swipeFrontView, 0); swipeBackView = styled.getResourceId(R.styleable.SwipeListView_swipeBackView, 0); styled.recycle(); } if (swipeFrontView == 0 || swipeBackView == 0) { swipeFrontView = getContext().getResources().getIdentifier(SWIPE_DEFAULT_FRONT_VIEW, "id", getContext().getPackageName()); swipeBackView = getContext().getResources().getIdentifier(SWIPE_DEFAULT_BACK_VIEW, "id", getContext().getPackageName()); if (swipeFrontView == 0 || swipeBackView == 0) { throw new RuntimeException(String.format("You forgot the attributes swipeFrontView or swipeBackView. You can add this attributes or use '%s' and '%s' identifiers", SWIPE_DEFAULT_FRONT_VIEW, SWIPE_DEFAULT_BACK_VIEW)); } } final ViewConfiguration configuration = ViewConfiguration.get(getContext()); touchSlop = ViewConfigurationCompat.getScaledPagingTouchSlop(configuration); touchListener = new SwipeListViewTouchListener(this, swipeFrontView, swipeBackView); if (swipeAnimationTime > 0) { touchListener.setAnimationTime(swipeAnimationTime); } touchListener.setRightOffset(swipeOffsetRight); touchListener.setLeftOffset(swipeOffsetLeft); touchListener.setSwipeActionLeft(swipeActionLeft); touchListener.setSwipeActionRight(swipeActionRight); touchListener.setSwipeMode(swipeMode); touchListener.setSwipeClosesAllItemsWhenListMoves(swipeCloseAllItemsWhenMoveList); touchListener.setSwipeOpenOnLongPress(swipeOpenOnLongPress); touchListener.setSwipeDrawableChecked(swipeDrawableChecked); touchListener.setSwipeDrawableUnchecked(swipeDrawableUnchecked); setOnTouchListener(touchListener); setOnScrollListener(touchListener.makeScrollListener()); } /** * Recycle cell. This method should be called from getView in Adapter when use SWIPE_ACTION_CHOICE * * @param convertView parent view * @param position position in list */ public void recycle(View convertView, int position) { touchListener.reloadChoiceStateInView(convertView.findViewById(swipeFrontView), position); touchListener.reloadSwipeStateInView(convertView.findViewById(swipeFrontView), position); // Clean pressed state (if dismiss is fire from a cell, to this cell, with a press drawable, in a swipelistview // when this cell will be recycle it will still have his pressed state. This ensure the pressed state is // cleaned. for (int j = 0; j < ((ViewGroup) convertView).getChildCount(); ++j) { View nextChild = ((ViewGroup) convertView).getChildAt(j); nextChild.setPressed(false); } } /** * Get if item is selected * * @param position position in list * @return */ public boolean isChecked(int position) { return touchListener.isChecked(position); } /** * Get positions selected * * @return */ public List<Integer> getPositionsSelected() { return touchListener.getPositionsSelected(); } /** * Count selected * * @return */ public int getCountSelected() { return touchListener.getCountSelected(); } /** * Unselected choice state in item */ public void unselectedChoiceStates() { touchListener.unselectedChoiceStates(); } /** * @see android.widget.ListView#setAdapter(android.widget.ListAdapter) */ @Override public void setAdapter(ListAdapter adapter) { super.setAdapter(adapter); touchListener.resetItems(); if (null != adapter) { adapter.registerDataSetObserver(new DataSetObserver() { @Override public void onChanged() { super.onChanged(); onListChanged(); touchListener.resetItems(); } }); } } /** * Dismiss item * * @param position Position that you want open */ public void dismiss(int position) { int height = touchListener.dismiss(position); if (height > 0) { touchListener.handlerPendingDismisses(height); } else { int[] dismissPositions = new int[1]; dismissPositions[0] = position; onDismiss(dismissPositions); touchListener.resetPendingDismisses(); } } /** * Dismiss items selected */ public void dismissSelected() { List<Integer> list = touchListener.getPositionsSelected(); int[] dismissPositions = new int[list.size()]; int height = 0; for (int i = 0; i < list.size(); i++) { int position = list.get(i); dismissPositions[i] = position; int auxHeight = touchListener.dismiss(position); if (auxHeight > 0) { height = auxHeight; } } if (height > 0) { touchListener.handlerPendingDismisses(height); } else { onDismiss(dismissPositions); touchListener.resetPendingDismisses(); } touchListener.returnOldActions(); } /** * Open ListView's item * * @param position Position that you want open */ public void openAnimate(int position) { touchListener.openAnimate(position); } /** * Close ListView's item * * @param position Position that you want open */ public void closeAnimate(int position) { touchListener.closeAnimate(position); } /** * Notifies onDismiss * * @param reverseSortedPositions All dismissed positions */ protected void onDismiss(int[] reverseSortedPositions) { if (swipeListViewListener != null) { swipeListViewListener.onDismiss(reverseSortedPositions); } } /** * Start open item * * @param position list item * @param action current action * @param right to right */ protected void onStartOpen(int position, int action, boolean right) { if (swipeListViewListener != null && position != ListView.INVALID_POSITION) { swipeListViewListener.onStartOpen(position, action, right); } } /** * Start close item * * @param position list item * @param right */ protected void onStartClose(int position, boolean right) { if (swipeListViewListener != null && position != ListView.INVALID_POSITION) { swipeListViewListener.onStartClose(position, right); } } /** * Notifies onClickFrontView * * @param position item clicked */ protected void onClickFrontView(int position) { if (swipeListViewListener != null && position != ListView.INVALID_POSITION) { swipeListViewListener.onClickFrontView(position); } } /** * Notifies onClickBackView * * @param position back item clicked */ protected void onClickBackView(int position) { if (swipeListViewListener != null && position != ListView.INVALID_POSITION) { swipeListViewListener.onClickBackView(position); } } /** * Notifies onOpened * * @param position Item opened * @param toRight If should be opened toward the right */ protected void onOpened(int position, boolean toRight) { if (swipeListViewListener != null && position != ListView.INVALID_POSITION) { swipeListViewListener.onOpened(position, toRight); } } /** * Notifies onClosed * * @param position Item closed * @param fromRight If open from right */ protected void onClosed(int position, boolean fromRight) { if (swipeListViewListener != null && position != ListView.INVALID_POSITION) { swipeListViewListener.onClosed(position, fromRight); } } /** * Notifies onChoiceChanged * * @param position position that choice * @param selected if item is selected or not */ protected void onChoiceChanged(int position, boolean selected) { if (swipeListViewListener != null && position != ListView.INVALID_POSITION) { swipeListViewListener.onChoiceChanged(position, selected); } } /** * User start choice items */ protected void onChoiceStarted() { if (swipeListViewListener != null) { swipeListViewListener.onChoiceStarted(); } } /** * User end choice items */ protected void onChoiceEnded() { if (swipeListViewListener != null) { swipeListViewListener.onChoiceEnded(); } } /** * User is in first item of list */ protected void onFirstListItem() { if (swipeListViewListener != null) { swipeListViewListener.onFirstListItem(); } } /** * User is in last item of list */ protected void onLastListItem() { if (swipeListViewListener != null) { swipeListViewListener.onLastListItem(); } } /** * Notifies onListChanged */ protected void onListChanged() { if (swipeListViewListener != null) { swipeListViewListener.onListChanged(); } } /** * Notifies onMove * * @param position Item moving * @param x Current position */ protected void onMove(int position, float x) { if (swipeListViewListener != null && position != ListView.INVALID_POSITION) { swipeListViewListener.onMove(position, x); } } protected int changeSwipeMode(int position) { if (swipeListViewListener != null && position != ListView.INVALID_POSITION) { return swipeListViewListener.onChangeSwipeMode(position); } return SWIPE_MODE_DEFAULT; } /** * Sets the Listener * * @param swipeListViewListener Listener */ public void setSwipeListViewListener(SwipeListViewListener swipeListViewListener) { this.swipeListViewListener = swipeListViewListener; } /** * Resets scrolling */ public void resetScrolling() { touchState = TOUCH_STATE_REST; } /** * Set offset on right * * @param offsetRight Offset */ public void setOffsetRight(float offsetRight) { touchListener.setRightOffset(offsetRight); } /** * Set offset on left * * @param offsetLeft Offset */ public void setOffsetLeft(float offsetLeft) { touchListener.setLeftOffset(offsetLeft); } /** * Set if all items opened will be closed when the user moves the ListView * * @param swipeCloseAllItemsWhenMoveList */ public void setSwipeCloseAllItemsWhenMoveList(boolean swipeCloseAllItemsWhenMoveList) { touchListener.setSwipeClosesAllItemsWhenListMoves(swipeCloseAllItemsWhenMoveList); } /** * Sets if the user can open an item with long pressing on cell * * @param swipeOpenOnLongPress */ public void setSwipeOpenOnLongPress(boolean swipeOpenOnLongPress) { touchListener.setSwipeOpenOnLongPress(swipeOpenOnLongPress); } /** * Set swipe mode * * @param swipeMode */ public void setSwipeMode(int swipeMode) { touchListener.setSwipeMode(swipeMode); } /** * Return action on left * * @return Action */ public int getSwipeActionLeft() { return touchListener.getSwipeActionLeft(); } /** * Set action on left * * @param swipeActionLeft Action */ public void setSwipeActionLeft(int swipeActionLeft) { touchListener.setSwipeActionLeft(swipeActionLeft); } /** * Return action on right * * @return Action */ public int getSwipeActionRight() { return touchListener.getSwipeActionRight(); } /** * Set action on right * * @param swipeActionRight Action */ public void setSwipeActionRight(int swipeActionRight) { touchListener.setSwipeActionRight(swipeActionRight); } /** * Sets animation time when user drops cell * * @param animationTime milliseconds */ public void setAnimationTime(long animationTime) { touchListener.setAnimationTime(animationTime); } /** * @see android.widget.ListView#onInterceptTouchEvent(android.view.MotionEvent) */ @Override public boolean onInterceptTouchEvent(MotionEvent ev) { int action = MotionEventCompat.getActionMasked(ev); final float x = ev.getX(); final float y = ev.getY(); if (isEnabled() && touchListener.isSwipeEnabled()) { if (touchState == TOUCH_STATE_SCROLLING_X) { return touchListener.onTouch(this, ev); } switch (action) { case MotionEvent.ACTION_MOVE: checkInMoving(x, y); return touchState == TOUCH_STATE_SCROLLING_Y; case MotionEvent.ACTION_DOWN: super.onInterceptTouchEvent(ev); touchListener.onTouch(this, ev); touchState = TOUCH_STATE_REST; lastMotionX = x; lastMotionY = y; return false; case MotionEvent.ACTION_CANCEL: touchState = TOUCH_STATE_REST; break; case MotionEvent.ACTION_UP: touchListener.onTouch(this, ev); return touchState == TOUCH_STATE_SCROLLING_Y; default: break; } } return super.onInterceptTouchEvent(ev); } /** * Check if the user is moving the cell * * @param x Position X * @param y Position Y */ private void checkInMoving(float x, float y) { final int xDiff = (int) Math.abs(x - lastMotionX); final int yDiff = (int) Math.abs(y - lastMotionY); final int touchSlop = this.touchSlop; boolean xMoved = xDiff > touchSlop; boolean yMoved = yDiff > touchSlop; if (xMoved) { touchState = TOUCH_STATE_SCROLLING_X; lastMotionX = x; lastMotionY = y; } if (yMoved) { touchState = TOUCH_STATE_SCROLLING_Y; lastMotionX = x; lastMotionY = y; } } /** * Close all opened items */ public void closeOpenedItems() { touchListener.closeOpenedItems(); } }
longluo/AndroidDemo
app/src/main/java/com/longluo/demo/widget/swipelistview/SwipeListView.java
Java
mit
20,482
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"> <meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"> <meta name=viewport content="width=device-width, initial-scale=1"> <title>Hisabo &#8211; Borker dot co</title> <meta name="description" content="A note about my involvement with Hisabo"> <meta name="keywords" content="Hisabo"> <link rel="canonical" href="http://borker.co/project-hisabo/"> <!-- Twitter Cards --> <meta name="twitter:title" content="Hisabo"> <meta name="twitter:description" content="A note about my involvement with Hisabo"> <meta name="twitter:site" content="@borker"> <meta name="twitter:creator" content="@borker"> <meta name="twitter:card" content="summary"> <meta name="twitter:image" content="http://borker.co/assets/img/logo-new.png"> <!-- Open Graph --> <meta property="og:locale" content="en_US"> <meta property="og:type" content="article"> <meta property="og:title" content="Hisabo"> <meta property="og:description" content="A note about my involvement with Hisabo"> <meta property="og:url" content="http://borker.co/project-hisabo/"> <meta property="og:site_name" content="Borker dot co"> <meta property="og:image" content="http://borker.co/assets/img/logo-new.png"> <!-- Handheld --> <meta name="HandheldFriendly" content="True"> <meta name="MobileOptimized" content="320"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Favicons --> <link rel="apple-touch-icon-precomposed" sizes="57x57" href="http://borker.co/assets/img/favicon/apple-touch-icon-57x57.png"> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://borker.co/assets/img/favicon/apple-touch-icon-114x114.png"> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://borker.co/assets/img/favicon/apple-touch-icon-72x72.png"> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="http://borker.co/assets/img/favicon/apple-touch-icon-144x144.png"> <link rel="icon" type="image/png" href="http://borker.co/assets/img/favicon/favicon.png"> <link rel="shortcut icon" href="http://borker.co/assets/img/favicon/favicon.ico"> <!-- Feed --> <link rel="alternate" type="application/rss+xml" title="Borker dot co" href="http://borker.co/feed.xml" /> <!-- CSS --> <link rel="stylesheet" type="text/css" href="http://borker.co/assets/css/main.css"> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-86377416-1', 'auto'); ga('send', 'pageview'); </script> </head> <body> <nav class="nav"> <ul class="list"> <li class="item"><a class="link" href="http://borker.co/" >Home</a></li> <li class="item"><a class="link" href="http://borker.co/projects" >Projects</a></li> <li class="item"><a class="link" href="http://borker.co/about" >About</a></li> <li class="item"><a class="link" href="http://borker.co/writing" >Writing</a></li> <li class="item"><a class="link" href="http://borker.co/thoughts" >Thoughts</a></li> <li class="item"><a class="link" href="http://borker.co/design" >Design</a></li> </ul> </nav> <div class="wrapper"> <div class="title"> <h1>Hisabo</h1> <h4>23 Jul 2015</h4> </div> <div class="article"> <h2 id="hisabo">Hisabo</h2> <p>I founded and ran <a href="http://www.hisabo.com">Hisabo Tea Company</a> for a few months as a side project.</p> <p>Through Hisabo, we sold hard to find or unique teas to a list of email subscribers (similar to Garagiste for wines).</p> <p>We sourced each tea through a network of connections in Japan, Taiwan, China and Nepal.</p> <p>I stopped working on Hisabo to focus exclusively on Shortlist.</p> </div> </div> <div class="footer"> Borker dot co © 2019 <a href="http://borker.co/feed.xml" target="_blank"><i class="fa fa-fw fa-feed"></i></a> </div> <script src="http://borker.co/assets/js/jquery-1.12.2.min.js"></script> <script src="http://borker.co/assets/js/jquery.goup.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $.goup({ trigger: 500, bottomOffset: 10, locationOffset: 20, containerRadius: 0, containerColor: '#fff', arrowColor: '#000', goupSpeed: 'normal' }); }); </script> <!-- Asynchronous Google Analytics snippet --> <script> var _gaq = _gaq || []; var pluginUrl = '//www.google-analytics.com/plugins/ga/inpage_linkid.js'; _gaq.push(['_require', 'inpage_linkid', pluginUrl]); _gaq.push(['_setAccount', 'UA-86377416-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </body> </html>
borker-co/borker-co.github.io
_site/project-hisabo/index.html
HTML
mit
5,566
--- title: padding-line-between-statements - Rules layout: doc --- <!-- Note: No pull requests accepted for this file. See README.md in the root directory for details. --> # Require or disallow padding lines between statements (padding-line-between-statements) (fixable) The `--fix` option on the [command line](../user-guide/command-line-interface#fix) can automatically fix some of the problems reported by this rule. This rule requires or disallows blank lines between the given 2 kinds of statements. Properly blank lines help developers to understand the code. For example, the following configuration requires a blank line between a variable declaration and a `return` statement. ```js /*eslint padding-line-between-statements: [ "error", { blankLine: "always", prev: "var", next: "return" } ]*/ function foo() { var a = 1; return a; } ``` ## Rule Details This rule does nothing if no configuration. A configuration is an object which has 3 properties; `blankLine`, `prev` and `next`. For example, `{ blankLine: "always", prev: "var", next: "return" }` is meaning "it requires one or more blank lines between a variable declaration and a `return` statement." You can supply any number of configurations. If an statement pair matches multiple configurations, the last matched configuration will be used. ```json { "padding-line-between-statements": [ "error", { "blankLine": LINEBREAK_TYPE, "prev": STATEMENT_TYPE, "next": STATEMENT_TYPE }, { "blankLine": LINEBREAK_TYPE, "prev": STATEMENT_TYPE, "next": STATEMENT_TYPE }, { "blankLine": LINEBREAK_TYPE, "prev": STATEMENT_TYPE, "next": STATEMENT_TYPE }, { "blankLine": LINEBREAK_TYPE, "prev": STATEMENT_TYPE, "next": STATEMENT_TYPE }, ... ] } ``` - `LINEBREAK_TYPE` is one of the following. - `"any"` just ignores the statement pair. - `"never"` disallows blank lines. - `"always"` requires one or more blank lines. Note it does not count lines that comments exist as blank lines. - `STATEMENT_TYPE` is one of the following, or an array of the following. - `"*"` is wildcard. This matches any statements. - `"block"` is lonely blocks. - `"block-like"` is block like statements. This matches statements that the last token is the closing brace of blocks; e.g. `{ }`, `if (a) { }`, and `while (a) { }`. - `"break"` is `break` statements. - `"case"` is `case` labels. - `"cjs-export"` is `export` statements of CommonJS; e.g. `module.exports = 0`, `module.exports.foo = 1`, and `exports.foo = 2`. This is the special cases of assignment. - `"cjs-import"` is `import` statements of CommonJS; e.g. `const foo = require("foo")`. This is the special cases of variable declarations. - `"class"` is `class` declarations. - `"const"` is `const` variable declarations. - `"continue"` is `continue` statements. - `"debugger"` is `debugger` statements. - `"default"` is `default` labels. - `"directive"` is directive prologues. This matches directives; e.g. `"use strict"`. - `"do"` is `do-while` statements. This matches all statements that the first token is `do` keyword. - `"empty"` is empty statements. - `"export"` is `export` declarations. - `"expression"` is expression statements. - `"for"` is `for` loop families. This matches all statements that the first token is `for` keyword. - `"function"` is function declarations. - `"if"` is `if` statements. - `"import"` is `import` declarations. - `"let"` is `let` variable declarations. - `"multiline-block-like"` is block like statements. This is the same as `block-like` type, but only the block is multiline. - `"return"` is `return` statements. - `"switch"` is `switch` statements. - `"throw"` is `throw` statements. - `"try"` is `try` statements. - `"var"` is `var` variable declarations. - `"while"` is `while` loop statements. - `"with"` is `with` statements. ## Examples This configuration would require blank lines before all `return` statements, like the [newline-before-return] rule. Examples of **incorrect** code for the `[{ blankLine: "always", prev: "*", next: "return" }]` configuration: ```js /*eslint padding-line-between-statements: [ "error", { blankLine: "always", prev: "*", next: "return" } ]*/ function foo() { bar(); return; } ``` Examples of **correct** code for the `[{ blankLine: "always", prev: "*", next: "return" }]` configuration: ```js /*eslint padding-line-between-statements: [ "error", { blankLine: "always", prev: "*", next: "return" } ]*/ function foo() { bar(); return; } function foo() { return; } ``` ---- This configuration would require blank lines after every sequence of variable declarations, like the [newline-after-var] rule. Examples of **incorrect** code for the `[{ blankLine: "always", prev: ["const", "let", "var"], next: "*"}, { blankLine: "any", prev: ["const", "let", "var"], next: ["const", "let", "var"]}]` configuration: ```js /*eslint padding-line-between-statements: [ "error", { blankLine: "always", prev: ["const", "let", "var"], next: "*"}, { blankLine: "any", prev: ["const", "let", "var"], next: ["const", "let", "var"]} ]*/ function foo() { var a = 0; bar(); } function foo() { let a = 0; bar(); } function foo() { const a = 0; bar(); } ``` Examples of **correct** code for the `[{ blankLine: "always", prev: ["const", "let", "var"], next: "*"}, { blankLine: "any", prev: ["const", "let", "var"], next: ["const", "let", "var"]}]` configuration: ```js /*eslint padding-line-between-statements: [ "error", { blankLine: "always", prev: ["const", "let", "var"], next: "*"}, { blankLine: "any", prev: ["const", "let", "var"], next: ["const", "let", "var"]} ]*/ function foo() { var a = 0; var b = 0; bar(); } function foo() { let a = 0; const b = 0; bar(); } function foo() { const a = 0; const b = 0; bar(); } ``` ---- This configuration would require blank lines after all directive prologues, like the [lines-around-directive] rule. Examples of **incorrect** code for the `[{ blankLine: "always", prev: "directive", next: "*" }, { blankLine: "any", prev: "directive", next: "directive" }]` configuration: ```js /*eslint padding-line-between-statements: [ "error", { blankLine: "always", prev: "directive", next: "*" }, { blankLine: "any", prev: "directive", next: "directive" } ]*/ "use strict"; foo(); ``` Examples of **correct** code for the `[{ blankLine: "always", prev: "directive", next: "*" }, { blankLine: "any", prev: "directive", next: "directive" }]` configuration: ```js /*eslint padding-line-between-statements: [ "error", { blankLine: "always", prev: "directive", next: "*" }, { blankLine: "any", prev: "directive", next: "directive" } ]*/ "use strict"; "use asm"; foo(); ``` ## Compatibility - **JSCS:** [requirePaddingNewLineAfterVariableDeclaration] - **JSCS:** [requirePaddingNewLinesAfterBlocks] - **JSCS:** [disallowPaddingNewLinesAfterBlocks] - **JSCS:** [requirePaddingNewLinesAfterUseStrict] - **JSCS:** [disallowPaddingNewLinesAfterUseStrict] - **JSCS:** [requirePaddingNewLinesBeforeExport] - **JSCS:** [disallowPaddingNewLinesBeforeExport] - **JSCS:** [requirePaddingNewlinesBeforeKeywords] - **JSCS:** [disallowPaddingNewlinesBeforeKeywords] ## When Not To Use It If you don't want to notify warnings about linebreaks, then it's safe to disable this rule. [lines-around-directive]: http://eslint.org/docs/rules/lines-around-directive [newline-after-var]: http://eslint.org/docs/rules/newline-after-var [newline-before-return]: http://eslint.org/docs/rules/newline-before-return [requirePaddingNewLineAfterVariableDeclaration]: http://jscs.info/rule/requirePaddingNewLineAfterVariableDeclaration [requirePaddingNewLinesAfterBlocks]: http://jscs.info/rule/requirePaddingNewLinesAfterBlocks [disallowPaddingNewLinesAfterBlocks]: http://jscs.info/rule/disallowPaddingNewLinesAfterBlocks [requirePaddingNewLinesAfterUseStrict]: http://jscs.info/rule/requirePaddingNewLinesAfterUseStrict [disallowPaddingNewLinesAfterUseStrict]: http://jscs.info/rule/disallowPaddingNewLinesAfterUseStrict [requirePaddingNewLinesBeforeExport]: http://jscs.info/rule/requirePaddingNewLinesBeforeExport [disallowPaddingNewLinesBeforeExport]: http://jscs.info/rule/disallowPaddingNewLinesBeforeExport [requirePaddingNewlinesBeforeKeywords]: http://jscs.info/rule/requirePaddingNewlinesBeforeKeywords [disallowPaddingNewlinesBeforeKeywords]: http://jscs.info/rule/disallowPaddingNewlinesBeforeKeywords ## Version This rule was introduced in ESLint 4.0.0-beta.0. ## Resources * [Rule source](https://github.com/eslint/eslint/tree/master/lib/rules/padding-line-between-statements.js) * [Documentation source](https://github.com/eslint/eslint/tree/master/docs/rules/padding-line-between-statements.md)
mockee/eslint.github.io
docs/4.0.0/rules/padding-line-between-statements.md
Markdown
mit
8,977
[![Demi.js](https://raw2.github.com/enytc/demi/master/logo.png)](http://demijs.enytc.com) # Demi.js Logger [![Build Status](https://secure.travis-ci.org/chrisenytc/demi-logger.png?branch=master)](http://travis-ci.org/chrisenytc/demi-logger) [![NPM version](https://badge-me.herokuapp.com/api/npm/demi-logger.png)](http://badges.enytc.com/for/npm/demi-logger) [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/chrisenytc/demi-logger/trend.png)](https://bitdeli.com/free "Bitdeli Badge") Demi.js middleware for advanced logging ## Getting Started Install the module with: `npm install demi-logger` ```javascript var logger = require('demi-logger'); //Express example.js app.configure(function() { app.use(express.logger(logger)); }); ``` ## Screenshort [![Demi.js](screenshort.png)](http://demijs.enytc.com) ## Contributing Please submit all issues and pull requests to the [chrisenytc/demi-logger](http://github.com/chrisenytc/demi-logger) repository! ## Support If you have any problem or suggestion please open an issue [here](https://github.com/chrisenytc/demi-logger/issues). ## License The MIT License Copyright (c) 2014 Christopher EnyTC 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.
chrisenytc/demi-logger
README.md
Markdown
mit
2,189
## Prerequisites [Node.js](http://nodejs.org/) >= 6 must be installed. ## Installation - Running `npm install` in the component's root directory will install everything you need for development. ## Demo Development Server - `npm start` will run a development server with the component's demo app at [http://localhost:3000](http://localhost:3000) with hot module reloading. ## Running Tests - `npm test` will run the tests once. - `npm run test:coverage` will run the tests and produce a coverage report in `coverage/`. - `npm run test:watch` will run the tests on every change. ## Building - `npm run build` will build the component for publishing to npm and also bundle the demo app. - `npm run clean` will delete built resources.
cpeele00/bigbrother
CONTRIBUTING.md
Markdown
mit
744
<?php declare(strict_types=1); namespace DiContainerBenchmarks\Fixture\C; class FixtureC846 { public function __construct(FixtureC845 $dependency) { } }
kocsismate/php-di-container-benchmarks
src/Fixture/C/FixtureC846.php
PHP
mit
168
var five = require("../lib/johnny-five.js"); var board = new five.Board(); board.on("ready", function() { var gyro = new five.Gyroscope({ pins: ["I0", "I1"], freq: 200, extent: 4 }); gyro.on("acceleration", function(data) { console.log(data.position); }); });
januszhou/pi
node_modules/johnny-five/eg/tinkerkit-imu-gyro-accel.js
JavaScript
mit
286
--- layout: null section-type: contact title: Contact --- ## Contact Nothing to say!
hxflove521/hxflove521.github.io
contact.html
HTML
mit
85
// "horizontalaxis" : { // "id" : STRING, "type" : DATATYPE(number), "length" : RELLEN(1.0), "base" : POINT(-1,1), "anchor" : DOUBLE(-1), "position" : POINT(0,0), // "min" : DATAVALUEORAUTO(auto), "max" : DATAVALUEORAUTO(auto), "minposition" : RELPOS(-1.0), "maxposition" : RELPOS(1.0), "color" : COLOR(black), "linewidth" : INTEGER(1), // "tickmin" : INTEGER(-3), "tickmax" : INTEGER(3), "tickcolor" : COLOR(black), // "labels" : { // "format" : STRING, "start" : DATAVALUE(0), "angle" : DOUBLE(0), "position" : POINT, // "anchor" : POINT, "color" : COLOR(black), "spacing" : STRING, "densityfactor" : DOUBLE(1.0), // "label" : [ // { "format" : STRING, "start" : STRING, "angle" : DOUBLE, "position" : POINT, "anchor" : POINT, "spacing" : STRING, "densityfactor" : DOUBLE }, // { "format" : STRING, "start" : STRING, "angle" : DOUBLE, "position" : POINT, "anchor" : POINT, "spacing" : STRING, "densityfactor" : DOUBLE }, // ... // ] // } // "title" : { "base" : DOUBLE(0), "anchor" : POINT, "position" : POINT, "angle" : DOUBLE(0), "text" : "TITLETEXT", "font": STRING }, // "grid" : { "color" : COLOR(0xeeeeee), "visible" : BOOLEAN(false) }, // "pan" : { "allowed" : BOOLEAN(yes), "min" : DATAVALUE, "max" : DATAVALUE }, // "zoom" : { "allowed" : BOOLEAN(yes), "min" : DATAMEASURE, "max" : DATAMEASURE, "anchor" : DATAVALUE }, // "binding" : { "id" : STRING!, "min" : DATAVALUE!, "max" : DATAVALUE! } // "visible" : BOOLEAN(true) // } // these are needed so that their .parseJSON methods will be defined when called below: require('./labeler.js'); require('./axis_title.js'); require('./grid.js'); require('./pan.js'); require('./zoom.js'); var Axis = require('../../core/axis.js'), pF = require('../../util/parsingFunctions.js'), vF = require('../../util/validationFunctions.js'), uF = require('../../util/utilityFunctions.js'); var parseLabels = function (json, axis) { var spacings, labelers = axis.labelers(), Labeler = require('../../core/labeler.js'), DataValue = require('../../core/data_value.js'), i; spacings = []; if (json !== undefined) { if (json.spacing !== undefined) { spacings = vF.typeOf(json.spacing) === 'array' ? json.spacing : [ json.spacing ]; } } if (spacings.length > 0) { // If there was a spacing attr on the <labels> tag, create a new labeler for // each spacing present in it, using the other values from the <labels> tag for (i = 0; i < spacings.length; ++i) { labelers.add(Labeler.parseJSON(json, axis, undefined, spacings[i])); } } else if (json !== undefined && json.label !== undefined && json.label.length > 0) { // If there are <label> tags, parse the <labels> tag to get default values var defaults = Labeler.parseJSON(json, axis, undefined, null); // And loop over each <label> tag, creating labelers for each, splitting multiple // spacings on the same <label> tag into multiple labelers: json.label.forEach(function(e) { var spacing = []; if (e.spacing !== undefined) { spacing = vF.typeOf(e.spacing) === 'array' ? e.spacing : [ e.spacing ]; } spacing.forEach(function(s) { labelers.add( Labeler.parseJSON(e, axis, defaults, s) ); }); }); } else { // Otherwise create labelers using the default spacing, with the other values // from the <labels> tag var defaultValues = (uF.getDefaultValuesFromXSD()).horizontalaxis.labels; var defaultSpacings = axis.type() === DataValue.NUMBER ? defaultValues.defaultNumberSpacing : defaultValues.defaultDatetimeSpacing; for (i = 0; i < defaultSpacings.length; ++i) { labelers.add(Labeler.parseJSON(json, axis, undefined, defaultSpacings[i])); } } }; Axis.parseJSON = function (json, orientation, messageHandler, multigraph) { var DataValue = require('../../core/data_value.js'), Point = require('../../math/point.js'), RGBColor = require('../../math/rgb_color.js'), Displacement = require('../../math/displacement.js'), AxisTitle = require('../../core/axis_title.js'), Grid = require('../../core/grid.js'), Pan = require('../../core/pan.js'), Zoom = require('../../core/zoom.js'), AxisBinding = require('../../core/axis_binding.js'), axis = new Axis(orientation), parseAttribute = pF.parseAttribute, parseDisplacement = Displacement.parse, parseJSONPoint = function(p) { return new Point(p[0], p[1]); }, parseRGBColor = RGBColor.parse, attr, child, value; if (json) { parseAttribute(json.id, axis.id); parseAttribute(json.type, axis.type, DataValue.parseType); parseAttribute(json.length, axis.length, parseDisplacement); // // The following provides support for the deprecated "positionbase" axis attribute; // MUGL files should use the "base" attribute instead. When we're ready to remove // support for the deprecated attribute, delete this block of code: // (function () { var positionbase = json.positionbase; if (positionbase) { messageHandler.warning('Use of deprecated axis attribute "positionbase"; use "base" attribute instead'); if ((positionbase === "left") || (positionbase === "bottom")) { axis.base(new Point(-1, -1)); } else if (positionbase === "right") { axis.base(new Point(1, -1)); } else if (positionbase === "top") { axis.base(new Point(-1, 1)); } } }()); // // End of code to delete when removing support for deprecated "positionbase" // attribute. // attr = json.position; if (attr !== undefined) { if (vF.typeOf(attr) === 'array') { axis.position(parseJSONPoint(attr)); } else { // If position is not an array, and if it can be interpreted // as a number, construct the position point by interpreting that // number as an offset from the 0 location along the perpendicular // direction. if (vF.isNumberNotNaN(attr)) { if (orientation === Axis.HORIZONTAL) { axis.position(new Point(0, attr)); } else { axis.position(new Point(attr, 0)); } } else { throw new Error("axis position '"+attr+"' is of the wrong type; it should be a number or a point"); } } } // Note: we coerce the min and max values to strings here, because the "min" and "max" attrs // of the Axis object require strings. See the comments about these properties in src/core/axis.js // for a discussion of why this is the case. if ("min" in json) { axis.min(uF.coerceToString(json.min)); } if (axis.min() !== "auto") { axis.dataMin(DataValue.parse(axis.type(), axis.min())); } if ("max" in json) { axis.max(uF.coerceToString(json.max)); } if (axis.max() !== "auto") { axis.dataMax(DataValue.parse(axis.type(), axis.max())); } parseAttribute(json.pregap, axis.pregap); parseAttribute(json.postgap, axis.postgap); parseAttribute(json.anchor, axis.anchor); parseAttribute(json.base, axis.base, parseJSONPoint); parseAttribute(json.minposition, axis.minposition, parseDisplacement); parseAttribute(json.maxposition, axis.maxposition, parseDisplacement); parseAttribute(json.minoffset, axis.minoffset); parseAttribute(json.maxoffset, axis.maxoffset); parseAttribute(json.color, axis.color, parseRGBColor); parseAttribute(json.tickcolor, axis.tickcolor, parseRGBColor); parseAttribute(json.tickwidth, axis.tickwidth); parseAttribute(json.tickmin, axis.tickmin); parseAttribute(json.tickmax, axis.tickmax); parseAttribute(json.highlightstyle, axis.highlightstyle); parseAttribute(json.linewidth, axis.linewidth); if ("title" in json) { if (typeof(json.title) === 'boolean') { if (json.title) { axis.title(new AxisTitle(axis)); } else { axis.title(AxisTitle.parseJSON({}, axis)); } } else { axis.title(AxisTitle.parseJSON(json.title, axis)); } } else { axis.title(new AxisTitle(axis)); } if (json.grid) { axis.grid(Grid.parseJSON(json.grid)); } if (json.visible !== undefined) { axis.visible(json.visible); } if ("pan" in json) { axis.pan(Pan.parseJSON(json.pan, axis.type())); } if ("zoom" in json) { axis.zoom(Zoom.parseJSON(json.zoom, axis.type())); } if (json.labels) { parseLabels(json.labels, axis); } if (json.binding) { var bindingMinDataValue = DataValue.parse(axis.type(), json.binding.min), bindingMaxDataValue = DataValue.parse(axis.type(), json.binding.max); if (typeof(json.binding.id) !== "string") { throw new Error("invalid axis binding id: '" + json.binding.id + "'"); } if (! DataValue.isInstance(bindingMinDataValue)) { throw new Error("invalid axis binding min: '" + json.binding.min + "'"); } if (! DataValue.isInstance(bindingMaxDataValue)) { throw new Error("invalid axis binding max: '" + json.binding.max + "'"); } AxisBinding.findByIdOrCreateNew(json.binding.id).addAxis(axis, bindingMinDataValue, bindingMaxDataValue, multigraph); } } return axis; }; module.exports = Axis;
multigraph/js-multigraph
src/parser/json/axis.js
JavaScript
mit
10,515
namespace Todo.ViewModel { public sealed class NewTodoItem { public string Text { get; set; } } }
spicydog/Todo-app-sample
src/Todo/ViewModel/NewTodoItem.cs
C#
mit
120
<?xml version="1.0" encoding="utf-8"?> <!-- This comment will force IE7 to go into quirks mode. --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta> <link rel="stylesheet" type="text/css" href="../../CSS/Contents.css"></link> <script type="text/javascript" src="../../JS/Common.js"></script> <title>Zips.Zip&lt;T, U, V&gt; Method</title> </head> <body> <div id="Header"> <div id="ProjectTitle">Documentation Project</div> <div id="PageTitle">Zips.Zip&lt;T, U, V&gt; Method</div> <div id="HeaderShortcuts"> <a href="#SectionHeader0" onclick="javascript: SetSectionVisibility(0, true); SetExpandCollapseAllToCollapseAll();">Overload List</a>&nbsp; </div> <div class="DarkLine"></div> <div class="LightLine"></div> <div id="HeaderToolbar"> <img id="ExpandCollapseAllImg" src="../../GFX/SmallSquareExpanded.gif" alt="" style="vertical-align: top;" onclick="javascript: ToggleAllSectionsVisibility();" /> <span id="ExpandCollapseAllSpan" onclick="javascript: ToggleAllSectionsVisibility();">Collapse All</span> </div> </div> <div id="Contents"> <a id="ContentsAnchor">&nbsp;</a> Zip a paired stream with a third stream. <div id="ItemLocation"> <b>Declaring type:</b> <a href="../../Contents/2/287.html">Zips</a><br /> <b>Namespace:</b> <a href="../../Contents/1/212.html">Sasa.Linq</a><br /> <b>Assembly:</b> <a href="../../Contents/1/1.html">Sasa</a> </div> <div id="SectionHeader0" class="SectionHeader"> <img id="SectionExpanderImg0" src="../../GFX/BigSquareExpanded.gif" alt="Collapse/Expand" onclick="javascript: ToggleSectionVisibility(0);" /> <span class="SectionHeader"> <span class="ArrowCursor" onclick="javascript: ToggleSectionVisibility(0);"> Overload List </span> </span> </div> <div id="SectionContainerDiv0" class="SectionContainer"> <table class="MembersTable"> <col width="7%" /> <col width="38%" /> <col width="55%" /> <tr> <th>&nbsp;</th> <th>Name</th> <th>Description</th> </tr> <tr> <td class="IconColumn"> <img src="../../GFX/PublicMethod.gif" alt="Public Method" />&nbsp;<img src="../../GFX/Static.gif" alt="Static" /></td> <td><a href="../../Contents/2/316.html">Zips.Zip&lt;T, U, V&gt; (IEnumerable&lt;T&gt;, IEnumerable&lt;U&gt;, IEnumerable&lt;V&gt;)</a></td> <td>Zip the elements of three streams.</td> </tr> <tr> <td class="IconColumn"> <img src="../../GFX/PublicMethod.gif" alt="Public Method" />&nbsp;<img src="../../GFX/Static.gif" alt="Static" /></td> <td><a href="../../Contents/2/317.html">Zips.Zip&lt;T, U, V&gt; (IEnumerable&lt;Pair&lt;T, U&gt;&gt;, IEnumerable&lt;V&gt;)</a></td> <td>Zip a paired stream with a third stream.</td> </tr> </table> <div class="TopLink"><a href="#ContentsAnchor">Top</a></div></div> </div> <div id="Footer"> <span class="Footer">Generated by <a href="http://immdocnet.codeplex.com/" target="_blank">ImmDoc .NET</a></span>. </div> </body> </html>
fschwiet/ManyConsole
lib/Sasa-v0.9.3-docs/Contents/2/306.html
HTML
mit
3,096
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $lang = array( 'img_module_name' => 'Img', 'img_module_description' => 'PHPImageWorkshop for EE', 'module_home' => 'Img Home', // Start inserting custom language keys/values here ); /* End of file lang.img.php */ /* Location: /system/expressionengine/third_party/img/language/english/lang.img.php */
bjornbjorn/img.ee_addon
system/expressionengine/third_party/img/language/english/lang.img.php
PHP
mit
392
module WoopleTheme class Configuration attr_accessor :profile_helper, :menu_helper, :impersonation_banner_helper, :layout_javascript def profile_helper @profile_helper || :profile_helper end def menu_helper @menu_helper || :menu_helper end def impersonation_banner_helper @impersonation_banner_helper || :impersonation_banner_helper end end class << self attr_accessor :configuration end def self.configure self.configuration ||= Configuration.new yield(configuration) end end
woople/woople-theme
lib/woople-theme/configuration.rb
Ruby
mit
553
export * from './about'; export * from './no-content'; export * from './home';
pschulzk/angular-webpack-starter
src/app/views/index.ts
TypeScript
mit
78
<!--conf <sample> <product version="2.6" edition="std"/> <modifications> <modified date="100609"/> </modifications> </sample> --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Series</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/> <script src="../../../codebase/dhtmlx.js"></script> <script src="../common/testdata.js"></script> </head> <body> <div id="chart1" style="width:900px;height:250px;border:1px solid #A4BED4;"></div> <script> var barChart1 = new dhtmlXChart({ view:"bar", container:"chart1", value:"#sales#", color: "#58dccd", gradient:"rising", tooltip:{ template:"#sales#" }, width:60, tooltip:{ template:"#sales#" }, xAxis:{ template:"'#year#" }, yAxis:{ start:0, step:10, end:100 }, legend:{ values:[{text:"Type A",color:"#58dccd"},{text:"Type B",color:"#a7ee70"},{text:"Type C",color:"#36abee"}], valign:"middle", align:"right", width:90, layout:"y" } }); barChart1.addSeries({ value:"#sales2#", color:"#a7ee70", tooltip:{ template:"#sales2#" } }); barChart1.addSeries({ value:"#sales3#", color:"#36abee", tooltip:{ template:"#sales3#" } }); barChart1.parse(multiple_dataset,"json"); </script> </body> </html>
blale-zhang/codegen
WebContent/component/dhtmlxSuite_v403_std/samples/dhtmlxChart/06_bar_chart/06_series.html
HTML
mit
1,793
version https://git-lfs.github.com/spec/v1 oid sha256:d5b913ad3304fa791ac6c6064dcecf37b157290bb0e8292e76aee05bee6dc425 size 3752
yogeshsaroya/new-cdnjs
ajax/libs/reqwest/0.2.2/reqwest.min.js
JavaScript
mit
129
--- layout: player radio: gardarica date: 2017-04-06T05:06:27Z ---
guskant/accessible
_radios/gardarica.md
Markdown
mit
68
/** * Filtering sensitive information */ const _ = require('lodash'); /** * reset option * @param {string|object|array} opt filter option * @param {array} filterKeys filter keys * @param {string|function} replaceChat replace chat or function * @param {boolean} recursion whether recursive , true of false */ const setOption = (option) => { let filterKeys = ['password', 'token', 'authorization']; let replaceChat = '*'; let recursion = false; if (option !== undefined) { if (typeof option === 'string') { filterKeys = [option]; } else if (option instanceof Array && option.length > 0) { filterKeys = option.filter(item => typeof item === 'string'); } else if (_.isPlainObject(option)) { const { filterKeys: fks, recursion: rcs, replaceChat: rpc } = option; recursion = !!rcs; if (fks instanceof Array && fks.length > 0) { filterKeys = fks.filter(item => typeof item === 'string'); } if (typeof rpc === 'string') { replaceChat = rpc; } else { replaceChat = '*'; } } else { console.error(new Error(`option.filter do not support ${typeof option} type !`)); } } return { filterKeys, recursion, replaceChat }; }; /** * replace by replaceChat * @param {string} param content to replace * @param {string|function} replaceChat replace chat or function */ const replace = (param, replaceChat) => { if (typeof replaceChat === 'function') { return replaceChat(param); } return param.replace(/\S/g, '*'); }; /** * filter log message by option * @param {*} message logger message * @param {object} opt filter option * @param {boolean} hit hit the fileterkeys , default false */ const filter = (message, opt, hit = false) => { const result = message; const { filterKeys, replaceChat } = opt; if (_.isPlainObject(result)) { Object.keys(result).forEach((key) => { const dHit = hit || filterKeys.indexOf(key) > -1; result[key] = filter(result[key], opt, dHit); // if (recursion) { // result[key] = filter(param, opt, true); // } else { // result[key] = replaceChat; // // replace the value of hit key // // eslint-disable-next-line no-return-assign // Object.keys(param).forEach(pk => (filterKeys.indexOf(pk) !== -1 ? result[key] = replaceChat : '')); // } }); return result; } else if (typeof result === 'number') { return replace(result.toString(), replaceChat); } else if (result instanceof Array && result.length > 0) { return result.map(param => filter(param, opt, hit)); } return replace(result, replaceChat); }; /** * filter log message by option do not recursion * @param {*} message logger message * @param {object} opt filter option * @param {array} opt.filterKeys filter keys * @param {string} opt.replaceChat replace chat or function */ const filterNoRecursion = (message, opt) => { const result = message; const { filterKeys, replaceChat } = opt; if (_.isPlainObject(result)) { Object.keys(result).forEach((key) => { if (filterKeys.indexOf(key) === -1) { result[key] = filterNoRecursion(result[key], opt); } else { result[key] = replaceChat; } }); return result; } else if (typeof result === 'number') { return result; } else if (result instanceof Array && result.length > 0) { return result; } return result; }; /** * filter sensitive information * @param {object} message log message * @param {*} option filter option */ const filteringSensitiveInfo = (message, option = false) => { if (!option) { return message; } if (typeof option === 'function') { return option(message); } return filterNoRecursion(message, setOption(option)); }; module.exports = { filteringSensitiveInfo, setOption, };
baijijs/logger
lib/filter.js
JavaScript
mit
3,846
from slm_lab.env.vec_env import make_gym_venv import numpy as np import pytest @pytest.mark.parametrize('name,state_shape,reward_scale', [ ('PongNoFrameskip-v4', (1, 84, 84), 'sign'), ('LunarLander-v2', (8,), None), ('CartPole-v0', (4,), None), ]) @pytest.mark.parametrize('num_envs', (1, 4)) def test_make_gym_venv_nostack(name, num_envs, state_shape, reward_scale): seed = 0 frame_op = None frame_op_len = None venv = make_gym_venv(name, num_envs, seed, frame_op=frame_op, frame_op_len=frame_op_len, reward_scale=reward_scale) venv.reset() for i in range(5): state, reward, done, info = venv.step([venv.action_space.sample()] * num_envs) assert isinstance(state, np.ndarray) assert state.shape == (num_envs,) + state_shape assert isinstance(reward, np.ndarray) assert reward.shape == (num_envs,) assert isinstance(done, np.ndarray) assert done.shape == (num_envs,) assert len(info) == num_envs venv.close() @pytest.mark.parametrize('name,state_shape, reward_scale', [ ('PongNoFrameskip-v4', (1, 84, 84), 'sign'), ('LunarLander-v2', (8,), None), ('CartPole-v0', (4,), None), ]) @pytest.mark.parametrize('num_envs', (1, 4)) def test_make_gym_concat(name, num_envs, state_shape, reward_scale): seed = 0 frame_op = 'concat' # used for image, or for concat vector frame_op_len = 4 venv = make_gym_venv(name, num_envs, seed, frame_op=frame_op, frame_op_len=frame_op_len, reward_scale=reward_scale) venv.reset() for i in range(5): state, reward, done, info = venv.step([venv.action_space.sample()] * num_envs) assert isinstance(state, np.ndarray) stack_shape = (num_envs, frame_op_len * state_shape[0],) + state_shape[1:] assert state.shape == stack_shape assert isinstance(reward, np.ndarray) assert reward.shape == (num_envs,) assert isinstance(done, np.ndarray) assert done.shape == (num_envs,) assert len(info) == num_envs venv.close() @pytest.mark.skip(reason='Not implemented yet') @pytest.mark.parametrize('name,state_shape,reward_scale', [ ('LunarLander-v2', (8,), None), ('CartPole-v0', (4,), None), ]) @pytest.mark.parametrize('num_envs', (1, 4)) def test_make_gym_stack(name, num_envs, state_shape, reward_scale): seed = 0 frame_op = 'stack' # used for rnn frame_op_len = 4 venv = make_gym_venv(name, num_envs, seed, frame_op=frame_op, frame_op_len=frame_op_len, reward_scale=reward_scale) venv.reset() for i in range(5): state, reward, done, info = venv.step([venv.action_space.sample()] * num_envs) assert isinstance(state, np.ndarray) stack_shape = (num_envs, frame_op_len,) + state_shape assert state.shape == stack_shape assert isinstance(reward, np.ndarray) assert reward.shape == (num_envs,) assert isinstance(done, np.ndarray) assert done.shape == (num_envs,) assert len(info) == num_envs venv.close() @pytest.mark.parametrize('name,state_shape,image_downsize', [ ('PongNoFrameskip-v4', (1, 84, 84), (84, 84)), ('PongNoFrameskip-v4', (1, 64, 64), (64, 64)), ]) @pytest.mark.parametrize('num_envs', (1, 4)) def test_make_gym_venv_downsize(name, num_envs, state_shape, image_downsize): seed = 0 frame_op = None frame_op_len = None venv = make_gym_venv(name, num_envs, seed, frame_op=frame_op, frame_op_len=frame_op_len, image_downsize=image_downsize) venv.reset() for i in range(5): state, reward, done, info = venv.step([venv.action_space.sample()] * num_envs) assert isinstance(state, np.ndarray) assert state.shape == (num_envs,) + state_shape assert isinstance(reward, np.ndarray) assert reward.shape == (num_envs,) assert isinstance(done, np.ndarray) assert done.shape == (num_envs,) assert len(info) == num_envs venv.close()
kengz/Unity-Lab
test/env/test_vec_env.py
Python
mit
3,861
package com.github.pineasaurusrex.inference_engine; import java.util.HashMap; /** * Partially or fully assigned model * A model represents a possible representation of the propositional symbol states in the KB */ public class Model { private HashMap<PropositionalSymbol, Boolean> symbolValues = new HashMap<>(); public boolean holdsTrue(Sentence sentence) { if (sentence.isPropositionSymbol()) { return symbolValues.get(sentence); } else { switch(sentence.getConnective()) { case NOT: return !holdsTrue(sentence.getOperand(0)); case AND: return holdsTrue(sentence.getOperand(0)) && holdsTrue(sentence.getOperand(1)); case OR: return holdsTrue(sentence.getOperand(0)) || holdsTrue(sentence.getOperand(1)); case IMPLICATION: return !holdsTrue(sentence.getOperand(0)) || holdsTrue(sentence.getOperand(1)); case BICONDITIONAL: return holdsTrue(sentence.getOperand(0)) == holdsTrue(sentence.getOperand(1)); } } return false; } public boolean holdsTrue(KnowledgeBase kb) { return kb.getSentences().parallelStream() .map(this::holdsTrue) .allMatch(Boolean::booleanValue); } /** * Returns a new model, with the union of the results of the old model and the result passed in * @param symbol the symbol to merge in * @param b the value to set * @return a new Model object */ public Model union(PropositionalSymbol symbol, boolean b) { Model m = new Model(); m.symbolValues.putAll(this.symbolValues); m.symbolValues.put(symbol, b); return m; } }
pineasaurusrex/inference-engine
src/com/github/pineasaurusrex/inference_engine/Model.java
Java
mit
1,821
describe("The ot object has a forEach method, which allows you: ", function () { it("To iterate over an array", function () { var array = [1, 2, 4, 8, 16]; var sum = 0; var sumIndex = 0; ot.forEach(array, function (value, index) { sum += value; sumIndex += index; expect(this.context).toBe(true); }, {context: true}); expect(sum).toBe(1 + 2 + 4 + 8 + 16); expect(sumIndex).toBe(1 + 2 + 3 + 4); }); it("To iterate over an object's properties", function () { var obj = { prop1: false, prop2: false, prop3: false }; ot.forEach(obj, function (value, key) { obj[key] = !value; expect(this.context).toBe(true); }, {context: true}); expect(obj.prop1).toBe(true); expect(obj.prop2).toBe(true); expect(obj.prop3).toBe(true); }); it("To iterate over user set function properties", function () { var fnWithProps = function aName() { }; fnWithProps.prop1 = false; fnWithProps.prop2 = false; fnWithProps.prop3 = false; ot.forEach(fnWithProps, function (value, key) { fnWithProps[key] = !value; expect(this.context).toBe(true); }, {context: true}); expect(fnWithProps.prop1).toBe(true); expect(fnWithProps.prop2).toBe(true); expect(fnWithProps.prop3).toBe(true); }); it("To iterate over an object with a forEach method", function () { var objectWithForEach = { forEach: function (iterator, context) { iterator.call(context, true); } }; ot.forEach(objectWithForEach, function(calledFromForEach) { expect(calledFromForEach).toBe(true); expect(this.context).toBe(true); }, {context: true}); }); });
rodyhaddad/objectTools.js
tests/specs/forEach.js
JavaScript
mit
1,933
#ifndef LWEXML_H #define LWEXML_H #include <LWCore/LWText.h> #include <functional> #include "LWETypes.h" #define LWEXMLMAXNAMELEN 32 #define LWEXMLMAXVALUELEN 256 #define LWEXMLMAXTEXTLEN 1024 struct LWXMLAttribute { char m_Name[LWEXMLMAXNAMELEN]; char m_Value[LWEXMLMAXVALUELEN]; }; struct LWEXMLNode { enum { MaxAttributes = 32 }; LWXMLAttribute m_Attributes[MaxAttributes]; char m_Text[LWEXMLMAXTEXTLEN]; char m_Name[LWEXMLMAXNAMELEN]; uint32_t m_AttributeCount; LWEXMLNode *m_Parent; LWEXMLNode *m_Next; LWEXMLNode *m_FirstChild; LWEXMLNode *m_LastChild; bool PushAttribute(const char *Name, const char *Value); bool PushAttributef(const char *Name, const char *ValueFmt, ...); bool RemoveAttribute(uint32_t i); bool RemoveAttribute(LWXMLAttribute *Attr); LWEXMLNode &SetName(const char *Name); LWEXMLNode &SetText(const char *Text); LWEXMLNode &SetTextf(const char *TextFmt, ...); LWXMLAttribute *FindAttribute(const LWText &Name); }; struct LWEXMLParser { char m_Name[LWEXMLMAXNAMELEN]; std::function<bool(LWEXMLNode *, void *, LWEXML *)> m_Callback; void *m_UserData; }; class LWEXML { public: enum { NodePoolSize = 256, MaxParsers = 32 }; static bool LoadFile(LWEXML &XML, LWAllocator &Allocator, const LWText &Path, bool StripFormatting, LWEXMLNode *Parent, LWEXMLNode *Prev, LWFileStream *ExistingStream = nullptr); static bool LoadFile(LWEXML &XML, LWAllocator &Allocator, const LWText &Path, bool StripFormatting, LWFileStream *ExistingStream = nullptr); static bool ParseBuffer(LWEXML &XML, LWAllocator &Allocator, const char *Buffer, bool StripFormatting, LWEXMLNode *Parent, LWEXMLNode *Prev); static bool ParseBuffer(LWEXML &XML, LWAllocator &Allocator, const char *Buffer, bool StripFormatting); static uint32_t ConstructBuffer(LWEXML &XML, char *Buffer, uint32_t BufferLen, bool Format); LWEXMLNode *NextNode(LWEXMLNode *Current, bool SkipChildren=false); LWEXMLNode *NextNode(LWEXMLNode *Current, LWEXMLNode *Top, bool SkipChildren = false); LWEXMLNode *NextNodeWithName(LWEXMLNode *Current, const LWText &Name, bool SkipChildren =false); template<class Method, class Obj> LWEXML &PushMethodParser(const LWText &XMLNodeName, Method CB, Obj *O, void *UserData) { return PushParser(XMLNodeName, std::bind(CB, O, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3), UserData); } LWEXML &PushParser(const LWText &XMLNodeName, std::function<bool(LWEXMLNode*, void*, LWEXML*)> Callback, void *UserData); LWEXML &Process(void); LWEXMLNode *GetInsertedNodeAfter(LWEXMLNode *Parent, LWEXMLNode *Prev, LWAllocator &Allocator); LWEXMLNode *GetFirstNode(void); LWEXMLNode *GetLastNode(void); LWEXML(); ~LWEXML(); private: LWEXMLNode **m_NodePool; LWEXMLParser m_Parsers[MaxParsers]; uint32_t m_NodeCount; uint32_t m_ParserCount; LWEXMLNode *m_FirstNode; LWEXMLNode *m_LastNode; }; #endif
slicer4ever/Lightwave
Engine/Includes/C++11/LWEXML.h
C
mit
3,001
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace CycleCycleCycle.Services { public interface IRideService { bool Create(int accountId, int routeId, DateTime dateRidden, int? hours, int? minutes, int? seconds); } }
JamesRandall/CycleCycleCycle.com
CycleCycleCycle/Services/IRideService.cs
C#
mit
285
<?php /** * [PHPFOX_HEADER] */ defined('PHPFOX') or exit('NO DICE!'); /** * * * @copyright [PHPFOX_COPYRIGHT] * @author Raymond Benc * @package Module_Mail * @version $Id: index.class.php 4378 2012-06-27 08:44:47Z Raymond_Benc $ */ class Mail_Component_Controller_Index extends Phpfox_Component { /** * Class process method wnich is used to execute this component. */ public function process() { Phpfox::isUser(true); $bIsInLegacyView = false; if (Phpfox::getParam('mail.threaded_mail_conversation') && $this->request()->get('legacy')) { Phpfox::getLib('setting')->setParam('mail.threaded_mail_conversation', false); $bIsInLegacyView = true; } $this->setParam('bIsInLegacyView', $bIsInLegacyView); if (($aItemModerate = $this->request()->get('item_moderate'))) { $sFile = Phpfox::getService('mail')->getThreadsForExport($aItemModerate); Phpfox::getLib('file')->forceDownload($sFile, 'mail.xml'); } $iPage = $this->request()->getInt('page'); $iPageSize = 10; $bIsSentbox = ($this->request()->get('view') == 'sent' ? true : false); $bIsTrash = ($this->request()->get('view') == 'trash' ? true : false); $iPrivateBox = ($this->request()->get('view') == 'box' ? $this->request()->getInt('id') : false); $bIs = $this->getParam('bIsSentbox'); if ($this->request()->get('action') == 'archive') { Phpfox::getService('mail.process')->archiveThread($this->request()->getInt('id'), 1); $this->url()->send('mail.trash', null, Phpfox::getPhrase('mail.message_successfully_archived')); } if ($this->request()->get('action') == 'unarchive') { Phpfox::getService('mail.process')->archiveThread($this->request()->getInt('id'), 0); $this->url()->send('mail', null, Phpfox::getPhrase('mail.message_successfully_unarchived')); } if ($this->request()->get('action') == 'delete') { $iMailId = $this->request()->getInt('id'); if (!is_int($iMailId) || empty($iMailId)) { Phpfox_Error::set(Phpfox::getPhrase('mail.no_mail_specified')); } else { $bTrash = $this->getParam('bIsTrash'); if (!isset($bTrash) || !is_bool($bTrash)) { $bIsTrash = Phpfox::getService('mail')->isDeleted($iMailId); } if ($bIsTrash) { if (Phpfox::getService('mail.process')->deleteTrash($iMailId)) { $this->url()->send('mail.trash', null, Phpfox::getPhrase('mail.mail_deleted_successfully')); } else { Phpfox_Error::set(Phpfox::getPhrase('mail.mail_could_not_be_deleted')); } } else { $bIsSent = $this->getParam('bIsSentbox'); if (!isset($bIsSent) || !is_bool($bIsSent)) { $bIsSentbox = Phpfox::getService('mail')->isSent($iMailId); } if (Phpfox::getService('mail.process')->delete($iMailId, $bIsSentbox)) { $this->url()->send($bIsSentbox == true ? 'mail.sentbox' : 'mail', null, Phpfox::getPhrase('mail.mail_deleted_successfully')); } else { Phpfox_Error::set(Phpfox::getPhrase('mail.mail_could_not_be_deleted')); } } } } if (($aVals = $this->request()->getArray('val')) && isset($aVals['action'])) { if (isset($aVals['id'])) { //make sure there is at least one selected $oMailProcess = Phpfox::getService('mail.process'); switch ($aVals['action']) { case 'unread': case 'read': foreach ($aVals['id'] as $iId) { $oMailProcess->toggleView($iId, ($aVals['action'] == 'unread' ? true : false)); } $sMessage = Phpfox::getPhrase('mail.messages_updated'); break; case 'delete': if (isset($aVals['select']) && $aVals['select'] == 'every') { $aMail = Phpfox::getService('mail')->getAllMailFromFolder(Phpfox::getUserId(),(int)$aVals['folder'], $bIsSentbox, $bIsTrash); $aVals['id'] = $aMail; } foreach ($aVals['id'] as $iId) { ($bIsTrash ? $oMailProcess->deleteTrash($iId) : $oMailProcess->delete($iId, $bIsSentbox)); } $sMessage = Phpfox::getPhrase('mail.messages_deleted'); break; case 'undelete': foreach ($aVals['id'] as $iId) { $oMailProcess->undelete($iId); } $sMessage = Phpfox::getPhrase('mail.messages_updated'); break; } } else { // didnt select any message $sMessage = Phpfox::getPhrase('mail.error_you_did_not_select_any_message'); } // define the mail box that the user was looking at $mSend = null; if ($bIsSentbox) { $mSend = array('sentbox'); } elseif ($bIsTrash) { $mSend = array('trash'); } elseif ($iPrivateBox) { $mSend = array('box', 'id' => $iPrivateBox); } // send the user to that folder with the message $this->url()->send('mail', $mSend, $sMessage); } $this->search()->set(array( 'type' => 'mail', 'field' => 'mail.mail_id', 'search_tool' => array( 'table_alias' => 'm', 'search' => array( 'action' => $this->url()->makeUrl('mail', array('view' => $this->request()->get('view'), 'id' => $this->request()->get('id'))), 'default_value' => Phpfox::getPhrase('mail.search_messages'), 'name' => 'search', 'field' => array('m.subject', 'm.preview') ), 'sort' => array( 'latest' => array('m.time_stamp', Phpfox::getPhrase('mail.latest')), 'most-viewed' => array('m.viewer_is_new', Phpfox::getPhrase('mail.unread_first')) ), 'show' => array(10, 15, 20) ) ) ); $iPageSize = $this->search()->getDisplay(); $aFolders = Phpfox::getService('mail.folder')->get(); $sUrl = ''; $sFolder = ''; if (Phpfox::getParam('mail.threaded_mail_conversation')) { if ($bIsTrash) { $sUrl = $this->url()->makeUrl('mail.trash'); $this->search()->setCondition('AND m.owner_user_id = ' . Phpfox::getUserId() . ' AND m.is_archive = 1'); } else { if ($bIsSentbox) { $sUrl = $this->url()->makeUrl('mail.sentbox'); } else { $sUrl = $this->url()->makeUrl('mail'); } $this->search()->setCondition('AND m.viewer_user_id = ' . Phpfox::getUserId() . ' AND m.is_archive = 0'); } } else { if ($bIsTrash) { $sFolder = Phpfox::getPhrase('mail.trash'); $sUrl = $this->url()->makeUrl('mail.trash'); $this->search()->setCondition('AND (m.viewer_user_id = ' . Phpfox::getUserId() . ' AND m.viewer_type_id = 1) OR (m.owner_user_id = ' . Phpfox::getUserId() . ' AND m.owner_type_id = 1)'); // $this->search()->setCondition('AND m.viewer_user_id = ' . Phpfox::getUserId() . ' AND m.viewer_type_id = 1'); } elseif ($iPrivateBox) { if (isset($aFolders[$iPrivateBox])) { $sFolder = $aFolders[$iPrivateBox]['name']; $sUrl = $this->url()->makeUrl('mail.box', array('id' => (int) $iPrivateBox)); $this->search()->setCondition('AND m.viewer_folder_id = ' . (int) $iPrivateBox . ' AND m.viewer_user_id = ' . Phpfox::getUserId() . ' AND m.viewer_type_id = 0'); } else { $this->url()->send('mail', null, Phpfox::getPhrase('mail.mail_folder_does_not_exist')); } } else { if ($bIsSentbox) { $sFolder = Phpfox::getPhrase('mail.sent_messages'); $sUrl = $this->url()->makeUrl('mail.sentbox'); $this->search()->setCondition('AND m.owner_user_id = ' . Phpfox::getUserId() . ' AND m.owner_type_id = 0'); } else { $sFolder = Phpfox::getPhrase('mail.inbox'); $sUrl = $this->url()->makeUrl('mail'); $this->search()->setCondition('AND m.viewer_folder_id = 0 AND m.viewer_user_id = ' . Phpfox::getUserId() . ' AND m.viewer_type_id = 0'); } } } list($iCnt, $aRows, $aInputs) = Phpfox::getService('mail')->get($this->search()->getConditions(), $this->search()->getSort(), $this->search()->getPage(), $iPageSize, $bIsSentbox, $bIsTrash); Phpfox::getLib('pager')->set(array( 'page' => $iPage, 'size' => $iPageSize, 'count' => $iCnt ) ); Phpfox::getService('mail')->buildMenu(); $aActions = array(); $aActions[] = array( 'phrase' => Phpfox::getPhrase('mail.delete'), 'action' => 'delete' ); if (!$bIsSentbox) { $aActions[] = array( 'phrase' => Phpfox::getPhrase('mail.move'), 'action' => 'move' ); } $aModeration = array( 'name' => 'mail', 'ajax' => 'mail.moderation', 'menu' => $aActions ); if ($bIsSentbox) { $aModeration['custom_fields'] = '<div><input type="hidden" name="sent" value="1" /></div>'; } elseif ($bIsTrash) { $aModeration['custom_fields'] = '<div><input type="hidden" name="trash" value="1" /></div>'; } if (Phpfox::getParam('mail.threaded_mail_conversation')) { $aModeration['ajax'] = 'mail.archive'; $aMenuOptions = array(); if ($bIsTrash) { $aMenuOptions = array( 'phrase' => Phpfox::getPhrase('mail.un_archive'), 'action' => 'un-archive' ); } else { $aMenuOptions = array( 'phrase' => Phpfox::getPhrase('mail.archive'), 'action' => 'archive' ); } $aModeration['menu'] = array($aMenuOptions, array( 'phrase' => Phpfox::getPhrase('mail.export'), 'action' => 'export' ) ); } $this->setParam('global_moderation', $aModeration); if (empty($sFolder)) { $sFolder = Phpfox::getPhrase('mail.mail'); } $iMailSpaceUsed = 0; if ((!Phpfox::getUserParam('mail.override_mail_box_limit') && Phpfox::getParam('mail.enable_mail_box_warning'))) { $iMailSpaceUsed = Phpfox::getService('mail')->getSpaceUsed(Phpfox::getUserId()); } $this->template()->setTitle($sFolder) ->setBreadcrumb(Phpfox::getPhrase('mail.mail'), $this->url()->makeUrl('mail')) ->setPhrase(array( 'mail.add_new_folder', 'mail.adding_new_folder', 'mail.view_folders', 'mail.edit_folders', 'mail.you_will_delete_every_message_in_this_folder', 'mail.updating' ) ) ->setHeader('cache', array( 'jquery/plugin/jquery.highlightFade.js' => 'static_script', 'quick_edit.js' => 'static_script', 'selector.js' => 'static_script', 'mail.js' => 'module_mail', 'pager.css' => 'style_css', 'mail.css' => 'style_css' ) ) ->assign(array( 'aMails' => $aRows, 'bIsSentbox' => $bIsSentbox, 'bIsTrash' => $bIsTrash, 'aInputs' => $aInputs, 'aFolders' => $aFolders, 'iMailSpaceUsed' => $iMailSpaceUsed, 'iMessageAge' => Phpfox::getParam('mail.message_age_to_delete'), 'sUrl' => $sUrl, 'iFolder' => (isset($aFolders[$iPrivateBox]['folder_id']) ? $aFolders[$iPrivateBox]['folder_id'] : 0), 'iTotalMessages' => $iCnt, 'sSiteName' => Phpfox::getParam('core.site_title'), 'bIsInLegacyView' => $bIsInLegacyView ) ); } /** * Garbage collector. Is executed after this class has completed * its job and the template has also been displayed. */ public function clean() { (($sPlugin = Phpfox_Plugin::get('mail.component_controller_index_clean')) ? eval($sPlugin) : false); } } ?>
edbiler/BazaarCorner
module/mail/include/component/controller/index.class.php
PHP
mit
11,278
<?php namespace Vin\FrontOfficeBundle\Entity; use Doctrine\ORM\EntityRepository; /** * MessageRepository * * This class was generated by the Doctrine ORM. Add your own custom * repository methods below. */ class MessageRepository extends EntityRepository { public function countMessages() { $query = $this -> getEntityManager()->createQuery(' SELECT COUNT(m.id) FROM VinFrontOfficeBundle:Message m'); return $query ->getSingleScalarResult(); } }
chhoulet/vin.com
src/Vin/FrontOfficeBundle/Entity/MessageRepository.php
PHP
mit
508
<!DOCTYPE html><html><head><title>https://cgmonline.co/tags/2ns/</title><link rel="canonical" href="https://cgmonline.co/tags/2ns/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://cgmonline.co/tags/2ns/" /></head></html>
cgmonline/cgmonline
docs/tags/2ns/page/1/index.html
HTML
mit
286
"""Classification-based test and kernel two-sample test. Author: Sandro Vega-Pons, Emanuele Olivetti. """ import os import numpy as np from sklearn.metrics import pairwise_distances, confusion_matrix from sklearn.metrics import pairwise_kernels from sklearn.svm import SVC from sklearn.cross_validation import StratifiedKFold, KFold, cross_val_score from sklearn.grid_search import GridSearchCV from kernel_two_sample_test import MMD2u, compute_null_distribution from kernel_two_sample_test import compute_null_distribution_given_permutations import matplotlib.pylab as plt from joblib import Parallel, delayed def compute_rbf_kernel_matrix(X): """Compute the RBF kernel matrix with sigma2 as the median pairwise distance. """ sigma2 = np.median(pairwise_distances(X, metric='euclidean'))**2 K = pairwise_kernels(X, X, metric='rbf', gamma=1.0/sigma2, n_jobs=-1) return K def balanced_accuracy_scoring(clf, X, y): """Scoring function that computes the balanced accuracy to be used internally in the cross-validation procedure. """ y_pred = clf.predict(X) conf_mat = confusion_matrix(y, y_pred) bal_acc = 0. for i in range(len(conf_mat)): bal_acc += (float(conf_mat[i, i])) / np.sum(conf_mat[i]) bal_acc /= len(conf_mat) return bal_acc def compute_svm_cv(K, y, C=100.0, n_folds=5, scoring=balanced_accuracy_scoring): """Compute cross-validated score of SVM with given precomputed kernel. """ cv = StratifiedKFold(y, n_folds=n_folds) clf = SVC(C=C, kernel='precomputed', class_weight='auto') scores = cross_val_score(clf, K, y, scoring=scoring, cv=cv) return scores.mean() def compute_svm_subjects(K, y, n_folds=5): """ """ cv = KFold(len(K)/2, n_folds) scores = np.zeros(n_folds) for i, (train, test) in enumerate(cv): train_ids = np.concatenate((train, len(K)/2+train)) test_ids = np.concatenate((test, len(K)/2+test)) clf = SVC(kernel='precomputed') clf.fit(K[train_ids, :][:, train_ids], y[train_ids]) scores[i] = clf.score(K[test_ids, :][:, train_ids], y[test_ids]) return scores.mean() def permutation_subjects(y): """Permute class labels of Contextual Disorder dataset. """ y_perm = np.random.randint(0, 2, len(y)/2) y_perm = np.concatenate((y_perm, np.logical_not(y_perm).astype(int))) return y_perm def permutation_subjects_ktst(y): """Permute class labels of Contextual Disorder dataset for KTST. """ yp = np.random.randint(0, 2, len(y)/2) yp = np.concatenate((yp, np.logical_not(yp).astype(int))) y_perm = np.arange(len(y)) for i in range(len(y)/2): if yp[i] == 1: y_perm[i] = len(y)/2+i y_perm[len(y)/2+i] = i return y_perm def compute_svm_score_nestedCV(K, y, n_folds, scoring=balanced_accuracy_scoring, random_state=None, param_grid=[{'C': np.logspace(-5, 5, 25)}]): """Compute cross-validated score of SVM using precomputed kernel. """ cv = StratifiedKFold(y, n_folds=n_folds, shuffle=True, random_state=random_state) scores = np.zeros(n_folds) for i, (train, test) in enumerate(cv): cvclf = SVC(kernel='precomputed') y_train = y[train] cvcv = StratifiedKFold(y_train, n_folds=n_folds, shuffle=True, random_state=random_state) clf = GridSearchCV(cvclf, param_grid=param_grid, scoring=scoring, cv=cvcv, n_jobs=1) clf.fit(K[train, :][:, train], y_train) # print clf.best_params_ scores[i] = clf.score(K[test, :][:, train], y[test]) return scores.mean() def apply_svm(K, y, n_folds=5, iterations=10000, subjects=False, verbose=True, random_state=None): """ Compute the balanced accuracy, its null distribution and the p-value. Parameters: ---------- K: array-like Kernel matrix y: array_like class labels cv: Number of folds in the stratified cross-validation verbose: bool Verbosity Returns: ------- acc: float Average balanced accuracy. acc_null: array Null distribution of the balanced accuracy. p_value: float p-value """ # Computing the accuracy param_grid = [{'C': np.logspace(-5, 5, 20)}] if subjects: acc = compute_svm_subjects(K, y, n_folds) else: acc = compute_svm_score_nestedCV(K, y, n_folds, param_grid=param_grid, random_state=random_state) if verbose: print("Mean balanced accuracy = %s" % (acc)) print("Computing the null-distribution.") # Computing the null-distribution # acc_null = np.zeros(iterations) # for i in range(iterations): # if verbose and (i % 1000) == 0: # print(i), # stdout.flush() # y_perm = np.random.permutation(y) # acc_null[i] = compute_svm_score_nestedCV(K, y_perm, n_folds, # param_grid=param_grid) # if verbose: # print '' # Computing the null-distribution if subjects: yis = [permutation_subjects(y) for i in range(iterations)] acc_null = Parallel(n_jobs=-1)(delayed(compute_svm_subjects)(K, yis[i], n_folds) for i in range(iterations)) else: yis = [np.random.permutation(y) for i in range(iterations)] acc_null = Parallel(n_jobs=-1)(delayed(compute_svm_score_nestedCV)(K, yis[i], n_folds, scoring=balanced_accuracy_scoring, param_grid=param_grid) for i in range(iterations)) # acc_null = Parallel(n_jobs=-1)(delayed(compute_svm_cv)(K, yis[i], C=100., n_folds=n_folds) for i in range(iterations)) p_value = max(1.0 / iterations, (acc_null > acc).sum() / float(iterations)) if verbose: print("p-value ~= %s \t (resolution : %s)" % (p_value, 1.0/iterations)) return acc, acc_null, p_value def apply_ktst(K, y, iterations=10000, subjects=False, verbose=True): """ Compute MMD^2_u, its null distribution and the p-value of the kernel two-sample test. Parameters: ---------- K: array-like Kernel matrix y: array_like class labels verbose: bool Verbosity Returns: ------- mmd2u: float MMD^2_u value. acc_null: array Null distribution of the MMD^2_u p_value: float p-value """ assert len(np.unique(y)) == 2, 'KTST only works on binary problems' # Assuming that the first m rows of the kernel matrix are from one # class and the other n rows from the second class. m = len(y[y == 0]) n = len(y[y == 1]) mmd2u = MMD2u(K, m, n) if verbose: print("MMD^2_u = %s" % mmd2u) print("Computing the null distribution.") if subjects: perms = [permutation_subjects_ktst(y) for i in range(iterations)] mmd2u_null = compute_null_distribution_given_permutations(K, m, n, perms, iterations) else: mmd2u_null = compute_null_distribution(K, m, n, iterations, verbose=verbose) p_value = max(1.0/iterations, (mmd2u_null > mmd2u).sum() / float(iterations)) if verbose: print("p-value ~= %s \t (resolution : %s)" % (p_value, 1.0/iterations)) return mmd2u, mmd2u_null, p_value def plot_null_distribution(stats, stats_null, p_value, data_name='', stats_name='$MMD^2_u$', save_figure=True): """Plot the observed value for the test statistic, its null distribution and p-value. """ fig = plt.figure() ax = fig.add_subplot(111) prob, bins, patches = plt.hist(stats_null, bins=50, normed=True) ax.plot(stats, prob.max()/30, 'w*', markersize=15, markeredgecolor='k', markeredgewidth=2, label="%s = %s" % (stats_name, stats)) ax.annotate('p-value: %s' % (p_value), xy=(float(stats), prob.max()/9.), xycoords='data', xytext=(-105, 30), textcoords='offset points', bbox=dict(boxstyle="round", fc="1."), arrowprops={"arrowstyle": "->", "connectionstyle": "angle,angleA=0,angleB=90,rad=10"}, ) plt.xlabel(stats_name) plt.ylabel('p(%s)' % stats_name) plt.legend(numpoints=1) plt.title('Data: %s' % data_name) if save_figure: save_dir = 'figures' if not os.path.exists(save_dir): os.makedirs(save_dir) stn = 'ktst' if stats_name == '$MMD^2_u$' else 'clf' fig_name = os.path.join(save_dir, '%s_%s.pdf' % (data_name, stn)) fig.savefig(fig_name)
emanuele/jstsp2015
classif_and_ktst.py
Python
mit
9,044
#export pid=`ps aux | grep python | grep hello_gevent.py | awk 'NR==1{print $2}' | cut -d' ' -f1`;kill -9 $pid for KILLPID in `ps aux | grep 'python' | grep 'server01' | awk ' { print $2;}'`; do kill -9 $KILLPID; done #ps aux | grep python | grep -v grep | awk '{print $2}' | xargs kill -9
alexp25/d4w_app_lab
utils/rpi/app_exit.sh
Shell
mit
296
<?php class kml_Overlay extends kml_Feature { protected $tagName = 'Overlay'; var $color; var $drawOrder; var $Icon; /* Constructor */ function kml_Overlay() { parent::kml_Feature(); } /* Assignments */ function set_color($color) { $this->color = $color; } function set_drawOrder($drawOrder) { $this->drawOrder = $drawOrder; } function set_Icon($Icon) { $this->Icon = $Icon; } /* Render */ function render($doc) { $X = parent::render($doc); if (isset($this->color)) $X->appendChild(XML_create_text_element($doc, 'color', $this->color)); if (isset($this->drawOrder)) $X->appendChild(XML_create_text_element($doc, 'drawOrder', $this->drawOrder)); if (isset($this->Icon)) $X->appendChild($this->Icon->render($doc)); return $X; } } /* $a = new kml_Overlay(); $a->set_id('1'); $a->dump(false); */
lifelink1987/old.life-link.org
libs/php-kml/kml_Overlay.php
PHP
mit
908
###Simple CMS written in python3 bottle framework by default, project is configured to work on openshift cloud: https://openshift.redhat.com. You only need to add mongodb cartridge and restart app. If you want to deploy app on your own server, you have to configure ```DB_CREDENTIALS``` variable in ```config/__init__.py``` ``` DB_CREDENTIALS = { 'creds': { 'username': 'database username', 'password': 'database password', 'host': 'database host name', 'port': database port #must be integer }, 'db': 'database name' } ``` When application is deployed default user is created for admin interface. ``` username: admin password: admin ``` **It is strongly recomended to change password after deployment.**
unixxxx/simplecms
README.md
Markdown
mit
756
require "importeer_plan/version" require 'importeer_plan/configuration' module ImporteerPlan class Importeer attr_accessor :path, :name, :dir, :size_batch, :sep, :initial, :options #call importeer("filename") to import the file in batches of 1000, optional importeer("filename", size_) def initialize(name, options={}) @options = options @name = name @path = Importeer.dir.join( @name ) @size_batch = options[:size_batch]||1000 @sep = options[:sep]|| ";" @initial = options[:initial]|| false end def self.dir # Rails.root.join('public/imports/') ImporteerPlan.configuration.dir end def bron end def sweep end def importeer sweep bron.each{|batch| importeer_batch batch} end def commaf(str) # comma-float; "1,234" ('%.2f' % str.gsub(',', '.') ).to_f end def pointf(str) # point-float; "1.234" ('%.2f' % str.gsub(',', '.') ).to_f end end class MyXls < Importeer require 'spreadsheet' def initialize(*) super end def bron Spreadsheet.open(@path).worksheet(0).to_a.tap{|x| x.shift}.each_slice(size_batch).each end end class MyCsv< Importeer require 'csv' def initialize(*) super # @sep = options[:sep] end def bron CSV.read(path, { :col_sep => @sep , :encoding => "ISO-8859-1"}).tap{|x| x.shift}.each_slice(@size_batch) end end class MyTxt< Importeer def initialize(*) super end def bron # Csv.open(@path).worksheet(0).to_a.tap{|x| x.shift}.each_slice(size_batch).each end end end
l-plan/importeer_plan
lib/importeer_plan.rb
Ruby
mit
1,598
from collections import namedtuple Resolution = namedtuple('Resolution', ['x', 'y']) class Resolutions(object): resolutions = [ (1920, 1200), (1920, 1080), (1680, 1050), (1440, 900), (1360, 768), (1280, 800), (1024, 640) ] @classmethod def parse(self, x, y): if (x,y) not in self.resolutions: resolutions = ', '.join(['%sx%s' % (a, b) for a,b in self.resolutions]) raise Exception('Resolution %s x %s not supported. Available resolutions: %s' % (x,y, resolutions) ) return Resolution(x, y) class Color(object): gray = (0.15, 0.15, 0.13, 1.0) black = (0.0, 0.0, 0.0, 1.0) white = (1.0, 1.0, 1.0, 1.0) red = (1.0, 0.2, 0.0, 1.0) orange = (1.0, 0.4, 0.0, 1.0) yellow = (1.0, 0.9, 0.0, 1.0) light_green = (0.4, 1.0, 0.0, 1.0) green = (0.0, 1.0, 0.2, 1.0) cyan = (0.0, 1.0, 0.4, 1.0) light_blue = (0.0, 0.6, 1.0, 1.0) blue = (0.0, 0.2, 1.0, 1.0) purple = (0.4, 0.0, 1.0, 1.0) pink = (1.0, 0.0, 0.8, 1.0) @classmethod def __colors(self): return [key for key in self.__dict__.keys() if not key.startswith('_') and key != 'named'] @classmethod def named(self, name): if not hasattr(self, name): colors = ', '.join(self.__colors()) raise Exception('Unknown color %s. Available colors are: %s' % (name, colors)) return getattr(self, name) def try_parse(value): try: return int(value) except: return { 'true': True, 'false': False }.get(value.lower(), value) def read_config(): with open('config.cfg', 'r') as cfg_file: lines = cfg_file.readlines() lines = [ line.strip().replace(' ', '').split('=') for line in lines if line.strip() and '=' in line ] cfg = {key:try_parse(value) for key,value in lines} return cfg cfg = read_config() NUM_CELLS = cfg.get('CELLS', 100) RESOLUTION = Resolutions.parse(cfg.get('WINDOW_WIDTH', 1280), cfg.get('WINDOW_HEIGHT', 800)) limit = min(RESOLUTION) PIXEL_PER_CELL = limit / NUM_CELLS OFFSET_X = (RESOLUTION.x - (NUM_CELLS * PIXEL_PER_CELL)) / 2 OFFSET_Y = (RESOLUTION.y - (NUM_CELLS * PIXEL_PER_CELL)) / 2 SHOW_FULLSCREEN = cfg.get('FULLSCREEN', False) SHOW_GRID = cfg.get('SHOW_GRID', True) BACKGROUND_COLOR = Color.named(cfg.get('BACKGROUND_COLOR', 'black')) GRID_BACKDROP_COLOR = Color.named(cfg.get('GRID_BACKDROP_COLOR', 'gray')) GRID_LINE_COLOR = Color.named(cfg.get('GRID_LINE_COLOR', 'black')) CELL_COLOR = Color.named(cfg.get('CELL_COLOR', 'green')) CURSOR_COLOR = Color.named(cfg.get('CURSOR_COLOR', 'red'))
cessor/gameoflife
config.py
Python
mit
2,820
namespace Dapper.SimpleSave.Tests.Dto { [Table("dbo.OneToManySpecialChild")] [ReferenceData(true)] public class OneToManySpecialChildDto : BaseOneToManyChildDto { } }
Paymentsense/Dapper.SimpleSave
src/Dapper.SimpleSave.Tests/Dto/OneToManySpecialChildDto.cs
C#
mit
186
using System.Diagnostics; namespace AdventOfCode.Day07.SignalProviders { [DebuggerDisplay("{DebuggerDisplay}")] public class Wire : SignalProvider { #region | Properties & fields private readonly Circut _parentCircut; private readonly string _rawProvider; public string ID { get; } private SignalProvider Connection { get; set; } public string DebuggerDisplay => $"{ID}{_rawProvider}"; #endregion #region | ctors public Wire(Circut circut, string wireId, string rawSignalProvider) { _parentCircut = circut; ID = wireId; _rawProvider = rawSignalProvider; } #endregion #region | Non-public members private void ResolveProvider() { Connection = ProviderParser.ParseProviderType(_rawProvider, _parentCircut); } #endregion #region | Overrides public override ushort GetValue() { if (!IsResolved) // cache the value { ResolveProvider(); Value = Connection.GetValue(); IsResolved = true; } return Value; } #endregion } }
vatioz/AdventOfCode
AdventOfCode/Day07/SignalProviders/Wire.cs
C#
mit
1,265
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>18 --> 19</title> <link href="./../../assets/style.css" rel="stylesheet"> </head> <body> <h2>You have to be fast</h2> <a href="./c9030aaf9d04a204bbcb52ab81f7d32203b0d25fa13ca8835e8e8174018d7f33.html">Teleport</a> <hr> <a href="./../../about.md">About</a> (Spoilers! ) <script src="./../../assets/md5.js"></script> <script> window.currentLevel = 7; </script> <script src="./../../assets/script.js"></script> </body> </html>
simonmysun/praxis
TAIHAO2019/pub/SmallGame/AsFastAsYouCan2/c626cc48559647aac2af68227fe2c20bf0ef84e83b8980fa8bf479b27ae81274.html
HTML
mit
550
// // SLWordViewController.h // 百思不得姐 // // Created by Anthony on 17/3/30. // Copyright © 2017年 SLZeng. All rights reserved. // #import "SLTopicViewController.h" @interface SLWordViewController : SLTopicViewController @end
CoderSLZeng/BaiSiBuDeJie
百思不得姐/百思不得姐/Classes/Essence-精华/Controller/SLWordViewController.h
C
mit
243
# Use this setup block to configure all options available in SimpleForm. SimpleForm.setup do |config| # Wrappers are used by the form builder to generate a # complete input. You can remove any component from the # wrapper, change the order or even add your own to the # stack. The options given below are used to wrap the # whole input. config.wrappers :default, class: :input, hint_class: :field_with_hint, error_class: :field_with_errors do |b| ## Extensions enabled by default # Any of these extensions can be disabled for a # given input by passing: `f.input EXTENSION_NAME => false`. # You can make any of these extensions optional by # renaming `b.use` to `b.optional`. # Determines whether to use HTML5 (:email, :url, ...) # and required attributes b.use :html5 # Calculates placeholders automatically from I18n # You can also pass a string as f.input placeholder: "Placeholder" b.use :placeholder ## Optional extensions # They are disabled unless you pass `f.input EXTENSION_NAME => true` # to the input. If so, they will retrieve the values from the model # if any exists. If you want to enable any of those # extensions by default, you can change `b.optional` to `b.use`. # Calculates maxlength from length validations for string inputs b.optional :maxlength # Calculates pattern from format validations for string inputs b.optional :pattern # Calculates min and max from length validations for numeric inputs b.optional :min_max # Calculates readonly automatically from readonly attributes b.optional :readonly ## Inputs b.use :label_input b.use :hint, wrap_with: { tag: :span, class: :hint } b.use :error, wrap_with: { tag: :span, class: :error } ## full_messages_for # If you want to display the full error message for the attribute, you can # use the component :full_error, like: # # b.use :full_error, wrap_with: { tag: :span, class: :error } end # The default wrapper to be used by the FormBuilder. config.default_wrapper = :default # Define the way to render check boxes / radio buttons with labels. # Defaults to :nested for bootstrap config. # inline: input + label # nested: label > input config.boolean_style = :nested # Default class for buttons config.button_class = 'btn' # Method used to tidy up errors. Specify any Rails Array method. # :first lists the first message for each field. # Use :to_sentence to list all errors for each field. # config.error_method = :first # Default tag used for error notification helper. config.error_notification_tag = :div # CSS class to add for error notification helper. config.error_notification_class = 'error_notification' # ID to add for error notification helper. # config.error_notification_id = nil # Series of attempts to detect a default label method for collection. # config.collection_label_methods = [ :to_label, :name, :title, :to_s ] # Series of attempts to detect a default value method for collection. # config.collection_value_methods = [ :id, :to_s ] # You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none. # config.collection_wrapper_tag = nil # You can define the class to use on all collection wrappers. Defaulting to none. # config.collection_wrapper_class = nil # You can wrap each item in a collection of radio/check boxes with a tag, # defaulting to :span. Please note that when using :boolean_style = :nested, # SimpleForm will force this option to be a label. # config.item_wrapper_tag = :span # You can define a class to use in all item wrappers. Defaulting to none. # config.item_wrapper_class = nil # How the label text should be generated altogether with the required text. # config.label_text = lambda { |label, required, explicit_label| "#{required} #{label}" } # You can define the class to use on all labels. Default is nil. # config.label_class = nil # You can define the default class to be used on forms. Can be overriden # with `html: { :class }`. Defaulting to none. # config.default_form_class = nil # You can define which elements should obtain additional classes # config.generate_additional_classes_for = [:wrapper, :label, :input] # Whether attributes are required by default (or not). Default is true. # config.required_by_default = true # Tell browsers whether to use the native HTML5 validations (novalidate form option). # These validations are enabled in SimpleForm's internal config but disabled by default # in this configuration, which is recommended due to some quirks from different browsers. # To stop SimpleForm from generating the novalidate option, enabling the HTML5 validations, # change this configuration to true. config.browser_validations = false # Collection of methods to detect if a file type was given. # config.file_methods = [ :mounted_as, :file?, :public_filename ] # Custom mappings for input types. This should be a hash containing a regexp # to match as key, and the input type that will be used when the field name # matches the regexp as value. # config.input_mappings = { /count/ => :integer } # Custom wrappers for input types. This should be a hash containing an input # type as key and the wrapper that will be used for all inputs with specified type. # config.wrapper_mappings = { string: :prepend } # Namespaces where SimpleForm should look for custom input classes that # override default inputs. # config.custom_inputs_namespaces << "CustomInputs" # Default priority for time_zone inputs. # config.time_zone_priority = nil # Default priority for country inputs. # config.country_priority = nil # When false, do not use translations for labels. # config.translate_labels = true # Automatically discover new inputs in Rails' autoload path. # config.inputs_discovery = true # Cache SimpleForm inputs discovery # config.cache_discovery = !Rails.env.development? # Default class for inputs # config.input_class = nil # Define the default class of the input wrapper of the boolean input. config.boolean_label_class = 'checkbox' # Defines if the default input wrapper class should be included in radio # collection wrappers. # config.include_default_input_wrapper_class = true # Defines which i18n scope will be used in Simple Form. # config.i18n_scope = 'simple_form' end
orbanbotond/subscribem
config/initializers/simple_form.rb
Ruby
mit
6,504
<?php namespace Craft\UserBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; class CraftUserBundle extends Bundle { }
rickogden/craftbeeruk
src/Craft/UserBundle/CraftUserBundle.php
PHP
mit
126
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class TestModel extends CI_Model { public function popular_merchants(){ //include total reviews, sum of reviews, mp_id, unit, building, street, city name, region name, merchant name, merchant image, date and time of application approval, sub category $sql = "(SELECT SUM(gr.rev_rate) AS sum_rev, COUNT(gr.rev_rate) AS total_rev, gr.mp_id AS ref_id,mp.mp_unit AS unit_add,mp.mp_building AS building_add,mp.mp_street AS street_add,ac.city_name AS merchant_city_name,ar.region_name AS merchant_region_name,ma.ma_merchant_name AS merchant_name,ma.ma_application_datetime AS datetime_approve, cs.cs_description AS merchant_sub_cat, gml.logo_name AS merchant_image FROM gl_review gr INNER JOIN gl_merchant_profile mp ON gr.mp_id = mp.mp_id INNER JOIN gl_merchant_application ma ON mp.ma_id = ma.ma_id INNER JOIN gl_address_city ac ON mp.city_id = ac.city_id INNER JOIN gl_address_region ar ON mp.region_id = ar.region_id INNER JOIN gl_category_sub cs ON ma.cs_id = cs.cs_id INNER JOIN gl_merchant_logo gml ON gml.mp_id = mp.mp_id AND ma.pub_id= 1 GROUP BY ref_id ORDER BY sum_rev DESC, datetime_approve ASC LIMIT 12)"; $q = $this->db->query($sql); return ($q->num_rows() > 0) ? $q->result() : false; } public function insert_lang($lang_name,$lang_flag){ $this->db->set('lang_name', $lang_name); $this->db->set('lang_flag', $lang_flag); $this->db->insert('language'); return ($this->db->affected_rows() > 0) ? true : false; } public function check_lang($lang_name){ $this->db->where('lang_name', $lang_name); $q = $this->db->get('language'); return ($q->num_rows() > 0) ? true : false; } public function list_lang(){ $q = $this->db->get('language'); return ($q->num_rows() > 0) ? $q->result_array() : false; } public function delete_lang($lang_id){ $this->db->where('lang_id', $lang_id); $this->db->delete('language'); return ($this->db->affected_rows() > 0) ? true : false; } public function bookmarks($ui_id){ $sql = "SELECT CONCAT_WS('-', REPLACE(`ma`.`ma_merchant_name`, ' ', '-'), REPLACE(`ac`.`city_name`, ' ', '-')) AS `merchant_linkname`, `mp`.`mp_id` AS `merchant_prof_id`, `ma`.`ma_id` AS `merchant_app_id`, `ma`.`ma_merchant_name` AS `merchant_name`, `ma`.`cm_id` AS `merchant_main_cat_id`, `cm`.`cm_category` AS `merchant_main_cat_text`, `ma`.`cs_id` AS `merchant_sub_cat_id`, `cs`.`cs_description` AS `merchant_sub_cat_text`, `ma`.`ma_email` AS `merchant_email`, `ma`.`ma_contact_number` AS `merchant_contact_number`, `ma`.`ma_status` AS `merchant_status`, `bk`.book_id AS `book_id` FROM `gl_bookmark` `bk` LEFT JOIN `gl_merchant_profile` `mp` ON `mp`.`mp_id` = `bk`.`mp_id` LEFT JOIN `gl_merchant_application` `ma` ON `ma`.`ma_id` = `mp`.`ma_id` LEFT JOIN `gl_address_city` `ac` ON `ac`.`city_id` = `mp`.`city_id` LEFT JOIN `gl_category_main` `cm` ON `cm`.`cm_id` = `ma`.`cm_id` LEFT JOIN `gl_category_sub` `cs` ON `cs`.`cs_id` = `ma`.`cs_id` LEFT JOIN `gl_address_region` `ar` ON `ar`.`region_id` = `mp`.`region_id` WHERE `bk`.`ui_id` = '".$ui_id."' "; $q = $this->db->query($sql); return ($q->num_rows() > 0) ? $q->result() : false; } public function check_bookmark($ui_id , $mp_id){ $sql = "SELECT * FROM `gl_bookmark` WHERE `ui_id` = '".$ui_id."' AND `mp_id` = '".$mp_id."'"; $q = $this->db->query($sql); return ($q->num_rows() > 0) ? true : false; } public function add_bookmark($data) { return ($this->db->insert('gl_bookmark',$data))?$this->db->insert_id():false; } public function delete_bookmark($ui_id , $book_id){ $sql = "DELETE FROM `gl_bookmark` WHERE `ui_id` = '".$ui_id."' AND `book_id` = '".$book_id."'"; $q = $this->db->query($sql); return ($this->db->affected_rows() > 0) ? true : false; } }
shiranui03/-_-
application/models/TestModel.php
PHP
mit
3,940
/* * Copyright (c) 2013 Triforce - in association with the University of Pretoria and Epi-Use <Advance/> * * 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. */ package afk.ge.tokyo.ems.nodes; import afk.ge.ems.Node; import afk.ge.tokyo.ems.components.Life; /** * * @author Daniel */ public class LifeNode extends Node { public Life life; }
jwfwessels/AFK
src/afk/ge/tokyo/ems/nodes/LifeNode.java
Java
mit
1,391
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Documentation Module: DBConnector</title> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css"> <link type="text/css" rel="stylesheet" href="styles/site.flatly.css"> </head> <body> <div class="container-fluid"> <div class="navbar navbar-fixed-top "> <div class="navbar-inner"> <a class="brand" href="index.html">Documentation</a> <ul class="nav"> <li class="dropdown"> <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a> <ul class="dropdown-menu "> <li> <a href="module-Dashboard.html">Dashboard</a> </li> <li> <a href="module-DBConnector.html">DBConnector</a> </li> <li> <a href="module-MessageCenter.html">MessageCenter</a> </li> <li> <a href="module-Mocks.html">Mocks</a> </li> <li> <a href="module-Widget.html">Widget</a> </li> <li> <a href="module-WidgetMap.html">WidgetMap</a> </li> </ul> </li> <li class="dropdown"> <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a> <ul class="dropdown-menu "> <li> <a href="module-Dashboard-Dashboard.html">Dashboard</a> </li> <li> <a href="module-Widget-Widget.html">Widget</a> </li> </ul> </li> </ul> </div> </div> <div class="row-fluid"> <div class="span8"> <div id="main"> <h1 class="page-title">Module: DBConnector</h1> <section> <header> <h2> DBConnector </h2> </header> <article> <div class="container-overview"> <div class="description">Database connector module<br> Implements ajax data fetching from Cache back-end</div> <dl class="details"> </dl> </div> <h3 class="subsection-title">Members</h3> <dl> <dt> <h4 class="name" id="defaults"><span class="type-signature">&lt;private> </span>defaults<code><span class="type-signature"> :Object</span></code></h4> </dt> <dd> <div class="description"> Default settings for DBConnector </div> <h5>Type:</h5> <ul> <li> <span class="param-type">Object</span> </li> </ul> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>username</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Username to connect to DB</td> </tr> <tr> <td class="name"><code>password</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Password to connect to DB</td> </tr> </tbody> </table> </dl> </dl> </dd> </dl> <h3 class="subsection-title">Methods</h3> <table class="table table-stripped"> <tr> <td> <h4 class="name" id="acquireData"><span class="type-signature"></span>acquireData<span class="signature">()</span><span class="type-signature"></span></h4> </td> <td> <div class="description"> Does ajax request for data from server </div> <dl class="details"> </dl> <h5>Fires:</h5> <ul> <li>module:MessageCenter#event:*_data_acquired</li> </ul> <h5>Listens to Events:</h5> <ul> <li>module:MessageCenter#event:data_requested</li> </ul> </td> </tr> <tr> <td> <h4 class="name" id="acquireFilters"><span class="type-signature"></span>acquireFilters<span class="signature">()</span><span class="type-signature"></span></h4> </td> <td> <div class="description"> Acquires filter list for cube from server </div> <dl class="details"> </dl> <h5>Fires:</h5> <ul> <li>module:MessageCenter#event:filters_acquired</li> </ul> <h5>Listens to Events:</h5> <ul> <li>module:MessageCenter#event:filters_requested</li> </ul> </td> </tr> <tr> <td> <h4 class="name" id="acquireFilterValues"><span class="type-signature"></span>acquireFilterValues<span class="signature">()</span><span class="type-signature"></span></h4> </td> <td> <div class="description"> Acquire possible values for selected filter </div> <dl class="details"> </dl> <h5>Fires:</h5> <ul> <li>module:MessageCenter#event:filter_list_acquired[path]</li> </ul> <h5>Listens to Events:</h5> <ul> <li>module:MessageCenter#event:filter_list_requested</li> </ul> </td> </tr> <tr> <td> <h4 class="name" id="toString"><span class="type-signature"></span>toString<span class="signature">()</span><span class="type-signature"> &rarr; {String}</span></h4> </td> <td> <dl class="details"> </dl> <h5>Returns:</h5> <div class="param-desc"> Module name </div> <dl> <dt> Type </dt> <dd> <span class="param-type">String</span> </dd> </dl> </td> </tr> </table> </article> </section> </div> <div class="clearfix"></div> <footer> <span class="jsdoc-message"> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha8</a> on 2014-09-11T04:54:51+04:00 using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>. </span> </footer> </div> <div class="span3"> <div id="toc"></div> </div> <br clear="both"> </div> </div> <!--<script src="scripts/sunlight.js"></script>--> <script src="scripts/docstrap.lib.js"></script> <script src="scripts/bootstrap-dropdown.js"></script> <script src="scripts/toc.js"></script> <script> $( function () { $( "#toc" ).toc( { anchorName : function ( i, heading, prefix ) { return $( heading ).attr( "id" ) || ( prefix + i ); }, selectors : "h1,h2,h3,h4", showAndHide : false, scrollTo : 60 } ); $( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" ); $( "#main span[id^='toc']" ).addClass( "toc-shim" ); $('.dropdown-toggle').dropdown(); // $( ".tutorial-section pre, .readme-section pre" ).addClass( "sunlight-highlight-javascript" ).addClass( "linenums" ); $( ".tutorial-section pre, .readme-section pre" ).each( function () { var $this = $( this ); var example = $this.find("code" ); exampleText = example.html(); var lang = /{@lang (.*?)}/.exec( exampleText ); if ( lang && lang[1] ) { exampleText = exampleText.replace( lang[0], "" ); example.html(exampleText); lang = lang[1]; } else { lang = "javascript"; } if ( lang ) { $this .addClass( "sunlight-highlight-" + lang ) .addClass( "linenums" ) .html( example.html() ); } } ); Sunlight.highlightAll( { lineNumbers : false, showMenu:true, enableDoclinks:true } ); } ); </script> <!--Google Analytics--> <!--Navigation and Symbol Display--> </body> </html>
intersystems-ru/DeepSeeMobile
documentation/module-DBConnector.html
HTML
mit
8,717
import * as types from '../actions/types'; const search = (state = [], action) => { switch(action.type) { case types.SEARCH_INPUT_SUCCESS: return action.data; case types.SEARCH_INPUT_FAILED: return action.error.message; default: return state; } }; export default search;
communicode-source/communicode
app/reducers/search.js
JavaScript
mit
341
using System; using System.Collections.Generic; using System.Text; namespace Light.Data.Mysql.Test { class BaseFieldSelectModelNull { #region "Data Property" private int id; /// <summary> /// Id /// </summary> /// <value></value> public int Id { get { return this.id; } set { this.id = value; } } private bool? boolFieldNull; /// <summary> /// BoolField /// </summary> /// <value></value> public bool? BoolFieldNull { get { return this.boolFieldNull; } set { this.boolFieldNull = value; } } private sbyte? sbyteFieldNull; /// <summary> /// SbyteField /// </summary> /// <value></value> public sbyte? SbyteFieldNull { get { return this.sbyteFieldNull; } set { this.sbyteFieldNull = value; } } private byte? byteFieldNull; /// <summary> /// ByteField /// </summary> /// <value></value> public byte? ByteFieldNull { get { return this.byteFieldNull; } set { this.byteFieldNull = value; } } private short? int16FieldNull; /// <summary> /// Int16Field /// </summary> /// <value></value> public short? Int16FieldNull { get { return this.int16FieldNull; } set { this.int16FieldNull = value; } } private ushort? uInt16FieldNull; /// <summary> /// UInt16Field /// </summary> /// <value></value> public ushort? UInt16FieldNull { get { return this.uInt16FieldNull; } set { this.uInt16FieldNull = value; } } private int? int32FieldNull; /// <summary> /// Int32Field /// </summary> /// <value></value> public int? Int32FieldNull { get { return this.int32FieldNull; } set { this.int32FieldNull = value; } } private uint? uInt32FieldNull; /// <summary> /// UInt32Field /// </summary> /// <value></value> public uint? UInt32FieldNull { get { return this.uInt32FieldNull; } set { this.uInt32FieldNull = value; } } private long? int64FieldNull; /// <summary> /// Int64Field /// </summary> /// <value></value> public long? Int64FieldNull { get { return this.int64FieldNull; } set { this.int64FieldNull = value; } } private ulong? uInt64FieldNull; /// <summary> /// UInt64Field /// </summary> /// <value></value> public ulong? UInt64FieldNull { get { return this.uInt64FieldNull; } set { this.uInt64FieldNull = value; } } private float? floatFieldNull; /// <summary> /// FloatField /// </summary> /// <value></value> public float? FloatFieldNull { get { return this.floatFieldNull; } set { this.floatFieldNull = value; } } private double? doubleFieldNull; /// <summary> /// DoubleField /// </summary> /// <value></value> public double? DoubleFieldNull { get { return this.doubleFieldNull; } set { this.doubleFieldNull = value; } } private decimal? decimalFieldNull; /// <summary> /// DecimalField /// </summary> /// <value></value> public decimal? DecimalFieldNull { get { return this.decimalFieldNull; } set { this.decimalFieldNull = value; } } private DateTime? dateTimeFieldNull; /// <summary> /// DateTimeField /// </summary> /// <value></value> public DateTime? DateTimeFieldNull { get { return this.dateTimeFieldNull; } set { this.dateTimeFieldNull = value; } } private string varcharFieldNull; /// <summary> /// VarcharField /// </summary> /// <value></value> public string VarcharFieldNull { get { return this.varcharFieldNull; } set { this.varcharFieldNull = value; } } private string textFieldNull; /// <summary> /// TextField /// </summary> /// <value></value> public string TextFieldNull { get { return this.textFieldNull; } set { this.textFieldNull = value; } } private byte[] bigDataFieldNull; /// <summary> /// BigDataField /// </summary> /// <value></value> public byte[] BigDataFieldNull { get { return this.bigDataFieldNull; } set { this.bigDataFieldNull = value; } } private EnumInt32Type enumInt32FieldNull; /// <summary> /// EnumInt32Field /// </summary> /// <value></value> public EnumInt32Type EnumInt32FieldNull { get { return this.enumInt32FieldNull; } set { this.enumInt32FieldNull = value; } } private EnumInt64Type enumInt64FieldNull; /// <summary> /// EnumInt64Field /// </summary> /// <value></value> public EnumInt64Type EnumInt64FieldNull { get { return this.enumInt64FieldNull; } set { this.enumInt64FieldNull = value; } } #endregion } }
aquilahkj/Light.Data2
test/Light.Data.Mysql.Test/Model/BaseFieldSelectModelNull.cs
C#
mit
6,702
// // YWPayViewController.h // YuWa // // Created by 黄佳峰 on 16/10/10. // Copyright © 2016年 Shanghai DuRui Information Technology Company. All rights reserved. // #import <UIKit/UIKit.h> typedef NS_ENUM(NSInteger,PayCategory){ PayCategoryQRCodePay=0, //二维码支付 PayCategoryWritePay //手写支付 }; @interface YWPayViewController : UIViewController @property(nonatomic,assign)PayCategory whichPay; //哪种支付 @property(nonatomic,strong)NSString*shopID; //店铺的id @property(nonatomic,strong)NSString*shopName; //店铺的名字 @property(nonatomic,assign)CGFloat shopZhekou; //店铺的折扣 //如果是 扫码支付 就得有下面的参数 否则就不需要 @property(nonatomic,assign)CGFloat payAllMoney; //需要支付的总额 @property(nonatomic,assign)CGFloat NOZheMoney; //不打折的金额 //---------------------------------------------- //折扣多少 +(instancetype)payViewControllerCreatWithWritePayAndShopNameStr:(NSString*)shopName andShopID:(NSString*)shopID andZhekou:(CGFloat)shopZhekou; +(instancetype)payViewControllerCreatWithQRCodePayAndShopNameStr:(NSString*)shopName andShopID:(NSString*)shopID andZhekou:(CGFloat)shopZhekou andpayAllMoney:(CGFloat)payAllMoney andNOZheMoney:(CGFloat)NOZheMoney; @end
daidi-double/_new_YWB
YuWa/YuWa/Contents/HomePage/支付界面/YWPayViewController.h
C
mit
1,300
.ui.video{position:relative;max-width:100%}.ui.video .placeholder{background-color:#333;display:block;width:100%;height:100%}.ui.video .embed,.ui.video.active .placeholder,.ui.video.active .play{display:none}.ui.video .play{cursor:pointer;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";filter:alpha(opacity=60);opacity:.6;-webkit-transition:opacity .3s;-moz-transition:opacity .3s;transition:opacity .3s}.ui.video .play.icon:before{position:absolute;top:50%;left:50%;z-index:11;font-size:6rem;margin:-3rem 0 0 -3rem;color:#FFF;text-shadow:0 3px 3px rgba(0,0,0,.4)}.ui.video .play:hover{opacity:1}.ui.video.active .embed{display:block}
pkaminski/Semantic-UI
build/minified/modules/video.min.css
CSS
mit
717
<?php use PHPUnit\Framework\TestCase; use voku\helper\HtmlDomHelper; use voku\helper\HtmlDomParser; /** * @internal */ final class SimpleHtmlHelperTest extends TestCase { public function testMergeHtmlAttributes() { $result = HtmlDomHelper::mergeHtmlAttributes( '<div class="foo" id="bar" data-foo="bar"></div>', 'class="foo2" data-lall="foo"', '#bar' ); self::assertSame('<div class="foo foo2" id="bar" data-foo="bar" data-lall="foo"></div>', $result); } }
voku/simple_html_dom
tests/SimpleHtmlHelperTest.php
PHP
mit
535
<?php namespace Youshido\CommentsBundle; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\Bundle\Bundle; use Youshido\CommentsBundle\DependencyInjection\CompilerPass\CommentsCompilerPass; /** * Class CommentsBundle */ class CommentsBundle extends Bundle { /** * @param ContainerBuilder $container */ public function build(ContainerBuilder $container) { parent::build($container); $container->addCompilerPass(new CommentsCompilerPass()); } }
Youshido/CommentsBundle
CommentsBundle.php
PHP
mit
533
<table width="90%" border="0"><tr><td><script>function openfile(url) {fullwin = window.open(url, "fulltext", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes");}</script><div class="layoutclass_pic"><div class="layoutclass_first_pic"><table class="ztable"><tr><th class="ztd1"><b>成語&nbsp;</b></th><td class="ztd2">後起之秀</td></tr> <tr><th class="ztd1"><b>典故說明&nbsp;</b></th><td class="ztd2"> 王忱是東晉的才子,在年輕的時候就已經很有文名,曾當過荊州刺史、建武將軍。他的舅父范甯是當時有名的學者,經常會有一些知名人士前來拜訪他。有一次王忱到范甯家中拜訪,正好有一個叫張玄的人也來拜訪范甯,張玄的學問淵博,也是當時一個有名望的學者。范甯認為他們兩人都是一時俊彥,想介紹他們認識,就請他們彼此交談。張玄覺得自己年紀稍長,就沒有先向王忱開口。結果王忱見張玄不願先開口,自己也不說話。兩人沈默地對坐了很久,最後張玄很失望地離去。范甯見到這種情形,便問王忱說︰「張玄是一個很有才華的人,你怎麼不跟他聊聊呢?」王忱回答道:「如果他真的想要認識我,可以先開口跟我說話啊!」范甯聽了,覺得王忱年紀雖輕,卻自視不凡,便稱讚他說:「你的才智抱負那麼高,真是後來之秀啊!」典源又見《晉書.卷四三.郭舒傳》。「後起之秀」在此處亦用來稱讚郭舒是年輕一輩中的優秀人物。後來「後起之秀」這句成語就從這裡演變而出,用來稱譽後輩中的優秀人物。</font></td></tr> </td></tr></table></div> <!-- layoutclass_first_pic --><div class="layoutclass_second_pic"></div> <!-- layoutclass_second_pic --></div> <!-- layoutclass_pic --></td></tr></table>
BuzzAcademy/idioms-moe-unformatted-data
all-data/0-999/876-32.html
HTML
mit
1,868
#include <stdio.h> #include <set> #include <utility> #include <vector> using namespace std; const int MAXN = 1e+2; int n, x0, y0; typedef pair<int, int> point; set<point> s; int cross(int x0, int y0, const point &a, const point &b) { return (a.first - x0) * (b.second - y0) - (a.second - y0) * (b.first - x0); } int main() { scanf("%d %d %d", &n, &x0, &y0); int x, y; for (int i = 0; i < n; i++) { scanf("%d %d", &x, &y); s.emplace(x, y); } int n = s.size(); vector<point> v(s.begin(), s.end()); vector<bool> dead(n); int count = 0; for (int i = 0; i < n; i++) { if (dead[i]) { continue; } dead[i] = true; count++; for (int j = i + 1; j < n; j++) { if (dead[j]) { continue; } if (!cross(x0, y0, v[i], v[j])) { dead[j] = true; } } } printf("%d\n", count); }
aLagoG/kygerand
and/semana_i2018/dia_3/han_solo_lazer_gun.cpp
C++
mit
967
// 1000. 连通性问题 #include <iostream> using namespace std; int unionFind[100001]; int find(int val) { if (val == unionFind[val]) return val; unionFind[val] = find(unionFind[val]); return unionFind[val]; } int main() { int a, b; for (int i = 0; i < 100001; i++) { unionFind[i] = i; } while (cin >> a >> b) { if (find(a) != find(b)) { cout << a << ' ' << b << endl; unionFind[find(a)] = unionFind[find(b)]; } } }
MegaShow/college-programming
Homework/Data Structures and Algorithms/GJR/5 Weightd Graph Algorithms/1000.cpp
C++
mit
461
# This file is autogenerated. Do not edit it manually. # If you want change the content of this file, edit # # spec/fixtures/responses/whois.nic.pw/status_available # # and regenerate the tests with the following script # # $ scripts/generate_tests.py # from nose.tools import * from dateutil.parser import parse as time_parse import yawhois class TestWhoisNicPwStatusAvailable(object): def setUp(self): fixture_path = "spec/fixtures/responses/whois.nic.pw/status_available.txt" host = "whois.nic.pw" part = yawhois.record.Part(open(fixture_path, "r").read(), host) self.record = yawhois.record.Record(None, [part]) def test_status(self): eq_(self.record.status, []) def test_available(self): eq_(self.record.available, True) def test_domain(self): eq_(self.record.domain, None) def test_nameservers(self): eq_(self.record.nameservers.__class__.__name__, 'list') eq_(self.record.nameservers, []) def test_admin_contacts(self): eq_(self.record.admin_contacts.__class__.__name__, 'list') eq_(self.record.admin_contacts, []) def test_registered(self): eq_(self.record.registered, False) def test_created_on(self): eq_(self.record.created_on, None) def test_registrar(self): eq_(self.record.registrar, None) def test_registrant_contacts(self): eq_(self.record.registrant_contacts.__class__.__name__, 'list') eq_(self.record.registrant_contacts, []) def test_technical_contacts(self): eq_(self.record.technical_contacts.__class__.__name__, 'list') eq_(self.record.technical_contacts, []) def test_updated_on(self): eq_(self.record.updated_on, None) def test_domain_id(self): eq_(self.record.domain_id, None) def test_expires_on(self): eq_(self.record.expires_on, None) def test_disclaimer(self): eq_(self.record.disclaimer, None)
huyphan/pyyawhois
test/record/parser/test_response_whois_nic_pw_status_available.py
Python
mit
2,000
<?php class ProvinceModel extends CI_Model { function __construct() { parent::__construct(); } /** * 插入数据 * @param $insertRows * @return mixed */ function insert_entry($insertRows) { foreach ($insertRows as $key => $val) { $this->$key = $val; } $res = $this->db->insert('province', $this); return $res; } /** * 修改数据 * @param $updateRows * @return mixed */ function update_entry($updateRows) { foreach ($updateRows as $key => $val) { if ($key !== 'id') { $this->$key = $val; } } $res = $this->db->update('province', $this, array('id' => $updateRows['id'])); return $res; } /** * 查询数据 * @param string $field * @param $where * @param int $offset * @param int $count * @return mixed */ function getData($field = '*', $where = '', $offset = 0, $count = 20) { $this->db->select($field); if (!empty($where) && is_array($where)) { foreach ($where as $key => $val) { $this->db->where($key, $val); } } $query = $this->db->get('province', $count, $offset); return $query->result(); } /** * 获取数据总量 * @return mixed */ function getCount() { return $this->db->count_all('province'); } }
onlySun/daxue
application/models/provinceModel.php
PHP
mit
1,537
.sidenav { height: 100%; width: 0; position: fixed; z-index: 1; top: 0; left: 0; background-color: #111; overflow-x: hidden; transition: 0.5s; padding-top: 60px; } .sidenav a { padding: 8px 8px 8px 32px; text-decoration: none; font-size: 25px; color: #818181; display: block; transition: 0.3s; } .sidenav a:hover, .offcanvas a:focus{ color: #f1f1f1; } .sidenav .closebtn { position: absolute; top: 0; right: 25px; font-size: 36px; margin-left: 50px; } @media screen and (max-height: 450px) { .sidenav {padding-top: 15px;} .sidenav a {font-size: 18px;} }
vvn050/WebStoreMEAN
public/spastore/src/app/navigation/main-navigation/main-navigation.component.css
CSS
mit
650
#!/bin/sh sqlite3 -echo db/test.db < db/schema_context_a.sql
DDD-Hamburg/ddd-in-legacy-systems
scripts/setup-db.sh
Shell
mit
61
<?xml version="1.0" ?><!DOCTYPE TS><TS language="fa" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About KCz</source> <translation>در مورد KCz</translation> </message> <message> <location line="+39"/> <source>&lt;b&gt;KCz&lt;/b&gt; version</source> <translation>نسخه KCz</translation> </message> <message> <location line="+57"/> <source> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young ([email protected]) and UPnP software written by Thomas Bernard.</source> <translation>⏎ ⏎ این نسخه نرم افزار آزمایشی است⏎ ⏎ نرم افزار تحت لیسانس MIT/X11 منتشر شده است. به فایل coping یا آدرس http://www.opensource.org/licenses/mit-license.php. مراجعه شود⏎ ⏎ این محصول شامل نرم افزاری است که با OpenSSL برای استفاده از OpenSSL Toolkit (http://www.openssl.org/) و نرم افزار نوشته شده توسط اریک یانگ ([email protected] ) و UPnP توسط توماس برنارد طراحی شده است.</translation> </message> <message> <location filename="../aboutdialog.cpp" line="+14"/> <source>Copyright</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The KCz developers</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation>فهرست آدرس</translation> </message> <message> <location line="+19"/> <source>Double-click to edit address or label</source> <translation>برای ویرایش آدرس یا بر چسب دو بار کلیک کنید</translation> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation>آدرس جدید ایجاد کنید</translation> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation>آدرس انتخاب شده در سیستم تخته رسم گیره دار کپی کنید</translation> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation>آدرس جدید</translation> </message> <message> <location filename="../addressbookpage.cpp" line="+63"/> <source>These are your KCz 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>این آدرسها، آدرسهای KCz شما برای دریافت وجوه هستند. شما ممکن است آدرسهای متفاوت را به هر گیرنده اختصاص دهید که بتوانید مواردی که پرداخت می کنید را پیگیری نمایید</translation> </message> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>&amp;Copy Address</source> <translation>کپی آدرس</translation> </message> <message> <location line="+11"/> <source>Show &amp;QR Code</source> <translation>نمایش &amp;کد QR</translation> </message> <message> <location line="+11"/> <source>Sign a message to prove you own a KCz address</source> <translation>پیام را برای اثبات آدرس KCz خود امضا کنید</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation>امضا و پیام</translation> </message> <message> <location line="+25"/> <source>Delete the currently selected address from the list</source> <translation>آدرس انتخاب شده در سیستم تخته رسم گیره دا حذف</translation> </message> <message> <location line="+27"/> <source>Export the data in the current tab to a file</source> <translation>داده ها نوارِ جاری را به فایل انتقال دهید</translation> </message> <message> <location line="+3"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>Verify a message to ensure it was signed with a specified KCz address</source> <translation>یک پیام را برای حصول اطمینان از ورود به سیستم با آدرس KCz مشخص، شناسایی کنید</translation> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation>شناسایی پیام</translation> </message> <message> <location line="+14"/> <source>&amp;Delete</source> <translation>حذف</translation> </message> <message> <location filename="../addressbookpage.cpp" line="-5"/> <source>These are your KCz addresses for sending payments. Always check the amount and the receiving address before sending coins.</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Copy &amp;Label</source> <translation>کپی و برچسب گذاری</translation> </message> <message> <location line="+1"/> <source>&amp;Edit</source> <translation>ویرایش</translation> </message> <message> <location line="+1"/> <source>Send &amp;Coins</source> <translation type="unfinished"/> </message> <message> <location line="+260"/> <source>Export Address Book Data</source> <translation>آدرس انتخاب شده در سیستم تخته رسم گیره دار کپی کنید</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Comma separated file (*.csv)</translation> </message> <message> <location line="+13"/> <source>Error exporting</source> <translation>خطای صدور</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>تا فایل %1 نمی شود نوشت</translation> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+144"/> <source>Label</source> <translation>بر چسب</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>آدرس</translation> </message> <message> <location line="+36"/> <source>(no label)</source> <translation>بدون برچسب</translation> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation>دیالوگ Passphrase </translation> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation>وارد عبارت عبور</translation> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation>عبارت عبور نو</translation> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation>تکرار عبارت عبور نو</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="+33"/> <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>وارد کنید..&amp;lt;br/&amp;gt عبارت عبور نو در پنجره 10 یا بیشتر کاراکتورهای تصادفی استفاده کنید &amp;lt;b&amp;gt لطفا عبارت عبور</translation> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation>رمز بندی پنجره</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation>این عملیت نیاز عبارت عبور پنجره شما دارد برای رمز گشایی آن</translation> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation>تکرار عبارت عبور نو</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation>این عملیت نیاز عبارت عبور شما دارد برای رمز بندی آن</translation> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation>رمز بندی پنجره</translation> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation>تغییر عبارت عبور</translation> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation>عبارت عبور نو و قدیم در پنجره وارد کنید</translation> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation>تایید رمز گذاری</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 BITCOMMODITIZ&lt;/b&gt;!</source> <translation>هشدار: اگر wallet رمزگذاری شود و شما passphrase را گم کنید شما همه اطلاعات KCz را از دست خواهید داد.</translation> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation>آیا اطمینان دارید که می خواهید wallet رمزگذاری شود؟</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 type="unfinished"/> </message> <message> <location line="+100"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation>هشدار: Caps lock key روشن است</translation> </message> <message> <location line="-130"/> <location line="+58"/> <source>Wallet encrypted</source> <translation>تغییر عبارت عبور</translation> </message> <message> <location line="-56"/> <source>KCz will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your KCzs from being stolen by malware infecting your computer.</source> <translation>Biticon هم اکنون بسته می‌شود تا فرایند رمزگذاری را تمام کند. به خاطر داشته باشید که رمزگذاری کیف پولتان نمی‌تواند به طور کامل بیتیکون‌های شما را در برابر دزدیده شدن توسط بدافزارهایی که رایانه شما را آلوده می‌کنند، محافظت نماید.</translation> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+42"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation>عبارت عبور نو و قدیم در پنجره وارد کنید</translation> </message> <message> <location line="-54"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation>تنا موفق رمز بندی پنجره ناشی از خطای داخل شد. پنجره شما مرز بندی نشده است</translation> </message> <message> <location line="+7"/> <location line="+48"/> <source>The supplied passphrases do not match.</source> <translation>عبارت عبور عرضه تطابق نشد</translation> </message> <message> <location line="-37"/> <source>Wallet unlock failed</source> <translation>نجره رمز گذار شد</translation> </message> <message> <location line="+1"/> <location line="+11"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation>اموفق رمز بندی پنجر</translation> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation>ناموفق رمز بندی پنجره</translation> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation>wallet passphrase با موفقیت تغییر یافت</translation> </message> </context> <context> <name>BitcoinGUI</name> <message> <location filename="../bitcoingui.cpp" line="+233"/> <source>Sign &amp;message...</source> <translation>امضا و پیام</translation> </message> <message> <location line="+280"/> <source>Synchronizing with network...</source> <translation>همگام سازی با شبکه ...</translation> </message> <message> <location line="-349"/> <source>&amp;Overview</source> <translation>بررسی اجمالی</translation> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation>نمای کلی پنجره نشان بده</translation> </message> <message> <location line="+20"/> <source>&amp;Transactions</source> <translation>&amp;معاملات</translation> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation>نمایش تاریخ معاملات</translation> </message> <message> <location line="+7"/> <source>Edit the list of stored addresses and labels</source> <translation>ویرایش لیست آدرسها و بر چسب های ذخیره ای</translation> </message> <message> <location line="-14"/> <source>Show the list of addresses for receiving payments</source> <translation>نمایش لیست آدرس ها برای در یافت پر داخت ها</translation> </message> <message> <location line="+31"/> <source>E&amp;xit</source> <translation>خروج</translation> </message> <message> <location line="+1"/> <source>Quit application</source> <translation>خروج از برنامه </translation> </message> <message> <location line="+4"/> <source>Show information about KCz</source> <translation>نمایش اطلاعات در مورد بیتکویین</translation> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation>درباره &amp;Qt</translation> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation>نمایش اطلاعات درباره Qt</translation> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation>تنظیمات...</translation> </message> <message> <location line="+6"/> <source>&amp;Encrypt Wallet...</source> <translation>رمزگذاری wallet</translation> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation>پشتیبان گیری از wallet</translation> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation>تغییر Passphrase</translation> </message> <message> <location line="+285"/> <source>Importing blocks from disk...</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Reindexing blocks on disk...</source> <translation type="unfinished"/> </message> <message> <location line="-347"/> <source>Send coins to a KCz address</source> <translation>سکه ها را به آدرس bitocin ارسال کن</translation> </message> <message> <location line="+49"/> <source>Modify configuration options for KCz</source> <translation>انتخابهای پیکربندی را برای KCz اصلاح کن</translation> </message> <message> <location line="+9"/> <source>Backup wallet to another location</source> <translation>نسخه پیشتیبان wallet را به محل دیگر انتقال دهید</translation> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation>عبارت عبور رمز گشایی پنجره تغییر کنید</translation> </message> <message> <location line="+6"/> <source>&amp;Debug window</source> <translation>اشکال زدایی از صفحه</translation> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation>کنسول اشکال زدایی و تشخیص را باز کنید</translation> </message> <message> <location line="-4"/> <source>&amp;Verify message...</source> <translation>بازبینی پیام</translation> </message> <message> <location line="-165"/> <location line="+530"/> <source>KCz</source> <translation>یت کویین </translation> </message> <message> <location line="-530"/> <source>Wallet</source> <translation>wallet</translation> </message> <message> <location line="+101"/> <source>&amp;Send</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Receive</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>&amp;Addresses</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>&amp;About KCz</source> <translation>در مورد KCz</translation> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation>&amp;نمایش/ عدم نمایش</translation> </message> <message> <location line="+1"/> <source>Show or hide the main Window</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Encrypt the private keys that belong to your wallet</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Sign messages with your KCz addresses to prove you own them</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Verify messages to ensure they were signed with specified KCz addresses</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>&amp;File</source> <translation>فایل</translation> </message> <message> <location line="+7"/> <source>&amp;Settings</source> <translation>تنظیمات</translation> </message> <message> <location line="+6"/> <source>&amp;Help</source> <translation>کمک</translation> </message> <message> <location line="+9"/> <source>Tabs toolbar</source> <translation>نوار ابزار زبانه ها</translation> </message> <message> <location line="+17"/> <location line="+10"/> <source>[testnet]</source> <translation>آزمایش شبکه</translation> </message> <message> <location line="+47"/> <source>KCz client</source> <translation>مشتری KCz</translation> </message> <message numerus="yes"> <location line="+141"/> <source>%n active connection(s) to KCz network</source> <translation><numerusform>در صد ارتباطات فعال بیتکویین با شبکه %n</numerusform></translation> </message> <message> <location line="+22"/> <source>No block source available...</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Processed %1 of %2 (estimated) blocks of transaction history.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Processed %1 blocks of transaction history.</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+20"/> <source>%n hour(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n week(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>%1 behind</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Last received block was generated %1 ago.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Transactions after this will not yet be visible.</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>Error</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="+70"/> <source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source> <translation type="unfinished"/> </message> <message> <location line="-140"/> <source>Up to date</source> <translation>تا تاریخ</translation> </message> <message> <location line="+31"/> <source>Catching up...</source> <translation>ابتلا به بالا</translation> </message> <message> <location line="+113"/> <source>Confirm transaction fee</source> <translation>هزینه تراکنش را تایید کنید</translation> </message> <message> <location line="+8"/> <source>Sent transaction</source> <translation>معامله ارسال شده</translation> </message> <message> <location line="+0"/> <source>Incoming transaction</source> <translation>معامله در یافت شده</translation> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation>تاریخ %1 مبلغ%2 نوع %3 آدرس %4</translation> </message> <message> <location line="+33"/> <location line="+23"/> <source>URI handling</source> <translation>مدیریت URI</translation> </message> <message> <location line="-23"/> <location line="+23"/> <source>URI can not be parsed! This can be caused by an invalid KCz address or malformed URI parameters.</source> <translation>URI قابل تحلیل نیست. این خطا ممکن است به دلیل ادرس LITECOIN اشتباه یا پارامترهای اشتباه URI رخ داده باشد</translation> </message> <message> <location line="+17"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation>زمایش شبکهه</translation> </message> <message> <location line="+8"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source> <translation>زمایش شبکه</translation> </message> <message> <location filename="../bitcoin.cpp" line="+111"/> <source>A fatal error occurred. KCz can no longer continue safely and will quit.</source> <translation>خطا روی داده است. KCz نمی تواند بدون مشکل ادامه دهد و باید بسته شود</translation> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+104"/> <source>Network Alert</source> <translation>پیام شبکه</translation> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation>اصلاح آدرس</translation> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation>بر چسب</translation> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation>بر چسب با دفتر آدرس ورود مرتبط است</translation> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation>آدرس</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>آدرس با دفتر آدرس ورودی مرتبط است. این فقط در مورد آدرسهای ارسال شده است</translation> </message> <message> <location filename="../editaddressdialog.cpp" line="+21"/> <source>New receiving address</source> <translation>آدرس در یافت نو</translation> </message> <message> <location line="+4"/> <source>New sending address</source> <translation>آدرس ارسال نو</translation> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation>اصلاح آدرس در یافت</translation> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation>اصلاح آدرس ارسال</translation> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation>%1آدرس وارد شده دیگر در دفتر آدرس است</translation> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid KCz address.</source> <translation>آدرس وارد شده %1 یک ادرس صحیح KCz نیست</translation> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation>رمز گشایی پنجره امکان پذیر نیست</translation> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation>کلید نسل جدید ناموفق است</translation> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+424"/> <location line="+12"/> <source>KCz-Qt</source> <translation>KCz-Qt</translation> </message> <message> <location line="-12"/> <source>version</source> <translation>نسخه</translation> </message> <message> <location line="+2"/> <source>Usage:</source> <translation>ستفاده :</translation> </message> <message> <location line="+1"/> <source>command-line options</source> <translation>انتخابها برای خطوط دستور command line</translation> </message> <message> <location line="+4"/> <source>UI options</source> <translation>انتخابهای UI </translation> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation>زبان را تنظیم کنید برای مثال &quot;de_DE&quot; (پیش فرض: system locale)</translation> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation>شروع حد اقل</translation> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation>نمایش صفحه splash در STARTUP (پیش فرض:1)</translation> </message> </context> <context> <name>OptionsDialog</name> <message> <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation>اصلی</translation> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation>اصلی</translation> </message> <message> <location line="+6"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation>دستمزد&amp;پر داخت معامله</translation> </message> <message> <location line="+31"/> <source>Automatically start KCz after logging in to the system.</source> <translation>در زمان ورود به سیستم به صورت خودکار KCz را اجرا کن</translation> </message> <message> <location line="+3"/> <source>&amp;Start KCz on system login</source> <translation>اجرای KCz در زمان ورود به سیستم</translation> </message> <message> <location line="+35"/> <source>Reset all client options to default.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Reset Options</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>&amp;Network</source> <translation>شبکه</translation> </message> <message> <location line="+6"/> <source>Automatically open the KCz client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation>اتوماتیک باز کردن بندر بیتکویین در روتر . این فقط در مواردی می باشد که روتر با کمک یو پ ن پ کار می کند</translation> </message> <message> <location line="+3"/> <source>Map port using &amp;UPnP</source> <translation>درگاه با استفاده از</translation> </message> <message> <location line="+7"/> <source>Connect to the KCz network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation>اتصال به شبکه LITECOIN از طریق پراکسی ساکس (برای مثال وقتی از طریق نرم افزار TOR متصل می شوید)</translation> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy:</source> <translation>اتصال با پراکسی SOCKS</translation> </message> <message> <location line="+9"/> <source>Proxy &amp;IP:</source> <translation>پراکسی و آی.پی.</translation> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation>درس پروکسی</translation> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation>درگاه</translation> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation>درگاه پراکسی (مثال 9050)</translation> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation>SOCKS و نسخه</translation> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation>نسخه SOCKS از پراکسی (مثال 5)</translation> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation>صفحه</translation> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation>tray icon را تنها بعد از کوچک کردن صفحه نمایش بده</translation> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation>حد اقل رساندن در جای نوار ابزار ها</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>حد اقل رساندن در جای خروج بر نامه وقتیکه پنجره بسته است.وقتیکه این فعال است برنامه خاموش می شود بعد از انتخاب دستور خاموش در منیو</translation> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation>کوچک کردن صفحه در زمان بستن</translation> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation>نمایش</translation> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation>میانجی کاربر و زبان</translation> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting KCz.</source> <translation>زبان میانجی کاربر می تواند در اینجا تنظیم شود. این تنظیمات بعد از شروع دوباره RESTART در LITECOIN اجرایی خواهند بود.</translation> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation>واحد برای نمایش میزان وجوه در:</translation> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation>بخش فرعی پیش فرض را برای نمایش میانجی و زمان ارسال سکه ها مشخص و انتخاب نمایید</translation> </message> <message> <location line="+9"/> <source>Whether to show KCz addresses in the transaction list or not.</source> <translation>تا آدرسهای bITCOIN در فهرست تراکنش نمایش داده شوند یا نشوند.</translation> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation>نمایش آدرسها در فهرست تراکنش</translation> </message> <message> <location line="+71"/> <source>&amp;OK</source> <translation>تایید</translation> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation>رد</translation> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation>انجام</translation> </message> <message> <location filename="../optionsdialog.cpp" line="+53"/> <source>default</source> <translation>پیش فرض</translation> </message> <message> <location line="+130"/> <source>Confirm options reset</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Some settings may require a client restart to take effect.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Do you want to proceed?</source> <translation type="unfinished"/> </message> <message> <location line="+42"/> <location line="+9"/> <source>Warning</source> <translation>هشدار</translation> </message> <message> <location line="-9"/> <location line="+9"/> <source>This setting will take effect after restarting KCz.</source> <translation>این تنظیمات پس از اجرای دوباره KCz اعمال می شوند</translation> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation>آدرس پراکسی داده شده صحیح نیست</translation> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation>تراز</translation> </message> <message> <location line="+50"/> <location line="+166"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the KCz network after a connection is established, but this process has not completed yet.</source> <translation>اطلاعات نمایش داده شده روزآمد نیستند.wallet شما به صورت خودکار با شبکه KCz بعد از برقراری اتصال روزآمد می شود اما این فرایند هنوز کامل نشده است.</translation> </message> <message> <location line="-124"/> <source>Balance:</source> <translation>راز:</translation> </message> <message> <location line="+29"/> <source>Unconfirmed:</source> <translation>تایید نشده</translation> </message> <message> <location line="-78"/> <source>Wallet</source> <translation>wallet</translation> </message> <message> <location line="+107"/> <source>Immature:</source> <translation>نابالغ</translation> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation>بالانس/تتمه حساب استخراج شده، نابالغ است /تکمیل نشده است</translation> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation>اخرین معاملات&amp;lt</translation> </message> <message> <location line="-101"/> <source>Your current balance</source> <translation>تزار جاری شما</translation> </message> <message> <location line="+29"/> <source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source> <translation>تعداد معاملات که تایید شده ولی هنوز در تزار جاری شما بر شمار نرفته است</translation> </message> <message> <location filename="../overviewpage.cpp" line="+116"/> <location line="+1"/> <source>out of sync</source> <translation>روزآمد نشده</translation> </message> </context> <context> <name>PaymentServer</name> <message> <location filename="../paymentserver.cpp" line="+107"/> <source>Cannot start KCz: click-to-pay handler</source> <translation type="unfinished"/> </message> </context> <context> <name>QRCodeDialog</name> <message> <location filename="../forms/qrcodedialog.ui" line="+14"/> <source>QR Code Dialog</source> <translation>دیالوگ QR CODE</translation> </message> <message> <location line="+59"/> <source>Request Payment</source> <translation>درخواست پرداخت</translation> </message> <message> <location line="+56"/> <source>Amount:</source> <translation>مقدار:</translation> </message> <message> <location line="-44"/> <source>Label:</source> <translation>برچسب:</translation> </message> <message> <location line="+19"/> <source>Message:</source> <translation>پیام</translation> </message> <message> <location line="+71"/> <source>&amp;Save As...</source> <translation>&amp;ذخیره به عنوان...</translation> </message> <message> <location filename="../qrcodedialog.cpp" line="+62"/> <source>Error encoding URI into QR Code.</source> <translation>خطا در زمان رمزدار کردن URI در کد QR</translation> </message> <message> <location line="+40"/> <source>The entered amount is invalid, please check.</source> <translation>میزان وجه وارد شده صحیح نیست، لطفا بررسی نمایید</translation> </message> <message> <location line="+23"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation>URI ذکر شده بسیار طولانی است، متن برچسب/پیام را کوتاه کنید</translation> </message> <message> <location line="+25"/> <source>Save QR Code</source> <translation>ذخیره کد QR</translation> </message> <message> <location line="+0"/> <source>PNG Images (*.png)</source> <translation>تصاویر با فرمت PNG (*.png)</translation> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation>نام مشتری</translation> </message> <message> <location line="+10"/> <location line="+23"/> <location line="+26"/> <location line="+23"/> <location line="+23"/> <location line="+36"/> <location line="+53"/> <location line="+23"/> <location line="+23"/> <location filename="../rpcconsole.cpp" line="+339"/> <source>N/A</source> <translation>-</translation> </message> <message> <location line="-217"/> <source>Client version</source> <translation>نسخه مشتری</translation> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation>اطلاعات</translation> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation>استفاده از نسخه OPENSSL</translation> </message> <message> <location line="+49"/> <source>Startup time</source> <translation>زمان آغاز STARTUP</translation> </message> <message> <location line="+29"/> <source>Network</source> <translation>شبکه</translation> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation>تعداد اتصالات</translation> </message> <message> <location line="+23"/> <source>On testnet</source> <translation>در testnetکها</translation> </message> <message> <location line="+23"/> <source>Block chain</source> <translation>زنجیره بلاک</translation> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation>تعداد کنونی بلاکها</translation> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation>تعداد تخمینی بلاکها</translation> </message> <message> <location line="+23"/> <source>Last block time</source> <translation>زمان آخرین بلاک</translation> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation>باز کردن</translation> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation>گزینه های command-line</translation> </message> <message> <location line="+7"/> <source>Show the KCz-Qt help message to get a list with possible KCz command-line options.</source> <translation>پیام راهنمای KCz-Qt را برای گرفتن فهرست گزینه های command-line نشان بده</translation> </message> <message> <location line="+3"/> <source>&amp;Show</source> <translation>نمایش</translation> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation>کنسول</translation> </message> <message> <location line="-260"/> <source>Build date</source> <translation>ساخت تاریخ</translation> </message> <message> <location line="-104"/> <source>KCz - Debug window</source> <translation>صفحه اشکال زدایی KCz </translation> </message> <message> <location line="+25"/> <source>KCz Core</source> <translation> هسته KCz </translation> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation>فایلِ لاگِ اشکال زدایی</translation> </message> <message> <location line="+7"/> <source>Open the KCz debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation>فایلِ لاگِ اشکال زدایی KCz را از دایرکتوری جاری داده ها باز کنید. این عملیات ممکن است برای فایلهای لاگِ حجیم طولانی شود.</translation> </message> <message> <location line="+102"/> <source>Clear console</source> <translation>پاکسازی کنسول</translation> </message> <message> <location filename="../rpcconsole.cpp" line="-30"/> <source>Welcome to the KCz RPC console.</source> <translation>به کنسول KCz RPC خوش آمدید</translation> </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>دکمه های بالا و پایین برای مرور تاریخچه و Ctrl-L برای پاکسازی صفحه</translation> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation>با تایپ عبارت HELP دستورهای در دسترس را مرور خواهید کرد</translation> </message> </context> <context> <name>SendCoinsDialog</name> <message> <location filename="../forms/sendcoinsdialog.ui" line="+14"/> <location filename="../sendcoinsdialog.cpp" line="+124"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+6"/> <location line="+5"/> <location line="+5"/> <source>Send Coins</source> <translation>ارسال سکه ها</translation> </message> <message> <location line="+50"/> <source>Send to multiple recipients at once</source> <translation>ارسال چندین در یافت ها فورا</translation> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation>اضافه کردن دریافت کننده</translation> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation>پاک کردن تمام ستون‌های تراکنش</translation> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation>پاکسازی همه</translation> </message> <message> <location line="+22"/> <source>Balance:</source> <translation>تزار :</translation> </message> <message> <location line="+10"/> <source>123.456 BTC</source> <translation>123.456 بتس</translation> </message> <message> <location line="+31"/> <source>Confirm the send action</source> <translation>عملیت دوم تایید کنید</translation> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation>&amp;;ارسال</translation> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-59"/> <source>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</source> <translation>(%3) تا &lt;b&gt;%1&lt;/b&gt; درصد%2</translation> </message> <message> <location line="+5"/> <source>Confirm send coins</source> <translation>ارسال سکه ها تایید کنید</translation> </message> <message> <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation> %1شما متماینید که می خواهید 1% ارسال کنید ؟</translation> </message> <message> <location line="+0"/> <source> and </source> <translation>و</translation> </message> <message> <location line="+23"/> <source>The recipient address is not valid, please recheck.</source> <translation>آدرس گیرنده نادرست است، لطفا دوباره بررسی کنید.</translation> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation>مبلغ پر داخت باید از 0 بیشتر باشد </translation> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation>میزان وجه از بالانس/تتمه حساب شما بیشتر است</translation> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation>کل میزان وجه از بالانس/تتمه حساب شما بیشتر می شود وقتی %1 هزینه تراکنش نیز به ین میزان افزوده می شود</translation> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation>آدرس تکراری یافت شده است، در زمان انجام عملیات به هر آدرس تنها یکبار می توانید اطلاعات ارسال کنید</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>خطا: تراکنش تایید نشد. این پیام زمانی روی می دهد که مقداری از سکه های WALLET شما استفاده شده اند برای مثال اگر شما از WALLET.DAT استفاده کرده اید، ممکن است سکه ها استفاده شده باشند اما در اینجا نمایش داده نشوند</translation> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation>تراز</translation> </message> <message> <location line="+15"/> <source>A&amp;mount:</source> <translation>A&amp;مبلغ :</translation> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation>به&amp;پر داخت :</translation> </message> <message> <location line="+34"/> <source>The address to send the payment to (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation type="unfinished"/> </message> <message> <location line="+60"/> <location filename="../sendcoinsentry.cpp" line="+26"/> <source>Enter a label for this address to add it to your address book</source> <translation>برای آدرس بر پسب وارد کنید که در دفتر آدرس اضافه شود</translation> </message> <message> <location line="-78"/> <source>&amp;Label:</source> <translation>&amp;بر چسب </translation> </message> <message> <location line="+28"/> <source>Choose address from address book</source> <translation>اآدرسن ازدفتر آدرس انتخاب کنید</translation> </message> <message> <location line="+10"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="+7"/> <source>Paste address from clipboard</source> <translation>آدرس از تخته رسم گیره دار پست کنید </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>بر داشتن این در یافت کننده</translation> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a KCz address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>آدرس بیتکویین وارد کنید (bijvoorbeeld: Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> </context> <context> <name>SignVerifyMessageDialog</name> <message> <location filename="../forms/signverifymessagedialog.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation>امضا - امضا کردن /شناسایی یک پیام</translation> </message> <message> <location line="+13"/> <source>&amp;Sign Message</source> <translation>&amp;امضای پیام</translation> </message> <message> <location line="+6"/> <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source> <translation>شما می توانید پیامها را با آدرس خودتان امضا نمایید تا ثابت شود متعلق به شما هستند. مواظب باشید تا چیزی که بدان مطمئن نیستنید را امضا نکنید زیرا حملات فیشینگ در زمان ورود شما به سیستم فریبنده هستند. تنها مواردی را که حاوی اطلاعات دقیق و قابل قبول برای شما هستند را امضا کنید</translation> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>آدرس برای امضا کردن پیام با (برای مثال Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> <message> <location line="+10"/> <location line="+213"/> <source>Choose an address from the address book</source> <translation>یک آدرس را از فهرست آدرسها انتخاب کنید</translation> </message> <message> <location line="-203"/> <location line="+213"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="-203"/> <source>Paste address from clipboard</source> <translation>آدرس از تخته رسم گیره دار پست کنید </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>پیامی را که می‌خواهید امضا کنید در اینجا وارد کنید</translation> </message> <message> <location line="+7"/> <source>Signature</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Copy the current signature to the system clipboard</source> <translation>این امضا را در system clipboard کپی کن</translation> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this KCz address</source> <translation>پیام را برای اثبات آدرس LITECOIN خود امضا کنید</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Reset all sign message fields</source> <translation>تنظیم دوباره تمامی فیلدهای پیام</translation> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation>پاکسازی همه</translation> </message> <message> <location line="-87"/> <source>&amp;Verify Message</source> <translation>تایید پیام</translation> </message> <message> <location line="+6"/> <source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source> <translation>آدرس/پیام خود را وارد کنید (مطمئن شوید که فاصله بین خطوط، فاصله ها، تب ها و ... را دقیقا کپی می کنید) و سپس امضا کنید تا پیام تایید شود. مراقب باشید که پیام را بیشتر از مطالب درون امضا مطالعه نمایید تا فریب شخص سوم/دزدان اینترنتی را نخورید.</translation> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>آدرس برای امضا کردن پیام با (برای مثال Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified KCz address</source> <translation>پیام را برای اطمنان از ورود به سیستم با آدرس LITECOIN مشخص خود،تایید کنید</translation> </message> <message> <location line="+3"/> <source>Verify &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Reset all verify message fields</source> <translation>تنظیم دوباره تمامی فیلدهای پیام تایید شده</translation> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a KCz address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>آدرس بیتکویین وارد کنید (bijvoorbeeld: Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation>با کلیک بر &quot;امضای پیام&quot; شما یک امضای جدید درست می کنید</translation> </message> <message> <location line="+3"/> <source>Enter KCz signature</source> <translation>امضای BITOCOIN خود را وارد کنید</translation> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation>آدرس وارد شده صحیح نیست</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>اطفا آدرس را بررسی کرده و دوباره امتحان کنید</translation> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation>آدرس وارد شده با کلید وارد شده مرتبط نیست</translation> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation>قفل کردن wallet انجام نشد</translation> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation>کلید شخصی برای آدرس وارد شده در دسترس نیست</translation> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation>پیام امضا کردن انجام نشد</translation> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation>پیام امضا شد</translation> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation>امضا نمی تواند رمزگشایی شود</translation> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation>لطفا امضا را بررسی و دوباره تلاش نمایید</translation> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation>امضا با تحلیلِ پیام مطابقت ندارد</translation> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation>عملیات شناسایی پیام انجام نشد</translation> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation>پیام شناسایی شد</translation> </message> </context> <context> <name>SplashScreen</name> <message> <location filename="../splashscreen.cpp" line="+22"/> <source>The KCz developers</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>[testnet]</source> <translation>آزمایش شبکه</translation> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+20"/> <source>Open until %1</source> <translation>باز کردن تا%1</translation> </message> <message> <location line="+6"/> <source>%1/offline</source> <translation>%1 آفلاین</translation> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation>%1 تایید نشده </translation> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation>ایید %1 </translation> </message> <message> <location line="+18"/> <source>Status</source> <translation>وضعیت</translation> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation><numerusform>انتشار از طریق n% گره انتشار از طریق %n گره</numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation>تاریخ </translation> </message> <message> <location line="+7"/> <source>Source</source> <translation>منبع</translation> </message> <message> <location line="+0"/> <source>Generated</source> <translation>تولید شده</translation> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation>فرستنده</translation> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation>گیرنده</translation> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation>آدرس شما</translation> </message> <message> <location line="-2"/> <source>label</source> <translation>برچسب</translation> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation>بدهی </translation> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation><numerusform>بلوغ در n% از بیشتر بلاکها بلوغ در %n از بیشتر بلاکها</numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation>غیرقابل قبول</translation> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation>اعتبار</translation> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation>هزینه تراکنش</translation> </message> <message> <location line="+16"/> <source>Net amount</source> <translation>هزینه خالص</translation> </message> <message> <location line="+6"/> <source>Message</source> <translation>پیام</translation> </message> <message> <location line="+2"/> <source>Comment</source> <translation>نظر</translation> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation>شناسه کاربری برای تراکنش</translation> </message> <message> <location line="+3"/> <source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &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>سکه های ایجاد شده باید 120 بلاک را قبل از استفاده بالغ کنند. در هنگام ایجاد بلاک، آن بلاک در شبکه منتشر می شود تا به زنجیره بلاکها بپیوندد. اگر در زنجیره قرار نگیرد، پیام وضعیت به غیرقابل قبول تغییر می بپیابد و قابل استفاده نیست. این مورد معمولا زمانی پیش می آید که گره دیگری به طور همزمان بلاکی را با فاصل چند ثانیه ای از شما ایجاد کند.</translation> </message> <message> <location line="+7"/> <source>Debug information</source> <translation>اشکال زدایی طلاعات</translation> </message> <message> <location line="+8"/> <source>Transaction</source> <translation>تراکنش</translation> </message> <message> <location line="+3"/> <source>Inputs</source> <translation>درونداد</translation> </message> <message> <location line="+23"/> <source>Amount</source> <translation>مبلغ</translation> </message> <message> <location line="+1"/> <source>true</source> <translation>صحیح</translation> </message> <message> <location line="+0"/> <source>false</source> <translation>نادرست</translation> </message> <message> <location line="-209"/> <source>, has not been successfully broadcast yet</source> <translation>هنوز با مو فقیت ارسال نشده</translation> </message> <message numerus="yes"> <location line="-35"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+70"/> <source>unknown</source> <translation>مشخص نیست </translation> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation>جزییات معاملات</translation> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation>در این قاب شیشه توصیف دقیق معامله نشان می شود</translation> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+225"/> <source>Date</source> <translation>تاریخ</translation> </message> <message> <location line="+0"/> <source>Type</source> <translation>نوع</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>ایل جدا </translation> </message> <message> <location line="+0"/> <source>Amount</source> <translation>مبلغ</translation> </message> <message numerus="yes"> <location line="+57"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+3"/> <source>Open until %1</source> <translation>از شده تا 1%1</translation> </message> <message> <location line="+3"/> <source>Offline (%1 confirmations)</source> <translation>افلایین (%1)</translation> </message> <message> <location line="+3"/> <source>Unconfirmed (%1 of %2 confirmations)</source> <translation>تایید نشده (%1/%2)</translation> </message> <message> <location line="+3"/> <source>Confirmed (%1 confirmations)</source> <translation>تایید شده (%1)</translation> </message> <message numerus="yes"> <location line="+8"/> <source>Mined balance will be available when it matures in %n more block(s)</source> <translation><numerusform>بالانس/تتمه حساب استخراج شده زمانی که %n از بیشتر بلاکها بالغ شدند در دسترس خواهد بود بالانس/تتمه حساب استخراج شده زمانی که n% از بیشتر بلاکها بالغ شدند در دسترس خواهد بود</numerusform></translation> </message> <message> <location line="+5"/> <source>This block was not received by any other nodes and will probably not be accepted!</source> <translation>این بلوک از دیگر گره ها در یافت نشده بدین دلیل شاید قابل قابول نیست</translation> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation>تولید شده ولی قبول نشده</translation> </message> <message> <location line="+43"/> <source>Received with</source> <translation>در یافت با :</translation> </message> <message> <location line="+2"/> <source>Received from</source> <translation>دریافتی از</translation> </message> <message> <location line="+3"/> <source>Sent to</source> <translation>ارسال به :</translation> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation>پر داخت به خودتان</translation> </message> <message> <location line="+2"/> <source>Mined</source> <translation>استخراج</translation> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation>(کاربرد ندارد)</translation> </message> <message> <location line="+199"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation>وضعیت معالمه . عرصه که تعداد تایید نشان می دهد</translation> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation>تاریخ و ساعت در یافت معامله</translation> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation>نوع معاملات</translation> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation>آدرس مقصود معاملات </translation> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation>مبلغ از تزار شما خارج یا وارد شده</translation> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+52"/> <location line="+16"/> <source>All</source> <translation>همه</translation> </message> <message> <location line="-15"/> <source>Today</source> <translation>امروز</translation> </message> <message> <location line="+1"/> <source>This week</source> <translation>این هفته</translation> </message> <message> <location line="+1"/> <source>This month</source> <translation>این ماه</translation> </message> <message> <location line="+1"/> <source>Last month</source> <translation>ماه گذشته</translation> </message> <message> <location line="+1"/> <source>This year</source> <translation>امسال</translation> </message> <message> <location line="+1"/> <source>Range...</source> <translation>محدوده </translation> </message> <message> <location line="+11"/> <source>Received with</source> <translation>در یافت با</translation> </message> <message> <location line="+2"/> <source>Sent to</source> <translation>ارسال به</translation> </message> <message> <location line="+2"/> <source>To yourself</source> <translation>به خودتان </translation> </message> <message> <location line="+1"/> <source>Mined</source> <translation>استخراج</translation> </message> <message> <location line="+1"/> <source>Other</source> <translation>یگر </translation> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation>برای جست‌‌وجو نشانی یا برچسب را وارد کنید</translation> </message> <message> <location line="+7"/> <source>Min amount</source> <translation>حد اقل مبلغ </translation> </message> <message> <location line="+34"/> <source>Copy address</source> <translation>کپی آدرس </translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>کپی بر چسب</translation> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation>روگرفت مقدار</translation> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Edit label</source> <translation>اصلاح بر چسب</translation> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation>جزئیات تراکنش را نمایش بده</translation> </message> <message> <location line="+139"/> <source>Export Transaction Data</source> <translation>صادرات تاریخ معامله</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Comma فایل جدا </translation> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation>تایید شده</translation> </message> <message> <location line="+1"/> <source>Date</source> <translation>تاریخ </translation> </message> <message> <location line="+1"/> <source>Type</source> <translation>نوع </translation> </message> <message> <location line="+1"/> <source>Label</source> <translation>ر چسب</translation> </message> <message> <location line="+1"/> <source>Address</source> <translation>ایل جدا </translation> </message> <message> <location line="+1"/> <source>Amount</source> <translation>مبلغ</translation> </message> <message> <location line="+1"/> <source>ID</source> <translation>آی دی</translation> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation>خطای صادرت</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>تا فایل %1 نمی شود نوشت</translation> </message> <message> <location line="+100"/> <source>Range:</source> <translation>&gt;محدوده</translation> </message> <message> <location line="+8"/> <source>to</source> <translation>به</translation> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+193"/> <source>Send Coins</source> <translation>ارسال سکه ها</translation> </message> </context> <context> <name>WalletView</name> <message> <location filename="../walletview.cpp" line="+42"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Export the data in the current tab to a file</source> <translation>داده ها نوارِ جاری را به فایل انتقال دهید</translation> </message> <message> <location line="+193"/> <source>Backup Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Wallet Data (*.dat)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Backup Failed</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Backup Successful</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The wallet data was successfully saved to the new location.</source> <translation type="unfinished"/> </message> </context> <context> <name>bitcoin-core</name> <message> <location filename="../bitcoinstrings.cpp" line="+94"/> <source>KCz version</source> <translation>سخه بیتکویین</translation> </message> <message> <location line="+102"/> <source>Usage:</source> <translation>ستفاده :</translation> </message> <message> <location line="-29"/> <source>Send command to -server or KCzd</source> <translation>ارسال فرمان به سرور یا باتکویین</translation> </message> <message> <location line="-23"/> <source>List commands</source> <translation>لیست فومان ها</translation> </message> <message> <location line="-12"/> <source>Get help for a command</source> <translation>کمک برای فرمان </translation> </message> <message> <location line="+24"/> <source>Options:</source> <translation>تنظیمات</translation> </message> <message> <location line="+24"/> <source>Specify configuration file (default: KCz.conf)</source> <translation>(: KCz.confپیش فرض: )فایل تنظیمی خاص </translation> </message> <message> <location line="+3"/> <source>Specify pid file (default: KCzd.pid)</source> <translation>(KCzd.pidپیش فرض : ) فایل پید خاص</translation> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation>دایرکتور اطلاعاتی خاص</translation> </message> <message> <location line="-9"/> <source>Set database cache size in megabytes (default: 25)</source> <translation>سایز کَش بانک داده را بر حسب مگابایت تنظیم کنید (پیش فرض:25)</translation> </message> <message> <location line="-28"/> <source>Listen for connections on &lt;port&gt; (default: 9333 or testnet: 19333)</source> <translation>برای اتصالات به &lt;port&gt; (پیش‌فرض: 9333 یا تست‌نت: 19333) گوش کنید</translation> </message> <message> <location line="+5"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation>حداکثر &lt;n&gt; اتصال با همکاران برقرار داشته باشید (پیش‌فرض: 125)</translation> </message> <message> <location line="-48"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation>اتصال به گره برای دریافت آدرسهای قرینه و قطع اتصال</translation> </message> <message> <location line="+82"/> <source>Specify your own public address</source> <translation>آدرس عمومی خود را ذکر کنید</translation> </message> <message> <location line="+3"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation>آستانه برای قطع ارتباط با همکاران بدرفتار (پیش‌فرض: 100)</translation> </message> <message> <location line="-134"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation>مدت زمان به ثانیه برای جلوگیری از همکاران بدرفتار برای اتصال دوباره (پیش‌فرض: 86400)</translation> </message> <message> <location line="-29"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation>در زمان تنظیم درگاه RPX %u در فهرست کردن %s اشکالی رخ داده است</translation> </message> <message> <location line="+27"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 9332 or testnet: 19332)</source> <translation>( 9332پیش فرض :) &amp;lt;poort&amp;gt; JSON-RPC شنوایی برای ارتباطات</translation> </message> <message> <location line="+37"/> <source>Accept command line and JSON-RPC commands</source> <translation>JSON-RPC قابل فرمانها و</translation> </message> <message> <location line="+76"/> <source>Run in the background as a daemon and accept commands</source> <translation>اجرای در پس زمینه به عنوان شبح و قبول فرمان ها</translation> </message> <message> <location line="+37"/> <source>Use the test network</source> <translation>استفاده شبکه آزمایش</translation> </message> <message> <location line="-112"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation>پذیرش اتصالات از بیرون (پیش فرض:1 بدون پراکسی یا اتصال)</translation> </message> <message> <location line="-80"/> <source>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: rpcuser=KCzrpc 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;KCz Alert&quot; [email protected] </source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Cannot obtain a lock on data directory %s. KCz is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation>حجم حداکثر تراکنشهای با/کم اهمیت را به بایت تنظیم کنید (پیش فرض:27000)</translation> </message> <message> <location line="+6"/> <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source> <translation>هشدار:paytxfee بسیار بالا تعریف شده است! این هزینه تراکنش است که باید در زمان ارسال تراکنش بپردازید</translation> </message> <message> <location line="+3"/> <source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source> <translation>هشدار: تراکنش نمایش داده شده ممکن است صحیح نباشد! شما/یا یکی از گره ها به روزآمد سازی نیاز دارید </translation> </message> <message> <location line="+3"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong KCz will not work properly.</source> <translation>هشدار: لطفا زمان و تاریخ رایانه خود را تصحیح نمایید! اگر ساعت رایانه شما اشتباه باشد KCz ممکن است صحیح کار نکند</translation> </message> <message> <location line="+3"/> <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Block creation options:</source> <translation>بستن گزینه ایجاد</translation> </message> <message> <location line="+5"/> <source>Connect only to the specified node(s)</source> <translation>تنها در گره (های) مشخص شده متصل شوید</translation> </message> <message> <location line="+3"/> <source>Corrupted block database detected</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation>آدرس آی.پی. خود را شناسایی کنید (پیش فرض:1 در زمان when listening وno -externalip)</translation> </message> <message> <location line="+1"/> <source>Do you want to rebuild the block database now?</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error initializing block database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error initializing wallet database environment %s!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading block database</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error opening block database</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error: Disk space is low!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error: Wallet locked, unable to create transaction!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error: system error: </source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation>شنیدن هر گونه درگاه انجام پذیر نیست. ازlisten=0 برای اینکار استفاده کیند.</translation> </message> <message> <location line="+1"/> <source>Failed to read block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to read block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to sync block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write file info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write to coin database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write transaction index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write undo data</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Find peers using DNS lookup (default: 1 unless -connect)</source> <translation>قرینه ها را برای جستجوی DNS بیاب (پیش فرض: 1 مگر در زمان اتصال)</translation> </message> <message> <location line="+1"/> <source>Generate coins (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 288, 0 = all)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>How thorough the block verification is (0-4, default: 3)</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Not enough file descriptors available.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Rebuild block chain index from current blk000??.dat files</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Set the number of threads to service RPC calls (default: 4)</source> <translation type="unfinished"/> </message> <message> <location line="+26"/> <source>Verifying blocks...</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Verifying wallet...</source> <translation type="unfinished"/> </message> <message> <location line="-69"/> <source>Imports blocks from external blk000??.dat file</source> <translation type="unfinished"/> </message> <message> <location line="-76"/> <source>Set the number of script verification threads (up to 16, 0 = auto, &lt;0 = leave that many cores free, default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+77"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation>آدرس نرم افزار تور غلط است %s</translation> </message> <message> <location line="+1"/> <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Maintain a full transaction index (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation>حداکثر بافر دریافت شده بر اساس اتصال &lt;n&gt;* 1000 بایت (پیش فرض:5000)</translation> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation>حداکثر بافر دریافت شده بر اساس اتصال &lt;n&gt;* 1000 بایت (پیش فرض:1000)</translation> </message> <message> <location line="+2"/> <source>Only accept block chain matching built-in checkpoints (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation>تنها =به گره ها در شبکه متصا شوید &lt;net&gt; (IPv4, IPv6 or Tor)</translation> </message> <message> <location line="+2"/> <source>Output extra debugging information. Implies all other -debug* options</source> <translation>برونداد اطلاعات اشکال زدایی اضافی. گزینه های اشکال زدایی دیگر رفع شدند</translation> </message> <message> <location line="+1"/> <source>Output extra network debugging information</source> <translation>برونداد اطلاعات اشکال زدایی اضافی برای شبکه</translation> </message> <message> <location line="+2"/> <source>Prepend debug output with timestamp</source> <translation>به خروجی اشکال‌زدایی برچسب زمان بزنید</translation> </message> <message> <location line="+5"/> <source>SSL options: (see the KCz Wiki for SSL setup instructions)</source> <translation>گزینه ssl (به ویکیKCz برای راهنمای راه اندازی ssl مراجعه شود)</translation> </message> <message> <location line="+1"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation>نسخه ای از پراکسی ساکس را برای استفاده انتخاب کنید (4-5 پیش فرض:5)</translation> </message> <message> <location line="+3"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation>اطلاعات ردگیری/اشکال‌زدایی را به جای فایل لاگ اشکال‌زدایی به کنسول بفرستید</translation> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation>اطلاعات ردگیری/اشکال‌زدایی را به اشکال‌زدا بفرستید</translation> </message> <message> <location line="+5"/> <source>Set maximum block size in bytes (default: 250000)</source> <translation>حداکثر سایز بلاک بر اساس بایت تنظیم شود (پیش فرض: 250000)</translation> </message> <message> <location line="+1"/> <source>Set minimum block size in bytes (default: 0)</source> <translation>حداقل سایز بلاک بر اساس بایت تنظیم شود (پیش فرض: 0)</translation> </message> <message> <location line="+2"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation>فایل debug.log را در startup مشتری کوچک کن (پیش فرض:1 اگر اشکال زدایی روی نداد)</translation> </message> <message> <location line="+1"/> <source>Signing transaction failed</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation>(میلی ثانیه )فاصله ارتباط خاص</translation> </message> <message> <location line="+4"/> <source>System error: </source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Transaction amount too small</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction amounts must be positive</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction too large</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation>از UPnP برای شناسایی درگاه شنیداری استفاده کنید (پیش فرض:0)</translation> </message> <message> <location line="+1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation>از UPnP برای شناسایی درگاه شنیداری استفاده کنید (پیش فرض:1 در زمان شنیدن)</translation> </message> <message> <location line="+1"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation>برای دستیابی به سرویس مخفیانه نرم افزار تور از پراکسی استفاده کنید (پیش فرض:same as -proxy)</translation> </message> <message> <location line="+2"/> <source>Username for JSON-RPC connections</source> <translation>JSON-RPC شناسه برای ارتباطات</translation> </message> <message> <location line="+4"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation>هشدار: این نسخه قدیمی است، روزآمدسازی مورد نیاز است</translation> </message> <message> <location line="+1"/> <source>You need to rebuild the databases using -reindex to change -txindex</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>wallet.dat corrupt, salvage failed</source> <translation type="unfinished"/> </message> <message> <location line="-50"/> <source>Password for JSON-RPC connections</source> <translation>JSON-RPC عبارت عبور برای ارتباطات</translation> </message> <message> <location line="-67"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation>از آدرس آی پی خاص JSON-RPC قبول ارتباطات</translation> </message> <message> <location line="+76"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation>(127.0.0.1پیش فرض: ) &amp;lt;ip&amp;gt; دادن فرمانها برای استفاده گره ها روی</translation> </message> <message> <location line="-120"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation>زمانی که بهترین بلاک تغییر کرد، دستور را اجرا کن (%s در cmd با block hash جایگزین شده است)</translation> </message> <message> <location line="+147"/> <source>Upgrade wallet to latest format</source> <translation>wallet را به جدیدترین فرمت روزآمد کنید</translation> </message> <message> <location line="-21"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation> (100پیش فرض:)&amp;lt;n&amp;gt; گذاشتن اندازه کلید روی </translation> </message> <message> <location line="-12"/> <source>Rescan the block chain for missing wallet transactions</source> <translation>اسکان مجدد زنجیر بلوکها برای گم والت معامله</translation> </message> <message> <location line="+35"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation>JSON-RPCبرای ارتباطات استفاده کنید OpenSSL (https)</translation> </message> <message> <location line="-26"/> <source>Server certificate file (default: server.cert)</source> <translation> (server.certپیش فرض: )گواهی نامه سرور</translation> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation>(server.pemپیش فرض: ) کلید خصوصی سرور</translation> </message> <message> <location line="-151"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation>رمز های قابل قبول( TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</translation> </message> <message> <location line="+165"/> <source>This help message</source> <translation>پیام کمکی</translation> </message> <message> <location line="+6"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation>امکان اتصال به %s از این رایانه وجود ندارد ( bind returned error %d, %s)</translation> </message> <message> <location line="-91"/> <source>Connect through socks proxy</source> <translation>اتصال از طریق پراکسی ساکس</translation> </message> <message> <location line="-10"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation>به DNS اجازه بده تا برای addnode ، seednode و اتصال جستجو کند</translation> </message> <message> <location line="+55"/> <source>Loading addresses...</source> <translation>بار گیری آدرس ها</translation> </message> <message> <location line="-35"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation>خطا در بارگیری wallet.dat: کیف پول خراب شده است</translation> </message> <message> <location line="+1"/> <source>Error loading wallet.dat: Wallet requires newer version of KCz</source> <translation>خطا در بارگیری wallet.dat: کیف پول به ویرایش جدیدتری از Biticon نیاز دارد</translation> </message> <message> <location line="+93"/> <source>Wallet needed to be rewritten: restart KCz to complete</source> <translation>سلام</translation> </message> <message> <location line="-95"/> <source>Error loading wallet.dat</source> <translation>خطا در بارگیری wallet.dat</translation> </message> <message> <location line="+28"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation>آدرس پراکسی اشتباه %s</translation> </message> <message> <location line="+56"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation>شبکه مشخص شده غیرقابل شناسایی در onlynet: &apos;%s&apos;</translation> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation>نسخه پراکسی ساکس غیرقابل شناسایی درخواست شده است: %i</translation> </message> <message> <location line="-96"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation>آدرس قابل اتصال- شناسایی نیست %s</translation> </message> <message> <location line="+1"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation>آدرس خارجی قابل اتصال- شناسایی نیست %s</translation> </message> <message> <location line="+44"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>میزان وجه اشتباه برای paytxfee=&lt;میزان وجه&gt;: %s</translation> </message> <message> <location line="+1"/> <source>Invalid amount</source> <translation>میزان وجه اشتباه</translation> </message> <message> <location line="-6"/> <source>Insufficient funds</source> <translation>بود جه نا کافی </translation> </message> <message> <location line="+10"/> <source>Loading block index...</source> <translation>بار گیری شاخص بلوک</translation> </message> <message> <location line="-57"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation>به اتصال یک گره اضافه کنید و اتصال را باز نگاه دارید</translation> </message> <message> <location line="-25"/> <source>Unable to bind to %s on this computer. KCz is probably already running.</source> <translation>اتصال به %s از این رایانه امکان پذیر نیست. KCz احتمالا در حال اجراست.</translation> </message> <message> <location line="+64"/> <source>Fee per KB to add to transactions you send</source> <translation>پر داجت برای هر کیلو بیت برای اضافه به معامله ارسال</translation> </message> <message> <location line="+19"/> <source>Loading wallet...</source> <translation>بار گیری والت</translation> </message> <message> <location line="-52"/> <source>Cannot downgrade wallet</source> <translation>امکان تنزل نسخه در wallet وجود ندارد</translation> </message> <message> <location line="+3"/> <source>Cannot write default address</source> <translation>آدرس پیش فرض قابل ذخیره نیست</translation> </message> <message> <location line="+64"/> <source>Rescanning...</source> <translation>اسکان مجدد</translation> </message> <message> <location line="-57"/> <source>Done loading</source> <translation>بار گیری انجام شده است</translation> </message> <message> <location line="+82"/> <source>To use the %s option</source> <translation>برای استفاده از %s از انتخابات</translation> </message> <message> <location line="-74"/> <source>Error</source> <translation>خطا</translation> </message> <message> <location line="-31"/> <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>%s، شما باید یک rpcpassword را در فایل پیکربندی تنظیم کنید :⏎%s⏎ اگر فایل ایجاد نشد، یک فایل فقط متنی ایجاد کنید. </translation> </message> </context> </TS>
bitcommoditiz/Coffeez-KCz
src/qt/locale/bitcoin_fa.ts
TypeScript
mit
118,770
# Anchor
boldr/boldr-ui
src/Anchor/Anchor.md
Markdown
mit
9
<?php namespace APP\AppBundle\Controller; use Symfony\Component\HttpFoundation\Request; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use APP\AppBundle\Entity\Cliente; use APP\AppBundle\Form\ClienteType; /** * Cliente controller. * */ class ClienteController extends Controller { /** * Lists all Cliente entities. * */ public function indexAction() { $em = $this->getDoctrine()->getManager(); $entities = $em->getRepository('AppBundle:Cliente')->findAll(); return $this->render('AppBundle:Cliente:index.html.twig', array( 'entities' => $entities, )); } /** * Creates a new Cliente entity. * */ public function createAction(Request $request) { $entity = new Cliente(); $form = $this->CreateForm(ClienteType::class, $entity); $form->handleRequest($request); if ($form->isValid()) { $em = $this->getDoctrine()->getManager(); $entity->setFechaAlta(new \DateTime()); $entity->setFechaMod(new \DateTime()); $usuario = $this->get('security.token_storage')->getToken()->getUser(); $entity->setUsuarioAlta($usuario); $entity->setUsuarioMod($usuario); $em->persist($entity); $em->flush(); return $this->redirect($this->generateUrl('cliente')); } return $this->render('AppBundle:Cliente:new.html.twig', array( 'entity' => $entity, 'form' => $form->createView(), )); } /** * Función para crear Cliente por Ajax */ public function createAjaxAction(Request $request) { if ($request->getMethod() == "POST") { $em = $this->getDoctrine()->getManager(); $name = $request->get('name'); $entity = new Cliente(); $entity->setNombre($name); $usuarioAlta = $this->get('security.token_storage')->getToken()->getUser(); $entity->setUsuarioAlta($usuarioAlta); $em->persist($entity); $em->flush(); } return $this->render("AppBundle:Default:_newOptionEntity.html.twig", array( 'entity' => $entity )); } /** * Displays a form to create a new Cliente entity. * */ public function newAction() { $entity = new Cliente(); $form = $this->CreateForm(ClienteType::class, $entity); return $this->render('AppBundle:Cliente:new.html.twig', array( 'entity' => $entity, 'form' => $form->createView(), )); } /** * Finds and displays a Cliente entity. * */ public function showAction($id) { $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('AppBundle:Cliente')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Cliente entity.'); } $deleteForm = $this->createForm(ClienteType::class); return $this->render('AppBundle:Cliente:show.html.twig', array( 'entity' => $entity, 'delete_form' => $deleteForm->createView(), )); } /** * Displays a form to edit an existing Cliente entity. * */ public function editAction($id) { $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('AppBundle:Cliente')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Cliente entity.'); } $editForm = $this->createForm(ClienteType::class, $entity); return $this->render('AppBundle:Cliente:edit.html.twig', array( 'entity' => $entity, 'form' => $editForm->createView() )); } /** * Edits an existing Cliente entity. * */ public function updateAction(Request $request, $id) { $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('AppBundle:Cliente')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Cliente entity.'); } $editForm = $this->createForm(ClienteType::class, $entity); $editForm->handleRequest($request); if ($editForm->isValid()) { /** @var $entity Cliente */ $usuario = $this->get('security.token_storage')->getToken()->getUser(); $entity->setFechaMod(new \DateTime()); $entity->setUsuarioMod($usuario); $em->persist($entity); $em->flush(); $this->setFlash('success', 'Los cambios se han realizado con éxito'); return $this->redirect($this->generateUrl('compania_edit', array('id' => $id))); } $this->setFlash('error', 'Ha ocurrido un error'); return $this->render('AppBundle:Cliente:edit.html.twig', array( 'entity' => $entity, 'form' => $editForm->createView(), )); } /** * Deletes a Cliente entity. * */ public function deleteAction(Request $request, $id) { $form = $this->createDeleteForm($id); $form->handleRequest($request); if ($form->isValid()) { $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('AppBundle:Cliente')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Cliente entity.'); } $em->remove($entity); $em->flush(); } return $this->redirect($this->generateUrl('cliente')); } /** * Creates a form to delete a Cliente entity by id. * * @param mixed $id The entity id * * @return \Symfony\Component\Form\Form The form */ private function createDeleteForm($id) { return $this->createFormBuilder() ->setAction($this->generateUrl('companias_delete', array('id' => $id))) ->setMethod('DELETE') ->add('submit', 'submit', array('label' => 'Delete')) ->getForm() ; } private function setFlash($index, $message) { $this->get('session')->getFlashBag()->clear(); $this->get('session')->getFlashBag()->add($index, $message); } }
alegperea/cmsgabriel
src/APP/AppBundle/Controller/ClienteController.php
PHP
mit
6,482
WebsiteOne::Application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false # Do not eager load code on boot. config.eager_load = false # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log # Raise an error on page load if there are pending migrations config.active_record.migration_error = :page_load # Debug mode disables concatenation and preprocessing of assets. # This option may cause significant delays in view rendering with a large # number of complex assets. config.assets.debug = true config.action_mailer.delivery_method = :smtp config.action_mailer.perform_deliveries = true config.action_mailer.raise_delivery_errors = true config.action_mailer.smtp_settings = { :address => 'smtp.gmail.com', :port => 587, :domain => '', :user_name => '[email protected]', :password => 'Wso12345', :authentication => 'plain', :enable_starttls_auto => true } end
tochman/WebsiteOne
config/environments/development.rb
Ruby
mit
1,607
# sails.config.models Your default project-wide **model settings**, conventionally specified in the [config/models.js](http://sailsjs.com/documentation/anatomy/myApp/config/models-js) configuration file. Most of the settings below can also be overridden on a per-model basis-- just edit the appropriate model definition file. There are also some additional model settings, not listed below, which can _only_ be specified on a per-model basis. For more details, see [Concepts > Model Settings](http://sailsjs.com/documentation/concepts/orm/model-settings). ### Properties Property | Type | Default | Details :---------------------|:---------------:|:------------------------------- |:-------- `attributes` | ((dictionary)) | _see [Attributes](http://sailsjs.com/documentation/concepts/models-and-orm/attributes)_ | Default [attributes](http://sailsjs.com/documentation/concepts/models-and-orm/attributes) to implicitly include in all of your app's model definitions. (Can be overridden on an attribute-by-attribute basis.) `migrate` | ((string)) | _see [Model Settings](http://sailsjs.com/documentation/concepts/orm/model-settings)_ | The [auto-migration strategy](http://sailsjs.com/documentation/concepts/models-and-orm/model-settings#?migrate) for your Sails app. How & whether Sails will attempt to automatically rebuild the tables/collections/etc. in your schema every time it lifts. `schema` | ((boolean)) | `false` | Only relevant for models hooked up to a schemaless database like MongoDB. If set to `true`, then the ORM will switch into "schemaful" mode. For example, if properties passed in to `.create()`, `.createEach()`, or `.update()` do not correspond with recognized attributes, then they will be stripped out before saving. `datastore` | ((string)) | `'default'` | The default [datastore configuration](http://sailsjs.com/documentation/reference/sails-config/sails-config-datastores) any given model will use without a configured override. Avoid changing this. `primaryKey` | ((string)) | `'id'` | The name of the attribute that every model in your app should use as its primary key by default. Can be overridden here, or on a per-model basis-- but there's [usually a better way](http://sailsjs.com/documentation/concepts/models-and-orm/model-settings#?primarykey). <docmeta name="displayName" value="sails.config.models"> <docmeta name="pageType" value="property">
yoshioka-s/sails-docs-ja
reference/sails.config/sails.config.models.md
Markdown
mit
2,575
require "presigner/version" require 'aws-sdk-v1' class Presigner DEFAULT_DURATION = 60 * 30 def initialize(options) @bucket = options[:bucket] @key = options[:key] @duration = options[:duration] || DEFAULT_DURATION @region = options[:region] || "us-east-1" @base = Time.now.to_i end attr_reader :duration, :base, :bucket, :key, :region def generate s3 = AWS::S3.new(region: region) # check if specified bucket and key exist. begin target_obj = s3.buckets[bucket].objects[key] if !target_obj.exists? $stderr.puts "Specified bucket or key does not exist." exit 1 end rescue AWS::S3::Errors::Forbidden $stderr.puts "Access to the S3 object is denied. Credential or target name might be wrong" exit 1 end if !target_obj.exists? $stderr.puts "Specified bucket or key does not exist." exit 1 end presigner = AWS::S3::PresignV4.new(target_obj) expires = calc_duration url = presigner.presign(:get, expires: base + duration, secure: true) url end def calc_duration duration end end
masaomoc/presigner
lib/presigner.rb
Ruby
mit
1,127
# frozen_string_literal: true require "administrate/base_dashboard" module Eve class StationDashboard < Administrate::BaseDashboard ATTRIBUTE_TYPES = { id: Field::Number, station_id: Field::Number, name: Field::String, system: Field::BelongsTo.with_options(class_name: "Eve::System"), type_id: Field::Number, # TODO: add type dashboard owner: Field::Number, race: Field::BelongsTo.with_options(class_name: "Eve::Race"), max_dockable_ship_volume: Field::Number, office_rental_cost: Field::Number, reprocessing_efficiency: Field::Number, reprocessing_stations_take: Field::Number, # TODO: t.string "services", array: true # services: Field::String, created_at: Field::DateTime, updated_at: Field::DateTime # position: Field::HasOne }.freeze COLLECTION_ATTRIBUTES = [:id, :station_id, :name].freeze SHOW_PAGE_ATTRIBUTES = [ :id, :station_id, :name, :system, :type_id, :owner, :race, :max_dockable_ship_volume, :office_rental_cost, :reprocessing_efficiency, :reprocessing_stations_take, # :services, :created_at, :updated_at # :position ].freeze COLLECTION_FILTERS = {}.freeze def display_resource(station) station.name end end end
biow0lf/evemonk
app/dashboards/eve/station_dashboard.rb
Ruby
mit
1,362
declare namespace jdk { namespace nashorn { namespace api { namespace tree { interface ModuleTree extends jdk.nashorn.api.tree.Tree { getImportEntries(): java.util.List<jdk.nashorn.api.tree.ImportEntryTree> getLocalExportEntries(): java.util.List<jdk.nashorn.api.tree.ExportEntryTree> getIndirectExportEntries(): java.util.List<jdk.nashorn.api.tree.ExportEntryTree> getStarExportEntries(): java.util.List<jdk.nashorn.api.tree.ExportEntryTree> } } } } }
wizawu/1c
@types/jdk/jdk.nashorn.api.tree.ModuleTree.d.ts
TypeScript
mit
535
<?php namespace GL\ProtocolloBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; class GLProtocolloBundle extends Bundle { }
lucagtc/protocollo
src/GL/ProtocolloBundle/GLProtocolloBundle.php
PHP
mit
132
/** * Created by lee on 10/13/17. */ import React, { Component } from 'react'; export default class PlacesItem extends Component { constructor(props) { super(props); this.config = this.config.bind(this); this.rateStars = this.rateStars.bind(this); this.startBounce = this.startBounce.bind(this); this.endBounce = this.endBounce.bind(this); } config() { return { itemPhotoSize : { maxWidth: 80, maxHeight: 91 } } } startBounce() { this.props.place.marker.setAnimation(google.maps.Animation.BOUNCE); } endBounce() { this.props.place.marker.setAnimation(null); } // build rate starts rateStars(num) { let stars = []; for(let i = 0; i < num; i++) { stars.push( <span><img key={i} src='./assets/star.png' /></span> ) } return stars } render() { const {place} = this.props.place; const img = place.photos ? place.photos[0].getUrl(this.config().itemPhotoSize) : './assets/no_image.png'; return( <div className="item-box" onMouseOver = {this.startBounce} onMouseOut={this.endBounce}> <div className="item-text"> <strong>{place.name}</strong> { place.rating ?<p>{this.rateStars(place.rating)}<span>&nbsp;&nbsp;&nbsp;{'$'.repeat(place.price_level)}</span></p> : <p>{'$'.repeat(place.price_level)}</p> } <p id="item-address">{place.formatted_address}</p> <p>{place.opening_hours && place.opening_hours.open_now ? "Open" :"Closed"}</p> </div> <img className='item-image' src={img} /> </div> ) } }
LEEwith/google-map-react
src/components/places_item.js
JavaScript
mit
1,854
The MIT License (MIT) Copyright (c) 2015 Jaro Marval 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.
Jamp/random
LICENSE.md
Markdown
mit
1,077
class Solution(object): def missingNumber(self, nums): """ :type nums: List[int] :rtype: int """ xor = len(nums) for i, n in enumerate(nums): xor ^= n xor ^= i return xor inputs = [ [0], [1], [3,0,1], [9,6,4,2,3,5,7,0,1] ] s = Solution() for i in inputs: print s.missingNumber(i)
daicang/Leetcode-solutions
268-missing-number.py
Python
mit
388
/**************************************************************************** * * Copyright (c) 2005 - 2012 by Vivante Corp. All rights reserved. * * The material in this file is confidential and contains trade secrets * of Vivante Corporation. This is proprietary information owned by * Vivante Corporation. No part of this work may be disclosed, * reproduced, copied, transmitted, or used in any way for any purpose, * without the express written permission of Vivante Corporation. * *****************************************************************************/ /** * \file sarea.h * SAREA definitions. * * \author Kevin E. Martin <[email protected]> * \author Jens Owen <[email protected]> * \author Rickard E. (Rik) Faith <[email protected]> */ /* * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc. * All Rights Reserved. * * 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, sub license, 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 (including the * next paragraph) 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 NON-INFRINGEMENT. * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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. */ #ifndef _SAREA_H_ #define _SAREA_H_ #include "xf86drm.h" /* SAREA area needs to be at least a page */ #if defined(__alpha__) #define SAREA_MAX 0x2000 #elif defined(__ia64__) #define SAREA_MAX 0x10000 /* 64kB */ #else /* Intel 830M driver needs at least 8k SAREA */ #define SAREA_MAX 0x2000 #endif #define SAREA_MAX_DRAWABLES 256 #define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000 /** * SAREA per drawable information. * * \sa _XF86DRISAREA. */ typedef struct _XF86DRISAREADrawable { unsigned int stamp; unsigned int flags; } XF86DRISAREADrawableRec, *XF86DRISAREADrawablePtr; /** * SAREA frame information. * * \sa _XF86DRISAREA. */ typedef struct _XF86DRISAREAFrame { unsigned int x; unsigned int y; unsigned int width; unsigned int height; unsigned int fullscreen; } XF86DRISAREAFrameRec, *XF86DRISAREAFramePtr; /** * SAREA definition. */ typedef struct _XF86DRISAREA { /** first thing is always the DRM locking structure */ drmLock lock; /** \todo Use readers/writer lock for drawable_lock */ drmLock drawable_lock; XF86DRISAREADrawableRec drawableTable[SAREA_MAX_DRAWABLES]; XF86DRISAREAFrameRec frame; drm_context_t dummy_context; } XF86DRISAREARec, *XF86DRISAREAPtr; typedef struct _XF86DRILSAREA { drmLock lock; drmLock otherLocks[31]; } XF86DRILSAREARec, *XF86DRILSAREAPtr; #endif
zOrg1331/xorg-drv-vivante
dri/src/sarea.h
C
mit
3,526