text
stringlengths
2
1.04M
meta
dict
from django.shortcuts import render from django.views.decorators.http import require_GET try: from wagtail.core.models import Page except ImportError: from wagtail.wagtailcore.models import Page from longclaw.utils import ProductVariant from longclaw.contrib.productrequests.models import ProductRequest @require_GET def requests_admin(request, pk): """Table display of each request for a given product. Allows the given Page pk to refer to a direct parent of the ProductVariant model or be the ProductVariant model itself. This allows for the standard longclaw product modelling philosophy where ProductVariant refers to the actual product (in the case where there is only 1 variant) or to be variants of the product page. """ page = Page.objects.get(pk=pk).specific if hasattr(page, 'variants'): requests = ProductRequest.objects.filter( variant__in=page.variants.all() ) else: requests = ProductRequest.objects.filter(variant=page) return render( request, "productrequests/requests_admin.html", {'page': page, 'requests': requests} )
{ "content_hash": "f39cdfdaa5b81f1ec350ca5fd6235ea4", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 76, "avg_line_length": 37.25806451612903, "alnum_prop": 0.7229437229437229, "repo_name": "JamesRamm/longclaw", "id": "d9bd3979e9f5b6444e8ec3c5ab0fc12d5c288c61", "size": "1155", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "longclaw/contrib/productrequests/views.py", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "1437" }, { "name": "Dockerfile", "bytes": "148" }, { "name": "HTML", "bytes": "20376" }, { "name": "JavaScript", "bytes": "37905" }, { "name": "Makefile", "bytes": "1562" }, { "name": "Python", "bytes": "172472" }, { "name": "Shell", "bytes": "970" } ], "symlink_target": "" }
namespace TGC.Core.SceneLoader { /// <summary> /// Interfaz generica para renderizar objetos /// </summary> public interface IRenderObject { /// <summary> /// Habilita el renderizado con AlphaBlending para los modelos /// con textura o colores por vértice de canal Alpha. /// Por default está deshabilitado. /// </summary> bool AlphaBlendEnable { get; set; } /// <summary> /// Inicializacion del objeto. /// </summary> //void Init(); /// <summary> /// Renderiza el objeto. /// </summary> void Render(); /// <summary> /// Libera los recursos del objeto. /// </summary> void Dispose(); } }
{ "content_hash": "d6cfb6b7d429764acf5674da41e81ffd", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 74, "avg_line_length": 26.2, "alnum_prop": 0.510178117048346, "repo_name": "tgc-utn/tgc-viewer", "id": "9cc00cd2d2ee80c37a4b93ca15d4761ae05547b8", "size": "786", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "TGC.Core/SceneLoader/IRenderObject.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "2610720" }, { "name": "HLSL", "bytes": "271230" } ], "symlink_target": "" }
import { TCountryToString } from './types' import countries2to3 from '../dist/more/countries.2to3.min.json' export default countries2to3 as TCountryToString
{ "content_hash": "1a35e7829ad9740cff31f98a23b10258", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 64, "avg_line_length": 39.5, "alnum_prop": 0.7974683544303798, "repo_name": "annexare/Countries", "id": "2950ef8512c4d6c39072a7f2063297a05785c4d5", "size": "158", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/countries.2to3.data.ts", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "5273" }, { "name": "PHP", "bytes": "2000" }, { "name": "TypeScript", "bytes": "20811" } ], "symlink_target": "" }
#ifdef HAVE_CONFIG_H #include "../../../../../ext_config.h" #endif #include <php.h> #include "../../../../../php_ext.h" #include "../../../../../ext.h" #include <Zend/zend_operators.h> #include <Zend/zend_exceptions.h> #include <Zend/zend_interfaces.h> #include "kernel/main.h" /** */ ZEPHIR_INIT_CLASS(ZendFramework_Http_Client_Adapter_Exception_OutOfRangeException) { ZEPHIR_REGISTER_CLASS_EX(Zend\\Http\\Client\\Adapter\\Exception, OutOfRangeException, zendframework, http_client_adapter_exception_outofrangeexception, zendframework_http_client_exception_outofrangeexception_ce, NULL, 0); zend_class_implements(zendframework_http_client_adapter_exception_outofrangeexception_ce TSRMLS_CC, 1, zendframework_http_client_adapter_exception_exceptioninterface_ce); return SUCCESS; }
{ "content_hash": "38327bccd7cc1c14cce0122ba8312f83", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 222, "avg_line_length": 28.428571428571427, "alnum_prop": 0.7386934673366834, "repo_name": "golovanov/php-ext-zendframework", "id": "12d2abe5dcee797cbdd437a9263933283e68042a", "size": "981", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "php-ext-zendframework/ext/zendframework/http/client/adapter/exception/outofrangeexception.zep.c", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "502687" }, { "name": "C++", "bytes": "35223" }, { "name": "PHP", "bytes": "17405684" }, { "name": "Shell", "bytes": "3262" }, { "name": "Zephir", "bytes": "223771" } ], "symlink_target": "" }
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true"><bitmap android:src="@mipmap/btn_send_blue_bg" /> </item> <item android:state_pressed="false"><bitmap android:src="@mipmap/btn_send_bg" /> </item> </selector>
{ "content_hash": "0ee63ad5758392b76da47403825bbeb9", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 88, "avg_line_length": 35.55555555555556, "alnum_prop": 0.671875, "repo_name": "hnyer/PopupwindowAndListView", "id": "79c50b0b40b4eebb132af29bbd951ba1048a8e99", "size": "320", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/src/main/res/drawable/btn_send_to_bg.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "35126" } ], "symlink_target": "" }
Delta indexing plugin for Thinking Sphinx that sets a reindex flag in memcached whenever a model needs to be reindexed. It is expected to be used along with the Deltoid daemon, which polls memcached and rebuilds indices whenever the reindex flags are set. ## Installation Installation is as simple as adding the `deltoid_delta` gem to your Gemfile: gem 'deltoid_delta', :git => "git://github.com/satisfaction/deltoid_delta.git" You may want to tag it to a specific release: gem 'deltoid_delta', :git => "git://github.com/satisfaction/deltoid_delta.git", :tag => "0.0.14" Then bundle your gems: bundle install You'll then need to require `deltoid_delta` in your Rails project. I've typically put this in an initializer along with all my other Sphinx-related configuration. require 'deltoid_delta' ## Using deltoid_delta in your models Thinking Sphinx allows you to specify which delta indexing strategy to use by setting the `:delta` property to the name or instance of a class. Within your `define_index` block, set the property like so: set_property :delta => "DeltoidDelta" `deltoid_delta` is based on the datetime delta strategy, and supports all of the same options, such as `:threshold` and `:delta_column`. The defaults for `:threshold` and `:delta_column` are also the same (1 day and `updated_at`, respectively). ## The Deltoid Daemon process All of the actual delta indexing work is performed within the deltoid daemon process, included in the gem. This daemon will check a memcached server every second to see if a dirty flag has been set for an index. This dirty flag is automatically set anytime one of your indexed models is updated. Whenever the deltoid daemon notices your indexes are dirty, it will rebuild the delta indexes for you. It will first clear the dirty flag, and then invoke the Sphinx `indexer` process to rebuild the affected indexes. The deltoid daemon also performs a complete reindex of the indexes once a day at midnight. Having all your indexing in one process avoids multiple indexer processes from corrupting your indexes. ### Rake Tasks To properly manage your indexes, the deltoid daemon needs your Sphinx configuration file, as well as your memcached.yml file. The `deltoid_delta` gem comes with rake tasks that you can use to manage the daemon process. To use the rake tasks, you should include them in your Rakefile: require 'deltoid_delta/tasks' This will give you the following rake tasks for managing the deltoid daemon included in the gem: rake deltoid:env # Displays the calculated deltoid daemon configuration values rake deltoid:restart # Restarts the deltoid daemon process rake deltoid:run # Runs the deltoid daemon process in the foreground rake deltoid:start # Starts the deltoid daemon process rake deltoid:stop # Stops the deltoid daemon process The `deltoid:env` task is really useful for debugging what the tasks will run, or as a starting point for writing your own management scripts. ## Copyright Copyright (c) 2010 Get Satisfaction. See LICENSE.txt for further details.
{ "content_hash": "3bf82b00b4674519b8bb092b317883c1", "timestamp": "", "source": "github", "line_count": 70, "max_line_length": 121, "avg_line_length": 44.58571428571429, "alnum_prop": 0.7693047100288369, "repo_name": "satisfaction/deltoid_delta", "id": "a37579b70f9724f0d54f1e0cb0f99ec911b923cd", "size": "3138", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "mit", "language": [ { "name": "Ruby", "bytes": "14172" } ], "symlink_target": "" }
package com.sam_chordas.android.stockhawk.data.rest; import com.google.gson.annotations.SerializedName; import java.util.Date; /** * Represents a value in time of a stock quote. */ public class QuoteTime { @SerializedName("Symbol") private String mSymbol; @SerializedName("Date") private Date mDate; @SerializedName("Adj_Close") private double mAdjClose; public String getSymbol() { return mSymbol; } public void setSymbol(String symbol) { mSymbol = symbol; } public Date getDate() { return mDate; } public void setDate(Date date) { mDate = date; } public double getAdjClose() { return mAdjClose; } public void setAdjClose(double adjClose) { mAdjClose = adjClose; } }
{ "content_hash": "2a5e8192faf5fb32644ee1eb752da30c", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 52, "avg_line_length": 18.227272727272727, "alnum_prop": 0.6346633416458853, "repo_name": "fnberta/StockHawk", "id": "e6a98520b06b793242d46288c2d6efd342432373", "size": "1397", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "app/src/main/java/com/sam_chordas/android/stockhawk/data/rest/QuoteTime.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "163173" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <rootTag> <Award> <AwardTitle>Travel Grant for Grand Challenges of Traceability (GCT): The Next Ten Years</AwardTitle> <AwardEffectiveDate>03/15/2017</AwardEffectiveDate> <AwardExpirationDate>09/30/2017</AwardExpirationDate> <AwardAmount>7000</AwardAmount> <AwardInstrument> <Value>Standard Grant</Value> </AwardInstrument> <Organization> <Code>05010000</Code> <Directorate> <LongName>Direct For Computer &amp; Info Scie &amp; Enginr</LongName> </Directorate> <Division> <LongName>Division of Computing and Communication Foundations</LongName> </Division> </Organization> <ProgramOfficer> <SignBlockName>Sol J. Greenspan</SignBlockName> </ProgramOfficer> <AbstractNarration>This travel grant will fund participants to attend a workshop entitled "Grand Challenges of Traceability (GCT): The Next Ten Years. The travel support will give priority to students, underrepresented groups, and those in need of funds not otherwise available. The purpose of the workshop is to reflect on the past decade of research on software traceability and to develop a research agenda for the next decade. The meeting will take place in Kentucky in March of 2017. The intellectual merit is to advance research and practice in software traceability, which instruments software development processes with links between software development artifacts, automatically computing links and empowering software tools to assist software developers. The broader impacts are to improve the maintainability and evolvability of software systems and to help build the community of researchers who address these problems.</AbstractNarration> <MinAmdLetterDate>03/09/2017</MinAmdLetterDate> <MaxAmdLetterDate>03/09/2017</MaxAmdLetterDate> <ARRAAmount/> <AwardID>1735433</AwardID> <Investigator> <FirstName>Nan</FirstName> <LastName>Niu</LastName> <EmailAddress>niunn@ucmail.uc.edu</EmailAddress> <StartDate>03/09/2017</StartDate> <EndDate/> <RoleCode>Principal Investigator</RoleCode> </Investigator> <Institution> <Name>University of Cincinnati Main Campus</Name> <CityName>Cincinnati</CityName> <ZipCode>452210222</ZipCode> <PhoneNumber>5135564358</PhoneNumber> <StreetAddress>University Hall, Suite 530</StreetAddress> <CountryName>United States</CountryName> <StateName>Ohio</StateName> <StateCode>OH</StateCode> </Institution> <ProgramElement> <Code>7798</Code> <Text>SOFTWARE &amp; HARDWARE FOUNDATION</Text> </ProgramElement> <ProgramReference> <Code>7556</Code> <Text>CONFERENCE AND WORKSHOPS</Text> </ProgramReference> <ProgramReference> <Code>7944</Code> <Text>SOFTWARE ENG &amp; FORMAL METHODS</Text> </ProgramReference> </Award> </rootTag>
{ "content_hash": "c913b3b497cf7e006f3ac6399d7e5289", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 955, "avg_line_length": 48.96666666666667, "alnum_prop": 0.7273655547991831, "repo_name": "jallen2/Research-Trend", "id": "b5246029203d3872b9255227125d5e6361c1abe0", "size": "2938", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "CU_Funding/2017/1735433.xml", "mode": "33261", "license": "mit", "language": [], "symlink_target": "" }
package com.kurs.manager; import javax.faces.bean.ManagedBean; import javax.inject.Inject; import javax.inject.Named; import com.kurs.dao.UserDao; import com.kurs.model.User; import com.kurs.model.form.Register; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.userdetails.UserDetails; @Named @ManagedBean public class UserManager { @Inject public UserDao userDao; public void setUserDao(UserDao userDao) { this.userDao = userDao; } public void addUser(Register model) { userDao.addUser(model); } public boolean getIsAuthenticated() { return SecurityContextHolder.getContext().getAuthentication().isAuthenticated(); } public UserDetails getCurrentUser() { return (UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); } public String getCurrentEmail() { return SecurityContextHolder.getContext().getAuthentication().getName(); } }
{ "content_hash": "dc61f172a6e2b14c1fc4c04d8c637187", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 99, "avg_line_length": 24.113636363636363, "alnum_prop": 0.7587181903864278, "repo_name": "astappev/Property", "id": "364acf8b8d7f41bb3e196287663a1453084912cc", "size": "1061", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/com/kurs/manager/UserManager.java", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "920" }, { "name": "HTML", "bytes": "14137" }, { "name": "Java", "bytes": "12877" } ], "symlink_target": "" }
package org.apache.ratis; import org.apache.hadoop.hdds.scm.container.common.helpers.Pipeline; import org.apache.hadoop.hdds.protocol.DatanodeDetails; import org.apache.hadoop.ozone.OzoneConfigKeys; import org.apache.ratis.client.RaftClient; import org.apache.ratis.conf.RaftProperties; import org.apache.ratis.grpc.GrpcConfigKeys; import org.apache.ratis.protocol.RaftGroup; import org.apache.ratis.protocol.RaftGroupId; import org.apache.ratis.protocol.RaftPeer; import org.apache.ratis.protocol.RaftPeerId; import org.apache.ratis.rpc.RpcType; import org.apache.ratis.shaded.com.google.protobuf.ByteString; import org.apache.ratis.util.SizeInBytes; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; /** * Ratis helper methods. */ public interface RatisHelper { Logger LOG = LoggerFactory.getLogger(RatisHelper.class); static String toRaftPeerIdString(DatanodeDetails id) { return id.getUuidString() + "_" + id.getPort(DatanodeDetails.Port.Name.RATIS).getValue(); } static String toRaftPeerAddressString(DatanodeDetails id) { return id.getIpAddress() + ":" + id.getPort(DatanodeDetails.Port.Name.RATIS).getValue(); } static RaftPeerId toRaftPeerId(DatanodeDetails id) { return RaftPeerId.valueOf(toRaftPeerIdString(id)); } static RaftPeer toRaftPeer(DatanodeDetails id) { return new RaftPeer(toRaftPeerId(id), toRaftPeerAddressString(id)); } static List<RaftPeer> toRaftPeers(Pipeline pipeline) { return toRaftPeers(pipeline.getMachines()); } static <E extends DatanodeDetails> List<RaftPeer> toRaftPeers( List<E> datanodes) { return datanodes.stream().map(RatisHelper::toRaftPeer) .collect(Collectors.toList()); } /* TODO: use a dummy id for all groups for the moment. * It should be changed to a unique id for each group. */ RaftGroupId DUMMY_GROUP_ID = RaftGroupId.valueOf(ByteString.copyFromUtf8("AOzoneRatisGroup")); RaftGroup EMPTY_GROUP = new RaftGroup(DUMMY_GROUP_ID, Collections.emptyList()); static RaftGroup emptyRaftGroup() { return EMPTY_GROUP; } static RaftGroup newRaftGroup(List<DatanodeDetails> datanodes) { final List<RaftPeer> newPeers = datanodes.stream() .map(RatisHelper::toRaftPeer) .collect(Collectors.toList()); return RatisHelper.newRaftGroup(newPeers); } static RaftGroup newRaftGroup(Collection<RaftPeer> peers) { return peers.isEmpty()? emptyRaftGroup() : new RaftGroup(DUMMY_GROUP_ID, peers); } static RaftGroup newRaftGroup(Pipeline pipeline) { return newRaftGroup(toRaftPeers(pipeline)); } static RaftClient newRaftClient(RpcType rpcType, Pipeline pipeline) { return newRaftClient(rpcType, toRaftPeerId(pipeline.getLeader()), newRaftGroup(pipeline)); } static RaftClient newRaftClient(RpcType rpcType, RaftPeer leader) { return newRaftClient(rpcType, leader.getId(), newRaftGroup(new ArrayList<>(Arrays.asList(leader)))); } static RaftClient newRaftClient( RpcType rpcType, RaftPeerId leader, RaftGroup group) { LOG.trace("newRaftClient: {}, leader={}, group={}", rpcType, leader, group); final RaftProperties properties = new RaftProperties(); RaftConfigKeys.Rpc.setType(properties, rpcType); GrpcConfigKeys.setMessageSizeMax(properties, SizeInBytes.valueOf(OzoneConfigKeys.DFS_CONTAINER_CHUNK_MAX_SIZE)); return RaftClient.newBuilder() .setRaftGroup(group) .setLeaderId(leader) .setProperties(properties) .build(); } }
{ "content_hash": "0793e7c3d1047e82a7000bed6574b546", "timestamp": "", "source": "github", "line_count": 115, "max_line_length": 80, "avg_line_length": 32.417391304347824, "alnum_prop": 0.7398068669527897, "repo_name": "szegedim/hadoop", "id": "df831161ca4be79544d267dc8bc7f0634f562da8", "size": "4540", "binary": false, "copies": "1", "ref": "refs/heads/trunk", "path": "hadoop-hdds/common/src/main/java/org/apache/ratis/RatisHelper.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "77936" }, { "name": "C", "bytes": "1649193" }, { "name": "C++", "bytes": "2793224" }, { "name": "CMake", "bytes": "108030" }, { "name": "CSS", "bytes": "87680" }, { "name": "HTML", "bytes": "365471" }, { "name": "Java", "bytes": "84086482" }, { "name": "JavaScript", "bytes": "1135014" }, { "name": "Python", "bytes": "23553" }, { "name": "RobotFramework", "bytes": "12810" }, { "name": "Shell", "bytes": "458748" }, { "name": "TLA", "bytes": "14993" }, { "name": "TeX", "bytes": "19322" }, { "name": "XSLT", "bytes": "18026" } ], "symlink_target": "" }
namespace { uint32_t nativeEvents(const Epoll::EventTypes& p_ets) { uint32_t result = 0; for (Epoll::EventTypes::const_iterator i = p_ets.begin(); i != p_ets.end(); ++i) { if (*i == Epoll::EventType::Error) result |= EPOLLERR; else if (*i == Epoll::EventType::In) result |= EPOLLIN; else if (*i == Epoll::EventType::Out) result |= EPOLLOUT; else if (*i == Epoll::EventType::Hup) result |= EPOLLHUP; else if (*i == Epoll::EventType::RdHup) result |= EPOLLRDHUP; else throw std::runtime_error("Unknown event"); } return result; } void nativeEvents(uint32_t p_nativeEvents, Epoll::EventTypes& p_ets) { if (p_nativeEvents & EPOLLERR) p_ets.insert(Epoll::EventType::Error); if (p_nativeEvents & EPOLLIN) p_ets.insert(Epoll::EventType::In); if (p_nativeEvents & EPOLLOUT) p_ets.insert(Epoll::EventType::Out); if (p_nativeEvents & EPOLLHUP) p_ets.insert(Epoll::EventType::Hup); if (p_nativeEvents & EPOLLRDHUP) p_ets.insert(Epoll::EventType::RdHup); } } int Epoll::EventType::Error = 0; int Epoll::EventType::In = 1; int Epoll::EventType::Out = 2; int Epoll::EventType::Hup = 3; int Epoll::EventType::RdHup = 4; Epoll::Event::Event(const EventTypes& p_ets, Socket::Descriptor p_fd) : eventTypes(p_ets), descriptor(p_fd) { } Epoll::Epoll(int p_size) : m_size(p_size), m_epollFd(::epoll_create(m_size)) { if (m_epollFd < 0) { throw std::runtime_error("Epoll create failed"); } } Epoll::~Epoll() { ::close(m_epollFd); } void Epoll::add(Socket::Ptr p_socket, const EventTypes& p_ets) const { int fd = p_socket->getDescriptor(); int option = EPOLL_CTL_ADD; epoll_event e; ::memset(&e, 0, sizeof(e)); e.data.fd = fd; e.events = nativeEvents(p_ets); if (::epoll_ctl(m_epollFd, option, fd, &e) < 0) { throw std::runtime_error("Add handler to epoll failed"); } } void Epoll::modify(Socket::Ptr, const EventTypes&) const { //TODO } void Epoll::remove(Socket::Descriptor p_fd) const { if (::epoll_ctl(m_epollFd, EPOLL_CTL_DEL, p_fd, 0) < 0) { throw ::std::runtime_error("Cannot remove fd from epoll"); } } void Epoll::wait(Events& p_events) const { boost::scoped_array<epoll_event> events(new epoll_event[m_size]); ::memset(events.get(), 0, m_size * sizeof (epoll_event)); int eventsLen = 0; eventsLen = ::epoll_wait(m_epollFd, events.get(), m_size, -1); if (eventsLen < 0) { throw ::std::runtime_error("Epoll wait failed"); } for (int i = 0; i < eventsLen; ++i) { EventTypes ets; nativeEvents(events[i].events, ets); p_events.push_back(Event(ets, events[i].data.fd)); } }
{ "content_hash": "609a90802c9e1b1e571582bf78fd4138", "timestamp": "", "source": "github", "line_count": 117, "max_line_length": 84, "avg_line_length": 23.333333333333332, "alnum_prop": 0.615018315018315, "repo_name": "RomanUlan/ReactorInheritance", "id": "9718837e8fd1674c9c229cfc21ac82db31915ef1", "size": "2851", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "IO/Epoll.cpp", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "C++", "bytes": "21953" }, { "name": "Makefile", "bytes": "1872" } ], "symlink_target": "" }
namespace ExampleApp { namespace Search { namespace SdkModel { class ISearchModule { public: virtual ~ISearchModule() { } virtual ISearchResultRepository& GetSearchResultRepository() const = 0; virtual ISearchQueryPerformer& GetSearchQueryPerformer() const = 0; virtual ISearchRefreshService& GetSearchRefreshService() const = 0; virtual ExampleApp::TagSearch::SdkModel::ITagSearchModule& GetTagSearchModule() const = 0; virtual MyPins::ISearchResultMyPinsService& GetSearchResultMyPinsService() const = 0; virtual MyPins::IMyPinsSearchResultRefreshService& GetMyPinsSearchResultRefreshService() const = 0; virtual InteriorMenuObserver& GetInteriorMenuObserver() const = 0; }; } } }
{ "content_hash": "149eb24edb46421d2b930af3755b41bf", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 115, "avg_line_length": 34.5, "alnum_prop": 0.5797101449275363, "repo_name": "wrld3d/wrld-example-app", "id": "372351e62794713bb43e25c2c562ac967b960be1", "size": "1115", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "src/Search/SdkModel/ISearchModule.h", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "Batchfile", "bytes": "1135" }, { "name": "C", "bytes": "377538" }, { "name": "C#", "bytes": "376920" }, { "name": "C++", "bytes": "4283467" }, { "name": "CMake", "bytes": "273099" }, { "name": "HTML", "bytes": "1013" }, { "name": "Java", "bytes": "434936" }, { "name": "Makefile", "bytes": "179" }, { "name": "Objective-C", "bytes": "602771" }, { "name": "Objective-C++", "bytes": "720039" }, { "name": "Python", "bytes": "3259" }, { "name": "Shell", "bytes": "17461" }, { "name": "Swift", "bytes": "178618" } ], "symlink_target": "" }
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.commonsware.android.passwordbox" android:versionCode="1" android:versionName="1.0" xmlns:tools="http://schemas.android.com/tools"> <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16" tools:ignore="OldTargetApi"/> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/Theme.Sherlock.Light.DarkActionBar"> <activity android:name="com.commonsware.android.passwordbox.MainActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> </application> </manifest>
{ "content_hash": "d7ab12872352d56b4bddedd6d5821631", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 74, "avg_line_length": 30.571428571428573, "alnum_prop": 0.735981308411215, "repo_name": "peterdocter/cw-omnibus", "id": "654de8a26bbc03b80f7e38a35880b6bfd0d4b49d", "size": "856", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Database/PasswordBox-Start/AndroidManifest.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "2322" }, { "name": "CSS", "bytes": "22338" }, { "name": "HTML", "bytes": "3030213" }, { "name": "Java", "bytes": "1370417" }, { "name": "JavaScript", "bytes": "209086" }, { "name": "Makefile", "bytes": "14011" }, { "name": "Python", "bytes": "546" }, { "name": "Shell", "bytes": "869" } ], "symlink_target": "" }
.. _man-configuration: ################################## Dropwizard Configuration Reference ################################## .. highlight:: text .. _man-configuration-servers: Servers ======= Tweaking some of the options will require good understanding of how Jetty is working. See the `Jetty architecture chapter`_ for reference. .. code-block:: yaml server: type: default maxThreads: 1024 .. _Jetty architecture chapter: http://www.eclipse.org/jetty/documentation/current/architecture.html#basic-architecture .. _man-configuration-all: All --- =================================== =============================================== ============================================================================= Name Default Description =================================== =============================================== ============================================================================= type default - default - simple maxThreads 1024 The maximum number of threads the thread pool is allowed to grow. Jetty will throw ``java.lang.IllegalStateException: Insufficient threads:`` in case of too aggressive limit on the thread count. minThreads 8 The minimum number of threads to keep alive in the thread pool. Note that each Jetty's connector consumes threads from the pool. See :ref:`HTTP connector <man-configuration-http>` how the thread counts are calculated. maxQueuedRequests 1024 The maximum number of requests to queue before blocking the acceptors. idleThreadTimeout 1 minute The amount of time a worker thread can be idle before being stopped. nofileSoftLimit (none) The number of open file descriptors before a soft error is issued. Requires Jetty's ``libsetuid.so`` on ``java.library.path``. nofileHardLimit (none) The number of open file descriptors before a hard error is issued. Requires Jetty's ``libsetuid.so`` on ``java.library.path``. gid (none) The group ID to switch to once the connectors have started. Requires Jetty's ``libsetuid.so`` on ``java.library.path``. uid (none) The user ID to switch to once the connectors have started. Requires Jetty's ``libsetuid.so`` on ``java.library.path``. user (none) The username to switch to once the connectors have started. Requires Jetty's ``libsetuid.so`` on ``java.library.path``. group (none) The group to switch to once the connectors have started. Requires Jetty's ``libsetuid.so`` on ``java.library.path``. umask (none) The umask to switch to once the connectors have started. Requires Jetty's ``libsetuid.so`` on ``java.library.path``. startsAsRoot (none) Whether or not the Dropwizard application is started as a root user. Requires Jetty's ``libsetuid.so`` on ``java.library.path``. shutdownGracePeriod 30 seconds The maximum time to wait for Jetty, and all Managed instances, to cleanly shutdown before forcibly terminating them. allowedMethods ``GET``, ``POST``, ``PUT``, ``DELETE``, The set of allowed HTTP methods. Others will be rejected with a ``HEAD``, ``OPTIONS``, ``PATCH`` 405 Method Not Allowed response. rootPath ``/*`` The URL pattern relative to ``applicationContextPath`` from which the JAX-RS resources will be served. registerDefaultExceptionMappers true Whether or not the default Jersey ExceptionMappers should be registered. Set this to false if you want to register your own. enableThreadNameFilter true Whether or not to apply the ``ThreadNameFilter`` that adjusts thread names to include the request method and request URI. =================================== =============================================== ============================================================================= .. _man-configuration-gzip: GZip .... .. code-block:: yaml server: gzip: bufferSize: 8KiB +---------------------------+---------------------+------------------------------------------------------------------------------------------------------+ | Name | Default | Description | +===========================+=====================+======================================================================================================+ | enabled | true | If true, all requests with ``gzip`` or ``deflate`` in the ``Accept-Encoding`` header will have their | | | | response entities compressed and requests with ``gzip`` or ``deflate`` in the ``Content-Encoding`` | | | | header will have their request entities decompressed. | +---------------------------+---------------------+------------------------------------------------------------------------------------------------------+ | minimumEntitySize | 256 bytes | All response entities under this size are not compressed. | +---------------------------+---------------------+------------------------------------------------------------------------------------------------------+ | bufferSize | 8KiB | The size of the buffer to use when compressing. | +---------------------------+---------------------+------------------------------------------------------------------------------------------------------+ | excludedUserAgentPatterns | [] | The set of user agent patterns to exclude from compression. | +---------------------------+---------------------+------------------------------------------------------------------------------------------------------+ | compressedMimeTypes | Jetty's default | The list of mime types to compress. The default is all types apart | | | | the commonly known image, video, audio and compressed types. | +---------------------------+---------------------+------------------------------------------------------------------------------------------------------+ | includedMethods | Jetty's default | The list list of HTTP methods to compress. The default is to compress only GET responses. | +---------------------------+---------------------+------------------------------------------------------------------------------------------------------+ | deflateCompressionLevel | -1 | The compression level used for ZLIB deflation(compression). | +---------------------------+---------------------+------------------------------------------------------------------------------------------------------+ | gzipCompatibleInflation | true | If true, then ZLIB inflation(decompression) will be performed in the GZIP-compatible mode. | +---------------------------+---------------------+------------------------------------------------------------------------------------------------------+ | syncFlush | false | The flush mode. Set to true if the application wishes to stream (e.g. SSE) the data, | | | | but this may hurt compression performance (as all pending output is flushed). | +---------------------------+---------------------+------------------------------------------------------------------------------------------------------+ .. _man-configuration-requestLog: Request Log ........... The new request log uses the `logback-access`_ library for processing request logs, which allow to use an extended set of logging patterns. See the `logback-access-pattern`_ docs for the reference. .. code-block:: yaml server: requestLog: appenders: - type: console .. _logback-access: http://logback.qos.ch/access.html .. _logback-access-pattern: http://logback.qos.ch/manual/layouts.html#AccessPatternLayout ====================== ================ ====================================================================== Name Default Description ====================== ================ ====================================================================== appenders console appender The set of AppenderFactory appenders to which requests will be logged. See :ref:`logging <man-configuration-logging>` for more info. ====================== ================ ====================================================================== Classic Request Log ................... The classic request log uses the `logback-classic`_ library for processing request logs. It produces logs only in the standard `NCSA common log format`_, but allows to use an extended set of appenders. .. code-block:: yaml server: requestLog: type: classic timeZone: UTC appenders: - type: console .. _logback-classic: http://logback.qos.ch/ .. _NCSA common log format: https://en.wikipedia.org/wiki/Common_Log_Format ====================== ================ ====================================================================== Name Default Description ====================== ================ ====================================================================== timeZone UTC The time zone to which request timestamps will be converted. appenders console appender The set of AppenderFactory appenders to which requests will be logged. See :ref:`logging <man-configuration-logging>` for more info. ====================== ================ ====================================================================== .. _man-configuration-server-push: Server Push ........... Server push technology allows a server to send additional resources to a client along with the requested resource. It works only for HTTP/2 connections. .. code-block:: yaml server: serverPush: enabled: true associatePeriod: '4 seconds' maxAssociations: 16 refererHosts: ['dropwizard.io', 'dropwizard.github.io'] refererPorts: [8444, 8445] +-----------------+------------+------------------------------------------------------------------------------------------------------+ | Name | Default | Description | +=================+============+======================================================================================================+ | enabled | false | If true, the filter will organize resources as primary resources (those referenced by the | | | | ``Referer`` header) and secondary resources (those that have the ``Referer`` header). Secondary | | | | resources that have been requested within a time window from the request of the primary resource | | | | will be associated with the it. The next time a client will request the primary resource, the | | | | server will send to the client the secondary resources along with the primary in a single response. | +-----------------+------------+------------------------------------------------------------------------------------------------------+ | associatePeriod | 4 seconds | The time window within which a request for a secondary resource will be associated to a | | | | primary resource.. | +-----------------+------------+------------------------------------------------------------------------------------------------------+ | maxAssociations | 16 | The maximum number of secondary resources that may be associated to a primary resource. | +-----------------+------------+------------------------------------------------------------------------------------------------------+ | refererHosts | All hosts | The list of referrer hosts for which the server push technology is supported. | +-----------------+------------+------------------------------------------------------------------------------------------------------+ | refererPorts | All ports | The list of referrer ports for which the server push technology is supported | +-----------------+------------+------------------------------------------------------------------------------------------------------+ .. _man-configuration-simple: Simple ------ Extends the attributes that are available to :ref:`all servers <man-configuration-all>` .. code-block:: yaml server: type: simple applicationContextPath: /application adminContextPath: /admin connector: type: http port: 8080 ======================== =============== ===================================================================== Name Default Description ======================== =============== ===================================================================== connector http connector HttpConnectorFactory HTTP connector listening on port 8080. The ConnectorFactory connector which will handle both application and admin requests. TODO link to connector below. applicationContextPath /application The context path of the application servlets, including Jersey. adminContextPath /admin The context path of the admin servlets, including metrics and tasks. ======================== =============== ===================================================================== .. _man-configuration-default: Default ------- Extends the attributes that are available to :ref:`all servers <man-configuration-all>` .. code-block:: yaml server: adminMinThreads: 1 adminMaxThreads: 64 adminContextPath: / applicationContextPath: / applicationConnectors: - type: http port: 8080 - type: https port: 8443 keyStorePath: example.keystore keyStorePassword: example validateCerts: false adminConnectors: - type: http port: 8081 - type: https port: 8444 keyStorePath: example.keystore keyStorePassword: example validateCerts: false ======================== ======================= ===================================================================== Name Default Description ======================== ======================= ===================================================================== applicationConnectors An `HTTP connector`_ A set of :ref:`connectors <man-configuration-connectors>` which will listening on port 8080. handle application requests. adminConnectors An `HTTP connector`_ An `HTTP connector`_ listening on port 8081. listening on port 8081. A set of :ref:`connectors <man-configuration-connectors>` which will handle admin requests. adminMinThreads 1 The minimum number of threads to use for admin requests. adminMaxThreads 64 The maximum number of threads to use for admin requests. adminContextPath / The context path of the admin servlets, including metrics and tasks. applicationContextPath / The context path of the application servlets, including Jersey. ======================== ======================= ===================================================================== .. _`HTTP connector`: https://github.com/dropwizard/dropwizard/blob/master/dropwizard-jetty/src/main/java/io/dropwizard/jetty/HttpConnectorFactory.java .. _man-configuration-connectors: Connectors ========== .. _man-configuration-http: HTTP ---- .. code-block:: yaml # Extending from the default server configuration server: applicationConnectors: - type: http port: 8080 bindHost: 127.0.0.1 # only bind to loopback inheritChannel: false headerCacheSize: 512 bytes outputBufferSize: 32KiB maxRequestHeaderSize: 8KiB maxResponseHeaderSize: 8KiB inputBufferSize: 8KiB idleTimeout: 30 seconds minBufferPoolSize: 64 bytes bufferPoolIncrement: 1KiB maxBufferPoolSize: 64KiB minRequestDataRate: 0 acceptorThreads: 1 selectorThreads: 2 acceptQueueSize: 1024 reuseAddress: true soLingerTime: 345s useServerHeader: false useDateHeader: true useForwardedHeaders: true httpCompliance: RFC7230 ======================== ================== ====================================================================================== Name Default Description ======================== ================== ====================================================================================== port 8080 The TCP/IP port on which to listen for incoming connections. bindHost (none) The hostname to bind to. inheritChannel false Whether this connector uses a channel inherited from the JVM. Use it with `Server::Starter`_, to launch an instance of Jetty on demand. headerCacheSize 512 bytes The size of the header field cache. outputBufferSize 32KiB The size of the buffer into which response content is aggregated before being sent to the client. A larger buffer can improve performance by allowing a content producer to run without blocking, however larger buffers consume more memory and may induce some latency before a client starts processing the content. maxRequestHeaderSize 8KiB The maximum size of a request header. Larger headers will allow for more and/or larger cookies plus larger form content encoded in a URL. However, larger headers consume more memory and can make a server more vulnerable to denial of service attacks. maxResponseHeaderSize 8KiB The maximum size of a response header. Larger headers will allow for more and/or larger cookies and longer HTTP headers (eg for redirection). However, larger headers will also consume more memory. inputBufferSize 8KiB The size of the per-connection input buffer. idleTimeout 30 seconds The maximum idle time for a connection, which roughly translates to the `java.net.Socket#setSoTimeout(int)`_ call, although with NIO implementations other mechanisms may be used to implement the timeout. The max idle time is applied when waiting for a new message to be received on a connection or when waiting for a new message to be sent on a connection. This value is interpreted as the maximum time between some progress being made on the connection. So if a single byte is read or written, then the timeout is reset. blockingTimeout (none) The timeout applied to blocking operations. This timeout is in addition to the `idleTimeout`, and applies to the total operation (as opposed to the idle timeout that applies to the time no data is being sent). minBufferPoolSize 64 bytes The minimum size of the buffer pool. bufferPoolIncrement 1KiB The increment by which the buffer pool should be increased. maxBufferPoolSize 64KiB The maximum size of the buffer pool. minRequestDataRate 0 The minimum request data rate in bytes per second; or <= 0 for no limit acceptorThreads (Jetty's default) The number of worker threads dedicated to accepting connections. By default is *max(1, min(4, #CPUs/8))*. selectorThreads (Jetty's default) The number of worker threads dedicated to sending and receiving data. By default is *max(1, min(4, #CPUs/2))*. acceptQueueSize (OS default) The size of the TCP/IP accept queue for the listening socket. reuseAddress true Whether or not ``SO_REUSEADDR`` is enabled on the listening socket. soLingerTime (disabled) Enable/disable ``SO_LINGER`` with the specified linger time. useServerHeader false Whether or not to add the ``Server`` header to each response. useDateHeader true Whether or not to add the ``Date`` header to each response. useForwardedHeaders true Whether or not to look at ``X-Forwarded-*`` headers added by proxies. See `ForwardedRequestCustomizer`_ for details. httpCompliance RFC7230 This sets the http compliance level used by Jetty when parsing http, this can be useful when using a non-RFC7230 compliant front end, such as nginx, which can produce multi-line headers when forwarding client certificates using ``proxy_set_header X-SSL-CERT $ssl_client_cert;`` Possible values are set forth in the ``org.eclipse.jetty.http.HttpCompliance`` enum: * RFC7230: Disallow header folding. * RFC2616: Allow header folding. ======================== ================== ====================================================================================== .. _`java.net.Socket#setSoTimeout(int)`: http://docs.oracle.com/javase/7/docs/api/java/net/Socket.html#setSoTimeout(int) .. _`ForwardedRequestCustomizer`: http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/server/ForwardedRequestCustomizer.html .. _`Server::Starter`: https://github.com/kazuho/p5-Server-Starter .. _man-configuration-https: HTTPS ----- Extends the attributes that are available to the :ref:`HTTP connector <man-configuration-http>` .. code-block:: yaml # Extending from the default server configuration server: applicationConnectors: - type: https port: 8443 .... keyStorePath: /path/to/file keyStorePassword: changeit keyStoreType: JKS keyStoreProvider: trustStorePath: /path/to/file trustStorePassword: changeit trustStoreType: JKS trustStoreProvider: keyManagerPassword: changeit needClientAuth: false wantClientAuth: certAlias: <alias> crlPath: /path/to/file enableCRLDP: false enableOCSP: false maxCertPathLength: (unlimited) ocspResponderUrl: (none) jceProvider: (none) validateCerts: false validatePeers: false supportedProtocols: (JVM default) excludedProtocols: [SSL, SSLv2, SSLv2Hello, SSLv3] # (Jetty's default) supportedCipherSuites: (JVM default) excludedCipherSuites: [.*_(MD5|SHA|SHA1)$] # (Jetty's default) allowRenegotiation: true endpointIdentificationAlgorithm: (none) ================================ ================== ====================================================================================== Name Default Description ================================ ================== ====================================================================================== keyStorePath REQUIRED The path to the Java key store which contains the host certificate and private key. keyStorePassword REQUIRED The password used to access the key store. keyStoreType JKS The type of key store (usually ``JKS``, ``PKCS12``, ``JCEKS``, ``Windows-MY``}, or ``Windows-ROOT``). keyStoreProvider (none) The JCE provider to use to access the key store. trustStorePath (none) The path to the Java key store which contains the CA certificates used to establish trust. trustStorePassword (none) The password used to access the trust store. trustStoreType JKS The type of trust store (usually ``JKS``, ``PKCS12``, ``JCEKS``, ``Windows-MY``, or ``Windows-ROOT``). trustStoreProvider (none) The JCE provider to use to access the trust store. keyManagerPassword (none) The password, if any, for the key manager. needClientAuth (none) Whether or not client authentication is required. wantClientAuth (none) Whether or not client authentication is requested. certAlias (none) The alias of the certificate to use. crlPath (none) The path to the file which contains the Certificate Revocation List. enableCRLDP false Whether or not CRL Distribution Points (CRLDP) support is enabled. enableOCSP false Whether or not On-Line Certificate Status Protocol (OCSP) support is enabled. maxCertPathLength (unlimited) The maximum certification path length. ocspResponderUrl (none) The location of the OCSP responder. jceProvider (none) The name of the JCE provider to use for cryptographic support. validateCerts false Whether or not to validate TLS certificates before starting. If enabled, Dropwizard will refuse to start with expired or otherwise invalid certificates. This option will cause unconditional failure in Dropwizard 1.x until a new validation mechanism can be implemented. validatePeers false Whether or not to validate TLS peer certificates. This option will cause unconditional failure in Dropwizard 1.x until a new validation mechanism can be implemented. supportedProtocols (none) A list of protocols (e.g., ``SSLv3``, ``TLSv1``) which are supported. All other protocols will be refused. excludedProtocols (none) A list of protocols (e.g., ``SSLv3``, ``TLSv1``) which are excluded. These protocols will be refused. supportedCipherSuites (none) A list of cipher suites (e.g., ``TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256``) which are supported. All other cipher suites will be refused excludedCipherSuites (none) A list of cipher suites (e.g., ``TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256``) which are excluded. These cipher suites will be refused and exclusion takes higher precedence than inclusion, such that if a cipher suite is listed in ``supportedCipherSuites`` and ``excludedCipherSuites``, the cipher suite will be excluded. To verify that the proper cipher suites are being whitelisted and blacklisted, it is recommended to use the tool `sslyze`_. allowRenegotiation true Whether or not TLS renegotiation is allowed. endpointIdentificationAlgorithm (none) Which endpoint identification algorithm, if any, to use during the TLS handshake. ================================ ================== ====================================================================================== .. _sslyze: https://github.com/nabla-c0d3/sslyze .. _man-configuration-http2: HTTP/2 over TLS --------------- HTTP/2 is a new protocol, intended as a successor of HTTP/1.1. It adds several important features like binary structure, stream multiplexing over a single connection, header compression, and server push. At the same time it remains semantically compatible with HTTP/1.1, which should make the upgrade process more seamless. Checkout HTTP/2 FAQ__ for the further information. .. __: https://http2.github.io/faq/ For an encrypted connection HTTP/2 uses ALPN protocol. It's a TLS extension, that allows a client to negotiate a protocol to use after the handshake is complete. If either side does not support ALPN, then the protocol will be ignored, and an HTTP/1.1 connection over TLS will be used instead. For this connector to work with ALPN protocol you need to provide alpn-boot library to JVM's bootpath. The correct library version depends on a JVM version. Consult Jetty ALPN guide__ for the reference. .. __: http://www.eclipse.org/jetty/documentation/current/alpn-chapter.html Note that your JVM also must provide ``TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256`` cipher. The specification states__ that HTTP/2 deployments must support it to avoid handshake failures. It's the single supported cipher in HTTP/2 connector by default. In case you want to support more strong ciphers, you should specify them in the ``supportedCipherSuites`` parameter along with ``TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256``. .. __: http://http2.github.io/http2-spec/index.html#rfc.section.9.2.2 This connector extends the attributes that are available to the :ref:`HTTPS connector <man-configuration-https>` .. code-block:: yaml server: applicationConnectors: - type: h2 port: 8445 maxConcurrentStreams: 1024 initialStreamRecvWindow: 65535 keyStorePath: /path/to/file # required keyStorePassword: changeit trustStorePath: /path/to/file # required trustStorePassword: changeit supportedCipherSuites: # optional - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 ======================== ======== =================================================================================== Name Default Description ======================== ======== =================================================================================== maxConcurrentStreams 1024 The maximum number of concurrently open streams allowed on a single HTTP/2 connection. Larger values increase parallelism, but cost a memory commitment. initialStreamRecvWindow 65535 The initial flow control window size for a new stream. Larger values may allow greater throughput, but also risk head of line blocking if TCP/IP flow control is triggered. ======================== ======== =================================================================================== .. _man-configuration-http2c: HTTP/2 Plain Text ----------------- HTTP/2 promotes using encryption, but doesn't require it. However, most browsers stated that they will not support HTTP/2 without encryption. Currently no browser supports HTTP/2 unencrypted. The connector should only be used in closed secured networks or during development. It expects from clients an HTTP/1.1 OPTIONS request with ``Upgrade : h2c`` header to indicate a wish to upgrade to HTTP/2, or a request with the HTTP/2 connection preface. If the client doesn't support HTTP/2, a plain HTTP/1.1 connections will be used instead. This connector extends the attributes that are available to the :ref:`HTTP connector <man-configuration-http>` .. code-block:: yaml server: applicationConnectors: - type: h2c port: 8446 maxConcurrentStreams: 1024 initialStreamRecvWindow: 65535 ======================== ======== =================================================================================== Name Default Description ======================== ======== =================================================================================== maxConcurrentStreams 1024 The maximum number of concurrently open streams allowed on a single HTTP/2 connection. Larger values increase parallelism, but cost a memory commitment. initialStreamRecvWindow 65535 The initial flow control window size for a new stream. Larger values may allow greater throughput, but also risk head of line blocking if TCP/IP flow control is triggered. ======================== ======== =================================================================================== .. _man-configuration-logging: Logging ======= .. code-block:: yaml logging: level: INFO loggers: "io.dropwizard": INFO "org.hibernate.SQL": level: DEBUG additive: false appenders: - type: file currentLogFilename: /var/log/myapplication-sql.log archivedLogFilenamePattern: /var/log/myapplication-sql-%d.log.gz archivedFileCount: 5 appenders: - type: console ====================== =========== ============================================================ Name Default Description ====================== =========== ============================================================ level Level.INFO Logback logging level. additive true Logback additive setting. loggers (none) Individual logger configuration (both forms are acceptable). appenders (none) One of console, file or syslog. ====================== =========== ============================================================ .. _man-configuration-logging-console: Console ------- .. code-block:: yaml logging: level: INFO appenders: - type: console threshold: ALL queueSize: 512 discardingThreshold: 0 timeZone: UTC target: stdout logFormat: "%-5p [%d{ISO8601,UTC}] %c: %m%n%rEx" filterFactories: - type: URI ====================== ======================================= =========== Name Default Description ====================== ======================================= =========== type REQUIRED The appender type. Must be ``console``. threshold ALL The lowest level of events to print to the console. queueSize 256 The maximum capacity of the blocking queue. discardingThreshold 51 When the blocking queue has only the capacity mentioned in discardingThreshold remaining, it will drop events of level TRACE, DEBUG and INFO, keeping only events of level WARN and ERROR. If no discarding threshold is specified, then a default of queueSize / 5 is used. To keep all events, set discardingThreshold to 0. timeZone UTC The time zone to which event timestamps will be converted. To use the system/default time zone, set it to ``system``. target stdout The name of the standard stream to which events will be written. Can be ``stdout`` or ``stderr``. logFormat %-5p [%d{ISO8601,UTC}] %c: %m%n%rEx The Logback pattern with which events will be formatted. See the Logback_ documentation for details. filterFactories (none) The list of filters to apply to the appender, in order, after the threshold. neverBlock false Prevent the wrapping asynchronous appender from blocking when its underlying queue is full. Set to true to disable blocking. ====================== ======================================= =========== .. _Logback: http://logback.qos.ch/manual/layouts.html#conversionWord .. _man-configuration-logging-file: File ---- .. code-block:: yaml logging: level: INFO appenders: - type: file currentLogFilename: /var/log/myapplication.log threshold: ALL queueSize: 512 discardingThreshold: 0 archive: true archivedLogFilenamePattern: /var/log/myapplication-%d.log archivedFileCount: 5 timeZone: UTC logFormat: "%-5p [%d{ISO8601,UTC}] %c: %m%n%rEx" bufferSize: 8KB filterFactories: - type: URI ============================ ========================================= ================================================================================================== Name Default Description ============================ ========================================= ================================================================================================== type REQUIRED The appender type. Must be ``file``. currentLogFilename REQUIRED The filename where current events are logged. threshold ALL The lowest level of events to write to the file. queueSize 256 The maximum capacity of the blocking queue. discardingThreshold 51 When the blocking queue has only the capacity mentioned in discardingThreshold remaining, it will drop events of level TRACE, DEBUG and INFO, keeping only events of level WARN and ERROR. If no discarding threshold is specified, then a default of queueSize / 5 is used. To keep all events, set discardingThreshold to 0. archive true Whether or not to archive old events in separate files. archivedLogFilenamePattern (none) Required if ``archive`` is ``true``. The filename pattern for archived files. If ``maxFileSize`` is specified, rollover is size-based, and the pattern must contain ``%i`` for an integer index of the archived file. Otherwise rollover is date-based, and the pattern must contain ``%d``, which is replaced with the date in ``yyyy-MM-dd`` form. If the pattern ends with ``.gz`` or ``.zip``, files will be compressed as they are archived. archivedFileCount 5 The number of archived files to keep. Must be greater than or equal to ``0``. Zero is a special value signifying to keep infinite logs (use with caution) maxFileSize (unlimited) The maximum size of the currently active file before a rollover is triggered. The value can be expressed in bytes, kilobytes, megabytes, gigabytes, and terabytes by appending B, K, MB, GB, or TB to the numeric value. Examples include 100MB, 1GB, 1TB. Sizes can also be spelled out, such as 100 megabytes, 1 gigabyte, 1 terabyte. timeZone UTC The time zone to which event timestamps will be converted. logFormat %-5p [%d{ISO8601,UTC}] %c: %m%n%rEx The Logback pattern with which events will be formatted. See the Logback_ documentation for details. filterFactories (none) The list of filters to apply to the appender, in order, after the threshold. neverBlock false Prevent the wrapping asynchronous appender from blocking when its underlying queue is full. Set to true to disable blocking. bufferSize 8KB The buffer size of the underlying FileAppender (setting added in logback 1.1.10). Increasing this from the default of 8KB to 256KB is reported to significantly reduce thread contention. ============================ ========================================= ================================================================================================== .. _man-configuration-logging-syslog: Syslog ------ .. code-block:: yaml logging: level: INFO appenders: - type: syslog host: localhost port: 514 facility: local0 threshold: ALL stackTracePrefix: \t logFormat: "%-5p [%d{ISO8601,UTC}] %c: %m%n%rEx" filterFactories: - type: URI ============================ ===================================== ================================================================================================== Name Default Description ============================ ===================================== ================================================================================================== host localhost The hostname of the syslog server. port 514 The port on which the syslog server is listening. facility local0 The syslog facility to use. Can be either ``auth``, ``authpriv``, ``daemon``, ``cron``, ``ftp``, ``lpr``, ``kern``, ``mail``, ``news``, ``syslog``, ``user``, ``uucp``, ``local0``, ``local1``, ``local2``, ``local3``, ``local4``, ``local5``, ``local6``, or ``local7``. threshold ALL The lowest level of events to write to the file. logFormat %-5p [%d{ISO8601,UTC}] %c: %m%n%rEx The Logback pattern with which events will be formatted. See the Logback_ documentation for details. stackTracePrefix \t The prefix to use when writing stack trace lines (these are sent to the syslog server separately from the main message) filterFactories (none) The list of filters to apply to the appender, in order, after the threshold. neverBlock false Prevent the wrapping asynchronous appender from blocking when its underlying queue is full. Set to true to disable blocking. ============================ ===================================== ================================================================================================== .. _man-configuration-logging-filter-factories: FilterFactories --------------- .. code-block:: yaml logging: level: INFO appenders: - type: console filterFactories: - type: URI ====================== =========== ================ Name Default Description ====================== =========== ================ type REQUIRED The filter type. ====================== =========== ================ .. _man-configuration-metrics: Metrics ======= The metrics configuration has two fields; frequency and reporters. .. code-block:: yaml metrics: frequency: 1 minute reporters: - type: <type> ====================== =========== =========== Name Default Description ====================== =========== =========== frequency 1 minute The frequency to report metrics. Overridable per-reporter. reporters (none) A list of reporters to report metrics. ====================== =========== =========== .. _man-configuration-metrics-all: All Reporters ------------- The following options are available for all metrics reporters. .. code-block:: yaml metrics: reporters: - type: <type> durationUnit: milliseconds rateUnit: seconds excludes: (none) includes: (all) excludesAttributes: (none) includesAttributes: (all) useRegexFilters: false frequency: 1 minute ====================== ============= =========== Name Default Description ====================== ============= =========== durationUnit milliseconds The unit to report durations as. Overrides per-metric duration units. rateUnit seconds The unit to report rates as. Overrides per-metric rate units. excludes (none) Metrics to exclude from reports, by name. When defined, matching metrics will not be reported. includes (all) Metrics to include in reports, by name. When defined, only these metrics will be reported. excludesAttributes (none) Metric attributes to exclude from reports, by name (e.g. ``p98``, ``m15_rate``, ``stddev``). When defined, matching metrics attributes will not be reported. includesAttributes (all) Metrics attributes to include in reports, by name (e.g. ``p98``, ``m15_rate``, ``stddev``). When defined, only these attributes will be reported. useRegexFilters false Indicates whether the values of the 'includes' and 'excludes' fields should be treated as regular expressions or not. useSubstringMatching false Uses a substring matching strategy to determine whether a metric should be processed. frequency (none) The frequency to report metrics. Overrides the default. ====================== ============= =========== The inclusion and exclusion rules are defined as: * If **includes** is empty, then all metrics are included; * If **includes** is not empty, only metrics from this list are included; * If **excludes** is empty, no metrics are excluded; * If **excludes** is not empty, then exclusion rules take precedence over inclusion rules. Thus if a name matches the exclusion rules it will not be included in reports even if it also matches the inclusion rules. When neither **useRegexFilters** nor **useSubstringMatching** are enabled, a default exact matching strategy will be used to determine whether a metric should be processed. In case both **useRegexFilters** and **useSubstringMatching** are set, **useRegexFilters** takes precedence over **useSubstringMatching**. .. _man-configuration-metrics-formatted: Formatted Reporters ................... These options are available only to "formatted" reporters and extend the options available to :ref:`all reporters <man-configuration-metrics-all>` .. code-block:: yaml metrics: reporters: - type: <type> locale: <system default> ====================== =============== =========== Name Default Description ====================== =============== =========== locale System default The Locale_ for formatting numbers, dates and times. ====================== =============== =========== .. _Locale: http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html .. _man-configuration-metrics-console: Console Reporter ---------------- Reports metrics periodically to the console. Extends the attributes that are available to :ref:`formatted reporters <man-configuration-metrics-formatted>` .. code-block:: yaml metrics: reporters: - type: console timeZone: UTC output: stdout ====================== =============== =========== Name Default Description ====================== =============== =========== timeZone UTC The timezone to display dates/times for. output stdout The stream to write to. One of ``stdout`` or ``stderr``. ====================== =============== =========== .. _man-configuration-metrics-csv: CSV Reporter ------------ Reports metrics periodically to a CSV file. Extends the attributes that are available to :ref:`formatted reporters <man-configuration-metrics-formatted>` .. code-block:: yaml metrics: reporters: - type: csv file: /path/to/file ====================== =============== =========== Name Default Description ====================== =============== =========== file No default The CSV file to write metrics to. ====================== =============== =========== .. _man-configuration-metrics-ganglia: Ganglia Reporter ---------------- Reports metrics periodically to Ganglia. Extends the attributes that are available to :ref:`all reporters <man-configuration-metrics-all>` .. note:: You will need to add ``dropwizard-metrics-ganglia`` to your POM. .. code-block:: yaml metrics: reporters: - type: ganglia host: localhost port: 8649 mode: unicast ttl: 1 uuid: (none) spoof: localhost:8649 tmax: 60 dmax: 0 ====================== =============== ==================================================================================================== Name Default Description ====================== =============== ==================================================================================================== host localhost The hostname (or group) of the Ganglia server(s) to report to. port 8649 The port of the Ganglia server(s) to report to. mode unicast The UDP addressing mode to announce the metrics with. One of ``unicast`` or ``multicast``. ttl 1 The time-to-live of the UDP packets for the announced metrics. uuid (none) The UUID to tag announced metrics with. spoof (none) The hostname and port to use instead of this nodes for the announced metrics. In the format ``hostname:port``. tmax 60 The tmax value to announce metrics with. dmax 0 The dmax value to announce metrics with. ====================== =============== ==================================================================================================== .. _man-configuration-metrics-graphite: Graphite Reporter ----------------- Reports metrics periodically to Graphite. Extends the attributes that are available to :ref:`all reporters <man-configuration-metrics-all>` .. note:: You will need to add ``dropwizard-metrics-graphite`` to your POM. .. code-block:: yaml metrics: reporters: - type: graphite host: localhost port: 8080 prefix: <prefix> ====================== =============== ==================================================================================================== Name Default Description ====================== =============== ==================================================================================================== host localhost The hostname of the Graphite server to report to. port 8080 The port of the Graphite server to report to. prefix (none) The prefix for Metric key names to report to Graphite. ====================== =============== ==================================================================================================== .. _man-configuration-metrics-slf4j: SLF4J ----- Reports metrics periodically by logging via SLF4J. Extends the attributes that are available to :ref:`all reporters <man-configuration-metrics-all>` See BaseReporterFactory_ and BaseFormattedReporterFactory_ for more options. .. _BaseReporterFactory: https://github.com/dropwizard/dropwizard/blob/master/dropwizard-metrics/src/main/java/io/dropwizard/metrics/BaseReporterFactory.java .. _BaseFormattedReporterFactory: https://github.com/dropwizard/dropwizard/blob/master/dropwizard-metrics/src/main/java/io/dropwizard/metrics/BaseFormattedReporterFactory.java .. code-block:: yaml metrics: reporters: - type: log logger: metrics markerName: <marker name> ====================== =============== ==================================================================================================== Name Default Description ====================== =============== ==================================================================================================== logger metrics The name of the logger to write metrics to. markerName (none) The name of the marker to mark logged metrics with. ====================== =============== ==================================================================================================== .. _man-configuration-clients: Clients ======= .. _man-configuration-clients-http: HttpClient ---------- See HttpClientConfiguration_ for more options. .. _HttpClientConfiguration: https://github.com/dropwizard/dropwizard/blob/master/dropwizard-client/src/main/java/io/dropwizard/client/HttpClientConfiguration.java .. code-block:: yaml httpClient: timeout: 500ms connectionTimeout: 500ms timeToLive: 1h cookiesEnabled: false maxConnections: 1024 maxConnectionsPerRoute: 1024 keepAlive: 0ms retries: 0 userAgent: <application name> (<client name>) ============================= ====================================== ============================================================================= Name Default Description ============================= ====================================== ============================================================================= timeout 500 milliseconds The maximum idle time for a connection, once established. connectionTimeout 500 milliseconds The maximum time to wait for a connection to open. connectionRequestTimeout 500 milliseconds The maximum time to wait for a connection to be returned from the connection pool. timeToLive 1 hour The maximum time a pooled connection can stay idle (not leased to any thread) before it is shut down. cookiesEnabled false Whether or not to enable cookies. maxConnections 1024 The maximum number of concurrent open connections. maxConnectionsPerRoute 1024 The maximum number of concurrent open connections per route. keepAlive 0 milliseconds The maximum time a connection will be kept alive before it is reconnected. If set to 0, connections will be immediately closed after every request/response. retries 0 The number of times to retry failed requests. Requests are only retried if they throw an exception other than ``InterruptedIOException``, ``UnknownHostException``, ``ConnectException``, or ``SSLException``. userAgent ``applicationName`` (``clientName``) The User-Agent to send with requests. validateAfterInactivityPeriod 0 milliseconds The maximum time before a persistent connection is checked to remain active. If set to 0, no inactivity check will be performed. ============================= ====================================== ============================================================================= .. _man-configuration-clients-http-proxy: Proxy ..... .. code-block:: yaml httpClient: proxy: host: 192.168.52.11 port: 8080 scheme : http auth: username: secret password: stuff authScheme: NTLM realm: realm hostname: host domain: WINDOWSDOMAIN credentialType: NT nonProxyHosts: - localhost - '192.168.52.*' - '*.example.com' ============== ================= ===================================================================================== Name Default Description ============== ================= ===================================================================================== host REQUIRED The proxy server host name or ip address. port (scheme default) The proxy server port. If the port is not set then the scheme default port is used. scheme http The proxy server URI scheme. HTTP and HTTPS schemas are permitted. By default HTTP scheme is used. auth (none) The proxy server ``Basic`` or ``NTLM`` authentication schemes. If they are not set then no credentials will be passed to the server. username REQUIRED The username used to connect to the server. password REQUIRED The password used to connect to the server. authScheme Basic The authentication scheme used by the. Allowed options are: ``Basic``, ``NTLM`` realm (none) The realm, used for NTLM authentication. hostname (none) The hostname of the windows workstation, used for NTLM authentication. domain (none) The Windows Domain, used for NTLM authentication. credentialType (none) The Apache HTTP Client Credentials imeplementation used for proxy authentication. Allowed options are: ``UsernamePassword`` or ``NT`` nonProxyHosts (none) List of patterns of hosts that should be reached without proxy. The patterns may contain symbol '*' as a wildcard. If a host matches one of the patterns it will be reached through a direct connection. ============== ================= ===================================================================================== .. _man-configuration-clients-http-tls: TLS ..... .. code-block:: yaml httpClient: tls: protocol: TLSv1.2 verifyHostname: true keyStorePath: /path/to/file keyStorePassword: changeit keyStoreType: JKS trustStorePath: /path/to/file trustStorePassword: changeit trustStoreType: JKS trustSelfSignedCertificates: false supportedProtocols: TLSv1.1,TLSv1.2 supportedCipherSuites: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 certAlias: alias-of-specific-cert =========================== ================= ============================================================================================================================ Name Default Description =========================== ================= ============================================================================================================================ protocol TLSv1.2 The default protocol the client will attempt to use during the SSL Handshake. See `here <http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#SSLContext>`_ for more information. verifyHostname true Whether to verify the hostname of the server against the hostname presented in the server certificate. keyStorePath (none) The path to the Java key store which contains the client certificate and private key. keyStorePassword (none) The password used to access the key store. keyStoreType JKS The type of key store (usually ``JKS``, ``PKCS12``, ``JCEKS``, ``Windows-MY``, or ``Windows-ROOT``). trustStorePath (none) The path to the Java key store which contains the CA certificates used to establish trust. trustStorePassword (none) The password used to access the trust store. trustStoreType JKS The type of trust store (usually ``JKS``, ``PKCS12``, ``JCEKS``, ``Windows-MY``, or ``Windows-ROOT``). trustSelfSignedCertificates false If true, will trust all self-signed certificates regardless of trustStore settings. If false, trust decisions will be handled by the supplied trustStore. supportedProtocols (none) A list of protocols (e.g., ``SSLv3``, ``TLSv1``) which are supported. All other protocols will be refused. supportedCipherSuites (none) A list of cipher suites (e.g., ``TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256``) which are supported. All other cipher suites will be refused. certAlias (none) The alias of a specific client certificate to present when authenticating. Use this when the specified keystore has multiple certificates to force use of a non-default certficate. =========================== ================= ============================================================================================================================ .. _man-configuration-clients-jersey: JerseyClient ------------ Extends the attributes that are available to :ref:`http clients <man-configuration-clients-http>` See JerseyClientConfiguration_ and HttpClientConfiguration_ for more options. .. _JerseyClientConfiguration: https://github.com/dropwizard/dropwizard/blob/master/dropwizard-client/src/main/java/io/dropwizard/client/JerseyClientConfiguration.java .. code-block:: yaml jerseyClient: minThreads: 1 maxThreads: 128 workQueueSize: 8 gzipEnabled: true gzipEnabledForRequests: true chunkedEncodingEnabled: true ======================= ================== =================================================================================================== Name Default Description ======================= ================== =================================================================================================== minThreads 1 The minimum number of threads in the pool used for asynchronous requests. maxThreads 128 The maximum number of threads in the pool used for asynchronous requests. If asynchronous requests made by jersey client while serving requests, the number must be set according to the `maxThread` setting of the :ref:`server <man-configuration-all>`. Otherwise some requests made to dropwizard on heavy load may fail due to congestion on the jersey client's thread pool. workQueueSize 8 The size of the work queue of the pool used for asynchronous requests. Additional threads will be spawn only if the queue is reached its maximum size. gzipEnabled true Adds an Accept-Encoding: gzip header to all requests, and enables automatic gzip decoding of responses. gzipEnabledForRequests true Adds a Content-Encoding: gzip header to all requests, and enables automatic gzip encoding of requests. chunkedEncodingEnabled true Enables the use of chunked encoding for requests. ======================= ================== =================================================================================================== .. _man-configuration-database: Database ======== .. code-block:: yaml database: driverClass : org.postgresql.Driver url: 'jdbc:postgresql://db.example.com/db-prod' user: pg-user password: iAMs00perSecrEET ============================ ===================== =============================================================== Name Default Description ============================ ===================== =============================================================== driverClass REQUIRED The full name of the JDBC driver class. url REQUIRED The URL of the server. user none The username used to connect to the server. password none The password used to connect to the server. removeAbandoned false Remove abandoned connections if they exceed removeAbandonedTimeout. If set to true a connection is considered abandoned and eligible for removal if it has been in use longer than the removeAbandonedTimeout and the condition for abandonWhenPercentageFull is met. removeAbandonedTimeout 60 seconds The time before a database connection can be considered abandoned. abandonWhenPercentageFull 0 Connections that have been abandoned (timed out) won't get closed and reported up unless the number of connections in use are above the percentage defined by abandonWhenPercentageFull. The value should be between 0-100. alternateUsernamesAllowed false Set to true if the call getConnection(username,password) is allowed. This is used for when the pool is used by an application accessing multiple schemas. There is a performance impact turning this option on, even when not used. commitOnReturn false Set to true if you want the connection pool to commit any pending transaction when a connection is returned. rollbackOnReturn false Set to true if you want the connection pool to rollback any pending transaction when a connection is returned. autoCommitByDefault JDBC driver's default The default auto-commit state of the connections. readOnlyByDefault JDBC driver's default The default read-only state of the connections. properties none Any additional JDBC driver parameters. defaultCatalog none The default catalog to use for the connections. defaultTransactionIsolation JDBC driver's default The default transaction isolation to use for the connections. Can be one of none, default, read-uncommitted, read-committed, repeatable-read, or serializable. useFairQueue true If true, calls to getConnection are handled in a FIFO manner. initialSize 10 The initial size of the connection pool. minSize 10 The minimum size of the connection pool. maxSize 100 The maximum size of the connection pool. initializationQuery none A custom query to be run when a connection is first created. logAbandonedConnections false If true, logs stack traces of abandoned connections. logValidationErrors false If true, logs errors when connections fail validation. maxConnectionAge none If set, connections which have been open for longer than maxConnectionAge are closed when returned. maxWaitForConnection 30 seconds If a request for a connection is blocked for longer than this period, an exception will be thrown. minIdleTime 1 minute The minimum amount of time an connection must sit idle in the pool before it is eligible for eviction. validationQuery SELECT 1 The SQL query that will be used to validate connections from this pool before returning them to the caller or pool. If specified, this query does not have to return any data, it just can't throw a SQLException.( FireBird will throw exception unless validationQuery set to **select 1 from rdb$database**) validationQueryTimeout none The timeout before a connection validation queries fail. checkConnectionWhileIdle true Set to true if query validation should take place while the connection is idle. checkConnectionOnBorrow false Whether or not connections will be validated before being borrowed from the pool. If the connection fails to validate, it will be dropped from the pool, and another will be borrowed. checkConnectionOnConnect false Whether or not connections will be validated before being added to the pool. If the connection fails to validate, it won't be added to the pool. checkConnectionOnReturn false Whether or not connections will be validated after being returned to the pool. If the connection fails to validate, it will be dropped from the pool. autoCommentsEnabled true Whether or not ORMs should automatically add comments. evictionInterval 5 seconds The amount of time to sleep between runs of the idle connection validation, abandoned cleaner and idle pool resizing. validationInterval 30 seconds To avoid excess validation, only run validation once every interval. validatorClassName none Name of a class of a custom validator implementation, which will be used for validating connections. jdbcInterceptors none A semicolon separated list of JDBC interceptor classnames. ============================ ===================== =============================================================== .. _man-configuration-polymorphic: Polymorphic configuration ========================= .. rubric:: The ``dropwizard-configuration`` module provides you with a polymorphic configuration mechanism, meaning that a particular section of your configuration file can be implemented using one or more configuration classes. To use this capability for your own configuration classes, create a top-level configuration interface or class that implements ``Discoverable`` and add the name of that class to ``META-INF/services/io.dropwizard.jackson.Discoverable``. Make sure to use `Jackson polymorphic deserialization`_ annotations appropriately. .. _Jackson polymorphic deserialization: http://wiki.fasterxml.com/JacksonPolymorphicDeserialization .. code-block:: java @JsonTypeInfo(use = Id.NAME, include = As.PROPERTY, property = "type") interface WidgetFactory extends Discoverable { Widget createWidget(); } Then create subtypes of the top-level type corresponding to each alternative, and add their names to ``META-INF/services/WidgetFactory``. .. code-block:: java @JsonTypeName("hammer") public class HammerFactory implements WidgetFactory { @JsonProperty private int weight = 10; @Override public Hammer createWidget() { return new Hammer(weight); } } @JsonTypeName("chisel") public class ChiselFactory implements WidgetFactory { @JsonProperty private float radius = 1; @Override public Chisel createWidget() { return new Chisel(radius); } } Now you can use ``WidgetFactory`` objects in your application's configuration. .. code-block:: java public class MyConfiguration extends Configuration { @JsonProperty @NotNull @Valid private List<WidgetFactory> widgets; } .. code-block:: yaml widgets: - type: hammer weight: 20 - type: chisel radius: 0.4 See :ref:`testing configurations <man-testing-configurations>` for details on ensuring the configuration will be deserialized correctly.
{ "content_hash": "881fe1a475c7a8ec22a5164801eb08f9", "timestamp": "", "source": "github", "line_count": 1394, "max_line_length": 414, "avg_line_length": 58.63916786226686, "alnum_prop": 0.4654588160454106, "repo_name": "patrox/dropwizard", "id": "a04b373d8155c295f402cc4ed199eb713903728e", "size": "81743", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docs/source/manual/configuration.rst", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "5043" }, { "name": "FreeMarker", "bytes": "1070" }, { "name": "HTML", "bytes": "680" }, { "name": "Java", "bytes": "2182363" }, { "name": "Shell", "bytes": "13967" } ], "symlink_target": "" }
package com.github.emboss.siphash; /** * * @author <a href="mailto:Martin.Bosslet@googlemail.com">Martin Bosslet</a> */ public class SipKey { private final byte[] key; public SipKey(byte[] key) { if (key == null || key.length != 16) throw new RuntimeException("SipHash key must be 16 bytes"); this.key = key; } long getLeftHalf() { return UnsignedInt64.binToIntOffset(key, 0); } long getRightHalf() { return UnsignedInt64.binToIntOffset(key, 8); } }
{ "content_hash": "62f93728163ada805e6d29c59f2e3f42", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 76, "avg_line_length": 23.608695652173914, "alnum_prop": 0.5948434622467772, "repo_name": "emboss/siphash-java", "id": "6c8cf03b348ff43896b46c1e64f6b224521c122a", "size": "543", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/com/github/emboss/siphash/SipKey.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "7209" } ], "symlink_target": "" }
@interface TVProgramTableViewCell : UITableViewCell @property (weak, nonatomic) IBOutlet UILabel *dateLabel; @property (weak, nonatomic) IBOutlet UILabel *detailLabel; @end
{ "content_hash": "5761522e3bf023a11cb830079938f940", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 58, "avg_line_length": 22.125, "alnum_prop": 0.7966101694915254, "repo_name": "BigKingQY/007Repository", "id": "a6199e47014ae6e0af437761e6e51caddb8fd5a3", "size": "348", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "TV_Program/TV_Program/View/TVProgramTableViewCell.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Objective-C", "bytes": "683613" }, { "name": "Ruby", "bytes": "522" }, { "name": "Shell", "bytes": "25617" } ], "symlink_target": "" }
<!DOCTYPE HTML> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"> <head> <div th:include="fragment :: head"></div> <link href="css/signin.css" rel="stylesheet"/> </head> <body> <div class="container" th:include="fragment :: header"></div> <div class="container"> <form class="form-signin" method="POST" th:action="@{/api/me}"> <h2 class="form-signin-heading">Please enter your details below:</h2> <label for="inputUsername" class="sr-only">Username</label> <input type="username" id="inputUsername" name="username" class="form-control" placeholder="Username" required="" autofocus=""/> <label for="inputPassword" class="sr-only">Password</label> <input type="password" id="inputPassword" name="password" class="form-control" placeholder="Password" required=""/> <div class="checkbox"> <!--<label>--> <!--<input type="checkbox" value="remember-me"> Remember me--> <!--</label>--> </div> <button class="btn btn-lg btn-secondary btn-block" type="submit">Sign up</button> <p>Already a member? <a th:ref="${/signin}">Sign in here!</a></p> </form> </div> <footer class="footer" th:include="fragment :: footer"></footer> <script src="https://code.jquery.com/jquery-3.1.0.min.js"></script> <script src="bootstrap/js/bootstrap.min.js"></script> <script src="js/barRest.js"></script> </body> </html>
{ "content_hash": "1eab3ad32e734d31657509e30d4ae179", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 136, "avg_line_length": 34.642857142857146, "alnum_prop": 0.6268041237113402, "repo_name": "OispaKaljaa/oispakaljaa", "id": "9593d8f536ffd47ef23933e464c24f940e31d875", "size": "1455", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/resources/templates/signup.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "28765" }, { "name": "HTML", "bytes": "9643" }, { "name": "Java", "bytes": "33205" }, { "name": "JavaScript", "bytes": "4493" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <billStatus> <bill> <billNumber>57</billNumber> <title>A resolution to constitute the majority party's membership on certain committees for the One Hundred Fifteenth Congress, or until their successors are chosen.</title> <policyArea> <name>Congress</name> </policyArea> <cboCostEstimates /> <relatedBills /> <originChamber>Senate</originChamber> <sponsors> <item> <party>R</party> <identifiers> <gpoId>8254</gpoId> <lisID>1395</lisID> <bioguideId>M000355</bioguideId> </identifiers> <middleName /> <bioguideId>M000355</bioguideId> <fullName>Sen. McConnell, Mitch [R-KY]</fullName> <lastName>MCCONNELL</lastName> <state>KY</state> <firstName>MITCH</firstName> <byRequestType /> </item> </sponsors> <version>1.0.0</version> <laws /> <billType>SRES</billType> <introducedDate>2017-02-09</introducedDate> <recordedVotes /> <committeeReports /> <calendarNumbers /> <congress>115</congress> <summaries> <billSummaries> <item> <versionCode>00</versionCode> <name>Introduced in Senate</name> <actionDate>2017-02-09</actionDate> <actionDesc>Introduced in Senate</actionDesc> <lastSummaryUpdateDate>2017-03-11T17:24:32Z</lastSummaryUpdateDate> <text><![CDATA[<p>Designates the majority party membership on specified Senate committees for the 115th Congress.</p>]]></text> <updateDate>2017-02-09T05:00:00Z</updateDate> </item> <item> <versionCode>82</versionCode> <name>Passed Senate without amendment</name> <actionDate>2017-02-09</actionDate> <actionDesc>Passed Senate without amendment</actionDesc> <lastSummaryUpdateDate>2017-03-16T19:17:31Z</lastSummaryUpdateDate> <text><![CDATA[<p>(This measure has not been amended since it was introduced. The summary of that version is repeated here.)</p> <p>Designates the majority party membership on specified Senate committees for the 115th Congress.</p>]]></text> <updateDate>2017-02-09T19:14:07Z</updateDate> </item> </billSummaries> </summaries> <notes /> <latestAction> <text>Submitted in the Senate, considered, and agreed to without amendment by Unanimous Consent. (consideration: CR S1070-1071; text as passed Senate: CR S1070-1071)</text> <actionDate>2017-02-09</actionDate> <links /> </latestAction> <cosponsors /> <titles> <item> <titleType>Official Title as Introduced</titleType> <chamberName /> <title>A resolution to constitute the majority party's membership on certain committees for the One Hundred Fifteenth Congress, or until their successors are chosen.</title> <chamberCode /> <parentTitleType /> </item> <item> <titleType>Display Title</titleType> <chamberName /> <title>A resolution to constitute the majority party's membership on certain committees for the One Hundred Fifteenth Congress, or until their successors are chosen.</title> <chamberCode /> <parentTitleType /> </item> </titles> <createDate>2017-02-10T07:41:47Z</createDate> <committees> <billCommittees /> </committees> <updateDate>2017-07-20T16:56:21Z</updateDate> <actions> <actionTypeCounts> <passedAgreedToInSenate>1</passedAgreedToInSenate> <passedOrAgreedToInSenateDayOf>1</passedOrAgreedToInSenateDayOf> <introducedInSenate>1</introducedInSenate> </actionTypeCounts> <item> <actionDate>2017-02-09</actionDate> <committee /> <links> <link> <name>S1070-1071</name> <url>https://www.congress.gov/congressional-record/volume-163/senate-section/page/S1070-1071</url> </link> </links> <sourceSystem> <name>Senate</name> <code>0</code> </sourceSystem> <text>Submitted in the Senate, considered, and agreed to without amendment by Unanimous Consent. (consideration: CR S1070-1071; text as passed Senate: CR S1070-1071)</text> <type>Floor</type> </item> <item> <type>Floor</type> <text>Passed/agreed to in Senate: Submitted in the Senate, considered, and agreed to without amendment by Unanimous Consent.(consideration: CR S1070-1071; text as passed Senate: CR S1070-1071)</text> <sourceSystem> <name>Library of Congress</name> <code>9</code> </sourceSystem> <actionCode>17000</actionCode> <committee /> <links> <link> <name>S1070-1071</name> <url>https://www.congress.gov/congressional-record/volume-163/senate-section/page/S1070-1071</url> </link> </links> <actionDate>2017-02-09</actionDate> </item> <item> <type>IntroReferral</type> <text>Introduced in Senate</text> <sourceSystem> <name>Library of Congress</name> <code>9</code> </sourceSystem> <actionCode>10000</actionCode> <committee /> <links /> <actionDate>2017-02-09</actionDate> </item> <actionByCounts> <senate>3</senate> </actionByCounts> </actions> <subjects> <billSubjects> <policyArea> <name>Congress</name> </policyArea> <legislativeSubjects> <item> <name>Congressional committees</name> </item> <item> <name>Members of Congress</name> </item> <item> <name>Senate</name> </item> <item> <name>Senate Committee on Agriculture, Nutrition, and Forestry</name> </item> <item> <name>Senate Committee on Armed Services</name> </item> <item> <name>Senate Committee on Energy and Natural Resources</name> </item> <item> <name>Senate Committee on Environment and Public Works</name> </item> <item> <name>Senate Committee on the Budget</name> </item> </legislativeSubjects> </billSubjects> </subjects> <amendments /> </bill> <dublinCore xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:format>text/xml</dc:format> <dc:language>EN</dc:language> <dc:rights>Pursuant to Title 17 Section 105 of the United States Code, this file is not subject to copyright protection and is in the public domain.</dc:rights> <dc:contributor>Congressional Research Service, Library of Congress</dc:contributor> <dc:description>This file contains bill summaries and statuses for federal legislation. A bill summary describes the most significant provisions of a piece of legislation and details the effects the legislative text may have on current law and federal programs. Bill summaries are authored by the Congressional Research Service (CRS) of the Library of Congress. As stated in Public Law 91-510 (2 USC 166 (d)(6)), one of the duties of CRS is "to prepare summaries and digests of bills and resolutions of a public general nature introduced in the Senate or House of Representatives". For more information, refer to the User Guide that accompanies this file.</dc:description> </dublinCore> </billStatus>
{ "content_hash": "1eae508d3c72c9a504ad3c1437bf3dc1", "timestamp": "", "source": "github", "line_count": 185, "max_line_length": 676, "avg_line_length": 40.88108108108108, "alnum_prop": 0.6301732116884834, "repo_name": "peter765/power-polls", "id": "03ce36fb69929b451636f9bb6f453f03edaafe65", "size": "7563", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "db/bills/sres/sres57/fdsys_billstatus.xml", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "58567" }, { "name": "JavaScript", "bytes": "7370" }, { "name": "Python", "bytes": "22988" } ], "symlink_target": "" }
import _plotly_utils.basevalidators class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="linewidth", parent_name="layout.ternary.baxis", **kwargs ): super(LinewidthValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, )
{ "content_hash": "83f2da8c385db2702d09ab07dde24e38", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 83, "avg_line_length": 33.42857142857143, "alnum_prop": 0.5982905982905983, "repo_name": "plotly/plotly.py", "id": "2ae4c65cbd332be575b9425471ecf574ba564918", "size": "468", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "packages/python/plotly/plotly/validators/layout/ternary/baxis/_linewidth.py", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "545" }, { "name": "JavaScript", "bytes": "2074" }, { "name": "PostScript", "bytes": "565328" }, { "name": "Python", "bytes": "31506317" }, { "name": "TypeScript", "bytes": "71337" } ], "symlink_target": "" }
'use strict'; // Setting up route angular.module('core').config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) { // Redirect to 404 when route not found $urlRouterProvider.otherwise(function ($injector) { $injector.get('$state').transitionTo('not-found', null, { location: false }); }); // Home state routing $stateProvider .state('home', { url: '/', templateUrl: 'modules/core/client/views/home.client.view.html', controller: 'HomeController', controllerAs: 'vm' }) .state('not-found', { url: '/not-found', templateUrl: 'modules/core/client/views/404.client.view.html', data: { ignoreState: true, pageTitle: 'Not-Found' } }) .state('bad-request', { url: '/bad-request', templateUrl: 'modules/core/client/views/400.client.view.html', data: { ignoreState: true, pageTitle: 'Bad-Request' } }) .state('forbidden', { url: '/forbidden', templateUrl: 'modules/core/client/views/403.client.view.html', data: { ignoreState: true, pageTitle: 'Forbidden' } }); } ]);
{ "content_hash": "be71c658c9d14d3977016026d6edacb6", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 71, "avg_line_length": 27.23404255319149, "alnum_prop": 0.553125, "repo_name": "PoetsRock/mapping-slc", "id": "a7176102ecf7d61f1f2f90de6a68fe05935b832e", "size": "1280", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "modules/core/client/config/core.client.routes.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "136762" }, { "name": "HTML", "bytes": "343694" }, { "name": "JavaScript", "bytes": "674208" }, { "name": "Shell", "bytes": "685" } ], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_72) on Wed Dec 31 16:42:13 UTC 2014 --> <title>VoidMethodStubbableImpl (Mockito 1.10.19 API)</title> <meta name="date" content="2014-12-31"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="VoidMethodStubbableImpl (Mockito 1.10.19 API)"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/VoidMethodStubbableImpl.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage"><em> <!-- Note there is a weird javadoc task bug if using the double quote char \" that causes an 'illegal package name' error --> <em id="mockito-version-header-javadoc7"><strong>Mockito 1.10.19 API</strong></em> <!-- using the beautify plugin for jQuery from https://bitbucket.org/larscorneliussen/beautyofcode/ --> <script type="text/javascript"> var shBaseURL = '../../../../js/sh-2.1.382/'; </script> <script type="text/javascript" src="../../../../js/jquery-1.7.min.js"></script> <script type="text/javascript" src="../../../../js/jquery.beautyOfCode-min.js"></script> <script type="text/javascript"> /* Apply beautification of code */ var usingOldIE = false; if($.browser.msie && parseInt($.browser.version) < 9) usingOldIE = true; if(!usingOldIE) { $.beautyOfCode.init({ theme : 'Eclipse', brushes: ['Java'] }); var version = '1.10.19'; jQuery.fn.removeAttributes = function() { return this.each(function() { var attributes = $.map(this.attributes, function(item) { return item.name; }); var img = $(this); $.each(attributes, function(i, item) { img.removeAttr(item); }); }); }; $(function() { /* Add name & version to header for Javadoc 1.6 */ $('td.NavBarCell1[colspan=2]').each(function(index, element) { var jqueryTD = $(element); jqueryTD.after( $('<td><em><strong>Mockito 1.10.19 API</strong></em></td>').attr('class','NavBarCell1').attr('id','mockito-version-header-javadoc6') ); jqueryTD.removeAttr('colspan'); }); /* Cleans up mess with Javadoc 1.7 */ $('body > h1').removeAttributes().attr('class', 'bar').attr('title', 'Mockito 1.10.19 API'); /* Cleans up mess with Javadoc 1.7 with Javadoc 1.6 */ $('td em#mockito-version-header-javadoc7').remove(); }); } </script> </em></div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../org/mockito/internal/stubbing/StubberImpl.html" title="class in org.mockito.internal.stubbing"><span class="strong">Prev Class</span></a></li> <li>Next Class</li> </ul> <ul class="navList"> <li><a href="../../../../index.html?org/mockito/internal/stubbing/VoidMethodStubbableImpl.html" target="_top">Frames</a></li> <li><a href="VoidMethodStubbableImpl.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">org.mockito.internal.stubbing</div> <h2 title="Class VoidMethodStubbableImpl" class="title">Class VoidMethodStubbableImpl&lt;T&gt;</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>org.mockito.internal.stubbing.VoidMethodStubbableImpl&lt;T&gt;</li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Implemented Interfaces:</dt> <dd><a href="../../../../org/mockito/stubbing/VoidMethodStubbable.html" title="interface in org.mockito.stubbing">VoidMethodStubbable</a>&lt;T&gt;</dd> </dl> <hr> <br> <pre>public class <span class="strong">VoidMethodStubbableImpl&lt;T&gt;</span> extends java.lang.Object implements <a href="../../../../org/mockito/stubbing/VoidMethodStubbable.html" title="interface in org.mockito.stubbing">VoidMethodStubbable</a>&lt;T&gt;</pre> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor_summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><strong><a href="../../../../org/mockito/internal/stubbing/VoidMethodStubbableImpl.html#VoidMethodStubbableImpl(T,%20org.mockito.internal.stubbing.InvocationContainerImpl)">VoidMethodStubbableImpl</a></strong>(<a href="../../../../org/mockito/internal/stubbing/VoidMethodStubbableImpl.html" title="type parameter in VoidMethodStubbableImpl">T</a>&nbsp;mock, <a href="../../../../org/mockito/internal/stubbing/InvocationContainerImpl.html" title="class in org.mockito.internal.stubbing">InvocationContainerImpl</a>&nbsp;invocationContainerImpl)</code>&nbsp;</td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method_summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../org/mockito/internal/stubbing/VoidMethodStubbableImpl.html" title="type parameter in VoidMethodStubbableImpl">T</a></code></td> <td class="colLast"><code><strong><a href="../../../../org/mockito/internal/stubbing/VoidMethodStubbableImpl.html#on()">on</a></strong>()</code> <div class="block">Choose void method for stubbing.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../../org/mockito/stubbing/VoidMethodStubbable.html" title="interface in org.mockito.stubbing">VoidMethodStubbable</a>&lt;<a href="../../../../org/mockito/internal/stubbing/VoidMethodStubbableImpl.html" title="type parameter in VoidMethodStubbableImpl">T</a>&gt;</code></td> <td class="colLast"><code><strong><a href="../../../../org/mockito/internal/stubbing/VoidMethodStubbableImpl.html#toAnswer(org.mockito.stubbing.Answer)">toAnswer</a></strong>(<a href="../../../../org/mockito/stubbing/Answer.html" title="interface in org.mockito.stubbing">Answer</a>&lt;?&gt;&nbsp;answer)</code> <div class="block">Stubs a void method with generic <a href="../../../../org/mockito/stubbing/Answer.html" title="interface in org.mockito.stubbing"><code>Answer</code></a></div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../org/mockito/stubbing/VoidMethodStubbable.html" title="interface in org.mockito.stubbing">VoidMethodStubbable</a>&lt;<a href="../../../../org/mockito/internal/stubbing/VoidMethodStubbableImpl.html" title="type parameter in VoidMethodStubbableImpl">T</a>&gt;</code></td> <td class="colLast"><code><strong><a href="../../../../org/mockito/internal/stubbing/VoidMethodStubbableImpl.html#toReturn()">toReturn</a></strong>()</code> <div class="block">Stubs void method to 'just return' (e.g.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../../org/mockito/stubbing/VoidMethodStubbable.html" title="interface in org.mockito.stubbing">VoidMethodStubbable</a>&lt;<a href="../../../../org/mockito/internal/stubbing/VoidMethodStubbableImpl.html" title="type parameter in VoidMethodStubbableImpl">T</a>&gt;</code></td> <td class="colLast"><code><strong><a href="../../../../org/mockito/internal/stubbing/VoidMethodStubbableImpl.html#toThrow(java.lang.Throwable)">toThrow</a></strong>(java.lang.Throwable&nbsp;throwable)</code> <div class="block">Stubs void method with an exception.</div> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class&nbsp;java.lang.Object</h3> <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor_detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="VoidMethodStubbableImpl(java.lang.Object,org.mockito.internal.stubbing.InvocationContainerImpl)"> <!-- --> </a><a name="VoidMethodStubbableImpl(T, org.mockito.internal.stubbing.InvocationContainerImpl)"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>VoidMethodStubbableImpl</h4> <pre>public&nbsp;VoidMethodStubbableImpl(<a href="../../../../org/mockito/internal/stubbing/VoidMethodStubbableImpl.html" title="type parameter in VoidMethodStubbableImpl">T</a>&nbsp;mock, <a href="../../../../org/mockito/internal/stubbing/InvocationContainerImpl.html" title="class in org.mockito.internal.stubbing">InvocationContainerImpl</a>&nbsp;invocationContainerImpl)</pre> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method_detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="toThrow(java.lang.Throwable)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>toThrow</h4> <pre>public&nbsp;<a href="../../../../org/mockito/stubbing/VoidMethodStubbable.html" title="interface in org.mockito.stubbing">VoidMethodStubbable</a>&lt;<a href="../../../../org/mockito/internal/stubbing/VoidMethodStubbableImpl.html" title="type parameter in VoidMethodStubbableImpl">T</a>&gt;&nbsp;toThrow(java.lang.Throwable&nbsp;throwable)</pre> <div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../org/mockito/stubbing/VoidMethodStubbable.html#toThrow(java.lang.Throwable)">VoidMethodStubbable</a></code></strong></div> <div class="block">Stubs void method with an exception. E.g: <pre class="code"><code class="java"> stubVoid(mock).toThrow(new RuntimeException()).on().someMethod(); </code></pre> If throwable is a checked exception then it has to match one of the checked exceptions of method signature. See examples in javadoc for <a href="../../../../org/mockito/Mockito.html#stubVoid(T)"><code>Mockito.stubVoid(T)</code></a></div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code><a href="../../../../org/mockito/stubbing/VoidMethodStubbable.html#toThrow(java.lang.Throwable)">toThrow</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/mockito/stubbing/VoidMethodStubbable.html" title="interface in org.mockito.stubbing">VoidMethodStubbable</a>&lt;<a href="../../../../org/mockito/internal/stubbing/VoidMethodStubbableImpl.html" title="type parameter in VoidMethodStubbableImpl">T</a>&gt;</code></dd> <dt><span class="strong">Parameters:</span></dt><dd><code>throwable</code> - to be thrown on method invocation</dd> <dt><span class="strong">Returns:</span></dt><dd>VoidMethodStubbable - typically to choose void method and finish stubbing</dd></dl> </li> </ul> <a name="toReturn()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>toReturn</h4> <pre>public&nbsp;<a href="../../../../org/mockito/stubbing/VoidMethodStubbable.html" title="interface in org.mockito.stubbing">VoidMethodStubbable</a>&lt;<a href="../../../../org/mockito/internal/stubbing/VoidMethodStubbableImpl.html" title="type parameter in VoidMethodStubbableImpl">T</a>&gt;&nbsp;toReturn()</pre> <div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../org/mockito/stubbing/VoidMethodStubbable.html#toReturn()">VoidMethodStubbable</a></code></strong></div> <div class="block">Stubs void method to 'just return' (e.g. to <b>not</b> to throw any exception) <p> <b>Only use this method if you're stubbing consecutive calls.</b> <p> For example: <pre class="code"><code class="java"> stubVoid(mock) .toReturn() .toThrow(new RuntimeException()) .on().foo(10); </code></pre> <ul> <li>first time foo(10) is called the mock will 'just return' (e.g. don't throw any exception)</li> <li>second time foo(10) is called the mock will throw RuntimeException</li> <li>every consecutive time foo(10) is called the mock will throw RuntimeException</li> </ul> <p> See examples in javadoc for <a href="../../../../org/mockito/Mockito.html#stubVoid(T)"><code>Mockito.stubVoid(T)</code></a></div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code><a href="../../../../org/mockito/stubbing/VoidMethodStubbable.html#toReturn()">toReturn</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/mockito/stubbing/VoidMethodStubbable.html" title="interface in org.mockito.stubbing">VoidMethodStubbable</a>&lt;<a href="../../../../org/mockito/internal/stubbing/VoidMethodStubbableImpl.html" title="type parameter in VoidMethodStubbableImpl">T</a>&gt;</code></dd> <dt><span class="strong">Returns:</span></dt><dd>VoidMethodStubbable - typically to choose void method and finish stubbing</dd></dl> </li> </ul> <a name="toAnswer(org.mockito.stubbing.Answer)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>toAnswer</h4> <pre>public&nbsp;<a href="../../../../org/mockito/stubbing/VoidMethodStubbable.html" title="interface in org.mockito.stubbing">VoidMethodStubbable</a>&lt;<a href="../../../../org/mockito/internal/stubbing/VoidMethodStubbableImpl.html" title="type parameter in VoidMethodStubbableImpl">T</a>&gt;&nbsp;toAnswer(<a href="../../../../org/mockito/stubbing/Answer.html" title="interface in org.mockito.stubbing">Answer</a>&lt;?&gt;&nbsp;answer)</pre> <div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../org/mockito/stubbing/VoidMethodStubbable.html#toAnswer(org.mockito.stubbing.Answer)">VoidMethodStubbable</a></code></strong></div> <div class="block">Stubs a void method with generic <a href="../../../../org/mockito/stubbing/Answer.html" title="interface in org.mockito.stubbing"><code>Answer</code></a> <p> For Example: <pre class="code"><code class="java"> stubVoid(mock) .toAnswer(new Answer() { public Object answer(InvocationOnMOck invocation) { Visitor v = (Visitor) invocation.getArguments()[0]; v.visitMock(invocation.getMock()); return null; } }) .on().accept(any()); </code></pre></div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code><a href="../../../../org/mockito/stubbing/VoidMethodStubbable.html#toAnswer(org.mockito.stubbing.Answer)">toAnswer</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/mockito/stubbing/VoidMethodStubbable.html" title="interface in org.mockito.stubbing">VoidMethodStubbable</a>&lt;<a href="../../../../org/mockito/internal/stubbing/VoidMethodStubbableImpl.html" title="type parameter in VoidMethodStubbableImpl">T</a>&gt;</code></dd> <dt><span class="strong">Parameters:</span></dt><dd><code>answer</code> - the custom answer to execute.</dd> <dt><span class="strong">Returns:</span></dt><dd>VoidMethodStubbable - typically to choose void method and finish stubbing</dd></dl> </li> </ul> <a name="on()"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>on</h4> <pre>public&nbsp;<a href="../../../../org/mockito/internal/stubbing/VoidMethodStubbableImpl.html" title="type parameter in VoidMethodStubbableImpl">T</a>&nbsp;on()</pre> <div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../org/mockito/stubbing/VoidMethodStubbable.html#on()">VoidMethodStubbable</a></code></strong></div> <div class="block">Choose void method for stubbing. E.g: <pre class="code"><code class="java"> stubVoid(mock).toThrow(new RuntimeException()).on().someMethod("some arg"); </code></pre> See examples in javadoc for <a href="../../../../org/mockito/Mockito.html#stubVoid(T)"><code>Mockito.stubVoid(T)</code></a></div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code><a href="../../../../org/mockito/stubbing/VoidMethodStubbable.html#on()">on</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/mockito/stubbing/VoidMethodStubbable.html" title="interface in org.mockito.stubbing">VoidMethodStubbable</a>&lt;<a href="../../../../org/mockito/internal/stubbing/VoidMethodStubbableImpl.html" title="type parameter in VoidMethodStubbableImpl">T</a>&gt;</code></dd> <dt><span class="strong">Returns:</span></dt><dd>mock object itself</dd></dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/VoidMethodStubbableImpl.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage"><em> <!-- Note there is a weird javadoc task bug if using the double quote char \" that causes an 'illegal package name' error --> <em id="mockito-version-header-javadoc7"><strong>Mockito 1.10.19 API</strong></em> <!-- using the beautify plugin for jQuery from https://bitbucket.org/larscorneliussen/beautyofcode/ --> <script type="text/javascript"> var shBaseURL = '../../../../js/sh-2.1.382/'; </script> <script type="text/javascript" src="../../../../js/jquery-1.7.min.js"></script> <script type="text/javascript" src="../../../../js/jquery.beautyOfCode-min.js"></script> <script type="text/javascript"> /* Apply beautification of code */ var usingOldIE = false; if($.browser.msie && parseInt($.browser.version) < 9) usingOldIE = true; if(!usingOldIE) { $.beautyOfCode.init({ theme : 'Eclipse', brushes: ['Java'] }); var version = '1.10.19'; jQuery.fn.removeAttributes = function() { return this.each(function() { var attributes = $.map(this.attributes, function(item) { return item.name; }); var img = $(this); $.each(attributes, function(i, item) { img.removeAttr(item); }); }); }; $(function() { /* Add name & version to header for Javadoc 1.6 */ $('td.NavBarCell1[colspan=2]').each(function(index, element) { var jqueryTD = $(element); jqueryTD.after( $('<td><em><strong>Mockito 1.10.19 API</strong></em></td>').attr('class','NavBarCell1').attr('id','mockito-version-header-javadoc6') ); jqueryTD.removeAttr('colspan'); }); /* Cleans up mess with Javadoc 1.7 */ $('body > h1').removeAttributes().attr('class', 'bar').attr('title', 'Mockito 1.10.19 API'); /* Cleans up mess with Javadoc 1.7 with Javadoc 1.6 */ $('td em#mockito-version-header-javadoc7').remove(); }); } </script> </em></div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../org/mockito/internal/stubbing/StubberImpl.html" title="class in org.mockito.internal.stubbing"><span class="strong">Prev Class</span></a></li> <li>Next Class</li> </ul> <ul class="navList"> <li><a href="../../../../index.html?org/mockito/internal/stubbing/VoidMethodStubbableImpl.html" target="_top">Frames</a></li> <li><a href="VoidMethodStubbableImpl.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
{ "content_hash": "a588219c97bb52a5f7dce050d175517e", "timestamp": "", "source": "github", "line_count": 490, "max_line_length": 454, "avg_line_length": 48.875510204081635, "alnum_prop": 0.6294626080420894, "repo_name": "JPAT-ROSEMARY/SCUBA", "id": "9995df3dc5814d8af91811e9f6cfd7c2232f5420", "size": "23949", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "org.jpat.scuba.external.mockito/mockito-1.10.19/javadocs/org/mockito/internal/stubbing/VoidMethodStubbableImpl.html", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "479" }, { "name": "CSS", "bytes": "184347" }, { "name": "Groovy", "bytes": "61577" }, { "name": "HTML", "bytes": "72563310" }, { "name": "Java", "bytes": "4674644" }, { "name": "JavaScript", "bytes": "155840" }, { "name": "PLSQL", "bytes": "4133" }, { "name": "PLpgSQL", "bytes": "4948" }, { "name": "Roff", "bytes": "505" }, { "name": "Scala", "bytes": "39880" }, { "name": "Shell", "bytes": "5051" }, { "name": "XSLT", "bytes": "16226" } ], "symlink_target": "" }
This module will enable Blackfire integration. It's available in module version 1.2.103+. It's based on instructions from [Blackfire reference guide on bypassing reverse proxy cache and CDNs](https://blackfire.io/docs/reference-guide/configuration#bypassing-reverse-proxy-cache-and-content-delivery-networks-cdn). Before you can use Fastly Edge Modules you need to [make sure they are enabled](https://github.com/fastly/fastly-magento2/blob/master/Documentation/Guides/Edge-Modules/EDGE-MODULES.md) and that you have selected the Blackfire integration module. When you click on the configuration you will be prompted with a screen like this ![Fastly Edge Module Blackfire configuration](../../images/guides/edge-modules/edge-module-blackfire.png "Fastly Edge Module Blackfire configuration") ## Configurable options ### ACL Pick ACL (Access Control List) that contains a list of admin IPs that are allowed to initiate profiling. If there are no ACLs listed or you want to specify a new one [you can create it using the ACL interface](https://github.com/fastly/fastly-magento2/blob/master/Documentation/Guides/ACL.md). ## Enabling After any change to the settings you need to click Upload as that will upload require VCL code to Fastly. ## Technical details Following VCL will be uploaded Snippet Type: vcl_recv ```vcl if (req.http.X-Blackfire-Query && req.http.Fastly-Client-IP ~ maint_allowlist) { if (req.esi_level > 0) { # ESI request should not be included in the profile. # Instead you should profile them separately, each one # in their dedicated profile. # Removing the Blackfire header avoids to trigger the profiling. # Not returning let it go through your usual workflow as a regular # ESI request without distinction. unset req.http.X-Blackfire-Query; } else { set req.http.X-Pass = "1"; } } ```
{ "content_hash": "ddeb90b180e7e8a4fc15d2928e8f3140", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 245, "avg_line_length": 46.4390243902439, "alnum_prop": 0.7452731092436975, "repo_name": "fastly/fastly-magento2", "id": "bd6b0a2fc1e49a7131565ff3951822f3c42f7857", "size": "1952", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Documentation/Guides/Edge-Modules/EDGE-MODULE-BLACKFIRE-INTEGRATION.md", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "CSS", "bytes": "331" }, { "name": "HTML", "bytes": "258422" }, { "name": "JavaScript", "bytes": "614884" }, { "name": "PHP", "bytes": "891103" }, { "name": "Shell", "bytes": "586" }, { "name": "VCL", "bytes": "22633" } ], "symlink_target": "" }
<?php /** * This file is part of the DVSA MOT API project. * * @link https://gitlab.motdev.org.uk/mot */ namespace DvsaMotApi\Service\Validator\RetestEligibility; use DvsaCommon\Date\DateTimeHolder; use DvsaCommon\Date\DateUtils as DU; use DvsaCommon\Dto\MotTesting\ContingencyTestDto; use DvsaCommonApi\Service\Exception\BadRequestException; use DvsaCommonApi\Service\Exception\NotFoundException; use DvsaCommonApi\Service\Exception\ForbiddenException; use DvsaEntities\Entity\MotTest; use DvsaEntities\Repository\MotTestRepository; use DvsaMotApi\Helper\MysteryShopperHelper; use NonWorkingDaysApi\NonWorkingDaysHelper; /** * Contains services related to retest eligibility feature. */ class RetestEligibilityValidator { const RETEST_WORKING_DAYS_PERIOD = 10; /** @var NonWorkingDaysHelper */ private $nonWorkingDaysHelper; /** @var MotTestRepository $motTestRepository */ private $motTestRepository; /** @var DateTimeHolder */ private $dateTime; /** * @var MysteryShopperHelper */ private $mysteryShopperHelper; /** * @param NonWorkingDaysHelper $nonWorkingDaysHelper * @param MotTestRepository $motTestRepository * @param MysteryShopperHelper $mysteryShopperHelper */ public function __construct( NonWorkingDaysHelper $nonWorkingDaysHelper, MotTestRepository $motTestRepository, MysteryShopperHelper $mysteryShopperHelper ) { $this->nonWorkingDaysHelper = $nonWorkingDaysHelper; $this->motTestRepository = $motTestRepository; $this->mysteryShopperHelper = $mysteryShopperHelper; $this->dateTime = new DateTimeHolder(); } /** * Method checks if a vehicle is eligible for a retest. * * @param int $vehicleId database identifier of vehicle * @param int $vtsId database identifier of Vehicle Testing Station * @param ContingencyTestDto $contingencyDto * * @return int Retest granted code, or throw exception * * @throws BadRequestException */ public function checkEligibilityForRetest($vehicleId, $vtsId, $contingencyDto = null) { $checkResult = $this->validateVehicleForRetest($vehicleId, $vtsId, $contingencyDto); $isEligibleForRetest = (count($checkResult) === 0); if (!$isEligibleForRetest) { $exception = BadRequestException::create('Vehicle is not eligible for a retest'); foreach ($checkResult as $errorCode) { $errorMsg = RetestEligibilityErrorCodeTranslator::toText($errorCode); $exception->addError($errorMsg, $errorCode, $errorMsg); } throw $exception; } return $isEligibleForRetest; } /** * @param DateTimeHolder $dateTimeHolder * * @return $this */ public function setDateTimeHolder(DateTimeHolder $dateTimeHolder) { $this->dateTime = $dateTimeHolder; return $this; } /** * @param $vehicleId * @param $vtsId * @param $contingencyDto * * @return array * * @throws ForbiddenException * @throws NotFoundException */ private function validateVehicleForRetest($vehicleId, $vtsId, $contingencyDto = null) { $resultCodes = []; $lastTest = $this->motTestRepository->findLastNormalNotAbortedTest($vehicleId, $contingencyDto); if (!($lastTest instanceof MotTest)) { return [RetestEligibilityCheckCode::RETEST_REJECTED_ORIGINAL_NEVER_PERFORMED]; } $isDifferentVts = intval($lastTest->getVehicleTestingStation()->getId()) !== intval($vtsId); if (!$lastTest->isFailed()) { return [RetestEligibilityCheckCode::RETEST_REJECTED_ORIGINAL_WAS_NOT_FAILED]; } elseif ($isDifferentVts) { $resultCodes[] = RetestEligibilityCheckCode::RETEST_REJECTED_ORIGINAL_PERFORMED_AT_A_DIFFERENT_VTS; } if (false === $this->isWithinTenWorkingDays($lastTest, $contingencyDto)) { $resultCodes[] = RetestEligibilityCheckCode::RETEST_REJECTED_ORIGINAL_PERFORMED_MORE_THAN_10_WORKING_DAYS; } $reTest = $this->motTestRepository->findRetestForMotTest($lastTest->getNumber()); if ($reTest instanceof MotTest) { $resultCodes [] = RetestEligibilityCheckCode::RETEST_REJECTED_ALREADY_REGISTERED; } return $resultCodes; } /** * @param MotTest $test * @param $contingencyDto * * @throws NotFoundException * * @return bool */ private function isWithinTenWorkingDays(MotTest $test, $contingencyDto = null) { $country = $test->getVehicleTestingStation()->getNonWorkingDayCountry(); if (is_null($country)) { throw new NotFoundException('Vts country required'); } $lastTestCompletedDate = DU::cropTime($test->getCompletedDate()); $queryDate = ($contingencyDto instanceof ContingencyTestDto) ? DU::cropTime($contingencyDto->getPerformedAt()) : $this->dateTime->getCurrentDate(); $countryCode = $country->getCountry()->getCode(); $nthWorkingDayDate = $this->nonWorkingDaysHelper->calculateNthWorkingDayAfter( $lastTestCompletedDate, self::RETEST_WORKING_DAYS_PERIOD, $countryCode ); $dayDiff = intval(DU::getDaysDifference($nthWorkingDayDate, $queryDate)); return $dayDiff <= 0; } }
{ "content_hash": "758aeddb1bc275a1fcbbb5aa8dd40679", "timestamp": "", "source": "github", "line_count": 169, "max_line_length": 118, "avg_line_length": 32.739644970414204, "alnum_prop": 0.6576902223025484, "repo_name": "dvsa/mot", "id": "71dc09ca0bb0a28cb63a3f1501d3a4a1ccef180e", "size": "5533", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "mot-api/module/DvsaMotApi/src/DvsaMotApi/Service/Validator/RetestEligibility/RetestEligibilityValidator.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "604618" }, { "name": "Dockerfile", "bytes": "2693" }, { "name": "Gherkin", "bytes": "189981" }, { "name": "HTML", "bytes": "1579702" }, { "name": "Java", "bytes": "1631717" }, { "name": "JavaScript", "bytes": "156823" }, { "name": "Makefile", "bytes": "2877" }, { "name": "PHP", "bytes": "20142004" }, { "name": "PLpgSQL", "bytes": "61098" }, { "name": "Python", "bytes": "3354" }, { "name": "Ruby", "bytes": "72" }, { "name": "SQLPL", "bytes": "1739266" }, { "name": "Shell", "bytes": "203709" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="ProjectModuleManager"> <modules> <module fileurl="file://$PROJECT_DIR$/13-java-rabbitmq-topics.iml" filepath="$PROJECT_DIR$/13-java-rabbitmq-topics.iml" /> </modules> </component> </project>
{ "content_hash": "bc235603eaa18ac4ad83acb1f6403954", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 128, "avg_line_length": 35.75, "alnum_prop": 0.6748251748251748, "repo_name": "hawkup/learn-web-programming", "id": "2917bc736a66febccae719a4be9a45ce4bd05c77", "size": "286", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "13-java-rabbitmq-topics/.idea/modules.xml", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "29" }, { "name": "Clojure", "bytes": "6237" }, { "name": "Elm", "bytes": "5786" }, { "name": "HTML", "bytes": "3303" }, { "name": "Java", "bytes": "20297" }, { "name": "JavaScript", "bytes": "575" }, { "name": "Python", "bytes": "3723" }, { "name": "Thrift", "bytes": "42" } ], "symlink_target": "" }
title: Worst Job in My Career 2 - The First 8 Months tags: - story - series - suffering - career - pain --- Back for more? Welcome to the second article in a series about the worst job I’ve had in my career. The series was kicked off back in a [previous article]({{ site.baseurl }}{% post_url 2019-03-08-worst-job-in-my-career %}). Let me share with you what happened in the first 8 months of joining a company that espouses a fulfilling career and great life balance. ## The First Project Within the first 8 months of joining the company, I realized that I was becoming an alcoholic. My orientation at the company lasted for two days. That orientation boiled down to things like getting access to internal systems, getting introduced to core business groups, and learning to use the internal expense and travel systems. I wondered if someone was going to tell me what it looked like to do my job well, but nobody would. By the end of that orientation, I knew where I was going and bought my tickets, booked my hotel, and hoped I hadn’t made a mistake. The briefing I received went along the lines of this would be a crazy project that is going to be short-lived. We have a really tight deadline to impress a bunch of executives doing something very complicated with a team of people who have never done this before. Yep, we were all new. The only one with experience building the type of product that was under consideration was me. I knew that without anyone saying anything I would have to build a team and their competencies. The pressures from our short timeline were reinforced every day. I remember when caffeine pills started showing up on people’s desks. I recommended that nobody touch them. I remember the floor we were sent to for work. It was an open floor that was going to be built into new office space for our company, but right at that moment, it was gutted. We made a small space amid the wiring, paint, and construction materials. We worked there under lock-and-key while the floor was constructed for months. When the fumes became too bad, or the sounds too loud we would leave the building for a little bit to get some air. Groups of us would get sick at a time. This remains the only clear time I can say I wasn’t physically safe at my job. We would have retrospectives, and we’d bring an external facilitator in to help prevent someone from dominating the meeting. They would hold a safety check where people would indicate they were unsafe. I remember a facilitator saying, “We need to stop this retrospective. There are bigger problems here and we shouldn’t continue.” I remember one of the leaders saying demanding the retrospective continue and that if someone has a problem they can speak up. We lost a lot of people during those 8 months. It would average out to one person a month, but some months it would be more, some less. I remember several people asking me if this was normal. I told them it wasn’t. They would leave the project or the company and I would remain. During the evenings I’d go out to eat. I was one of the few travelers, so I’d do this with another traveler if they were interested. We would eat and drink and blow off steam. We would drink more. I’d wake up in my hotel with equal amounts of surprise and fear that I made it back and didn’t remember it. After everyone else was gone, I was going out and eating alone. I was drinking alone. I was finding my way back alone. One of the leaders of the project was fired. It was confirmed that they sexually harassed someone. This would happen again. Eventually, we found a room that was far away from the madness of our work environment. I was one of the few people that had a key to this room. This room was a refuge for the team that needed to talk. They needed a safe place. They’d ask me to talk with them in private. They needed help. I listened and I felt powerless to do anything. Our leadership team was removed, replaced, and partially removed again. Throughout the company, word was spreading that this project was dangerous and terrible. I got out of the project, my health was at risk. I was drinking too much, I was angry and depressed. I couldn’t do anything to help, and I was suffering. This was my first 8 months. ## Conclusion If somehow you’ve survived all of this writing you may be surprised to find out that I stayed an entire year past that first one. I have to take my own responsibility for every day I stayed in a company that caused me so much pain. I also know that when these are the experiences every day it doesn’t feel so simple or straightforward to, “Just quit.” The tweet that prompted this woke back up a flood of memories that I wouldn’t wish on anyone. There is a lot more I can write and say. I submitted a talk for Agile 2019 where stories like these and others I’ve seen from the other decade of my career can be shared. I think the tech industry and numerous companies have become blind to the institutional harm they cause their employees. Even while I may be able to significantly improve the lives around me. It would be a mistake to believe that everything must be fine for me. The way our industry is now, I assume by default that every day someone is living with a pain that is bound to their job. I was told I was too sensitive at one point at this job I wrote about. That was feedback I maintain that I was right to ignore. Previous: [The Tweet]({{ site.baseurl }}{% post_url 2019-03-08-worst-job-in-my-career %}) Up Next: [The second project]({{ site.baseurl }}{% post_url 2019-03-08-worst-job-in-my-career-3 %})
{ "content_hash": "0f56360d1bd9c36ac5e541e78c117364", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 457, "avg_line_length": 79.14084507042253, "alnum_prop": 0.7739811354333511, "repo_name": "recursivefaults/recursivefaults.github.io", "id": "e6f9d9e5781303feb64a35db1d3617e69fb9c086", "size": "5665", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "_posts/2019-03-08-worst-job-in-my-career-2.md", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "152419" }, { "name": "JavaScript", "bytes": "15888" }, { "name": "Ruby", "bytes": "154" }, { "name": "SCSS", "bytes": "59531" }, { "name": "Shell", "bytes": "327" } ], "symlink_target": "" }
description: "Log driver plugins." keywords: "Examples, Usage, plugins, docker, documentation, user guide, logging" --- <!-- This file is maintained within the docker/cli GitHub repository at https://github.com/docker/cli/. Make all pull requests against that repo. If you see this file in another repository, consider it read-only there, as it will periodically be overwritten by the definitive file. Pull requests which include edits to this file in other repositories will be rejected. --> # Docker log driver plugins This document describes logging driver plugins for Docker. Logging drivers enables users to forward container logs to another service for processing. Docker includes several logging drivers as built-ins, however can never hope to support all use-cases with built-in drivers. Plugins allow Docker to support a wide range of logging services without requiring to embed client libraries for these services in the main Docker codebase. See the [plugin documentation](legacy_plugins.md) for more information. ## Create a logging plugin The main interface for logging plugins uses the same JSON+HTTP RPC protocol used by other plugin types. See the [example](https://github.com/cpuguy83/docker-log-driver-test) plugin for a reference implementation of a logging plugin. The example wraps the built-in `jsonfilelog` log driver. ## LogDriver protocol Logging plugins must register as a `LogDriver` during plugin activation. Once activated users can specify the plugin as a log driver. There are two HTTP endpoints that logging plugins must implement: ### `/LogDriver.StartLogging` Signals to the plugin that a container is starting that the plugin should start receiving logs for. Logs will be streamed over the defined file in the request. On Linux this file is a FIFO. Logging plugins are not currently supported on Windows. **Request**: ```json { "File": "/path/to/file/stream", "Info": { "ContainerID": "123456" } } ``` `File` is the path to the log stream that needs to be consumed. Each call to `StartLogging` should provide a different file path, even if it's a container that the plugin has already received logs for prior. The file is created by docker with a randomly generated name. `Info` is details about the container that's being logged. This is fairly free-form, but is defined by the following struct definition: ```go type Info struct { Config map[string]string ContainerID string ContainerName string ContainerEntrypoint string ContainerArgs []string ContainerImageID string ContainerImageName string ContainerCreated time.Time ContainerEnv []string ContainerLabels map[string]string LogPath string DaemonName string } ``` `ContainerID` will always be supplied with this struct, but other fields may be empty or missing. **Response** ```json { "Err": "" } ``` If an error occurred during this request, add an error message to the `Err` field in the response. If no error then you can either send an empty response (`{}`) or an empty value for the `Err` field. The driver should at this point be consuming log messages from the passed in file. If messages are unconsumed, it may cause the container to block while trying to write to its stdio streams. Log stream messages are encoded as protocol buffers. The protobuf definitions are in the [docker repository](https://github.com/docker/docker/blob/master/api/types/plugins/logdriver/entry.proto). Since protocol buffers are not self-delimited you must decode them from the stream using the following stream format: ``` [size][message] ``` Where `size` is a 4-byte big endian binary encoded uint32. `size` in this case defines the size of the next message. `message` is the actual log entry. A reference golang implementation of a stream encoder/decoder can be found [here](https://github.com/docker/docker/blob/master/api/types/plugins/logdriver/io.go) ### `/LogDriver.StopLogging` Signals to the plugin to stop collecting logs from the defined file. Once a response is received, the file will be removed by Docker. You must make sure to collect all logs on the stream before responding to this request or risk losing log data. Requests on this endpoint does not mean that the container has been removed only that it has stopped. **Request**: ```json { "File": "/path/to/file/stream" } ``` **Response**: ```json { "Err": "" } ``` If an error occurred during this request, add an error message to the `Err` field in the response. If no error then you can either send an empty response (`{}`) or an empty value for the `Err` field. ## Optional endpoints Logging plugins can implement two extra logging endpoints: ### `/LogDriver.Capabilities` Defines the capabilities of the log driver. You must implement this endpoint for Docker to be able to take advantage of any of the defined capabilities. **Request**: ```json {} ``` **Response**: ```json { "ReadLogs": true } ``` Supported capabilities: - `ReadLogs` - this tells Docker that the plugin is capable of reading back logs to clients. Plugins that report that they support `ReadLogs` must implement the `/LogDriver.ReadLogs` endpoint ### `/LogDriver.ReadLogs` Reads back logs to the client. This is used when `docker logs <container>` is called. In order for Docker to use this endpoint, the plugin must specify as much when `/LogDriver.Capabilities` is called. **Request**: ```json { "ReadConfig": {}, "Info": { "ContainerID": "123456" } } ``` `ReadConfig` is the list of options for reading, it is defined with the following golang struct: ```go type ReadConfig struct { Since time.Time Tail int Follow bool } ``` - `Since` defines the oldest log that should be sent. - `Tail` defines the number of lines to read (e.g. like the command `tail -n 10`) - `Follow` signals that the client wants to stay attached to receive new log messages as they come in once the existing logs have been read. `Info` is the same type defined in `/LogDriver.StartLogging`. It should be used to determine what set of logs to read. **Response**: ``` {% raw %}{{ log stream }}{% endraw %} ``` The response should be the encoded log message using the same format as the messages that the plugin consumed from Docker.
{ "content_hash": "0bbb390948e77b3c6c93756baf10a9e2", "timestamp": "", "source": "github", "line_count": 219, "max_line_length": 106, "avg_line_length": 28.85388127853881, "alnum_prop": 0.7458458616869758, "repo_name": "thaJeztah/cli", "id": "6405dd26cf37af3458b8149850a1a2c5fabeb795", "size": "6323", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "docs/extend/plugins_logging.md", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Dockerfile", "bytes": "9508" }, { "name": "Go", "bytes": "2499191" }, { "name": "HCL", "bytes": "3179" }, { "name": "Makefile", "bytes": "8025" }, { "name": "Shell", "bytes": "311752" } ], "symlink_target": "" }
(function () { 'use strict'; angular .module('brew_journal.authentication.controllers') .controller('LoginController', LoginController); LoginController.$inject = ['$location', '$scope', 'Authentication']; /** * @namespace LoginController */ function LoginController($location, $scope, Authentication) { var ctrl = this; ctrl.login = login; activate(); /** * @name activate * @desc Actions to be performed when this controller is instanciated * @memberOf brew_journal.authentication.controllers.LoginController */ function activate() { var account = Authentication.getAuthenticatedAccount(); if (Authentication.isAuthenticated()) { $location.path('/view/recipe'); } } /** * @name login * @desc Attempt to log a user in * @memberOf brew_journal.authentication.controllers.LoginController */ function login() { Authentication.login(ctrl.username, ctrl.password).then(showLoginResult); } /** * @name showLoginResult * @desc Report to the user the results of their login action * @memberOf brew_journal.authentication.controllers.LoginController */ function showLoginResult() { ctrl.error = !Authentication.isAuthenticated(); if(ctrl.error) { // Using a variable so that if I decide to make a dynamic error message // later it'll be easier. ctrl.loginErrorMessage = "Username/password not recognized. Please veryify credentials and try again."; } else { $location.path('/view/recipe'); } } } })();
{ "content_hash": "bfabeb6c7826e649df4358ade24ee087", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 111, "avg_line_length": 29.24561403508772, "alnum_prop": 0.629874025194961, "repo_name": "moonboy13/brew-journal", "id": "adee45e55b7b0b6741b85f8c1fc13e2174cea29f", "size": "1667", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "brew_journal/static/js/authentication/controllers/login.controller.js", "mode": "33261", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "563" }, { "name": "HTML", "bytes": "46367" }, { "name": "JavaScript", "bytes": "639000" }, { "name": "PLpgSQL", "bytes": "152" }, { "name": "Python", "bytes": "59854" } ], "symlink_target": "" }
import React from "react"; import Angle from "../model/Angle"; import { eq2gal, figureOfMerit, elevation } from "../util"; import useMpcEphemerisService from "../services/mpc"; /** * Targets render themselves as table rows */ export default function Target({ index, target, observer, onChangeSelect, onChangePlot, onTargetUpdate, isUTC, ephemerisSource, addMessage }) { const timeOffset = isUTC ? new Angle(-observer.date.utcOffset() / 60, 'hr') : new Angle(0); const onEphemerisSuccess = (ephemeris) => { if (ephemeris) onTargetUpdate({ ...target, ...ephemeris, ...elevation(ephemeris, observer), refresh: false }, index); }; const onEphemerisError = (error) => { addMessage({ severity: 'error', text: String(error) }); } useMpcEphemerisService(target, observer, onEphemerisSuccess, onEphemerisError, ephemerisSource === "debug"); React.useEffect(() => { if (target.ra && observer) { onTargetUpdate({ ...target, ...elevation(target, observer), refresh: false }, index); } }, [observer]); return ( <tr> <td> <input type="checkbox" checked={target.selected} onChange={() => onChangeSelect(!target.selected, index)} /> </td> <td> <input type="checkbox" checked={target.plot} onChange={() => onChangePlot(!target.plot, index)} /> </td> <td>{target.name}</td> <td> <input type="checkbox" checked={target.moving} readOnly /> </td> <td>{target.ra && target.ra.hms()}</td> <td>{target.dec && target.dec.dms()}</td> <td>{target.properMotion && target.properMotion.toFixed(0)}</td> <td>{target.ra && target.dec && eq2gal(target.ra, target.dec).b.deg.toFixed(0)}</td> <td>{target.mV}</td> <td>{target.rh && target.delta && target.mV && figureOfMerit(target.rh, target.delta, target.mV).toFixed(2)}</td> <td>{target.rh}</td> <td>{target.delta}</td> <td>{target.phase}</td> <td>{target.solarElongation}</td> <td>{target.lunarElongation}</td> <td>{target.transitTime && target.transitTime.add(timeOffset).clock()}</td> <td>{target.timeAboveElevationLimit && target.timeAboveElevationLimit.hm(2)}</td> <td>{target.timeAboveElevationLimitAndDark && target.timeAboveElevationLimitAndDark.hm(2)}</td> <td>{target.notes}</td> </tr> ); }
{ "content_hash": "4173d2e4290f267306e55663362158fc", "timestamp": "", "source": "github", "line_count": 80, "max_line_length": 143, "avg_line_length": 31.5875, "alnum_prop": 0.589236248516027, "repo_name": "mkelley/elevation", "id": "c7488264f4be2fdc0d942ac99e621621db8fae4d", "size": "2527", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "src/components/Target.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "2162" }, { "name": "HTML", "bytes": "1607" }, { "name": "JavaScript", "bytes": "79857" } ], "symlink_target": "" }
This is the nginx module. ## Basic usage This module manages nginx. It should be included on any host that needs nginx. ```puppet class { 'nginx': } ``` ## Configuring a vhost To build the basic skeleton of a vhost the ``nginx::vhost`` type can be used. It will generate a nginx configuration file and symlink it after which nginx is reloaded. To expand on that configuration and include arbitrary configuration this module does not provide for the ``nginx::vhost::config`` type is provided. The target parameter of that module must be the name of the ``nginx::vhost`` resource you created before. ```puppet nginx::vhost { 'site1': server_name => 'site.example.com', } nginx::vhost::config { 'site1-http-extra-option': target => 'site1', order => '120', content => 'Arbitrary configuration you want to add to the generated file', } ``` ## Order This module and it's types make heavy use of the native concat type from the Onyxpoint concat module. In order to be able to inject configuration in either the generated ``nginx.conf`` or one of the vhosts order ranges have been set up. ### Order nginx.conf * 001: the first line this module generates. If you need something before that, an order of 000. * 010: opens the 'events' configuration block * 011: writes the default events configuration block provided by this module * 012-018: free for your use * 019: closes the 'events' configuration block * 020: opens the 'http' configuration block * 021: writes the default http configuration provided by this module * 022-028: free for your use * 029: closes the 'http' configuration block * 030-099: free for your use ### Order vhost * 000: opens the 'upstream' block * 001-098: free for your use * 099: closes the 'upstream' block * 100: opens the 'http' block * 101-198: free for your use * 199: closes the' http' block * 200: opens the 'https' block * 201-298: free for your use * 299: closes the 'https' block ## Dependencies This module depends on the following Puppet modules: * Puppetlabs stdlib: https://github.com/puppetlabs/puppetlabs-stdlib * Onyxpoint concat: https://github.com/onyxpoint/pupmod-concat * templatelv: https://github.com/duritong/puppet-templatewlv ## Contributing Feel free to fork, epand upon this module and send pull requests back our way. For contributions to be accepted we do require the following: * Code must pass without warnings through puppet-lint or have a real good reason as why it can't pass that check. * Certain manifests are extensively documented because of how important they are. Should your change touch these manifests you must update the documentation accordingly. * Tests must be added or changed to reflect the new behaviour and must of course pass. Tests can be found in the ``spec/`` directory and are written with the help of rspec-puppet. ## License Copyright 2012 - 2013, Nedap Steppingstone. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at &nbsp;&nbsp;&nbsp;&nbsp;[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ## Support File an issue at: https://github.com/nedap/puppet-nginx/issues.
{ "content_hash": "6a95afc6151eef158bfb87084de44bdd", "timestamp": "", "source": "github", "line_count": 111, "max_line_length": 112, "avg_line_length": 32.711711711711715, "alnum_prop": 0.7397411181492701, "repo_name": "nedap/puppet-nginx", "id": "0a6ca6da9043b6e67d11ebf04ad36c13d0f3b79d", "size": "3640", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
<?php namespace ModelBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; class ModelBundle extends Bundle { }
{ "content_hash": "f500978f6d06022f2a9d282db7b1f2d7", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 47, "avg_line_length": 13, "alnum_prop": 0.7948717948717948, "repo_name": "marcovilella/projetos_tutorials", "id": "f3cf1722ac917cbdd18407fd8516d2ff3d17e5d0", "size": "117", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "src/ModelBundle/ModelBundle.php", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "3073" }, { "name": "PHP", "bytes": "50506" } ], "symlink_target": "" }
<?xml version="1.0" ?><!DOCTYPE TS><TS language="ro_RO" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About lastcoin</source> <translation>Despre lastcoin</translation> </message> <message> <location line="+39"/> <source>&lt;b&gt;lastcoin&lt;/b&gt; version</source> <translation>&lt;b&gt;lastcoin&lt;/b&gt; versiunea</translation> </message> <message> <location line="+57"/> <source> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source> <translation type="unfinished"/> </message> <message> <location filename="../aboutdialog.cpp" line="+14"/> <source>Copyright</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The lastcoin developers</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation>Listă de adrese</translation> </message> <message> <location line="+19"/> <source>Double-click to edit address or label</source> <translation>Dublu-click pentru a edita adresa sau eticheta</translation> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation>Creaţi o adresă nouă</translation> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation>Copiați adresa selectată în clipboard</translation> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation>&amp;Adresă nouă</translation> </message> <message> <location filename="../addressbookpage.cpp" line="+63"/> <source>These are your lastcoin 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>Acestea sunt adresele dumneavoastră lastcoin pentru a primi plăţi. Dacă doriţi, puteți da o adresa diferită fiecărui expeditor, pentru a putea ţine evidenţa plăţilor.</translation> </message> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>&amp;Copy Address</source> <translation>&amp;Copiază adresa</translation> </message> <message> <location line="+11"/> <source>Show &amp;QR Code</source> <translation>Arata codul QR</translation> </message> <message> <location line="+11"/> <source>Sign a message to prove you own a lastcoin address</source> <translation>Semneaza mesajul pentru a dovedi ca detii aceasta adresa Bitocin</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation>Semneaza mesajul</translation> </message> <message> <location line="+25"/> <source>Delete the currently selected address from the list</source> <translation>Sterge adresele curent selectate din lista</translation> </message> <message> <location line="+27"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>Verify a message to ensure it was signed with a specified lastcoin address</source> <translation>Verifica mesajul pentru a te asigura ca a fost insemnat cu o adresa lastcoin specifica</translation> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation> Verifica mesajele</translation> </message> <message> <location line="+14"/> <source>&amp;Delete</source> <translation>&amp;Șterge</translation> </message> <message> <location filename="../addressbookpage.cpp" line="-5"/> <source>These are your lastcoin 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>Copiază &amp;eticheta</translation> </message> <message> <location line="+1"/> <source>&amp;Edit</source> <translation>&amp;Editează</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>Exportă Lista de adrese</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Fisier csv: valori separate prin virgulă (*.csv)</translation> </message> <message> <location line="+13"/> <source>Error exporting</source> <translation>Eroare la exportare.</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>Eroare la scrierea în fişerul %1.</translation> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+144"/> <source>Label</source> <translation>Etichetă</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Adresă</translation> </message> <message> <location line="+36"/> <source>(no label)</source> <translation>(fără etichetă)</translation> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation>Introduceți fraza de acces.</translation> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation>Frază de acces nouă </translation> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation>Repetaţi noua frază de acces</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>Introduceţi noua parolă a portofelului electronic.&lt;br/&gt;Vă rugăm să folosiţi &lt;b&gt;minimum 10 caractere aleatoare&lt;/b&gt;, sau &lt;b&gt;minimum 8 cuvinte&lt;/b&gt;.</translation> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation>Criptează portofelul</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation>Aceasta operație are nevoie de un portofel deblocat.</translation> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation>Deblochează portofelul</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation>Această operaţiune necesită parola pentru decriptarea portofelului electronic.</translation> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation>Decriptează portofelul.</translation> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation>Schimbă fraza de acces</translation> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation>Introduceţi vechea parola a portofelului eletronic şi apoi pe cea nouă.</translation> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation>Confirmă criptarea portofelului.</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 lastcoinS&lt;/b&gt;!</source> <translation>Atenție: Dacă pierdeţi parola portofelului electronic dupa criptare, &lt;b&gt;VEŢI PIERDE ÎNTREAGA SUMĂ DE lastcoin ACUMULATĂ&lt;/b&gt;!</translation> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation>Sunteţi sigur că doriţi să criptaţi portofelul electronic?</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>Atentie! Caps Lock este pornit</translation> </message> <message> <location line="-130"/> <location line="+58"/> <source>Wallet encrypted</source> <translation>Portofel criptat </translation> </message> <message> <location line="-56"/> <source>lastcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your lastcoins from being stolen by malware infecting your computer.</source> <translation>lastcoin se va închide acum pentru a termina procesul de criptare. Amintiți-vă că criptarea portofelului dumneavoastră nu poate proteja în totalitate lastcoins dvs. de a fi furate de intentii rele.</translation> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+42"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation>Criptarea portofelului a eșuat.</translation> </message> <message> <location line="-54"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation>Criptarea portofelului a eșuat din cauza unei erori interne. Portofelul tău nu a fost criptat.</translation> </message> <message> <location line="+7"/> <location line="+48"/> <source>The supplied passphrases do not match.</source> <translation>Fraza de acces introdusă nu se potrivește.</translation> </message> <message> <location line="-37"/> <source>Wallet unlock failed</source> <translation>Deblocarea portofelului electronic a eşuat.</translation> </message> <message> <location line="+1"/> <location line="+11"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation>Parola introdusă pentru decriptarea portofelului electronic a fost incorectă.</translation> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation>Decriptarea portofelului electronic a eşuat.</translation> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation>Parola portofelului electronic a fost schimbată.</translation> </message> </context> <context> <name>BitcoinGUI</name> <message> <location filename="../bitcoingui.cpp" line="+233"/> <source>Sign &amp;message...</source> <translation>Semneaza &amp;mesaj...</translation> </message> <message> <location line="+280"/> <source>Synchronizing with network...</source> <translation>Se sincronizează cu reţeaua...</translation> </message> <message> <location line="-349"/> <source>&amp;Overview</source> <translation>&amp;Detalii</translation> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation>Afişează detalii despre portofelul electronic</translation> </message> <message> <location line="+20"/> <source>&amp;Transactions</source> <translation>&amp;Tranzacţii</translation> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation>Istoricul tranzacţiilor</translation> </message> <message> <location line="+7"/> <source>Edit the list of stored addresses and labels</source> <translation>Editaţi lista de adrese şi etichete.</translation> </message> <message> <location line="-14"/> <source>Show the list of addresses for receiving payments</source> <translation>Lista de adrese pentru recepţionarea plăţilor</translation> </message> <message> <location line="+31"/> <source>E&amp;xit</source> <translation>Ieșire</translation> </message> <message> <location line="+1"/> <source>Quit application</source> <translation>Părăsiţi aplicaţia</translation> </message> <message> <location line="+4"/> <source>Show information about lastcoin</source> <translation>Informaţii despre lastcoin</translation> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation>Despre &amp;Qt</translation> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation>Informaţii despre Qt</translation> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation>&amp;Setări...</translation> </message> <message> <location line="+6"/> <source>&amp;Encrypt Wallet...</source> <translation>Criptează portofelul electronic...</translation> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation>&amp;Backup portofelul electronic...</translation> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation>&amp;Schimbă parola...</translation> </message> <message> <location line="+285"/> <source>Importing blocks from disk...</source> <translation>Importare blocks de pe disk...</translation> </message> <message> <location line="+3"/> <source>Reindexing blocks on disk...</source> <translation type="unfinished"/> </message> <message> <location line="-347"/> <source>Send coins to a lastcoin address</source> <translation>&amp;Trimiteţi lastcoin către o anumită adresă</translation> </message> <message> <location line="+49"/> <source>Modify configuration options for lastcoin</source> <translation>Modifică setările pentru lastcoin</translation> </message> <message> <location line="+9"/> <source>Backup wallet to another location</source> <translation>Creaza copie de rezerva a portofelului intr-o locatie diferita</translation> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation>&amp;Schimbă parola folosită pentru criptarea portofelului electronic</translation> </message> <message> <location line="+6"/> <source>&amp;Debug window</source> <translation>&amp; Fereastra debug</translation> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation>Deschide consola de debug si diagnosticare</translation> </message> <message> <location line="-4"/> <source>&amp;Verify message...</source> <translation>Verifica mesajul</translation> </message> <message> <location line="-165"/> <location line="+530"/> <source>lastcoin</source> <translation>lastcoin</translation> </message> <message> <location line="-530"/> <source>Wallet</source> <translation>Portofelul</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 lastcoin</source> <translation>&amp;Despre lastcoin</translation> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation>Arata/Ascunde</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 lastcoin 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 lastcoin addresses</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>&amp;File</source> <translation>&amp;Fişier</translation> </message> <message> <location line="+7"/> <source>&amp;Settings</source> <translation>&amp;Setări</translation> </message> <message> <location line="+6"/> <source>&amp;Help</source> <translation>&amp;Ajutor</translation> </message> <message> <location line="+9"/> <source>Tabs toolbar</source> <translation>Bara de ferestre de lucru</translation> </message> <message> <location line="+17"/> <location line="+10"/> <source>[testnet]</source> <translation>[testnet]</translation> </message> <message> <location line="+47"/> <source>lastcoin client</source> <translation>Client lastcoin</translation> </message> <message numerus="yes"> <location line="+141"/> <source>%n active connection(s) to lastcoin network</source> <translation><numerusform>%n active connections to lastcoin network</numerusform><numerusform>%n active connections to lastcoin network</numerusform><numerusform>%n active connections to lastcoin network</numerusform></translation> </message> <message> <location line="+22"/> <source>No block source available...</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Processed %1 of %2 (estimated) blocks of transaction history.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Processed %1 blocks of transaction history.</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+20"/> <source>%n hour(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n week(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>%1 behind</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Last received block was generated %1 ago.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Transactions after this will not yet be visible.</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>Error</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="+70"/> <source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source> <translation type="unfinished"/> </message> <message> <location line="-140"/> <source>Up to date</source> <translation>Actualizat</translation> </message> <message> <location line="+31"/> <source>Catching up...</source> <translation>Se actualizează...</translation> </message> <message> <location line="+113"/> <source>Confirm transaction fee</source> <translation>Confirma taxa tranzactiei</translation> </message> <message> <location line="+8"/> <source>Sent transaction</source> <translation>Tranzacţie expediată</translation> </message> <message> <location line="+0"/> <source>Incoming transaction</source> <translation>Tranzacţie recepţionată</translation> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation>Data: %1⏎ Suma: %2⏎ Tipul: %3⏎ Addresa: %4⏎</translation> </message> <message> <location line="+33"/> <location line="+23"/> <source>URI handling</source> <translation type="unfinished"/> </message> <message> <location line="-23"/> <location line="+23"/> <source>URI can not be parsed! This can be caused by an invalid lastcoin address or malformed URI parameters.</source> <translation type="unfinished"/> </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>Portofelul electronic este &lt;b&gt;criptat&lt;/b&gt; iar in momentul de faţă este &lt;b&gt;deblocat&lt;/b&gt;</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>Portofelul electronic este &lt;b&gt;criptat&lt;/b&gt; iar in momentul de faţă este &lt;b&gt;blocat&lt;/b&gt;</translation> </message> <message> <location filename="../bitcoin.cpp" line="+111"/> <source>A fatal error occurred. lastcoin can no longer continue safely and will quit.</source> <translation type="unfinished"/> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+104"/> <source>Network Alert</source> <translation>Alerta retea</translation> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation>Editează adresa</translation> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation>&amp;Eticheta</translation> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation>Eticheta asociată cu această înregistrare în Lista de adrese</translation> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation>&amp;Adresă</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>Adresa asociată cu această înregistrare în Lista de adrese. Aceasta poate fi modificată doar pentru expediere.</translation> </message> <message> <location filename="../editaddressdialog.cpp" line="+21"/> <source>New receiving address</source> <translation>Noua adresă de primire</translation> </message> <message> <location line="+4"/> <source>New sending address</source> <translation>Noua adresă de trimitere</translation> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation>Editează adresa de primire</translation> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation>Editează adresa de trimitere</translation> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation>Adresa introdusă &quot;%1&quot; se află deja în Lista de adrese.</translation> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid lastcoin address.</source> <translation>Adresa introdusă &quot;%1&quot; nu este o adresă lastcoin valabilă.</translation> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation>Portofelul electronic nu a putut fi deblocat .</translation> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation>New key generation failed.</translation> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+424"/> <location line="+12"/> <source>lastcoin-Qt</source> <translation>lastcoin-Qt</translation> </message> <message> <location line="-12"/> <source>version</source> <translation>versiunea</translation> </message> <message> <location line="+2"/> <source>Usage:</source> <translation>Uz:</translation> </message> <message> <location line="+1"/> <source>command-line options</source> <translation>command-line setări</translation> </message> <message> <location line="+4"/> <source>UI options</source> <translation>UI setări</translation> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation>Seteaza limba, de exemplu: &quot;de_DE&quot; (initialt: system locale)</translation> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation>Incepe miniaturizare</translation> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation>Afișează pe ecran splash la pornire (implicit: 1)</translation> </message> </context> <context> <name>OptionsDialog</name> <message> <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation>Setări</translation> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation>&amp;Principal</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>Plăteşte comision pentru tranzacţie &amp;f</translation> </message> <message> <location line="+31"/> <source>Automatically start lastcoin after logging in to the system.</source> <translation>Porneşte automat programul lastcoin la pornirea computerului.</translation> </message> <message> <location line="+3"/> <source>&amp;Start lastcoin on system login</source> <translation>&amp;S Porneşte lastcoin la pornirea sistemului</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>&amp;Retea</translation> </message> <message> <location line="+6"/> <source>Automatically open the lastcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation>Deschide automat în router portul aferent clientului lastcoin. Funcţionează doar în cazul în care routerul e compatibil UPnP şi opţiunea e activată.</translation> </message> <message> <location line="+3"/> <source>Map port using &amp;UPnP</source> <translation>Mapeaza portul folosind &amp;UPnP</translation> </message> <message> <location line="+7"/> <source>Connect to the lastcoin network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation>Conectare la reţeaua lastcoin folosind un proxy SOCKS (de exemplu, când conexiunea se stabileşte prin reţeaua Tor)</translation> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy:</source> <translation>&amp;Conectează prin proxy SOCKS:</translation> </message> <message> <location line="+9"/> <source>Proxy &amp;IP:</source> <translation>Proxy &amp;IP:</translation> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation>Adresa de IP a proxy serverului (de exemplu: 127.0.0.1)</translation> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation>&amp;Port:</translation> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation>Portul pe care se concetează proxy serverul (de exemplu: 9050)</translation> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation>SOCKS &amp;Versiune:</translation> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation>Versiunea SOCKS a proxiului (ex. 5)</translation> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation>&amp;Fereastra</translation> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation>Afişează doar un icon in tray la ascunderea ferestrei</translation> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation>&amp;M Ascunde în tray în loc de taskbar</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>Ascunde fereastra în locul părăsirii programului în momentul închiderii ferestrei. Când acestă opţiune e activă, aplicaţia se va opri doar în momentul selectării comenzii Quit din menu.</translation> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation>&amp;i Ascunde fereastra în locul închiderii programului</translation> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation>&amp;Afişare</translation> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation>Interfata &amp; limba userului</translation> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting lastcoin.</source> <translation>Limba interfeței utilizatorului poate fi setat aici. Această setare va avea efect după repornirea lastcoin.</translation> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation>&amp;Unitatea de măsură pentru afişarea sumelor:</translation> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation>Alege subdiviziunea folosită la afişarea interfeţei şi la trimiterea de lastcoin.</translation> </message> <message> <location line="+9"/> <source>Whether to show lastcoin addresses in the transaction list or not.</source> <translation>Vezi dacă adresele lastcoin sunt în lista de tranzacție sau nu</translation> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation>&amp;Afişează adresele în lista de tranzacţii</translation> </message> <message> <location line="+71"/> <source>&amp;OK</source> <translation>&amp; OK</translation> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation>&amp; Renunta</translation> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation>Aplica</translation> </message> <message> <location filename="../optionsdialog.cpp" line="+53"/> <source>default</source> <translation>Initial</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>Atentie!</translation> </message> <message> <location line="-9"/> <location line="+9"/> <source>This setting will take effect after restarting lastcoin.</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation>Adresa lastcoin pe care a-ti specificat-o este invalida</translation> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation>Form</translation> </message> <message> <location line="+50"/> <location line="+166"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the lastcoin network after a connection is established, but this process has not completed yet.</source> <translation>Informațiile afișate pot fi expirate. Portofelul tău se sincronizează automat cu rețeaua lastcoin după ce o conexiune este stabilita, dar acest proces nu a fost finalizat încă.</translation> </message> <message> <location line="-124"/> <source>Balance:</source> <translation>Balanţă:</translation> </message> <message> <location line="+29"/> <source>Unconfirmed:</source> <translation>Neconfirmat:</translation> </message> <message> <location line="-78"/> <source>Wallet</source> <translation>Portofelul</translation> </message> <message> <location line="+107"/> <source>Immature:</source> <translation>Nematurizat:</translation> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation>Balanta minata care nu s-a maturizat inca</translation> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation>&lt;b&gt;Ultimele tranzacţii&lt;/b&gt;</translation> </message> <message> <location line="-101"/> <source>Your current balance</source> <translation>Soldul contul</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>Totalul tranzacţiilor care aşteaptă să fie confirmate şi care nu sunt încă luate în calcul la afişarea soldului contului.</translation> </message> <message> <location filename="../overviewpage.cpp" line="+116"/> <location line="+1"/> <source>out of sync</source> <translation>Nu este sincronizat</translation> </message> </context> <context> <name>PaymentServer</name> <message> <location filename="../paymentserver.cpp" line="+107"/> <source>Cannot start lastcoin: 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>Dialogul codului QR</translation> </message> <message> <location line="+59"/> <source>Request Payment</source> <translation>Cerere de plata</translation> </message> <message> <location line="+56"/> <source>Amount:</source> <translation>Sumă:</translation> </message> <message> <location line="-44"/> <source>Label:</source> <translation>Etichetă:</translation> </message> <message> <location line="+19"/> <source>Message:</source> <translation>Mesaj:</translation> </message> <message> <location line="+71"/> <source>&amp;Save As...</source> <translation>Salvare ca...</translation> </message> <message> <location filename="../qrcodedialog.cpp" line="+62"/> <source>Error encoding URI into QR Code.</source> <translation>Eroare la incercarea codarii URl-ului in cod QR</translation> </message> <message> <location line="+40"/> <source>The entered amount is invalid, please check.</source> <translation>Suma introdusa nu este valida, verifica suma.</translation> </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>Salveaza codul QR</translation> </message> <message> <location line="+0"/> <source>PNG Images (*.png)</source> <translation>Imagini de tip PNG (*.png)</translation> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation>Numaele clientului</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>N/A</translation> </message> <message> <location line="-217"/> <source>Client version</source> <translation>Versiunea clientului</translation> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation>&amp; Informatie</translation> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation>Foloseste versiunea OpenSSL</translation> </message> <message> <location line="+49"/> <source>Startup time</source> <translation>Data pornirii</translation> </message> <message> <location line="+29"/> <source>Network</source> <translation>Retea</translation> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation>Numarul de conexiuni</translation> </message> <message> <location line="+23"/> <source>On testnet</source> <translation>Pe testnet</translation> </message> <message> <location line="+23"/> <source>Block chain</source> <translation>Lant bloc</translation> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation>Numarul curent de blockuri</translation> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation>Estimarea totala a blocks</translation> </message> <message> <location line="+23"/> <source>Last block time</source> <translation>Ultimul block a fost gasit la:</translation> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation>&amp;Deschide</translation> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation>Command-line setări</translation> </message> <message> <location line="+7"/> <source>Show the lastcoin-Qt help message to get a list with possible lastcoin command-line options.</source> <translation>Arata mesajul de ajutor lastcoin-QT pentru a obtine o lista cu posibilele optiuni ale comenzilor lastcoin</translation> </message> <message> <location line="+3"/> <source>&amp;Show</source> <translation>&amp; Arata</translation> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation>&amp;Consola</translation> </message> <message> <location line="-260"/> <source>Build date</source> <translation>Construit la data:</translation> </message> <message> <location line="-104"/> <source>lastcoin - Debug window</source> <translation>lastcoin-Fereastra pentru debug</translation> </message> <message> <location line="+25"/> <source>lastcoin Core</source> <translation>lastcoin Core</translation> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation>Loguri debug</translation> </message> <message> <location line="+7"/> <source>Open the lastcoin debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation>Deschide logurile debug din directorul curent. Aceasta poate dura cateva secunde pentru fisierele mai mari</translation> </message> <message> <location line="+102"/> <source>Clear console</source> <translation>Curata consola</translation> </message> <message> <location filename="../rpcconsole.cpp" line="-30"/> <source>Welcome to the lastcoin RPC console.</source> <translation>Bun venit la consola lastcoin 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>Foloseste sagetile sus si jos pentru a naviga in istoric si &lt;b&gt;Ctrl-L&lt;/b&gt; pentru a curata.</translation> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation>Scrie &lt;b&gt;help&lt;/b&gt; pentru a vedea comenzile disponibile</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>Trimite lastcoin</translation> </message> <message> <location line="+50"/> <source>Send to multiple recipients at once</source> <translation>Trimite simultan către mai mulţi destinatari</translation> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation>&amp;Adaugă destinatar</translation> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation>Sterge toate spatiile de tranzactie</translation> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation>Şterge &amp;tot</translation> </message> <message> <location line="+22"/> <source>Balance:</source> <translation>Balanţă:</translation> </message> <message> <location line="+10"/> <source>123.456 BTC</source> <translation>123.456 BTC</translation> </message> <message> <location line="+31"/> <source>Confirm the send action</source> <translation>Confirmă operaţiunea de trimitere</translation> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation>&amp;S Trimite</translation> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-59"/> <source>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</source> <translation>&lt;b&gt;%1&lt;/b&gt; la %2 (%3)</translation> </message> <message> <location line="+5"/> <source>Confirm send coins</source> <translation>Confirmaţi trimiterea de lastcoin</translation> </message> <message> <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation>Sunteţi sigur că doriţi să trimiteţi %1?</translation> </message> <message> <location line="+0"/> <source> and </source> <translation> şi </translation> </message> <message> <location line="+23"/> <source>The recipient address is not valid, please recheck.</source> <translation>Adresa destinatarului nu este validă, vă rugăm să o verificaţi.</translation> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation>Suma de plată trebuie să fie mai mare decât 0.</translation> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation>Suma depăşeşte soldul contului.</translation> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation>Total depăşeşte soldul contului in cazul plăţii comisionului de %1.</translation> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation>S-a descoperit o adresă care figurează de două ori. Expedierea se poate realiza către fiecare adresă doar o singură dată pe operaţiune.</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>Eroare: Tranyacţia a fost respinsă. Acesta poate fi rezultatul cheltuirii prealabile a unei sume de lastcoin din portofelul electronic, ca în cazul folosirii unei copii a fisierului wallet.dat, în care s-au efectuat tranzacţii neînregistrate în fisierul curent.</translation> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation>Form</translation> </message> <message> <location line="+15"/> <source>A&amp;mount:</source> <translation>Su&amp;mă :</translation> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation>Plăteşte Că&amp;tre:</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>Adaugă o etichetă acestei adrese pentru a o trece în Lista de adrese</translation> </message> <message> <location line="-78"/> <source>&amp;Label:</source> <translation>&amp;L Etichetă:</translation> </message> <message> <location line="+28"/> <source>Choose address from address book</source> <translation>Alegeţi adresa din Listă</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>Lipiţi adresa copiată in clipboard.</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>Şterge destinatarul</translation> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a lastcoin address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>Introduceţi o adresă lastcoin (de exemplu: Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> </context> <context> <name>SignVerifyMessageDialog</name> <message> <location filename="../forms/signverifymessagedialog.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation>Semnatura- Semneaza/verifica un mesaj</translation> </message> <message> <location line="+13"/> <source>&amp;Sign Message</source> <translation>Semneaza Mesajul</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 type="unfinished"/> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>Introduceţi o adresă lastcoin (de exemplu: Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> <message> <location line="+10"/> <location line="+213"/> <source>Choose an address from the address book</source> <translation>Alegeţi adresa din Listă</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>Lipiţi adresa copiată in clipboard.</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>Introduce mesajul pe care vrei sa il semnezi, aici.</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>Copiaza semnatura curenta in clipboard-ul sistemului</translation> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this lastcoin address</source> <translation>Semneaza mesajul pentru a dovedi ca detii acesta adresa lastcoin</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>Reseteaza toate spatiile mesajelor semnate.</translation> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation>Şterge &amp;tot</translation> </message> <message> <location line="-87"/> <source>&amp;Verify Message</source> <translation>Verifica mesajul</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 type="unfinished"/> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>Introduceţi o adresă lastcoin (de exemplu: Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified lastcoin address</source> <translation>Verifica mesajul pentru a fi sigur ca a fost semnat cu adresa lastcoin specifica</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>Reseteaza toate spatiile mesajelor semnate.</translation> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a lastcoin address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>Introduceţi o adresă lastcoin (de exemplu: Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation>Click &quot;Semneaza msajul&quot; pentru a genera semnatura</translation> </message> <message> <location line="+3"/> <source>Enter lastcoin signature</source> <translation>Introduce semnatura bitocin</translation> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation>Adresa introdusa nu este valida</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>Te rugam verifica adresa si introduce-o din nou</translation> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation>Adresa introdusa nu se refera la o cheie.</translation> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation>Blocarea portofelului a fost intrerupta</translation> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation>Cheia privata pentru adresa introdusa nu este valida.</translation> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation>Semnarea mesajului a esuat</translation> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation>Mesaj Semnat!</translation> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation>Aceasta semnatura nu a putut fi decodata</translation> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation>Verifica semnatura si incearca din nou</translation> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation>Semnatura nu seamana!</translation> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation>Verificarea mesajului a esuat</translation> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation>Mesaj verificat</translation> </message> </context> <context> <name>SplashScreen</name> <message> <location filename="../splashscreen.cpp" line="+22"/> <source>The lastcoin developers</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>[testnet]</source> <translation>[testnet]</translation> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+20"/> <source>Open until %1</source> <translation>Deschis până la %1</translation> </message> <message> <location line="+6"/> <source>%1/offline</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation>%1/neconfirmat</translation> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation>%1 confirmări</translation> </message> <message> <location line="+18"/> <source>Status</source> <translation>Stare</translation> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation>Data</translation> </message> <message> <location line="+7"/> <source>Source</source> <translation>Sursa</translation> </message> <message> <location line="+0"/> <source>Generated</source> <translation>Generat</translation> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation>De la</translation> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation>Către</translation> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation>Adresa posedata</translation> </message> <message> <location line="-2"/> <source>label</source> <translation>etichetă</translation> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation>Credit</translation> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation>nu este acceptat</translation> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation>Debit</translation> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation>Comisionul tranzacţiei</translation> </message> <message> <location line="+16"/> <source>Net amount</source> <translation>Suma netă</translation> </message> <message> <location line="+6"/> <source>Message</source> <translation>Mesaj</translation> </message> <message> <location line="+2"/> <source>Comment</source> <translation>Comentarii</translation> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation>ID-ul tranzactiei</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>Monedele lastcoin generate se pot cheltui dupa parcurgerea a 120 de blocuri. După ce a fost generat, s-a propagat în reţea, urmând să fie adăugat lanţului de blocuri. Dacă nu poate fi inclus in lanţ, starea sa va deveni &quot;neacceptat&quot; si nu va putea fi folosit la tranzacţii. Acest fenomen se întâmplă atunci cand un alt nod a generat un bloc la o diferenţa de câteva secunde.</translation> </message> <message> <location line="+7"/> <source>Debug information</source> <translation>Informatii pentru debug</translation> </message> <message> <location line="+8"/> <source>Transaction</source> <translation>Tranzacţie</translation> </message> <message> <location line="+3"/> <source>Inputs</source> <translation>Intrari</translation> </message> <message> <location line="+23"/> <source>Amount</source> <translation>Sumă</translation> </message> <message> <location line="+1"/> <source>true</source> <translation>Adevarat!</translation> </message> <message> <location line="+0"/> <source>false</source> <translation>Fals!</translation> </message> <message> <location line="-209"/> <source>, has not been successfully broadcast yet</source> <translation>, nu s-a propagat încă</translation> </message> <message numerus="yes"> <location line="-35"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+70"/> <source>unknown</source> <translation>necunoscut</translation> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation>Detaliile tranzacţiei</translation> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation>Afişează detalii despre tranzacţie</translation> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+225"/> <source>Date</source> <translation>Data</translation> </message> <message> <location line="+0"/> <source>Type</source> <translation>Tipul</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Adresa</translation> </message> <message> <location line="+0"/> <source>Amount</source> <translation>Cantitate</translation> </message> <message numerus="yes"> <location line="+57"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+3"/> <source>Open until %1</source> <translation>Deschis până la %1</translation> </message> <message> <location line="+3"/> <source>Offline (%1 confirmations)</source> <translation>Neconectat (%1 confirmări)</translation> </message> <message> <location line="+3"/> <source>Unconfirmed (%1 of %2 confirmations)</source> <translation>Neconfirmat (%1 din %2 confirmări)</translation> </message> <message> <location line="+3"/> <source>Confirmed (%1 confirmations)</source> <translation>Confirmat (%1 confirmări)</translation> </message> <message numerus="yes"> <location line="+8"/> <source>Mined balance will be available when it matures in %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+5"/> <source>This block was not received by any other nodes and will probably not be accepted!</source> <translation>Blocul nu a fost recepţionat de niciun alt nod şi e probabil că nu va fi acceptat.</translation> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation>Generat, dar neacceptat</translation> </message> <message> <location line="+43"/> <source>Received with</source> <translation>Recepţionat cu</translation> </message> <message> <location line="+2"/> <source>Received from</source> <translation>Primit de la:</translation> </message> <message> <location line="+3"/> <source>Sent to</source> <translation>Trimis către</translation> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation>Plată către un cont propriu</translation> </message> <message> <location line="+2"/> <source>Mined</source> <translation>Produs</translation> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation>(n/a)</translation> </message> <message> <location line="+199"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation>Starea tranzacţiei. Treceţi cu mouse-ul peste acest câmp pentru afişarea numărului de confirmări.</translation> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation>Data şi ora la care a fost recepţionată tranzacţia.</translation> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation>Tipul tranzacţiei.</translation> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation>Adresa de destinaţie a tranzacţiei.</translation> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation>Suma extrasă sau adăugată la sold.</translation> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+52"/> <location line="+16"/> <source>All</source> <translation>Toate</translation> </message> <message> <location line="-15"/> <source>Today</source> <translation>Astăzi</translation> </message> <message> <location line="+1"/> <source>This week</source> <translation>Săptămâna aceasta</translation> </message> <message> <location line="+1"/> <source>This month</source> <translation>Luna aceasta</translation> </message> <message> <location line="+1"/> <source>Last month</source> <translation>Luna trecută</translation> </message> <message> <location line="+1"/> <source>This year</source> <translation>Anul acesta</translation> </message> <message> <location line="+1"/> <source>Range...</source> <translation>Între...</translation> </message> <message> <location line="+11"/> <source>Received with</source> <translation>Recepţionat cu...</translation> </message> <message> <location line="+2"/> <source>Sent to</source> <translation>Trimis către</translation> </message> <message> <location line="+2"/> <source>To yourself</source> <translation>Către propriul cont</translation> </message> <message> <location line="+1"/> <source>Mined</source> <translation>Produs</translation> </message> <message> <location line="+1"/> <source>Other</source> <translation>Altele</translation> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation>Introduceţi adresa sau eticheta pentru căutare</translation> </message> <message> <location line="+7"/> <source>Min amount</source> <translation>Cantitatea produsă</translation> </message> <message> <location line="+34"/> <source>Copy address</source> <translation>Copiază adresa</translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>Copiază eticheta</translation> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation>Copiază sumă</translation> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Edit label</source> <translation>Editează eticheta</translation> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation>Arata detaliile tranzactiei</translation> </message> <message> <location line="+139"/> <source>Export Transaction Data</source> <translation>Exportă tranzacţiile</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Fişier text cu valori separate prin virgulă (*.csv)</translation> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation>Confirmat</translation> </message> <message> <location line="+1"/> <source>Date</source> <translation>Data</translation> </message> <message> <location line="+1"/> <source>Type</source> <translation>Tipul</translation> </message> <message> <location line="+1"/> <source>Label</source> <translation>Etichetă</translation> </message> <message> <location line="+1"/> <source>Address</source> <translation>Adresă</translation> </message> <message> <location line="+1"/> <source>Amount</source> <translation>Sumă</translation> </message> <message> <location line="+1"/> <source>ID</source> <translation>ID</translation> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation>Eroare în timpul exportului</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>Fisierul %1 nu a putut fi accesat pentru scriere.</translation> </message> <message> <location line="+100"/> <source>Range:</source> <translation>Interval:</translation> </message> <message> <location line="+8"/> <source>to</source> <translation>către</translation> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+193"/> <source>Send Coins</source> <translation>Trimite lastcoin</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 type="unfinished"/> </message> <message> <location line="+193"/> <source>Backup Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Wallet Data (*.dat)</source> <translation>Date portofel (*.dat)</translation> </message> <message> <location line="+3"/> <source>Backup Failed</source> <translation>Copia de rezerva a esuat</translation> </message> <message> <location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation>A apărut o eroare la încercarea de a salva datele din portofel intr-o noua locație.</translation> </message> <message> <location line="+4"/> <source>Backup Successful</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The wallet data was successfully saved to the new location.</source> <translation type="unfinished"/> </message> </context> <context> <name>bitcoin-core</name> <message> <location filename="../bitcoinstrings.cpp" line="+94"/> <source>lastcoin version</source> <translation>versiunea lastcoin</translation> </message> <message> <location line="+102"/> <source>Usage:</source> <translation>Uz:</translation> </message> <message> <location line="-29"/> <source>Send command to -server or lastcoind</source> <translation>Trimite comanda la -server sau lastcoind</translation> </message> <message> <location line="-23"/> <source>List commands</source> <translation>Listă de comenzi</translation> </message> <message> <location line="-12"/> <source>Get help for a command</source> <translation>Ajutor pentru o comandă</translation> </message> <message> <location line="+24"/> <source>Options:</source> <translation>Setări:</translation> </message> <message> <location line="+24"/> <source>Specify configuration file (default: lastcoin.conf)</source> <translation>Specifica-ți configurația fisierului (in mod normal: lastcoin.conf)</translation> </message> <message> <location line="+3"/> <source>Specify pid file (default: lastcoind.pid)</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation>Specifica datele directorului</translation> </message> <message> <location line="-9"/> <source>Set database cache size in megabytes (default: 25)</source> <translation>Seteaza marimea cache a bazei de date in MB (initial: 25)</translation> </message> <message> <location line="-28"/> <source>Listen for connections on &lt;port&gt; (default: 9333 or testnet: 19333)</source> <translation>Lista a conectiunile in &lt;port&gt; (initial: 9333 sau testnet: 19333)</translation> </message> <message> <location line="+5"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation>Se menține la cele mai multe conexiuni &lt;n&gt; cu colegii (implicit: 125)</translation> </message> <message> <location line="-48"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation>Conecteaza-te la nod pentru a optine adresa peer, si deconecteaza-te</translation> </message> <message> <location line="+82"/> <source>Specify your own public address</source> <translation>Specifica adresa ta publica</translation> </message> <message> <location line="+3"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation>Prag pentru deconectarea colegii funcționează corect (implicit: 100)</translation> </message> <message> <location line="-134"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation>Numărul de secunde pentru a păstra colegii funcționează corect la reconectare (implicit: 86400)</translation> </message> <message> <location line="-29"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 9332 or testnet: 19332)</source> <translation type="unfinished"/> </message> <message> <location line="+37"/> <source>Accept command line and JSON-RPC commands</source> <translation>Se accepta command line si comenzi JSON-RPC</translation> </message> <message> <location line="+76"/> <source>Run in the background as a daemon and accept commands</source> <translation>Ruleaza în background ca un demon și accepta comenzi.</translation> </message> <message> <location line="+37"/> <source>Use the test network</source> <translation>Utilizeaza test de retea</translation> </message> <message> <location line="-112"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation>Accepta conexiuni de la straini (initial: 1 if no -proxy or -connect) </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=lastcoinrpc 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;lastcoin Alert&quot; admin@foo.com </source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Cannot obtain a lock on data directory %s. lastcoin 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>Seteaza marimea maxima a tranzactie mare/mica in bytes (initial: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 type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong lastcoin will not work properly.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Block creation options:</source> <translation>Optiuni creare block</translation> </message> <message> <location line="+5"/> <source>Connect only to the specified node(s)</source> <translation>Conecteaza-te doar la nod(urile) specifice</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>Descopera propria ta adresa IP (intial: 1)</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 type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to read block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to read block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to sync block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write file info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write to coin database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write transaction index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write undo data</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Find peers using DNS lookup (default: 1 unless -connect)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Generate coins (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 288, 0 = all)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>How thorough the block verification is (0-4, default: 3)</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Not enough file descriptors available.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Rebuild block chain index from current blk000??.dat files</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Set the number of threads to service RPC calls (default: 4)</source> <translation type="unfinished"/> </message> <message> <location line="+26"/> <source>Verifying blocks...</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Verifying wallet...</source> <translation type="unfinished"/> </message> <message> <location line="-69"/> <source>Imports blocks from external blk000??.dat file</source> <translation type="unfinished"/> </message> <message> <location line="-76"/> <source>Set the number of script verification threads (up to 16, 0 = auto, &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 type="unfinished"/> </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 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="+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 type="unfinished"/> </message> <message> <location line="+2"/> <source>Output extra debugging information. Implies all other -debug* options</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Output extra network debugging information</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Prepend debug output with timestamp</source> <translation>Copie de ieșire de depanare cu timestamp</translation> </message> <message> <location line="+5"/> <source>SSL options: (see the lastcoin Wiki for SSL setup instructions)</source> <translation>Optiuni SSl (vezi lastcoin wiki pentru intructiunile de instalare)</translation> </message> <message> <location line="+1"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation>Selecteaza versiunea socks-ului pe care vrei sa il folosesti (4-5, initial: 5)</translation> </message> <message> <location line="+3"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation>Trimite urmări / debug info la consola loc de debug.log fișier</translation> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation>Trimite urmări / debug info la depanatorul</translation> </message> <message> <location line="+5"/> <source>Set maximum block size in bytes (default: 250000)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set minimum block size in bytes (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Signing transaction failed</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>System error: </source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Transaction amount too small</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction amounts must be positive</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction too large</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation>Foloseste UPnP pentru a vedea porturile (initial: 0)</translation> </message> <message> <location line="+1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation>Foloseste UPnP pentru a vedea porturile (initial: 1 cand listezi)</translation> </message> <message> <location line="+1"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Username for JSON-RPC connections</source> <translation>Username pentru conectiunile 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 type="unfinished"/> </message> <message> <location line="+1"/> <source>You need to rebuild the databases using -reindex to change -txindex</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>wallet.dat corrupt, salvage failed</source> <translation type="unfinished"/> </message> <message> <location line="-50"/> <source>Password for JSON-RPC connections</source> <translation>Parola pentru conectiunile JSON-RPC</translation> </message> <message> <location line="-67"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation>Permiteti conectiunile JSON-RPC de la o adresa IP specifica.</translation> </message> <message> <location line="+76"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation>Trimite comenzi la nod, ruland pe ip-ul (initial: 127.0.0.1)</translation> </message> <message> <location line="-120"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation>Executa comanda cand cel mai bun block se schimba (%s in cmd se inlocuieste cu block hash)</translation> </message> <message> <location line="+147"/> <source>Upgrade wallet to latest format</source> <translation>Actualizeaza portofelul la ultimul format</translation> </message> <message> <location line="-21"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation>Setarea marimii cheii bezinului la &lt;n&gt;(initial 100)</translation> </message> <message> <location line="-12"/> <source>Rescan the block chain for missing wallet transactions</source> <translation>Rescanare lanțul de bloc pentru tranzacțiile portofel lipsă</translation> </message> <message> <location line="+35"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation>Foloseste Open SSL(https) pentru coneciunile JSON-RPC</translation> </message> <message> <location line="-26"/> <source>Server certificate file (default: server.cert)</source> <translation>Certificatul serverulu (initial: server.cert)</translation> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation>Cheia privata a serverului ( initial: server.pem)</translation> </message> <message> <location line="-151"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation>Accepta cifruri (initial: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</translation> </message> <message> <location line="+165"/> <source>This help message</source> <translation>Acest mesaj de ajutor.</translation> </message> <message> <location line="+6"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation>Nu se poate lega %s cu acest calculator (retunare eroare legatura %d, %s) </translation> </message> <message> <location line="-91"/> <source>Connect through socks proxy</source> <translation>Conectează prin proxy SOCKS</translation> </message> <message> <location line="-10"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation>Permite DNS-ului sa se uite dupa -addnode, -seednode si -connect</translation> </message> <message> <location line="+55"/> <source>Loading addresses...</source> <translation>Încarc adrese...</translation> </message> <message> <location line="-35"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation>Eroare incarcand wallet.dat: Portofel corupt</translation> </message> <message> <location line="+1"/> <source>Error loading wallet.dat: Wallet requires newer version of lastcoin</source> <translation>Eroare incarcare wallet.dat: Portofelul are nevoie de o versiune lastcoin mai noua</translation> </message> <message> <location line="+93"/> <source>Wallet needed to be rewritten: restart lastcoin to complete</source> <translation>Portofelul trebuie rescris: restarteaza aplicatia lastcoin pentru a face asta.</translation> </message> <message> <location line="-95"/> <source>Error loading wallet.dat</source> <translation>Eroare incarcand wallet.dat</translation> </message> <message> <location line="+28"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation>Adresa proxy invalida: &apos;%s&apos;</translation> </message> <message> <location line="+56"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation>Retea specificata necunoscuta -onlynet: &apos;%s&apos;</translation> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation>Necunoscut -socks proxy version requested: %i</translation> </message> <message> <location line="-96"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation>Nu se poate rezolca -bind address: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation>Nu se poate rezolva -externalip address: &apos;%s&apos;</translation> </message> <message> <location line="+44"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>Suma invalida pentru -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Invalid amount</source> <translation>Suma invalida</translation> </message> <message> <location line="-6"/> <source>Insufficient funds</source> <translation>Fonduri insuficiente</translation> </message> <message> <location line="+10"/> <source>Loading block index...</source> <translation>Încarc indice bloc...</translation> </message> <message> <location line="-57"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation>Add a node to connect to and attempt to keep the connection open details suggestions history </translation> </message> <message> <location line="-25"/> <source>Unable to bind to %s on this computer. lastcoin is probably already running.</source> <translation>Imposibilitatea de a lega la% s pe acest computer. lastcoin este, probabil, deja în execuție.</translation> </message> <message> <location line="+64"/> <source>Fee per KB to add to transactions you send</source> <translation>Taxa pe kb pentru a adauga tranzactii trimise</translation> </message> <message> <location line="+19"/> <source>Loading wallet...</source> <translation>Încarc portofel...</translation> </message> <message> <location line="-52"/> <source>Cannot downgrade wallet</source> <translation>Nu se poate face downgrade la portofel</translation> </message> <message> <location line="+3"/> <source>Cannot write default address</source> <translation>Nu se poate scrie adresa initiala</translation> </message> <message> <location line="+64"/> <source>Rescanning...</source> <translation>Rescanez...</translation> </message> <message> <location line="-57"/> <source>Done loading</source> <translation>Încărcare terminată</translation> </message> <message> <location line="+82"/> <source>To use the %s option</source> <translation>Pentru a folosii optiunea %s</translation> </message> <message> <location line="-74"/> <source>Error</source> <translation>Eroare</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 type="unfinished"/> </message> </context> </TS>
{ "content_hash": "5d89a52b8cc6861f8d77275a4afef264", "timestamp": "", "source": "github", "line_count": 2922, "max_line_length": 422, "avg_line_length": 37.440451745379875, "alnum_prop": 0.6193362035081946, "repo_name": "lastcoin/lastcoin", "id": "71e91aba391721e630fc7035bb4b08cb20da248b", "size": "109828", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/qt/locale/bitcoin_ro_RO.ts", "mode": "33261", "license": "mit", "language": [ { "name": "C", "bytes": "3057943" }, { "name": "C++", "bytes": "15171401" }, { "name": "CSS", "bytes": "1127" }, { "name": "Erlang", "bytes": "6752" }, { "name": "IDL", "bytes": "14913" }, { "name": "JavaScript", "bytes": "81" }, { "name": "Nu", "bytes": "264" }, { "name": "Objective-C++", "bytes": "5864" }, { "name": "PHP", "bytes": "2969" }, { "name": "Perl", "bytes": "30058" }, { "name": "Python", "bytes": "69714" }, { "name": "Shell", "bytes": "88022" }, { "name": "TypeScript", "bytes": "5236293" } ], "symlink_target": "" }
package org.seasar.doma.internal.apt.dao; import java.util.List; import java.util.Optional; import org.seasar.doma.Dao; import org.seasar.doma.Select; import example.entity.Emp; /** * @author nakamura-to * */ @Dao(config = MyConfig.class) public interface OptionalEntityListDao { @Select List<Optional<Emp>> selectAll(); }
{ "content_hash": "ef94b17a8efccf48d49a72d02e9b3cae", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 41, "avg_line_length": 15.5, "alnum_prop": 0.7243401759530792, "repo_name": "backpaper0/doma2", "id": "07881cfbc253f541a95cbc392036dfc91e216f30", "size": "966", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/test/java/org/seasar/doma/internal/apt/dao/OptionalEntityListDao.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "4666069" }, { "name": "Shell", "bytes": "499" } ], "symlink_target": "" }
layout: default title: API permalink: /api/ --- API docs here.
{ "content_hash": "916b0b91fbb8e890aaff9e862d5e5919", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 16, "avg_line_length": 10.666666666666666, "alnum_prop": 0.6875, "repo_name": "JPorry/redux-simple-resource", "id": "7cc7ee7e68896724170558cf9d61b16503e4e4dd", "size": "68", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "docs/api.html", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "985" }, { "name": "JavaScript", "bytes": "71131" } ], "symlink_target": "" }
import sys import unittest from asq.queryables import Queryable __author__ = "Sixty North" if not sys.platform == 'cli': class TestAsParallel(unittest.TestCase): def test_as_parallel_closed(self): b = Queryable([1]) b.close() self.assertRaises(ValueError, lambda: b.as_parallel())
{ "content_hash": "3771226c772377d7e599eab5e2e2b109", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 66, "avg_line_length": 23.714285714285715, "alnum_prop": 0.6385542168674698, "repo_name": "rob-smallshire/asq", "id": "0018b25808526dd4fb47465a43020220f7074a87", "size": "332", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "asq/test/test_as_parallel.py", "mode": "33188", "license": "mit", "language": [ { "name": "Python", "bytes": "284574" } ], "symlink_target": "" }
using System; using System.Collections.Generic; using System.Text.RegularExpressions; using System.Xml; using IDE.Common.Models.Value_Objects; using IDE.Common.Utilities.Extensions; namespace IDE.Common.Utilities { /// <summary> /// Commands class /// </summary> public class Commands { /// <summary> /// The file path /// </summary> private string filePath; /// <summary> /// Gets the commands map. /// </summary> /// <value> /// The commands map. /// </value> public ISet<Command> CommandsMap { get; } /// <summary> /// Gets the file path. /// </summary> /// <value> /// The file path. /// </value> public string FilePath { get { return filePath; } set { filePath = value; Session.Instance.SubmitCommands(filePath); } } // Utils /// <summary> /// The document /// </summary> private readonly XmlDocument document; /// <summary> /// Initializes a new instance of the <see cref="Commands"/> class. /// </summary> /// <param name="path">The path.</param> public Commands(string path = MissingFileManager.DEFAULT_COMMANDS_PATH) { document = new XmlDocument(); CommandsMap = new HashSet<Command>(); FilePath = Uri.IsWellFormedUriString(path, UriKind.RelativeOrAbsolute) ? path : MissingFileManager.DEFAULT_COMMANDS_PATH; Load(FilePath); } /// <summary> /// Loads the specified path. /// </summary> /// <param name="path">The path.</param> public void Load(string path) { try { CommandsMap.Clear(); document.RemoveAll(); document.Load(path); var root = document.SelectSingleNode("/Commands"); var commandNodes = root.ChildNodes; foreach (XmlNode commandNode in commandNodes) { var name = commandNode.Attributes["name"].Value; var content = commandNode.Attributes["content"].Value; var regex = new Regex(commandNode.Attributes[2].Value); var type = EnumExtensions .GetValueFromDescription<Command.TypeE>(commandNode.Attributes["type"].Value); var description = commandNode.FirstChild.InnerText; CommandsMap.Add(Command.CreateCommand(name, content, description, regex, type)); } FilePath = path; } catch { Console.Error.WriteLine("Could not load command list into memory"); MissingFileManager.CreateCommandsFile(); Load(MissingFileManager.DEFAULT_COMMANDS_PATH); } } /// <summary> /// Saves the specified path. /// </summary> /// <param name="path">The path.</param> /// <exception cref="System.InvalidOperationException">Commands were never loaded to memory.</exception> public void Save(string path) { if (null == CommandsMap) { throw new InvalidOperationException("Commands were never loaded to memory."); } try { document.RemoveAll(); foreach (var command in CommandsMap) { document.AppendChild(command.ToXML()); } document.Save(path); FilePath = path; } catch { Console.Error.WriteLine("Could not save commands."); } } /// <summary> /// Adds the command. /// </summary> /// <param name="command">The command.</param> public void AddCommand(Command command) { CommandsMap.Add(command); } /// <summary> /// Removes the command. /// </summary> /// <param name="command">The command.</param> public void RemoveCommand(Command command) { CommandsMap.Remove(command); } } }
{ "content_hash": "338c1b09c18b50cd374d1eb00294a3f0", "timestamp": "", "source": "github", "line_count": 142, "max_line_length": 133, "avg_line_length": 31.035211267605632, "alnum_prop": 0.5046516904923984, "repo_name": "Zuravvski/Industrial-Robotics", "id": "b0784d072552fdf5181ebf4749f4cbbf56b7a625", "size": "4409", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "IDE/IDE/Common/Utilities/Commands.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "583981" } ], "symlink_target": "" }
package com.navercorp.pinpoint.web.service.stat; import com.navercorp.pinpoint.web.dao.ApplicationActiveTraceDao; import com.navercorp.pinpoint.web.util.TimeWindow; import com.navercorp.pinpoint.web.vo.stat.AggreJoinActiveTraceBo; import com.navercorp.pinpoint.web.vo.stat.chart.StatChart; import com.navercorp.pinpoint.web.vo.stat.chart.application.ApplicationActiveTraceChart; import org.springframework.stereotype.Service; import java.util.List; import java.util.Objects; /** * @author minwoo.jung */ @Service public class ApplicationActiveTraceService implements ApplicationStatChartService { private final ApplicationActiveTraceDao applicationActiveTraceDao; public ApplicationActiveTraceService(ApplicationActiveTraceDao applicationActiveTraceDao) { this.applicationActiveTraceDao = Objects.requireNonNull(applicationActiveTraceDao, "applicationActiveTraceDao"); } @Override public StatChart selectApplicationChart(String applicationId, TimeWindow timeWindow) { Objects.requireNonNull(applicationId, "applicationId"); Objects.requireNonNull(timeWindow, "timeWindow"); List<AggreJoinActiveTraceBo> aggreJoinActiveTraceBoList = this.applicationActiveTraceDao.getApplicationStatList(applicationId, timeWindow); return new ApplicationActiveTraceChart(timeWindow, aggreJoinActiveTraceBoList); } }
{ "content_hash": "a9fa75742c3eee2c56ffa7d3fd55b9db", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 147, "avg_line_length": 39.22857142857143, "alnum_prop": 0.8171886380189366, "repo_name": "naver/pinpoint", "id": "5f509d3bf77d11565efa682047a37b2cc994eca1", "size": "1967", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "web/src/main/java/com/navercorp/pinpoint/web/service/stat/ApplicationActiveTraceService.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "22629" }, { "name": "CSS", "bytes": "386346" }, { "name": "Groovy", "bytes": "1423" }, { "name": "HTML", "bytes": "155936" }, { "name": "Java", "bytes": "16572538" }, { "name": "JavaScript", "bytes": "5349" }, { "name": "PLSQL", "bytes": "4156" }, { "name": "Shell", "bytes": "30236" }, { "name": "TSQL", "bytes": "4759" }, { "name": "Thrift", "bytes": "15284" }, { "name": "TypeScript", "bytes": "1358173" } ], "symlink_target": "" }
package controllers import ( "github.com/robfig/revel" ) type Application struct { *rev.Controller } func (c Application) Index() rev.Result { return c.Render() } func (c Application) EnterDemo(user, demo string) rev.Result { c.Validation.Required(user) c.Validation.Required(demo) if c.Validation.HasErrors() { c.Flash.Error("Please choose a nick name and the demonstration type.") return c.Redirect(Application.Index) } switch demo { case "refresh": return c.Redirect("/refresh?user=%s", user) case "longpolling": return c.Redirect("/longpolling/room?user=%s", user) case "websocket": return c.Redirect("/websocket/room?user=%s", user) } return nil }
{ "content_hash": "589f49155cf3a75bddfa214795c16c01", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 72, "avg_line_length": 20.666666666666668, "alnum_prop": 0.7155425219941349, "repo_name": "jamesward/revel", "id": "40d1e0ad3a0366b1692a8fd638e2b66c22179331", "size": "682", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "samples/chat/app/controllers/app.go", "mode": "33188", "license": "mit", "language": [ { "name": "Go", "bytes": "140013" } ], "symlink_target": "" }
/** * @depends nothing * @name core.console * @package jquery-sparkle {@link https://balupton.com/projects/jquery-sparkle} */ /** * Console Emulator * We have to convert arguments into arrays, and do this explicitly as webkit (chrome) hates function references, and arguments cannot be passed as is * @version 1.0.3 * @date August 31, 2010 * @since 0.1.0-dev, December 01, 2009 * @package jquery-sparkle {@link https://balupton.com/projects/jquery-sparkle} * @author Benjamin "balupton" Lupton {@link http://balupton.com} * @copyright (c) 2009+ Benjamin Arthur Lupton {@link https://balupton.com} * @license MIT License {@link https://spdx.org/licenses/MIT.html} */ // Check to see if console exists, if not define it if (typeof window.console === 'undefined') { window.console = {} } // Check to see if we have emulated the console yet if (typeof window.console.emulated === 'undefined') { // Emulate Log if (typeof window.console.log === 'function') { window.console.hasLog = true } else { if (typeof window.console.log === 'undefined') { window.console.log = function() {} } window.console.hasLog = false } // Emulate Debug if (typeof window.console.debug === 'function') { window.console.hasDebug = true } else { if (typeof window.console.debug === 'undefined') { window.console.debug = !window.console.hasLog ? function() {} : function() { var arr = ['console.debug:'] for (var i = 0; i < arguments.length; i++) { arr.push(arguments[i]) } window.console.log.apply(window.console, arr) } } window.console.hasDebug = false } // Emulate Warn if (typeof window.console.warn === 'function') { window.console.hasWarn = true } else { if (typeof window.console.warn === 'undefined') { window.console.warn = !window.console.hasLog ? function() {} : function() { var arr = ['console.warn:'] for (var i = 0; i < arguments.length; i++) { arr.push(arguments[i]) } window.console.log.apply(window.console, arr) } } window.console.hasWarn = false } // Emulate Error if (typeof window.console.error === 'function') { window.console.hasError = true } else { if (typeof window.console.error === 'undefined') { window.console.error = function() { var msg = 'An error has occured.' // Log if (window.console.hasLog) { var arr = ['console.error:'] for (var i = 0; i < arguments.length; i++) { arr.push(arguments[i]) } window.console.log.apply(window.console, arr) // Adjust Message msg = "An error has occured. More information is available in your browser's javascript console." } // Prepare Arguments for (var i = 0; i < arguments.length; ++i) { if (typeof arguments[i] !== 'string') { break } msg += '\n' + arguments[i] } // Throw Error if (typeof Error !== 'undefined') { throw new Error(msg) } else { throw msg } } } window.console.hasError = false } // Emulate Trace if (typeof window.console.trace === 'function') { window.console.hasTrace = true } else { if (typeof window.console.trace === 'undefined') { window.console.trace = function() { window.console.error('console.trace does not exist') } } window.console.hasTrace = false } // Done window.console.emulated = true } /** * @depends jquery * @name jquery.appendscriptstyle * @package jquery-sparkle {@link https://balupton.com/projects/jquery-sparkle} */ /** * jQuery Aliaser */ ;(function($) { /** * Append a Stylesheet to the DOM * @version 1.1.0 * @date July 23, 2010 * @since 1.0.0, June 30, 2010 * @package jquery-sparkle {@link https://balupton.com/projects/jquery-sparkle} * @author Benjamin "balupton" Lupton {@link http://balupton.com} * @copyright (c) 2009+ Benjamin Arthur Lupton {@link https://balupton.com} * @license MIT License {@link https://spdx.org/licenses/MIT.html} */ $.appendStylesheet = $.appendStylesheet || function(url, overwrite) { // Check if (!(document.body || false)) { setTimeout(function() { $.appendStylesheet.apply($, [url, overwrite]) }, 500) // Chain return $ } // Prepare var id = 'stylesheet-' + url.replace(/[^a-zA-Z0-9]/g, '') var $old = $('#' + id) if (typeof overwrite === 'undefined') { overwrite = false } // Check if ($old.length === 1) { if (overwrite) { $old.remove() } else { // Chain return $ } } // Create var bodyEl = document.getElementsByTagName( $.browser.safari ? 'head' : 'body' )[0] var linkEl = document.createElement('link') linkEl.type = 'text/css' linkEl.rel = 'stylesheet' linkEl.media = 'screen' linkEl.href = url linkEl.id = id bodyEl.appendChild(linkEl) // Chain return $ } /** * Append a Script to the DOM * @version 1.1.0 * @date July 23, 2010 * @since 1.0.0, June 30, 2010 * @package jquery-sparkle {@link https://balupton.com/projects/jquery-sparkle} * @author Benjamin "balupton" Lupton {@link http://balupton.com} * @copyright (c) 2009+ Benjamin Arthur Lupton {@link https://balupton.com} * @license MIT License {@link https://spdx.org/licenses/MIT.html} */ $.appendScript = $.appendScript || function(url, overwrite) { // Check if (!(document.body || false)) { setTimeout(function() { $.appendScript.apply($, [url, overwrite]) }, 500) // Chain return $ } // Prepare var id = 'script-' + url.replace(/[^a-zA-Z0-9]/g, '') var $old = $('#' + id) if (typeof overwrite === 'undefined') { overwrite = false } // Check if ($old.length === 1) { if (overwrite) { $old.remove() } else { // Chain return $ } } // Create var bodyEl = document.getElementsByTagName( $.browser.safari ? 'head' : 'body' )[0] var scriptEl = document.createElement('script') scriptEl.type = 'text/javascript' scriptEl.src = url scriptEl.id = id bodyEl.appendChild(scriptEl) // Chain return $ } })(jQuery) /** * @depends core.console, jquery, jquery.appendscriptstyle * @name jquery.syntaxhighlighter * @package jquery-syntaxhighlighter {@link https://balupton.com/projects/jquery-syntaxhighlighter} */ /** * jQuery Aliaser */ ;(function($) { /** * Get all elements within ourself which match the selector, and include ourself in the search * @version 1.0.0 * @date June 30, 2010 * @package jquery-sparkle {@link https://balupton.com/projects/jquery-sparkle} * @author Benjamin "balupton" Lupton {@link http://balupton.com} * @copyright (c) 2009+ Benjamin Arthur Lupton {@link https://balupton.com} * @license MIT License {@link https://spdx.org/licenses/MIT.html} */ $.fn.findAndSelf = $.fn.findAndSelf || function(selector) { var $this = $(this) return $this .find(selector) .andSelf() .filter(selector) } /** * Add the String replace method to the Number prototype * This is to fix an error with jQuery v1.4.2 when $('#el').val() contains a numeric value on Firefox. * Error is here: http://getsatisfaction.com/balupton/topics/word_jumbles * @version 1.0.0 * @date September 01, 2010 * @package jquery-sparkle {@link https://balupton.com/projects/jquery-sparkle} * @author Benjamin "balupton" Lupton {@link http://balupton.com} * @copyright (c) 2009+ Benjamin Arthur Lupton {@link https://balupton.com} * @license MIT License {@link https://spdx.org/licenses/MIT.html} */ Number.prototype.replace = Number.prototype.replace || function() { var str = String(this) return str.replace.apply(this, arguments) } /** * jQuery SyntaxHighlighter * @version 1.0.1-beta * @date August 16, 2010 * @since 0.1.0-dev, July 23, 2010 * @package jquery-syntaxhighlighter {@link https://balupton.com/projects/jquery-syntaxhighlighter} * @author Benjamin "balupton" Lupton {@link http://balupton.com} * @copyright (c) 2009+ Benjamin Arthur Lupton {@link https://balupton.com} * @license MIT License {@link https://spdx.org/licenses/MIT.html} */ if (!($.SyntaxHighlighter || false)) { $.SyntaxHighlighter = { // Configuration config: { /** * Whether or not we should load in Google Prettify automatically if it was not detected. */ load: true, /** * Whether or not we should highlight all appropriate code blocks automatically once the page has finished loading. */ highlight: true, /** * Whether or not we should output debug information in case something is not working correctly. */ debug: false, /** * Whether or not we should wrap the code blocks lines, or have them scrollable. */ wrapLines: true, /** * Whether or not we should display line numbers next to the code blocks. */ lineNumbers: true, /** * Whether or not we should strip empty start and finish lines from the code blocks. */ stripEmptyStartFinishLines: true, /** * Whether or not we should remove whitespaces/indentations which are only there for HTML formatting of our code block. */ stripInitialWhitespace: true, /** * Whether or not we should alternate the lines background colours on odd and even rows. */ alternateLines: false, /** * The default class to look for in case we have not explicitly specified a language. */ defaultClassname: 'highlight', /** * The theme that should be used by our highlighted code blocks. */ theme: 'balupton', /** * The themes to load in for use with our highlighted code blocks. */ themes: ['balupton'], /** * Whether or not we should add a Syntax Highlighter Sparkle extension if jQuery Sparkle is detected. */ addSparkleExtension: true, /** * The baseUrl to load Google's Prettify from. * This is used to load in Google's Prettify if the load option is true and it was not found. */ prettifyBaseUrl: 'https://bevry-archive.github.io/jquery-syntaxhighlighter/prettify', /** * The baseUrl to load our Syntax Highlighter from. * This is used to load in the stylesheet and additional themes. */ baseUrl: 'https://bevry-archive.github.io/jquery-syntaxhighlighter' }, // Init init: function(options) { // Prepare var SyntaxHighlighter = this, config = SyntaxHighlighter.config // Fix baseUrl var baseUrl = config.baseUrl if (baseUrl[baseUrl.length - 1] === '/') { config.baseUrl = baseUrl.substr(0, baseUrl.length - 2) } delete baseUrl // Configure $.extend(true, SyntaxHighlighter.config, options || {}) // Sparkle if ($.Sparkle || (false && config.addSparkleExtension)) { // Add Syntax Highlighter to Sparkle $.Sparkle.addExtension('syntaxhighlighter', function() { $(this).syntaxHighlight() }) } // Attach $.fn.syntaxHighlight = $.fn.SyntaxHighlight = SyntaxHighlighter.fn // Load if (config.load) SyntaxHighlighter.load() // Highlight if (config.highlight) SyntaxHighlighter.highlight() // Chain return this }, // Load load: function() { // Prepare var SyntaxHighlighter = this, config = SyntaxHighlighter.config, prettifyBaseUrl = config.prettifyBaseUrl, baseUrl = config.baseUrl, themes = config.themes // Append if (!SyntaxHighlighter.loaded()) { $.appendScript(prettifyBaseUrl + '/prettify.min.js') $.appendStylesheet(prettifyBaseUrl + '/prettify.min.css') $.appendStylesheet(baseUrl + '/styles/style.min.css') $.each(themes, function(i, theme) { $.appendStylesheet(baseUrl + '/styles/theme-' + theme + '.min.css') }) if ($.browser.msie) { $.appendStylesheet(baseUrl + '/styles/ie.min.css') } SyntaxHighlighter.loadedExtras = true } // Chain return this }, // Loaded Extras loadedExtras: false, // Loaded loaded: function() { return typeof prettyPrint !== 'undefined' && this.loadedExtras }, // Determine Language determineLanguage: function(css) { // Prepare var language = null, regex = /lang(uage)?-([a-z0-9]+)/g, match = regex.exec(css) // Handle while (match !== null) { language = match[2] match = regex.exec(css) } // Return langauge return language }, // jQuery Function fn: function() { // Prepare var SyntaxHighlighter = $.SyntaxHighlighter, config = SyntaxHighlighter.config, $el = $(this) // Highlight $.SyntaxHighlighter.highlight({ el: $el }) // Chain return this }, // Highlight highlight: function(params) { // Prepare if (typeof params !== 'object') { params = {} } var SyntaxHighlighter = this, config = SyntaxHighlighter.config, $el = params.el || false // Adjust if (!($el instanceof jQuery)) { $el = $('body') } // Check if (!SyntaxHighlighter.loaded()) { if (config.debug) window.console.debug( 'SyntaxHighlighter.highlight: Chosen SyntaxHighlighter is not yet defined. Waiting 1200 ms then trying again.' ) setTimeout(function() { SyntaxHighlighter.highlight.apply(SyntaxHighlighter, [params]) }, 1200) return } // Prepare Classnames var defaultClassname = config.defaultClassname, defaultSelector = '' if (typeof defaultClassname === 'array') { defaultSelector = '.' + defaultClassname.join(',.') defaultClassname = defaultClassname.join(' ') } else { defaultClassname = String(defaultClassname) defaultSelector = '.' + defaultClassname.replace(' ', ',.') } // Check Classnames if (defaultSelector === '.' || !defaultClassname) { window.console.error( 'SyntaxHighlighter.highlight: Invalid defaultClassname.', [this, arguments], [config.defaultClassname] ) window.console.trace() } // Fetch var $codes = $el .findAndSelf('code,pre') .filter('[class*=lang],' + defaultSelector) .filter(':not(.prettyprint)') // Highlight $codes .css({ 'overflow-y': 'visible', 'overflow-x': 'visible', 'white-space': 'pre' }) .addClass('prettyprint ' + defaultClassname) .each(function() { // Prepare var $code = $(this), css = $code.attr('class'), language = SyntaxHighlighter.determineLanguage(css) // Language $code.addClass('lang-' + language) }) // WrapLines if (config.lineNumbers) { $codes.addClass('linenums') } // Theme if (config.theme) { $codes.addClass('theme-' + config.theme) } // AlternateLines if (config.alternateLines) { $codes.addClass('alternate') } // Fire prettyPrint() // Adjust HTML: stripEmptyStartFinishLines // we have to do this here, as before prettyPrint IE has issues with newlines if (config.stripEmptyStartFinishLines) { $codes .find('li:first-child > :first-child, li:last-child > :first-child') .each(function() { // Prepare var $initialText = $(this), html = $initialText.html(), empty = /^([\r\n\s\t]|\&nbsp;)*$/.test(html), $parent = $initialText.parent(), $siblings = $initialText.siblings() // Check if ( empty && ($siblings.length === 0 || ($siblings.length === 1 && $siblings.filter(':last').is('br'))) ) { // Remove Line var $parent = $initialText.parent(), value = $parent.val() $parent.next().val(value) $parent.remove() } }) } // Adjust HTML: stripInitialWhitespace // we have to do this here, as before prettyPrint IE has issues with newlines if (config.stripInitialWhitespace) { $codes.find('li:first-child > :first-child').each(function() { // Prepare var $initialText = $(this), html = $initialText.html(), match = html.match(/^(([\r\n\s\t]|\&nbsp;)+)/) || [], whitespace = match[1] || '' // Check if (whitespace.length) { // Replace $initialText .parent() .siblings() .children(':first-child') .add($initialText) .each(function() { // Prepare var $nextText = $(this), html = $nextText.html() // Replace html = html.replace(new RegExp('^' + whitespace, 'gm'), '') // Apply $nextText.html(html) }) } }) } // Adjust Lines if (config.wrapLines) { $codes.css({ 'overflow-x': 'hidden', 'overflow-y': 'hidden', 'white-space': 'pre-wrap', 'max-height': 'none' }) } else { $codes.css({ 'overflow-x': 'auto', 'overflow-y': 'auto', 'white-space': 'normal', 'max-height': '500px' }) } // Chain return this } } } else { window.console.warn('SyntaxHighlighter has already been defined...') } })(jQuery)
{ "content_hash": "730816fbfd90aa9da18082e0adc9a3d9", "timestamp": "", "source": "github", "line_count": 658, "max_line_length": 150, "avg_line_length": 26.1580547112462, "alnum_prop": 0.6088775273065303, "repo_name": "balupton/jquery-syntaxhighlighter", "id": "526f77e4490a75dd364a2827f59399a358382399", "size": "17212", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "scripts/jquery.syntaxhighlighter.js", "mode": "33261", "license": "mit", "language": [ { "name": "CSS", "bytes": "6348" }, { "name": "JavaScript", "bytes": "113219" }, { "name": "Shell", "bytes": "2207" } ], "symlink_target": "" }
package pg import ( "fmt" "log" "time" "github.com/liut/osin-storage/storage" "github.com/openshift/osin" ) var _ = fmt.Sprintf var _ storage.Client = (*Client)(nil) var _ osin.Client = (*Client)(nil) // JSONKV .. type JSONKV map[string]interface{} // ToJSONKV ... func ToJSONKV(src interface{}) (JSONKV, error) { switch s := src.(type) { case JSONKV: return s, nil case map[string]interface{}: return JSONKV(s), nil } return nil, errInvalidJson } // WithKey ... func (m JSONKV) WithKey(key string) (v interface{}) { var ok bool if v, ok = m[key]; ok { return } return } // ClientMeta ... type ClientMeta struct { Site uint8 `json:"siteID"` Name string `json:"name"` } // Client ... type Client struct { tableName struct{} `sql:"oauth.client"` ID string `sql:"id,pk" json:"id"` Secret string `sql:"secret,notnull" json:"-"` RedirectURI string `sql:"redirect_uri,notnull" json:"redirect_uri"` Meta ClientMeta `sql:"meta,notnull" json:"meta,omitempty"` CreatedAt time.Time `sql:"created,notnull" json:"created,omitempty"` } func (c *Client) String() string { return fmt.Sprintf("<oauth:Client ID=%s>", c.ID) } // GetName ... func (c *Client) GetName() string { return c.Meta.Name } // GetId osin.Client func (c *Client) GetId() string { // justifying return c.ID } // GetSecret osin.Client func (c *Client) GetSecret() string { return c.Secret } // GetRedirectUri osin.Client func (c *Client) GetRedirectUri() string { return c.RedirectURI } // GetUserData osin.Client func (c *Client) GetUserData() interface{} { return c.Meta } // CopyFrom ... func (c *Client) CopyFrom(other storage.Client) { c.ID = other.GetId() c.Secret = other.GetSecret() c.RedirectURI = other.GetRedirectUri() data := other.GetUserData() if extra, ok := data.(ClientMeta); ok { c.Meta = extra } else { log.Printf("invalid userData %v", data) } } // NewClient ... func NewClient(id, secret, uri string) (c *Client) { c = &Client{ ID: id, Secret: secret, RedirectURI: uri, CreatedAt: time.Now(), Meta: ClientMeta{Name: ""}, } return }
{ "content_hash": "482b90e24098b6fc35871f0d32398d5f", "timestamp": "", "source": "github", "line_count": 109, "max_line_length": 72, "avg_line_length": 19.65137614678899, "alnum_prop": 0.6451914098972923, "repo_name": "liut/osin-storage", "id": "1a7bb09e936cdd453e32056a5827b7e71d52fdb4", "size": "2142", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "storage/pg/client.go", "mode": "33188", "license": "mit", "language": [ { "name": "Go", "bytes": "48221" }, { "name": "PLpgSQL", "bytes": "2090" } ], "symlink_target": "" }
(function() { 'use strict'; angular.module('horizon.framework.widgets.action-list') /** * @ngdoc parameters * @name horizon.framework.widgets.action-list.constant:tooltipConfig * @param {string} defaultTemplate Default warning tooltip template * @param {string} defaultMessage Default warning tooltip message */ .constant('horizon.framework.widgets.action-list.tooltipConfig', { defaultTemplate: '<div>{$ ::message $}</div>', defaultMessage: { message: gettext('The action cannot be performed. The contents of this row have errors or are missing information.') } }) /** * @ngdoc directive * @name horizon.framework.widgets.action-list.directive:buttonTooltip * @element action-list * @param {string} buttonTooltip The tooltip message * @param {object} btModel Custom tooltip model (optional) * @param {string} btPlacement Tooltip placement (optional) * @param {string} btDisabled Disable the tooltip (optional) * @description * The `buttonTooltip` directive provides a tooltip with a general * warning message. This directive should be added as an attribute * to an action-list element. The content of the tooltip can be * configured by providing a template and necessary data. * * Custom Tooltip Model: * ``` * $scope.tooltipModel = { * data: { * message: 'My custom message', * anotherMessage: 'Another message', * clickMe: function() { * alert('You clicked me'); * } * }, * templateUrl: path + 'myWarningTooltip.html' * } * ``` * * @restrict A * @scope * * @example * ``` * <action-list button-tooltip bt-model="tooltipModel"> * <action>...</action> * </action-list> * ``` */ .directive('buttonTooltip', [ 'horizon.framework.widgets.basePath', '$compile', '$http', '$templateCache', 'horizon.framework.widgets.action-list.tooltipConfig', function(path, $compile, $http, $templateCache, tooltipConfig) { return { restrict: 'A', scope: { btMessage: '=buttonTooltip', btModel: '=?', btPlacement: '=?', btDisabled: '=?' }, link: function (scope, element) { var tooltip = scope.btModel || {}; var template = tooltip.template || tooltipConfig.defaultTemplate; if (tooltip.templateUrl) { $http.get(tooltip.templateUrl, { cache: $templateCache }) .then(function(response) { template = response.data; }); } function createTooltip() { // If there is a custom tooltip model, use it // Otherwise, get the message or use default message var tooltipData = angular.extend({}, tooltip.data); tooltipData.message = scope.btMessage || tooltipConfig.defaultMessage.message; // Compile the template with custom tooltip model var tooltipScope = scope.$new(true); angular.extend(tooltipScope, tooltipData); tooltipScope.element = element; var compiledTemplate = $compile(template)(tooltipScope); tooltipScope.$apply(); var options = { content: compiledTemplate, html: true, placement: scope.btPlacement || 'left', trigger: 'manual' }; element.popover(options); element.popover('show'); } element.on('mousedown', function() { if (!scope.btDisabled) { var popoverElt = element.next('.popover'); if (popoverElt.length) { element.popover('destroy'); } else { createTooltip(); } return false; } }); element.on('mouseup', function() { if (!scope.btDisabled) { element.find('button').first().focus(); } }); element.on('blur', 'button', function() { element.popover('destroy'); }); } }; } ]); })();
{ "content_hash": "048f1d15e10cc60ba85571e843607dbb", "timestamp": "", "source": "github", "line_count": 129, "max_line_length": 137, "avg_line_length": 32.1937984496124, "alnum_prop": 0.5699494341439922, "repo_name": "Hodorable/0602", "id": "41eb13bff89a489351bf9b7fa4005689148015de", "size": "4153", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "horizon/static/framework/widgets/action-list/button-tooltip.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "125345" }, { "name": "HTML", "bytes": "480651" }, { "name": "JavaScript", "bytes": "663015" }, { "name": "Makefile", "bytes": "588" }, { "name": "Python", "bytes": "4681159" }, { "name": "Shell", "bytes": "19100" } ], "symlink_target": "" }
package de.lampware.racing.istats.model; /** * TODO JavaDoc * * @author sasch. */ public class CareerStats implements IracingModel { private CategoryCareerStats roadCareerStats; private CategoryCareerStats ovalCareerStats; private CareerStats(CareerStatsBuilder builder) { this.roadCareerStats = builder.roadCareerStats; this.ovalCareerStats = builder.ovalCareerStats; } public CategoryCareerStats getRoadCareerStats() { return roadCareerStats; } public CategoryCareerStats getOvalCareerStats() { return ovalCareerStats; } public static class CareerStatsBuilder { private CategoryCareerStats roadCareerStats; private CategoryCareerStats ovalCareerStats; public CareerStatsBuilder withRoadCareerStats(CategoryCareerStats roadCareerStats) { this.roadCareerStats = roadCareerStats; return this; } public CareerStatsBuilder withOvalCareerStats(CategoryCareerStats ovalCareerStats) { this.ovalCareerStats = ovalCareerStats; return this; } public CareerStats build() { return new CareerStats(this); } } }
{ "content_hash": "657dcdd3da8e851cd8047083a1d3b624", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 92, "avg_line_length": 26.304347826086957, "alnum_prop": 0.6942148760330579, "repo_name": "saschalamp/istats", "id": "9e398a13b8bb492023f632ff9bd14449e956839a", "size": "1833", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "istats/src/main/java/de/lampware/racing/istats/model/CareerStats.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "57" }, { "name": "Java", "bytes": "387938" } ], "symlink_target": "" }
define( ({ placeholder: "Texte de l\'espace réservé", url: "URL du géocodeur", name: "Nom du géocodeur", example: "Exemple", singleLineFieldName: "Nom de champ sur une seule ligne", portalConnectionError: 'Impossible d’obtenir les configurations du géocodeur auprès du portail', actions: "Actions", warning: "Cette version du service de géocodage n\'est pas prise en charge. Ce widget prend en charge le service de géocodage 10.1 et version supérieure.", instruction: "Paramétrez les géocodeurs dans ce widget. Cliquez sur Ajouter un géocodeur pour référencer une URL, spécifier un nom simple pour les utilisateurs et définir d\'autres propriétés. Vous pouvez également réorganiser, configurer ou supprimer vos géocodeurs ci-dessous.", layerInstruction1: "Vous pouvez configurer la condition de recherche dans la ", layerInstruction2: "page des détails de la carte Web", searchAddress: "Rechercher par adresse", searchLayer: "Rechercher par couche", layer: "Couche", field: "Champ", condition: "Condition", contains: "Contient", deleteLastGeocoderError: "Impossible de supprimer le dernier géocodeur.", noSearchFactorError: "Vous devez sélectionner une fonctionnalité (Rechercher par adresse ou Recherche par couche) au moins.", equals: "Est égal à", add: "Ajouter un géocodeur", edit: "Modifier le géocodeur", ok: "OK", cancel: "Annuler", geocoderNamePlaceHolder: "Mon géocodeur", geocodePlaceHolder: "Rechercher une adresse ou un lieu", REPEATING_ERROR: "Les champs suivants sont répétés : " }) );
{ "content_hash": "47b089a1dbd98a912665cc03a51499b4", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 284, "avg_line_length": 52.03225806451613, "alnum_prop": 0.726596404215747, "repo_name": "gisfromscratch/webapp-builder-demos", "id": "cae2007f7f6f5c6568d4b6ed3de8c5b9fa6397be", "size": "1652", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "samples/Sample Widgets/WebAppWidgets/widgets/Geocoder/setting/nls/fr/strings.js", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <plugin xmlns="http://www.phonegap.com/ns/plugins/1.0" id="com.lke.plugin.MobileReaderPlugin" version="0.1.0"> <name>MobileReaderPlugin</name> <description>Mobile Reader Plugin</description> <license>MIT</license> <keywords>phonegap,Mobile Reader</keywords> <js-module src="www/mobilereader.js" name="mobilereader"> <clobbers target="window.mobilereader" /> </js-module> <!-- android --> <platform name="android"> <config-file target="res/xml/config.xml" parent="/*"> <feature name="MobileReaderPlugin"> <param name="android-package" value="com.lke.plugin.MobileReaderPlugin"/> </feature> </config-file> <source-file src="src/android/MobileReaderPlugin.java" target-dir="src/com/lke/plugin" /> <source-file src="libs/mobilereader-api.jar" target-dir="libs" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.RECORD_AUDIO"/> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/> <uses-permission android:name="android.permission.READ_PHONE_STATE"/> </platform> </plugin>
{ "content_hash": "0903f77d9d13b83bfa51dd2d0589a755", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 103, "avg_line_length": 39.45454545454545, "alnum_prop": 0.6443932411674347, "repo_name": "leitzsin360/MobileReaderPlugin", "id": "e04efe6049b3e45eb4bd87cd59b2e2912512f23b", "size": "1302", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "plugin.xml", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "33187" }, { "name": "JavaScript", "bytes": "3721" } ], "symlink_target": "" }
from google.cloud import dialogflow_v2 async def sample_set_agent(): # Create a client client = dialogflow_v2.AgentsAsyncClient() # Initialize request argument(s) agent = dialogflow_v2.Agent() agent.parent = "parent_value" agent.display_name = "display_name_value" agent.default_language_code = "default_language_code_value" agent.time_zone = "time_zone_value" request = dialogflow_v2.SetAgentRequest( agent=agent, ) # Make the request response = await client.set_agent(request=request) # Handle the response print(response) # [END dialogflow_generated_dialogflow_v2_Agents_SetAgent_async]
{ "content_hash": "9c8bbf7c1b34c47870a8162acef0abb3", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 64, "avg_line_length": 26.44, "alnum_prop": 0.697428139183056, "repo_name": "googleapis/python-dialogflow", "id": "2f4bbd1dffd685de765ebdb69b3eb81698cc6793", "size": "1661", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "samples/generated_samples/dialogflow_generated_dialogflow_v2_agents_set_agent_async.py", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Dockerfile", "bytes": "2050" }, { "name": "Python", "bytes": "11184005" }, { "name": "Shell", "bytes": "30672" } ], "symlink_target": "" }
package com.dwarfartisan.parsec; import org.junit.Assert; import org.junit.Test; import org.junit.Before; import org.junit.After; import java.io.EOFException; /** * NoneOf Tester. * * @author <Authors name> * @version 1.0 * @since <pre>一月 9, 2016</pre> */ public class NoneOfTest extends Base { @Before public void before() throws Exception { } @After public void after() throws Exception { } /** * Method: parse(State<T> s) */ @Test public void testParse() throws Exception { State<Character> state = newState("hello"); NoneOf<Character> noneof = new NoneOf<Character>(new Character[]{'s', 'b'}); Character c = noneof.parse(state); Assert.assertEquals(c, new Character('h')); try { State<Character> state2 = newState("sello"); Character d = noneof.parse(state2); Assert.fail("not matched"); } catch (ParsecException e){ Assert.assertTrue(true); } } }
{ "content_hash": "4cf06c75439249727c64a10edc92b47a", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 84, "avg_line_length": 20.5, "alnum_prop": 0.5970731707317073, "repo_name": "ttch/jparsec", "id": "55288b0404d3a1e8255b7655cb24037164fd7556", "size": "1029", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "normal/src/test/com/dwarfartisan/parsec/NoneOfTest.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "91148" } ], "symlink_target": "" }
package com.scrachx.foodfacts.checker.ui.history; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.widget.DividerItemDecoration; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.scrachx.foodfacts.checker.R; import com.scrachx.foodfacts.checker.data.db.model.History; import com.scrachx.foodfacts.checker.data.network.model.State; import com.scrachx.foodfacts.checker.ui.base.BaseFragment; import com.scrachx.foodfacts.checker.ui.custom.EndlessRecyclerViewScrollListener; import com.scrachx.foodfacts.checker.ui.custom.RecyclerItemClickListener; import com.scrachx.foodfacts.checker.ui.product.ProductActivity; import org.apache.commons.lang3.StringUtils; import java.util.ArrayList; import java.util.List; import javax.inject.Inject; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; public class HistoryFragment extends BaseFragment implements HistoryMvpView { public static final String TAG = "HistoryFragment"; @Inject public HistoryMvpPresenter<HistoryMvpView> mPresenter; @BindView(R.id.title_nav_header) public TextView mNavHeader; private RecyclerView mProductsHistoryRecyclerView; private EndlessRecyclerViewScrollListener mScrollListener; private List<History> mProductsHistory; private int mCountProducts = 0; public static HistoryFragment newInstance() { Bundle args = new Bundle(); HistoryFragment fragment = new HistoryFragment(); fragment.setArguments(args); return fragment; } public static HistoryFragment newInstance(String grade) { Bundle args = new Bundle(); args.putString("grade", grade); HistoryFragment fragment = new HistoryFragment(); fragment.setArguments(args); return fragment; } @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_history, container, false); getActivityComponent().inject(this); setUnBinder(ButterKnife.bind(this, view)); mPresenter.onAttach(this); setUp(view); return view; } @Override protected void setUp(View view) { String grade = ""; if (this.getArguments() != null) { String descGrade = this.getArguments().getString("grade"); grade = convertDescriptionToGrade(descGrade); if (StringUtils.isNotEmpty(descGrade)) { mNavHeader.setText(getString(R.string.history) + ": " + descGrade); } } mProductsHistoryRecyclerView = view.findViewById(R.id.products_recycler_view); mProductsHistory = new ArrayList<>(); // use this setting to improve performance if you know that changes // in content do not change the layout size of the RecyclerView mProductsHistoryRecyclerView.setHasFixedSize(true); // use a linear layout manager LinearLayoutManager mLayoutManager = new LinearLayoutManager(getBaseActivity()); mProductsHistoryRecyclerView.setLayoutManager(mLayoutManager); // use VERTICAL divider DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(mProductsHistoryRecyclerView.getContext(), DividerItemDecoration.VERTICAL); mProductsHistoryRecyclerView.addItemDecoration(dividerItemDecoration); // Retain an instance so that you can call `resetState()` for fresh searches String finalGrade = grade; mScrollListener = new EndlessRecyclerViewScrollListener(mLayoutManager) { @Override public void onLoadMore(int page, int totalItemsCount, RecyclerView view) { if (mProductsHistory.size() < mCountProducts) { mPresenter.onLoadProducts(page, finalGrade); } } }; // Adds the scroll listener to RecyclerView mProductsHistoryRecyclerView.addOnScrollListener(mScrollListener); // Click listener on a product mProductsHistoryRecyclerView.addOnItemTouchListener( new RecyclerItemClickListener(view.getContext(), new RecyclerItemClickListener.OnItemClickListener() { @Override public void onItemClick(View view, int position) { History hp = ((HistoryRecyclerViewAdapter) mProductsHistoryRecyclerView.getAdapter()).getHistory(position); if (hp != null) { mPresenter.loadProduct(hp.getBarcode()); } } }) ); mPresenter.onLoadProducts(0, grade); } @OnClick(R.id.nav_back_btn) void onNavBackClick() { getBaseActivity().onFragmentDetached(HistoryFragment.class.getSimpleName()); } @Override public void onDestroyView() { mPresenter.onDetach(); super.onDestroyView(); } @Override public void loadHistory(List<History> productsHistory, long numberOfProductsHistory) { mCountProducts = (int) numberOfProductsHistory; if (mProductsHistoryRecyclerView.getAdapter() == null) { mProductsHistory.addAll(productsHistory); if (mProductsHistory.size() < mCountProducts) { mProductsHistory.add(null); } HistoryRecyclerViewAdapter adapter = new HistoryRecyclerViewAdapter(mProductsHistory); mProductsHistoryRecyclerView.setAdapter(adapter); } else { final int posStart = mProductsHistory.size(); if (mProductsHistory.size() - 1 < mCountProducts + 1) { mProductsHistory.remove(mProductsHistory.size() - 1); mProductsHistory.addAll(productsHistory); if (mProductsHistory.size() < mCountProducts) { mProductsHistory.add(null); } mProductsHistoryRecyclerView.getAdapter().notifyItemRangeChanged(posStart - 1, mProductsHistory.size() - 1); } } } @Override public void openPageProduct(State stateProduct) { Bundle args = new Bundle(); args.putParcelable("state", stateProduct); startActivity(ProductActivity.getStartIntent(this.getActivity(), args)); } private String convertDescriptionToGrade(String descGrade) { if (getString(R.string.txt_history_stats_desc_a).equals(descGrade)) { return "a"; } else if (getString(R.string.txt_history_stats_desc_b).equals(descGrade)) { return "b"; } else if (getString(R.string.txt_history_stats_desc_c).equals(descGrade)) { return "c"; } else if (getString(R.string.txt_history_stats_desc_d).equals(descGrade)) { return "d"; } else if (getString(R.string.txt_history_stats_desc_e).equals(descGrade)) { return "e"; } else { return ""; } } }
{ "content_hash": "5f3bf19777f8364b42560101ed44fb95", "timestamp": "", "source": "github", "line_count": 188, "max_line_length": 155, "avg_line_length": 38.601063829787236, "alnum_prop": 0.6713517982637454, "repo_name": "itchix/TestMVPAndroid", "id": "626a44311d6121aee3fbb753ccf58790dd560fa6", "size": "7862", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/src/main/java/com/scrachx/foodfacts/checker/ui/history/HistoryFragment.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "419372" } ], "symlink_target": "" }
package org.elasticsearch.test.rest.yaml; import java.nio.file.Files; import java.nio.file.Path; import java.util.Map; import java.util.Set; import org.elasticsearch.test.ESTestCase; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.Matchers.greaterThan; public class ESClientYamlSuiteTestCaseTests extends ESTestCase { public void testLoadAllYamlSuites() throws Exception { Map<String,Set<Path>> yamlSuites = ESClientYamlSuiteTestCase.loadYamlSuites(""); assertEquals(2, yamlSuites.size()); } public void testLoadSingleYamlSuite() throws Exception { Map<String,Set<Path>> yamlSuites = ESClientYamlSuiteTestCase.loadYamlSuites("suite1/10_basic"); assertSingleFile(yamlSuites, "suite1", "10_basic.yaml"); //extension .yaml is optional yamlSuites = ESClientYamlSuiteTestCase.loadYamlSuites("suite1/10_basic"); assertSingleFile(yamlSuites, "suite1", "10_basic.yaml"); } public void testLoadMultipleYamlSuites() throws Exception { //single directory Map<String,Set<Path>> yamlSuites = ESClientYamlSuiteTestCase.loadYamlSuites("suite1"); assertThat(yamlSuites, notNullValue()); assertThat(yamlSuites.size(), equalTo(1)); assertThat(yamlSuites.containsKey("suite1"), equalTo(true)); assertThat(yamlSuites.get("suite1").size(), greaterThan(1)); //multiple directories yamlSuites = ESClientYamlSuiteTestCase.loadYamlSuites("suite1", "suite2"); assertThat(yamlSuites, notNullValue()); assertThat(yamlSuites.size(), equalTo(2)); assertThat(yamlSuites.containsKey("suite1"), equalTo(true)); assertEquals(2, yamlSuites.get("suite1").size()); assertThat(yamlSuites.containsKey("suite2"), equalTo(true)); assertEquals(2, yamlSuites.get("suite2").size()); //multiple paths, which can be both directories or yaml test suites (with optional file extension) yamlSuites = ESClientYamlSuiteTestCase.loadYamlSuites("suite2/10_basic", "suite1"); assertThat(yamlSuites, notNullValue()); assertThat(yamlSuites.size(), equalTo(2)); assertThat(yamlSuites.containsKey("suite2"), equalTo(true)); assertThat(yamlSuites.get("suite2").size(), equalTo(1)); assertSingleFile(yamlSuites.get("suite2"), "suite2", "10_basic.yaml"); assertThat(yamlSuites.containsKey("suite1"), equalTo(true)); assertThat(yamlSuites.get("suite1").size(), greaterThan(1)); //files can be loaded from classpath and from file system too Path dir = createTempDir(); Path file = dir.resolve("test_loading.yaml"); Files.createFile(file); } private static void assertSingleFile(Map<String, Set<Path>> yamlSuites, String dirName, String fileName) { assertThat(yamlSuites, notNullValue()); assertThat(yamlSuites.size(), equalTo(1)); assertThat(yamlSuites.containsKey(dirName), equalTo(true)); assertSingleFile(yamlSuites.get(dirName), dirName, fileName); } private static void assertSingleFile(Set<Path> files, String dirName, String fileName) { assertThat(files.size(), equalTo(1)); Path file = files.iterator().next(); assertThat(file.getFileName().toString(), equalTo(fileName)); assertThat(file.toAbsolutePath().getParent().getFileName().toString(), equalTo(dirName)); } }
{ "content_hash": "554b2bfe0bcb8bb5ec741ca958f4c4e2", "timestamp": "", "source": "github", "line_count": 77, "max_line_length": 110, "avg_line_length": 45.246753246753244, "alnum_prop": 0.6991963260619977, "repo_name": "winstonewert/elasticsearch", "id": "ee76ad351a62bbe7bb53c45b1492d9a9c0efe095", "size": "4272", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "test/framework/src/test/java/org/elasticsearch/test/rest/yaml/ESClientYamlSuiteTestCaseTests.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ANTLR", "bytes": "11082" }, { "name": "Batchfile", "bytes": "14049" }, { "name": "Emacs Lisp", "bytes": "3341" }, { "name": "FreeMarker", "bytes": "45" }, { "name": "Groovy", "bytes": "315474" }, { "name": "HTML", "bytes": "3399" }, { "name": "Java", "bytes": "40518482" }, { "name": "Perl", "bytes": "7271" }, { "name": "Python", "bytes": "54437" }, { "name": "Shell", "bytes": "112791" } ], "symlink_target": "" }
define(['app'], function(app) { app.controller('HomeContactCtrl', [ '$scope','$http', 'ngAuthSettings', function($scope, $http, ngAuthSettings) { $scope.page = { heading: 'Contact Us' }; $scope.test = function(){ $http.get(ngAuthSettings.apiServiceBaseUri).then(function (results) { console.log(results); return results; }); $http.get(ngAuthSettings.apiServiceBaseUri + "products").then(function (results) { console.log(results); return results; }); } } ]); });
{ "content_hash": "a395642915b455ad6db4656325e0139c", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 98, "avg_line_length": 26.962962962962962, "alnum_prop": 0.4478021978021978, "repo_name": "sanelib/WebStarterKit", "id": "5894d609db65c8b4708da8e05cad9f3b3795cb28", "size": "728", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "FrontEndWeb/app/scripts/controllers/HomeContact.js", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "100" }, { "name": "C#", "bytes": "1337759" }, { "name": "CSS", "bytes": "8801" }, { "name": "Java", "bytes": "11667" }, { "name": "JavaScript", "bytes": "42878" }, { "name": "PowerShell", "bytes": "44953" }, { "name": "Shell", "bytes": "534" } ], "symlink_target": "" }
ACCEPTED #### According to Index Fungorum #### Published in Anal. Mus. nac. Hist. nat. B. Aires 23: 96 (1912) #### Original name Microphyma macrosporum Speg. ### Remarks null
{ "content_hash": "f8dfda512b3b2b1377d07b25926da3fd", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 49, "avg_line_length": 13.692307692307692, "alnum_prop": 0.6853932584269663, "repo_name": "mdoering/backbone", "id": "933a329ddefd3cd5f37ffa1d112b01140df561d5", "size": "230", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Fungi/Ascomycota/Dothideomycetes/Phillipsiellaceae/Microphyma/Microphyma macrosporum/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
var React = require('react'); var DocsArticle = require('../../DocsArticle'); var List = require('grommet/components/List'); var SCHEMA = [ {attribute: 'uid', uid: true}, {attribute: 'face', image: true}, {attribute: 'name', primary: true}, {attribute: 'mood', secondary: true} ]; var DATA = [ {uid: 1, face: '', name: 'Alan', mood: 'happy'}, {uid: 2, face: '', name: 'Bryan', mood: 'calm'}, {uid: 3, face: '', name: 'Chris', mood: 'cool'}, {uid: 4, face: '', name: 'Eric', mood: 'odd'} ]; var ListDoc = React.createClass({ render: function() { var inline = [ "<List ... />" ].join('\n'); var schema = [ "{", " attribute: name,", " default: string|node", " image: true|false,", " label: image label,", " primary: true|false,", " secondary: true|false,", " timestamp: true|false,", " uid: true|false", "}" ].join('\n'); return ( <DocsArticle title="List" colorIndex="neutral-3"> <p>List of things.</p> <pre><code className="html hljs xml">{inline}</code></pre> <section> <h2>Options</h2> <dl> <dt><code>data {"[{...}, ...]"}</code></dt> <dd>The data set.</dd> <dt><code>itemDirection row|column</code></dt> <dd>Direction of the item content. Default is <code>row</code>.</dd> <dt><code>large true|false</code></dt> <dd>Larger sized version. Deprecated, use <code>size</code>.</dd> <dt><code>onMore {"function () {...}"}</code></dt> <dd>Function that will be called when more data is needed.</dd> <dt><code>onSelect {"function (datum) {...}"}</code></dt> <dd>Function that will be called when the user selects an item.</dd> <dt><code>schema {"[{...}, ...]"}</code></dt> <dd>An array of objects describing the data. <code>{schema}</code> </dd> <dt><code>selected {"uid|[uid, ...]"}</code></dt> <dd>The currently selected items.</dd> <dt><code>size small|medium|large</code></dt> <dd>The size of the Header. Defaults to <code>medium</code>.</dd> <dt><code>small true|false</code></dt> <dd>Smaller sized version. Deprecated, use <code>size</code>.</dd> </dl> </section> <section> <h2>Examples</h2> <h3>Default</h3> <div className="example"> <List schema={SCHEMA} data={DATA} /> </div> <h3>Column</h3> <div className="example"> <List schema={SCHEMA} data={DATA} itemDirection="column" /> </div> <h3>Small</h3> <div className="example"> <List schema={SCHEMA} data={DATA} small={true} /> </div> <h3>Large</h3> <div className="example"> <List schema={SCHEMA} data={DATA} large={true} /> </div> </section> </DocsArticle> ); } }); module.exports = ListDoc;
{ "content_hash": "ad1eca16fc343c1bdaed86ec3781464c", "timestamp": "", "source": "github", "line_count": 101, "max_line_length": 80, "avg_line_length": 31.415841584158414, "alnum_prop": 0.4891270091396155, "repo_name": "Dinesh-Ramakrishnan/grommet", "id": "9420872c590dd09a3c446ec61b28b3e191cdd3cf", "size": "3243", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docs/src/develop/components/ListDoc.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "130516" }, { "name": "HTML", "bytes": "3817" }, { "name": "JavaScript", "bytes": "541574" } ], "symlink_target": "" }
<template name="meteoris_backupRestore_form"> <form id="users_form"> <input type="hidden" id="id" value="{{config._id}}" /> <div class="form-group {{#if error 'host'}}has-error{{/if}}"> <label for="host" class="control-label">Host *</label> <input type="text" id="host" value="{{config.host}}" placeholder="Host *" class="form-control" autofocus="true"> <span class="help-block">{{error "host"}}</span> </div> <div class="form-group {{#if error 'port'}}has-error{{/if}}"> <label for="port" class="control-label">Port *</label> <input type="text" id="port" value="{{config.port}}" placeholder="Port *" class="form-control" autofocus="true"> <span class="help-block">{{error "port"}}</span> </div> <div class="form-group {{#if error 'database'}}has-error{{/if}}"> <label for="database" class="control-label">Database *</label> <input type="text" id="database" value="{{config.database}}" placeholder="Database *" class="form-control" autofocus="true"> <span class="help-block">{{error "database"}}</span> </div> <div class="form-group {{#if error 'username'}}has-error{{/if}}"> <label for="username" class="control-label">Username</label> <input type="text" id="username" value="{{config.username}}" placeholder="Username" class="form-control" autofocus="true"> <span class="help-block">{{error "username"}}</span> </div> <div class="form-group {{#if error 'password'}}has-error{{/if}}"> <label for="password" class="control-label">Password</label> <input type="text" id="password" value="{{config.password}}" placeholder="Password" class="form-control"> <span class="help-block">{{error "password"}}</span> </div> <div class="form-group {{#if error 'path'}}has-error{{/if}}"> <label for="path" class="control-label">Path Dump *</label> <input type="text" id="path" value="{{config.path}}" placeholder="Path Dump *" class="form-control" autofocus="true"> <span class="help-block">{{error "path"}}</span> </div> <div class="form-group {{#if error 'pathUpload'}}has-error{{/if}}"> <label for="pathUpload" class="control-label">Path Upload *</label> <input type="text" id="pathUpload" value="{{config.pathUpload}}" placeholder="Path Upload *" class="form-control" autofocus="true"> <span class="help-block">{{error "pathUpload"}}</span> </div> <button id="btnSave" type="submit" class="btn btn-success">Save Changes</button> </form> </template>
{ "content_hash": "67fb8181aa232d7ec2263b62cbbd9363", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 143, "avg_line_length": 66.90243902439025, "alnum_prop": 0.5807510025519504, "repo_name": "meteoris/meteoris", "id": "182cb0c2c8d80c2cf6b71efd946b33ea388caff7", "size": "2743", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "packages/meteoris:backup-restore/client/views/_form.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "894" }, { "name": "HTML", "bytes": "113250" }, { "name": "JavaScript", "bytes": "131931" } ], "symlink_target": "" }
<h1 l10nTranslate>gamesListPage</h1> <!-- <form class="form-inline waves-light" mdbWavesEffect> <div class="md-form mt-0"> <input class="form-control mr-sm-2" type="text" placeholder="Search" [formControl]="searchControl" [value]="searchValue" > </div> </form> <br> <div> <button class="btn btn-link" [disabled]="currentPage==0" (click)="prevPage()">Prev</button> <div class="d-inline-block">{{ currentPage+1 }} of {{ countPages }} pages </div> <button class="btn btn-link" [disabled]="currentPage>=countPages" (click)="nextPage()">Next</button> </div> --> <table class="table"> <tbody> <tr *ngFor="let g of dataList"> <td width=60px> <img width=100px height=100px src="{{ g.logo }}"> </td> <td> <h3>{{ g.name }} (Maximum score: {{ g.maxscore }}) </h3> <small>{{ g.date_start }} (UTC) - {{ g.date_stop }} (UTC) </small><br> <small>Organiators: {{ g.organizators }} </small><br> <strong>{{ g.description }}</strong> </td> </tr> </tbody> </table>
{ "content_hash": "24b38513481004daa33b5fac50324656", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 104, "avg_line_length": 28.42105263157895, "alnum_prop": 0.5685185185185185, "repo_name": "freehackquest/frontend", "id": "bec5ef93705dc6e2e180b12ba07cc53e14242266", "size": "1080", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/app/pages/games/games.component.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "26730" }, { "name": "HTML", "bytes": "89497" }, { "name": "JavaScript", "bytes": "208009" }, { "name": "Shell", "bytes": "264" }, { "name": "TypeScript", "bytes": "130384" } ], "symlink_target": "" }
<?php namespace Notan\UserBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; class DefaultController extends Controller { public function indexAction($name) { return $this->render('NotanUserBundle:Default:index.html.twig', array('name' => $name)); } }
{ "content_hash": "19098c2aca72e0ddc8b1478ba42ca258", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 96, "avg_line_length": 20.466666666666665, "alnum_prop": 0.7166123778501629, "repo_name": "kaesetoast/symfony-kickstart", "id": "1ef8f136bb778a6a3274c2de938e8bedf96b6fb9", "size": "307", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Notan/UserBundle/Controller/DefaultController.php", "mode": "33188", "license": "mit", "language": [ { "name": "PHP", "bytes": "34303" } ], "symlink_target": "" }
require 'warden_watch/version' require 'warden_watch/authentication_event' require 'warden_watch/hook' if defined?(Rails) require 'warden_watch/engine' end module WardenWatch end
{ "content_hash": "88af7d5c553f1932d919856b740d7d0b", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 43, "avg_line_length": 15.416666666666666, "alnum_prop": 0.7837837837837838, "repo_name": "LaunchWare/warden_watch", "id": "c750d088461851541b735b2c7d9004501928bede", "size": "185", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "lib/warden_watch.rb", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "641" }, { "name": "Ruby", "bytes": "22901" } ], "symlink_target": "" }
package com.ofg.infrastructure.correlationid; import org.springframework.cloud.sleuth.Span; import org.springframework.cloud.sleuth.Trace; import org.springframework.cloud.sleuth.TraceContextHolder; /** * Component that stores correlation id using {@link ThreadLocal} */ public class CorrelationIdHolder { public static final String CORRELATION_ID_HEADER = Trace.TRACE_ID_NAME; public static final String OLD_CORRELATION_ID_HEADER = "correlationId"; public static void set(Span span) { TraceContextHolder.setCurrentSpan(span); } public static Span get() { return TraceContextHolder.getCurrentSpan(); } public static void remove() { TraceContextHolder.removeCurrentSpan(); } }
{ "content_hash": "f158172a6f385c043a9453c4a096dc2f", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 75, "avg_line_length": 29.56, "alnum_prop": 0.7401894451962111, "repo_name": "ofg-dmitrys/micro-infra-spring", "id": "4ec2e84515c60287c699693a51437332c68c4fe2", "size": "739", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "micro-infra-spring-base/src/main/groovy/com/ofg/infrastructure/correlationid/CorrelationIdHolder.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "43141" }, { "name": "Groovy", "bytes": "583559" }, { "name": "HTML", "bytes": "4644" }, { "name": "Java", "bytes": "479400" }, { "name": "JavaScript", "bytes": "312028" }, { "name": "Ruby", "bytes": "1361" }, { "name": "Shell", "bytes": "872" } ], "symlink_target": "" }
from __future__ import division import matplotlib matplotlib.use('TkAgg') from pylab import * import networkx as nx path = 11.0 selfinfluece = 0 # use self-influence? treatdataset = 0 # treat dataset? meanvalues = [] ### simulation parameters def Path (val = path): global path path = str(val) return val def TreatDataset (val = treatdataset): global treatdataset treatdataset = int(val) return val def SelfInfluence (val = selfinfluece): global selfinfluece selfinfluece = int(val) return val ### simulation steps def initialize(): global g, nextg, r, path, treatdataset, selfinfluece, meanvalues # read graph from .gml file g = nx.read_gml('./data/' + path + '.gml') # TreatDataset == 1 ... # remove nodes with no edge # set value 0 to -1. # set value 1 to 1. if (treatdataset): zeros = [] for i in g.nodes_iter(): if (g.node[i]['value'] == 0 or g.node[i]['value'] == -1): g.node[i]['value'] = -1. else: g.node[i]['value'] = 1. if (g.degree(i) == 0): zeros.append(i) for i in zeros: g.remove_node(i) # set graph layout g.pos = nx.spring_layout(g) # get reverse graph r = g.reverse() # calculate network mean value acc = 0 meanvalues = [] for i in g.nodes_iter(): acc += g.node[i]['value'] meanvalues.append(acc / g.order()) nextg = g.copy() def observe(): global g, nextg, meanvalues ## plot network figure(1) cla() # clear plot axis('off') # remove axis gcf().set_facecolor('white') # set background to white gcf().tight_layout() # remove white space # draw nodes nodes = nx.draw_networkx_nodes(g, cmap = cm.coolwarm, vmin = -1, vmax = 1, node_color = [g.node[i]['value'] for i in g.nodes_iter()], node_size = 50, pos = g.pos) nodes.set_edgecolor('None') # remove node border # draw edges nx.draw_networkx_edges(g, pos = g.pos, alpha = 0.1) ## plot histogram figure(2) cla() # clear plot # get histdata hitsdata = [] for i in g.nodes_iter(): hitsdata.append(g.node[i]['value']) # get wieghts to normilize histdata weights = np.ones_like(hitsdata)/len(hitsdata) # plot histdata hist(hitsdata, bins = linspace(-1.2, 1.2, 125), weights = weights, linewidth = 0.25, color = '0.75') # plot vertical line at meanvalue if (len(meanvalues) > 0): plot((meanvalues[-1], meanvalues[-1]), (0, 0.05), 'r-', alpha = 0.4, linewidth = 4) # set histogram plot limits xlim([-1.2,1.2]) def update(): global g, nextg, r, selfinfluece, meanvalues acc = 0 for i in g.nodes_iter(): ic = 0 nc = 0 # calculate selfinfluece if (selfinfluece): value = g.node[i]['value'] links = len(r.out_edges(i)) # get edges from i to any j ic = value * links # influence nc = links # links' count # calculate neighborhood influence for j in g.neighbors(i): value = g.node[j]['value'] links = len(r.out_edges(j)) # get edges from j to any k ic += value * links # influence nc += links # links' count # update node value if (nc != 0): nextg.node[i]['value'] = ic / nc # get network mean value for i in nextg.nodes_iter(): acc += nextg.node[i]['value'] meanvalues.append(acc / g.order()) # update networks g, nextg = nextg, g ## call for PyCX import pycxsimulator pycxsimulator.GUI(parameterSetters = [Path, TreatDataset, SelfInfluence]).start( func=[initialize, observe, update])
{ "content_hash": "cb94451160e982f52267a9f38c373e3d", "timestamp": "", "source": "github", "line_count": 157, "max_line_length": 91, "avg_line_length": 25.452229299363058, "alnum_prop": 0.5382882882882883, "repo_name": "brenoec/cefetmg.msc.influence.networks", "id": "ae44da7eeab2f2690036b327676da156f03f853e", "size": "3996", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "simulation/main.py", "mode": "33188", "license": "mit", "language": [ { "name": "Python", "bytes": "16598" }, { "name": "TeX", "bytes": "18745" } ], "symlink_target": "" }
<?php namespace RKuzovlev\GoogleAPI\Service; use RKuzovlev\GoogleAPI\Service as Google_Service; use RKuzovlev\GoogleAPI\Service\Resource as Google_Service_Resource; use RKuzovlev\GoogleAPI\Collection as Google_Collection; use RKuzovlev\GoogleAPI\Model as Google_Model; use RKuzovlev\GoogleAPI\Client as Google_Client; /** * Service definition for AdExchangeBuyer (v1.3). * * <p> * Lets you manage your Ad Exchange Buyer account. * </p> * * <p> * For more information about this service, see the API * <a href="https://developers.google.com/ad-exchange/buyer-rest" target="_blank">Documentation</a> * </p> * * @author Google, Inc. */ class Google_Service_AdExchangeBuyer extends Google_Service { /** Manage your Ad Exchange buyer account configuration. */ const ADEXCHANGE_BUYER = "https://www.googleapis.com/auth/adexchange.buyer"; public $accounts; public $creatives; public $directDeals; public $performanceReport; /** * Constructs the internal representation of the AdExchangeBuyer service. * * @param Google_Client $client */ public function __construct(Google_Client $client) { parent::__construct($client); $this->servicePath = 'adexchangebuyer/v1.3/'; $this->version = 'v1.3'; $this->serviceName = 'adexchangebuyer'; $this->accounts = new Google_Service_AdExchangeBuyer_Accounts_Resource( $this, $this->serviceName, 'accounts', array( 'methods' => array( 'get' => array( 'path' => 'accounts/{id}', 'httpMethod' => 'GET', 'parameters' => array( 'id' => array( 'location' => 'path', 'type' => 'integer', 'required' => true, ), ), ),'list' => array( 'path' => 'accounts', 'httpMethod' => 'GET', 'parameters' => array(), ),'patch' => array( 'path' => 'accounts/{id}', 'httpMethod' => 'PATCH', 'parameters' => array( 'id' => array( 'location' => 'path', 'type' => 'integer', 'required' => true, ), ), ),'update' => array( 'path' => 'accounts/{id}', 'httpMethod' => 'PUT', 'parameters' => array( 'id' => array( 'location' => 'path', 'type' => 'integer', 'required' => true, ), ), ), ) ) ); $this->creatives = new Google_Service_AdExchangeBuyer_Creatives_Resource( $this, $this->serviceName, 'creatives', array( 'methods' => array( 'get' => array( 'path' => 'creatives/{accountId}/{buyerCreativeId}', 'httpMethod' => 'GET', 'parameters' => array( 'accountId' => array( 'location' => 'path', 'type' => 'integer', 'required' => true, ), 'buyerCreativeId' => array( 'location' => 'path', 'type' => 'string', 'required' => true, ), ), ),'insert' => array( 'path' => 'creatives', 'httpMethod' => 'POST', 'parameters' => array(), ),'list' => array( 'path' => 'creatives', 'httpMethod' => 'GET', 'parameters' => array( 'statusFilter' => array( 'location' => 'query', 'type' => 'string', ), 'pageToken' => array( 'location' => 'query', 'type' => 'string', ), 'maxResults' => array( 'location' => 'query', 'type' => 'integer', ), ), ), ) ) ); $this->directDeals = new Google_Service_AdExchangeBuyer_DirectDeals_Resource( $this, $this->serviceName, 'directDeals', array( 'methods' => array( 'get' => array( 'path' => 'directdeals/{id}', 'httpMethod' => 'GET', 'parameters' => array( 'id' => array( 'location' => 'path', 'type' => 'string', 'required' => true, ), ), ),'list' => array( 'path' => 'directdeals', 'httpMethod' => 'GET', 'parameters' => array(), ), ) ) ); $this->performanceReport = new Google_Service_AdExchangeBuyer_PerformanceReport_Resource( $this, $this->serviceName, 'performanceReport', array( 'methods' => array( 'list' => array( 'path' => 'performancereport', 'httpMethod' => 'GET', 'parameters' => array( 'accountId' => array( 'location' => 'query', 'type' => 'string', 'required' => true, ), 'endDateTime' => array( 'location' => 'query', 'type' => 'string', 'required' => true, ), 'startDateTime' => array( 'location' => 'query', 'type' => 'string', 'required' => true, ), 'pageToken' => array( 'location' => 'query', 'type' => 'string', ), 'maxResults' => array( 'location' => 'query', 'type' => 'integer', ), ), ), ) ) ); } } /** * The "accounts" collection of methods. * Typical usage is: * <code> * $adexchangebuyerService = new Google_Service_AdExchangeBuyer(...); * $accounts = $adexchangebuyerService->accounts; * </code> */ class Google_Service_AdExchangeBuyer_Accounts_Resource extends Google_Service_Resource { /** * Gets one account by ID. (accounts.get) * * @param int $id * The account id * @param array $optParams Optional parameters. * @return Google_Service_AdExchangeBuyer_Account */ public function get($id, $optParams = array()) { $params = array('id' => $id); $params = array_merge($params, $optParams); return $this->call('get', array($params), "Google_Service_AdExchangeBuyer_Account"); } /** * Retrieves the authenticated user's list of accounts. (accounts.listAccounts) * * @param array $optParams Optional parameters. * @return Google_Service_AdExchangeBuyer_AccountsList */ public function listAccounts($optParams = array()) { $params = array(); $params = array_merge($params, $optParams); return $this->call('list', array($params), "Google_Service_AdExchangeBuyer_AccountsList"); } /** * Updates an existing account. This method supports patch semantics. * (accounts.patch) * * @param int $id * The account id * @param Google_Account $postBody * @param array $optParams Optional parameters. * @return Google_Service_AdExchangeBuyer_Account */ public function patch($id, Google_Service_AdExchangeBuyer_Account $postBody, $optParams = array()) { $params = array('id' => $id, 'postBody' => $postBody); $params = array_merge($params, $optParams); return $this->call('patch', array($params), "Google_Service_AdExchangeBuyer_Account"); } /** * Updates an existing account. (accounts.update) * * @param int $id * The account id * @param Google_Account $postBody * @param array $optParams Optional parameters. * @return Google_Service_AdExchangeBuyer_Account */ public function update($id, Google_Service_AdExchangeBuyer_Account $postBody, $optParams = array()) { $params = array('id' => $id, 'postBody' => $postBody); $params = array_merge($params, $optParams); return $this->call('update', array($params), "Google_Service_AdExchangeBuyer_Account"); } } /** * The "creatives" collection of methods. * Typical usage is: * <code> * $adexchangebuyerService = new Google_Service_AdExchangeBuyer(...); * $creatives = $adexchangebuyerService->creatives; * </code> */ class Google_Service_AdExchangeBuyer_Creatives_Resource extends Google_Service_Resource { /** * Gets the status for a single creative. A creative will be available 30-40 * minutes after submission. (creatives.get) * * @param int $accountId * The id for the account that will serve this creative. * @param string $buyerCreativeId * The buyer-specific id for this creative. * @param array $optParams Optional parameters. * @return Google_Service_AdExchangeBuyer_Creative */ public function get($accountId, $buyerCreativeId, $optParams = array()) { $params = array('accountId' => $accountId, 'buyerCreativeId' => $buyerCreativeId); $params = array_merge($params, $optParams); return $this->call('get', array($params), "Google_Service_AdExchangeBuyer_Creative"); } /** * Submit a new creative. (creatives.insert) * * @param Google_Creative $postBody * @param array $optParams Optional parameters. * @return Google_Service_AdExchangeBuyer_Creative */ public function insert(Google_Service_AdExchangeBuyer_Creative $postBody, $optParams = array()) { $params = array('postBody' => $postBody); $params = array_merge($params, $optParams); return $this->call('insert', array($params), "Google_Service_AdExchangeBuyer_Creative"); } /** * Retrieves a list of the authenticated user's active creatives. A creative * will be available 30-40 minutes after submission. (creatives.listCreatives) * * @param array $optParams Optional parameters. * * @opt_param string statusFilter * When specified, only creatives having the given status are returned. * @opt_param string pageToken * A continuation token, used to page through ad clients. To retrieve the next page, set this * parameter to the value of "nextPageToken" from the previous response. Optional. * @opt_param string maxResults * Maximum number of entries returned on one result page. If not set, the default is 100. Optional. * @return Google_Service_AdExchangeBuyer_CreativesList */ public function listCreatives($optParams = array()) { $params = array(); $params = array_merge($params, $optParams); return $this->call('list', array($params), "Google_Service_AdExchangeBuyer_CreativesList"); } } /** * The "directDeals" collection of methods. * Typical usage is: * <code> * $adexchangebuyerService = new Google_Service_AdExchangeBuyer(...); * $directDeals = $adexchangebuyerService->directDeals; * </code> */ class Google_Service_AdExchangeBuyer_DirectDeals_Resource extends Google_Service_Resource { /** * Gets one direct deal by ID. (directDeals.get) * * @param string $id * The direct deal id * @param array $optParams Optional parameters. * @return Google_Service_AdExchangeBuyer_DirectDeal */ public function get($id, $optParams = array()) { $params = array('id' => $id); $params = array_merge($params, $optParams); return $this->call('get', array($params), "Google_Service_AdExchangeBuyer_DirectDeal"); } /** * Retrieves the authenticated user's list of direct deals. * (directDeals.listDirectDeals) * * @param array $optParams Optional parameters. * @return Google_Service_AdExchangeBuyer_DirectDealsList */ public function listDirectDeals($optParams = array()) { $params = array(); $params = array_merge($params, $optParams); return $this->call('list', array($params), "Google_Service_AdExchangeBuyer_DirectDealsList"); } } /** * The "performanceReport" collection of methods. * Typical usage is: * <code> * $adexchangebuyerService = new Google_Service_AdExchangeBuyer(...); * $performanceReport = $adexchangebuyerService->performanceReport; * </code> */ class Google_Service_AdExchangeBuyer_PerformanceReport_Resource extends Google_Service_Resource { /** * Retrieves the authenticated user's list of performance metrics. * (performanceReport.listPerformanceReport) * * @param string $accountId * The account id to get the reports. * @param string $endDateTime * The end time of the report in ISO 8601 timestamp format using UTC. * @param string $startDateTime * The start time of the report in ISO 8601 timestamp format using UTC. * @param array $optParams Optional parameters. * * @opt_param string pageToken * A continuation token, used to page through performance reports. To retrieve the next page, set * this parameter to the value of "nextPageToken" from the previous response. Optional. * @opt_param string maxResults * Maximum number of entries returned on one result page. If not set, the default is 100. Optional. * @return Google_Service_AdExchangeBuyer_PerformanceReportList */ public function listPerformanceReport($accountId, $endDateTime, $startDateTime, $optParams = array()) { $params = array('accountId' => $accountId, 'endDateTime' => $endDateTime, 'startDateTime' => $startDateTime); $params = array_merge($params, $optParams); return $this->call('list', array($params), "Google_Service_AdExchangeBuyer_PerformanceReportList"); } } class Google_Service_AdExchangeBuyer_Account extends Google_Collection { protected $bidderLocationType = 'Google_Service_AdExchangeBuyer_AccountBidderLocation'; protected $bidderLocationDataType = 'array'; public $cookieMatchingNid; public $cookieMatchingUrl; public $id; public $kind; public $maximumTotalQps; public function setBidderLocation($bidderLocation) { $this->bidderLocation = $bidderLocation; } public function getBidderLocation() { return $this->bidderLocation; } public function setCookieMatchingNid($cookieMatchingNid) { $this->cookieMatchingNid = $cookieMatchingNid; } public function getCookieMatchingNid() { return $this->cookieMatchingNid; } public function setCookieMatchingUrl($cookieMatchingUrl) { $this->cookieMatchingUrl = $cookieMatchingUrl; } public function getCookieMatchingUrl() { return $this->cookieMatchingUrl; } public function setId($id) { $this->id = $id; } public function getId() { return $this->id; } public function setKind($kind) { $this->kind = $kind; } public function getKind() { return $this->kind; } public function setMaximumTotalQps($maximumTotalQps) { $this->maximumTotalQps = $maximumTotalQps; } public function getMaximumTotalQps() { return $this->maximumTotalQps; } } class Google_Service_AdExchangeBuyer_AccountBidderLocation extends Google_Model { public $maximumQps; public $region; public $url; public function setMaximumQps($maximumQps) { $this->maximumQps = $maximumQps; } public function getMaximumQps() { return $this->maximumQps; } public function setRegion($region) { $this->region = $region; } public function getRegion() { return $this->region; } public function setUrl($url) { $this->url = $url; } public function getUrl() { return $this->url; } } class Google_Service_AdExchangeBuyer_AccountsList extends Google_Collection { protected $itemsType = 'Google_Service_AdExchangeBuyer_Account'; protected $itemsDataType = 'array'; public $kind; public function setItems($items) { $this->items = $items; } public function getItems() { return $this->items; } public function setKind($kind) { $this->kind = $kind; } public function getKind() { return $this->kind; } } class Google_Service_AdExchangeBuyer_Creative extends Google_Collection { public $hTMLSnippet; public $accountId; public $advertiserId; public $advertiserName; public $agencyId; public $attribute; public $buyerCreativeId; public $clickThroughUrl; protected $correctionsType = 'Google_Service_AdExchangeBuyer_CreativeCorrections'; protected $correctionsDataType = 'array'; protected $disapprovalReasonsType = 'Google_Service_AdExchangeBuyer_CreativeDisapprovalReasons'; protected $disapprovalReasonsDataType = 'array'; protected $filteringReasonsType = 'Google_Service_AdExchangeBuyer_CreativeFilteringReasons'; protected $filteringReasonsDataType = ''; public $height; public $kind; public $productCategories; public $restrictedCategories; public $sensitiveCategories; public $status; public $vendorType; public $videoURL; public $width; public function setHTMLSnippet($hTMLSnippet) { $this->hTMLSnippet = $hTMLSnippet; } public function getHTMLSnippet() { return $this->hTMLSnippet; } public function setAccountId($accountId) { $this->accountId = $accountId; } public function getAccountId() { return $this->accountId; } public function setAdvertiserId($advertiserId) { $this->advertiserId = $advertiserId; } public function getAdvertiserId() { return $this->advertiserId; } public function setAdvertiserName($advertiserName) { $this->advertiserName = $advertiserName; } public function getAdvertiserName() { return $this->advertiserName; } public function setAgencyId($agencyId) { $this->agencyId = $agencyId; } public function getAgencyId() { return $this->agencyId; } public function setAttribute($attribute) { $this->attribute = $attribute; } public function getAttribute() { return $this->attribute; } public function setBuyerCreativeId($buyerCreativeId) { $this->buyerCreativeId = $buyerCreativeId; } public function getBuyerCreativeId() { return $this->buyerCreativeId; } public function setClickThroughUrl($clickThroughUrl) { $this->clickThroughUrl = $clickThroughUrl; } public function getClickThroughUrl() { return $this->clickThroughUrl; } public function setCorrections($corrections) { $this->corrections = $corrections; } public function getCorrections() { return $this->corrections; } public function setDisapprovalReasons($disapprovalReasons) { $this->disapprovalReasons = $disapprovalReasons; } public function getDisapprovalReasons() { return $this->disapprovalReasons; } public function setFilteringReasons(Google_Service_AdExchangeBuyer_CreativeFilteringReasons $filteringReasons) { $this->filteringReasons = $filteringReasons; } public function getFilteringReasons() { return $this->filteringReasons; } public function setHeight($height) { $this->height = $height; } public function getHeight() { return $this->height; } public function setKind($kind) { $this->kind = $kind; } public function getKind() { return $this->kind; } public function setProductCategories($productCategories) { $this->productCategories = $productCategories; } public function getProductCategories() { return $this->productCategories; } public function setRestrictedCategories($restrictedCategories) { $this->restrictedCategories = $restrictedCategories; } public function getRestrictedCategories() { return $this->restrictedCategories; } public function setSensitiveCategories($sensitiveCategories) { $this->sensitiveCategories = $sensitiveCategories; } public function getSensitiveCategories() { return $this->sensitiveCategories; } public function setStatus($status) { $this->status = $status; } public function getStatus() { return $this->status; } public function setVendorType($vendorType) { $this->vendorType = $vendorType; } public function getVendorType() { return $this->vendorType; } public function setVideoURL($videoURL) { $this->videoURL = $videoURL; } public function getVideoURL() { return $this->videoURL; } public function setWidth($width) { $this->width = $width; } public function getWidth() { return $this->width; } } class Google_Service_AdExchangeBuyer_CreativeCorrections extends Google_Collection { public $details; public $reason; public function setDetails($details) { $this->details = $details; } public function getDetails() { return $this->details; } public function setReason($reason) { $this->reason = $reason; } public function getReason() { return $this->reason; } } class Google_Service_AdExchangeBuyer_CreativeDisapprovalReasons extends Google_Collection { public $details; public $reason; public function setDetails($details) { $this->details = $details; } public function getDetails() { return $this->details; } public function setReason($reason) { $this->reason = $reason; } public function getReason() { return $this->reason; } } class Google_Service_AdExchangeBuyer_CreativeFilteringReasons extends Google_Collection { public $date; protected $reasonsType = 'Google_Service_AdExchangeBuyer_CreativeFilteringReasonsReasons'; protected $reasonsDataType = 'array'; public function setDate($date) { $this->date = $date; } public function getDate() { return $this->date; } public function setReasons($reasons) { $this->reasons = $reasons; } public function getReasons() { return $this->reasons; } } class Google_Service_AdExchangeBuyer_CreativeFilteringReasonsReasons extends Google_Model { public $filteringCount; public $filteringStatus; public function setFilteringCount($filteringCount) { $this->filteringCount = $filteringCount; } public function getFilteringCount() { return $this->filteringCount; } public function setFilteringStatus($filteringStatus) { $this->filteringStatus = $filteringStatus; } public function getFilteringStatus() { return $this->filteringStatus; } } class Google_Service_AdExchangeBuyer_CreativesList extends Google_Collection { protected $itemsType = 'Google_Service_AdExchangeBuyer_Creative'; protected $itemsDataType = 'array'; public $kind; public $nextPageToken; public function setItems($items) { $this->items = $items; } public function getItems() { return $this->items; } public function setKind($kind) { $this->kind = $kind; } public function getKind() { return $this->kind; } public function setNextPageToken($nextPageToken) { $this->nextPageToken = $nextPageToken; } public function getNextPageToken() { return $this->nextPageToken; } } class Google_Service_AdExchangeBuyer_DirectDeal extends Google_Model { public $accountId; public $advertiser; public $currencyCode; public $endTime; public $fixedCpm; public $id; public $kind; public $privateExchangeMinCpm; public $sellerNetwork; public $startTime; public function setAccountId($accountId) { $this->accountId = $accountId; } public function getAccountId() { return $this->accountId; } public function setAdvertiser($advertiser) { $this->advertiser = $advertiser; } public function getAdvertiser() { return $this->advertiser; } public function setCurrencyCode($currencyCode) { $this->currencyCode = $currencyCode; } public function getCurrencyCode() { return $this->currencyCode; } public function setEndTime($endTime) { $this->endTime = $endTime; } public function getEndTime() { return $this->endTime; } public function setFixedCpm($fixedCpm) { $this->fixedCpm = $fixedCpm; } public function getFixedCpm() { return $this->fixedCpm; } public function setId($id) { $this->id = $id; } public function getId() { return $this->id; } public function setKind($kind) { $this->kind = $kind; } public function getKind() { return $this->kind; } public function setPrivateExchangeMinCpm($privateExchangeMinCpm) { $this->privateExchangeMinCpm = $privateExchangeMinCpm; } public function getPrivateExchangeMinCpm() { return $this->privateExchangeMinCpm; } public function setSellerNetwork($sellerNetwork) { $this->sellerNetwork = $sellerNetwork; } public function getSellerNetwork() { return $this->sellerNetwork; } public function setStartTime($startTime) { $this->startTime = $startTime; } public function getStartTime() { return $this->startTime; } } class Google_Service_AdExchangeBuyer_DirectDealsList extends Google_Collection { protected $directDealsType = 'Google_Service_AdExchangeBuyer_DirectDeal'; protected $directDealsDataType = 'array'; public $kind; public function setDirectDeals($directDeals) { $this->directDeals = $directDeals; } public function getDirectDeals() { return $this->directDeals; } public function setKind($kind) { $this->kind = $kind; } public function getKind() { return $this->kind; } } class Google_Service_AdExchangeBuyer_PerformanceReport extends Google_Collection { public $calloutStatusRate; public $cookieMatcherStatusRate; public $creativeStatusRate; public $hostedMatchStatusRate; public $kind; public $latency50thPercentile; public $latency85thPercentile; public $latency95thPercentile; public $noQuotaInRegion; public $outOfQuota; public $pixelMatchRequests; public $pixelMatchResponses; public $quotaConfiguredLimit; public $quotaThrottledLimit; public $region; public $timestamp; public function setCalloutStatusRate($calloutStatusRate) { $this->calloutStatusRate = $calloutStatusRate; } public function getCalloutStatusRate() { return $this->calloutStatusRate; } public function setCookieMatcherStatusRate($cookieMatcherStatusRate) { $this->cookieMatcherStatusRate = $cookieMatcherStatusRate; } public function getCookieMatcherStatusRate() { return $this->cookieMatcherStatusRate; } public function setCreativeStatusRate($creativeStatusRate) { $this->creativeStatusRate = $creativeStatusRate; } public function getCreativeStatusRate() { return $this->creativeStatusRate; } public function setHostedMatchStatusRate($hostedMatchStatusRate) { $this->hostedMatchStatusRate = $hostedMatchStatusRate; } public function getHostedMatchStatusRate() { return $this->hostedMatchStatusRate; } public function setKind($kind) { $this->kind = $kind; } public function getKind() { return $this->kind; } public function setLatency50thPercentile($latency50thPercentile) { $this->latency50thPercentile = $latency50thPercentile; } public function getLatency50thPercentile() { return $this->latency50thPercentile; } public function setLatency85thPercentile($latency85thPercentile) { $this->latency85thPercentile = $latency85thPercentile; } public function getLatency85thPercentile() { return $this->latency85thPercentile; } public function setLatency95thPercentile($latency95thPercentile) { $this->latency95thPercentile = $latency95thPercentile; } public function getLatency95thPercentile() { return $this->latency95thPercentile; } public function setNoQuotaInRegion($noQuotaInRegion) { $this->noQuotaInRegion = $noQuotaInRegion; } public function getNoQuotaInRegion() { return $this->noQuotaInRegion; } public function setOutOfQuota($outOfQuota) { $this->outOfQuota = $outOfQuota; } public function getOutOfQuota() { return $this->outOfQuota; } public function setPixelMatchRequests($pixelMatchRequests) { $this->pixelMatchRequests = $pixelMatchRequests; } public function getPixelMatchRequests() { return $this->pixelMatchRequests; } public function setPixelMatchResponses($pixelMatchResponses) { $this->pixelMatchResponses = $pixelMatchResponses; } public function getPixelMatchResponses() { return $this->pixelMatchResponses; } public function setQuotaConfiguredLimit($quotaConfiguredLimit) { $this->quotaConfiguredLimit = $quotaConfiguredLimit; } public function getQuotaConfiguredLimit() { return $this->quotaConfiguredLimit; } public function setQuotaThrottledLimit($quotaThrottledLimit) { $this->quotaThrottledLimit = $quotaThrottledLimit; } public function getQuotaThrottledLimit() { return $this->quotaThrottledLimit; } public function setRegion($region) { $this->region = $region; } public function getRegion() { return $this->region; } public function setTimestamp($timestamp) { $this->timestamp = $timestamp; } public function getTimestamp() { return $this->timestamp; } } class Google_Service_AdExchangeBuyer_PerformanceReportList extends Google_Collection { public $kind; protected $performanceReportType = 'Google_Service_AdExchangeBuyer_PerformanceReport'; protected $performanceReportDataType = 'array'; public function setKind($kind) { $this->kind = $kind; } public function getKind() { return $this->kind; } public function setPerformanceReport($performanceReport) { $this->performanceReport = $performanceReport; } public function getPerformanceReport() { return $this->performanceReport; } }
{ "content_hash": "41eeacbfd793b132c2df9f08b0a43278", "timestamp": "", "source": "github", "line_count": 1273, "max_line_length": 113, "avg_line_length": 23.502749410840533, "alnum_prop": 0.6422674554630836, "repo_name": "rkuzovlev/google-api-php-client", "id": "17c50767c22459b4a2edaf98e9a7bc93a6d91171", "size": "30509", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "src/RKuzovlev/GoogleAPI/Service/AdExchangeBuyer.php", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "PHP", "bytes": "3394292" } ], "symlink_target": "" }
.listItem { display: flex; flex-direction: row; align-items: center; } .inlineBlock { display: inline-block; } .rightItem { composes: inlineBlock; margin-left: auto; }
{ "content_hash": "ac062dda3641c699637202bc97d85cd4", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 25, "avg_line_length": 15, "alnum_prop": 0.6777777777777778, "repo_name": "Magneticmagnum/react-atlas", "id": "0a146ae300f7c1c6867fec7951079cab0c137735", "size": "180", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/ListItem/ListItem.css", "mode": "33261", "license": "mit", "language": [ { "name": "CSS", "bytes": "93987" }, { "name": "JavaScript", "bytes": "123242" } ], "symlink_target": "" }
"""A simple number and datetime addition JSON API. Run the app: $ python examples/tornado_example.py Try the following with httpie (a cURL-like utility, http://httpie.org): $ pip install httpie $ http GET :5001/ $ http GET :5001/ name==Ada $ http POST :5001/add x=40 y=2 $ http POST :5001/dateadd value=1973-04-10 addend=63 $ http POST :5001/dateadd value=2014-10-23 addend=525600 unit=minutes """ import datetime as dt import tornado.ioloop from tornado.web import RequestHandler from webargs import fields, validate from webargs.tornadoparser import use_args, use_kwargs class BaseRequestHandler(RequestHandler): def write_error(self, status_code, **kwargs): """Write errors as JSON.""" self.set_header("Content-Type", "application/json") if "exc_info" in kwargs: etype, exc, traceback = kwargs["exc_info"] if hasattr(exc, "messages"): self.write({"errors": exc.messages}) if getattr(exc, "headers", None): for name, val in exc.headers.items(): self.set_header(name, val) self.finish() class HelloHandler(BaseRequestHandler): """A welcome page.""" hello_args = {"name": fields.Str(missing="Friend")} @use_args(hello_args) def get(self, args): response = {"message": "Welcome, {}!".format(args["name"])} self.write(response) class AdderHandler(BaseRequestHandler): """An addition endpoint.""" add_args = {"x": fields.Float(required=True), "y": fields.Float(required=True)} @use_kwargs(add_args) def post(self, x, y): self.write({"result": x + y}) class DateAddHandler(BaseRequestHandler): """A date adder endpoint.""" dateadd_args = { "value": fields.Date(required=False), "addend": fields.Int(required=True, validate=validate.Range(min=1)), "unit": fields.Str( missing="days", validate=validate.OneOf(["minutes", "days"]) ), } @use_kwargs(dateadd_args) def post(self, value, addend, unit): """A date adder endpoint.""" value = value or dt.datetime.utcnow() if unit == "minutes": delta = dt.timedelta(minutes=addend) else: delta = dt.timedelta(days=addend) result = value + delta self.write({"result": result.isoformat()}) if __name__ == "__main__": app = tornado.web.Application( [(r"/", HelloHandler), (r"/add", AdderHandler), (r"/dateadd", DateAddHandler)], debug=True, ) port = 5001 app.listen(port) print(f"Serving on port {port}") tornado.ioloop.IOLoop.instance().start()
{ "content_hash": "f440c8a31f729e406b250b36be2b0796", "timestamp": "", "source": "github", "line_count": 89, "max_line_length": 87, "avg_line_length": 30.370786516853933, "alnum_prop": 0.6067332593414725, "repo_name": "sloria/webargs", "id": "e748f77d90805d3648a7b15d0606c544e2708dfe", "size": "2703", "binary": false, "copies": "1", "ref": "refs/heads/dev", "path": "examples/tornado_example.py", "mode": "33188", "license": "mit", "language": [ { "name": "Python", "bytes": "182724" } ], "symlink_target": "" }
NS_ASSUME_NONNULL_BEGIN @interface RXViewVisiableViewController : UIViewController @end NS_ASSUME_NONNULL_END
{ "content_hash": "ef4b726d003cdf39d85604186c48595f", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 58, "avg_line_length": 16.142857142857142, "alnum_prop": 0.831858407079646, "repo_name": "xzjxylophone/RXVerifyExample", "id": "a3b4e2f90c283c2740e84d7877bab9a34b722afd", "size": "299", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "RXVerifyExample/RXVerifyExample/Verify/UI/ViewVisiable/RXViewVisiableViewController.h", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "3331" }, { "name": "C++", "bytes": "1578988" }, { "name": "JavaScript", "bytes": "145" }, { "name": "LLVM", "bytes": "45738" }, { "name": "Objective-C", "bytes": "1454563" }, { "name": "Objective-C++", "bytes": "9289" }, { "name": "Ruby", "bytes": "1589" } ], "symlink_target": "" }
import { CustomControl } from './CustomControl'; describe('Control: CustomControl', () => { let control; beforeEach(() => { control = new CustomControl({ template: 'new', type: 'custom' }); }); it('should have the right control type', () => { expect(control.controlType).toEqual('new'); }); it('should set the placeholder', () => { expect(control.placeholder).toEqual(''); }); });
{ "content_hash": "19ff9fa1b2d0cb9bcc2bb60d0c97bedb", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 69, "avg_line_length": 24.176470588235293, "alnum_prop": 0.6058394160583942, "repo_name": "bullhorn/novo-elements", "id": "2022a27e3962efcb87a35bc145f3c6d5a6da9b06", "size": "418", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "projects/novo-elements/src/elements/form/controls/custom/CustomControl.spec.ts", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "99369" }, { "name": "HTML", "bytes": "200072" }, { "name": "JavaScript", "bytes": "29452" }, { "name": "SCSS", "bytes": "349833" }, { "name": "Shell", "bytes": "1364" }, { "name": "TypeScript", "bytes": "3518153" } ], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="es"> <head> <!-- Generated by javadoc (1.8.0_25) on Thu Nov 12 16:46:20 ART 2015 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Uses of Class com.google.i18n.phonenumbers.PhoneNumberToCarrierMapper (carrier 1.12-SNAPSHOT API)</title> <meta name="date" content="2015-11-12"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class com.google.i18n.phonenumbers.PhoneNumberToCarrierMapper (carrier 1.12-SNAPSHOT API)"; } } catch(err) { } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../com/google/i18n/phonenumbers/package-summary.html">Package</a></li> <li><a href="../../../../../com/google/i18n/phonenumbers/PhoneNumberToCarrierMapper.html" title="class in com.google.i18n.phonenumbers">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?com/google/i18n/phonenumbers/class-use/PhoneNumberToCarrierMapper.html" target="_top">Frames</a></li> <li><a href="PhoneNumberToCarrierMapper.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Class com.google.i18n.phonenumbers.PhoneNumberToCarrierMapper" class="title">Uses of Class<br>com.google.i18n.phonenumbers.PhoneNumberToCarrierMapper</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="com.google.i18n.phonenumbers"> <!-- --> </a> <h3>Uses of <a href="../../../../../com/google/i18n/phonenumbers/PhoneNumberToCarrierMapper.html" title="class in com.google.i18n.phonenumbers">PhoneNumberToCarrierMapper</a> in <a href="../../../../../com/google/i18n/phonenumbers/package-summary.html">com.google.i18n.phonenumbers</a></h3> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../com/google/i18n/phonenumbers/package-summary.html">com.google.i18n.phonenumbers</a> that return <a href="../../../../../com/google/i18n/phonenumbers/PhoneNumberToCarrierMapper.html" title="class in com.google.i18n.phonenumbers">PhoneNumberToCarrierMapper</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>static <a href="../../../../../com/google/i18n/phonenumbers/PhoneNumberToCarrierMapper.html" title="class in com.google.i18n.phonenumbers">PhoneNumberToCarrierMapper</a></code></td> <td class="colLast"><span class="typeNameLabel">PhoneNumberToCarrierMapper.</span><code><span class="memberNameLink"><a href="../../../../../com/google/i18n/phonenumbers/PhoneNumberToCarrierMapper.html#getInstance--">getInstance</a></span>()</code> <div class="block">Gets a <a href="../../../../../com/google/i18n/phonenumbers/PhoneNumberToCarrierMapper.html" title="class in com.google.i18n.phonenumbers"><code>PhoneNumberToCarrierMapper</code></a> instance to carry out international carrier lookup.</div> </td> </tr> </tbody> </table> </li> </ul> </li> </ul> </div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../com/google/i18n/phonenumbers/package-summary.html">Package</a></li> <li><a href="../../../../../com/google/i18n/phonenumbers/PhoneNumberToCarrierMapper.html" title="class in com.google.i18n.phonenumbers">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?com/google/i18n/phonenumbers/class-use/PhoneNumberToCarrierMapper.html" target="_top">Frames</a></li> <li><a href="PhoneNumberToCarrierMapper.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small>Copyright &#169; 2015 <a href="http://www.google.com/">Google</a>. All Rights Reserved.</small></p> </body> </html>
{ "content_hash": "23cf972b3e2c372b984df0f30a403294", "timestamp": "", "source": "github", "line_count": 151, "max_line_length": 359, "avg_line_length": 43.370860927152314, "alnum_prop": 0.6542983661627729, "repo_name": "leandrocohn/libphonenumber-7-0.5", "id": "bde26a6ce05f1a2524e4c01d79cf51c84e72dd3f", "size": "6549", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "java/carrier/target/apidocs/com/google/i18n/phonenumbers/class-use/PhoneNumberToCarrierMapper.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "17121" }, { "name": "C++", "bytes": "3130007" }, { "name": "CMake", "bytes": "19127" }, { "name": "CSS", "bytes": "64345" }, { "name": "HTML", "bytes": "1944420" }, { "name": "Java", "bytes": "793870" }, { "name": "JavaScript", "bytes": "885614" }, { "name": "Protocol Buffer", "bytes": "20454" } ], "symlink_target": "" }
<?php // meta tag robots osc_add_hook('header','bender_nofollow_construct'); bender_add_body_class('error not-found'); osc_current_web_theme_path('header.php') ; ?> <div class="flashmessage-404"> <h1><?php _e("Sorry but I can't find the page you're looking for", 'bender') ; ?></h1> <p><?php _e("Let us help you, we have got a few tips for you to find it.", 'bender') ; ?></p> <ul> <li> <?php _e("<strong>Search</strong> for it:", 'bender') ; ?> <form action="<?php echo osc_base_url(true) ; ?>" method="get" class="search"> <input type="hidden" name="page" value="search" /> <fieldset class="main"> <input type="text" name="sPattern" id="query" value="" /> <button type="submit" class="ui-button ui-button-middle"><?php _e('Search', 'bender') ; ?></button> </fieldset> </form> </li> <li><?php _e("<strong>Look</strong> for it in the most popular categories.", 'bender') ; ?> <div class="categories"> <?php osc_goto_first_category() ; ?> <?php while ( osc_has_categories() ) { ?> <h2><a class="category <?php echo osc_category_slug() ; ?>" href="<?php echo osc_search_category_url() ; ?>"><?php echo osc_category_name() ; ?></a> <span>(<?php echo osc_category_total_items() ; ?>)</h2> <?php if ( osc_count_subcategories() > 0 ) { ?> <?php while ( osc_has_subcategories() ) { ?> <?php if( osc_category_total_items() > 0 ) { ?> <h3><a class="category <?php echo osc_category_slug() ; ?>" href="<?php echo osc_search_category_url() ; ?>"><?php echo osc_category_name() ; ?></a> <span>(<?php echo osc_category_total_items() ; ?>)</h3> <?php } ?> <?php } ?> <?php } ?> <?php } ?> </div> <div class="clear"></div> </li> </ul> </div> <?php osc_current_web_theme_path('footer.php') ; ?>
{ "content_hash": "b8a2c57896a7322e6b9e81664213455c", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 240, "avg_line_length": 54.45, "alnum_prop": 0.4738292011019284, "repo_name": "dmyoung1994/Park-N-Go", "id": "9491398c850b4df6029fb1101bb0a49c43847cd1", "size": "2178", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "WebApp/sell/osclass.3.2.1/oc-includes/osclass/gui/404.php", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "718832" }, { "name": "JavaScript", "bytes": "684889" }, { "name": "Objective-C", "bytes": "5860" }, { "name": "PHP", "bytes": "4489854" }, { "name": "Perl", "bytes": "71774" }, { "name": "Ruby", "bytes": "262" } ], "symlink_target": "" }
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="robots" content="noindex"> <title>File AdminBundle/Entity/User.php</title> <link rel="stylesheet" href="resources/style.css?e99947befd7bf673c6b43ff75e9e0f170c88a60e"> </head> <body> <div id="left"> <div id="menu"> <a href="index.html" title="Overview"><span>Overview</span></a> <div id="groups"> <h3>Namespaces</h3> <ul> <li> <a href="namespace-Xvolutions.html"> Xvolutions<span></span> </a> <ul> <li> <a href="namespace-Xvolutions.AdminBundle.html"> AdminBundle<span></span> </a> <ul> <li> <a href="namespace-Xvolutions.AdminBundle.Command.html"> Command </a> </li> <li> <a href="namespace-Xvolutions.AdminBundle.Controller.html"> Controller<span></span> </a> <ul> <li> <a href="namespace-Xvolutions.AdminBundle.Controller.Admin.html"> Admin </a> </li> </ul></li> <li> <a href="namespace-Xvolutions.AdminBundle.DependencyInjection.html"> DependencyInjection </a> </li> <li> <a href="namespace-Xvolutions.AdminBundle.Entity.html"> Entity </a> </li> <li> <a href="namespace-Xvolutions.AdminBundle.Form.html"> Form </a> </li> <li> <a href="namespace-Xvolutions.AdminBundle.Helpers.html"> Helpers </a> </li> <li> <a href="namespace-Xvolutions.AdminBundle.Tests.html"> Tests<span></span> </a> <ul> <li> <a href="namespace-Xvolutions.AdminBundle.Tests.Controller.html"> Controller<span></span> </a> <ul> <li> <a href="namespace-Xvolutions.AdminBundle.Tests.Controller.Admin.html"> Admin </a> </li> </ul></li> <li> <a href="namespace-Xvolutions.AdminBundle.Tests.Entity.html"> Entity </a> </li> <li> <a href="namespace-Xvolutions.AdminBundle.Tests.Helpers.html"> Helpers </a> </li> <li> <a href="namespace-Xvolutions.AdminBundle.Tests.Selenium.html"> Selenium<span></span> </a> <ul> <li> <a href="namespace-Xvolutions.AdminBundle.Tests.Selenium.Tests.html"> Tests </a> </li> </ul></li></ul></li></ul></li></ul></li> </ul> </div> <hr> <div id="elements"> <h3>Classes</h3> <ul> <li><a href="class-Xvolutions.AdminBundle.Command.InitiateCommand.html">Xvolutions\AdminBundle\Command\InitiateCommand</a></li> <li><a href="class-Xvolutions.AdminBundle.Controller.Admin.BlogPostController.html">Xvolutions\AdminBundle\Controller\Admin\BlogPostController</a></li> <li><a href="class-Xvolutions.AdminBundle.Controller.Admin.FileController.html">Xvolutions\AdminBundle\Controller\Admin\FileController</a></li> <li><a href="class-Xvolutions.AdminBundle.Controller.Admin.LanguagesController.html">Xvolutions\AdminBundle\Controller\Admin\LanguagesController</a></li> <li><a href="class-Xvolutions.AdminBundle.Controller.Admin.MenuController.html">Xvolutions\AdminBundle\Controller\Admin\MenuController</a></li> <li><a href="class-Xvolutions.AdminBundle.Controller.Admin.PagesController.html">Xvolutions\AdminBundle\Controller\Admin\PagesController</a></li> <li><a href="class-Xvolutions.AdminBundle.Controller.Admin.RolesController.html">Xvolutions\AdminBundle\Controller\Admin\RolesController</a></li> <li><a href="class-Xvolutions.AdminBundle.Controller.Admin.SectionsController.html">Xvolutions\AdminBundle\Controller\Admin\SectionsController</a></li> <li><a href="class-Xvolutions.AdminBundle.Controller.Admin.SettingController.html">Xvolutions\AdminBundle\Controller\Admin\SettingController</a></li> <li><a href="class-Xvolutions.AdminBundle.Controller.Admin.UsersController.html">Xvolutions\AdminBundle\Controller\Admin\UsersController</a></li> <li><a href="class-Xvolutions.AdminBundle.Controller.AdminController.html">Xvolutions\AdminBundle\Controller\AdminController</a></li> <li><a href="class-Xvolutions.AdminBundle.Controller.SecurityController.html">Xvolutions\AdminBundle\Controller\SecurityController</a></li> <li><a href="class-Xvolutions.AdminBundle.DependencyInjection.Configuration.html">Xvolutions\AdminBundle\DependencyInjection\Configuration</a></li> <li><a href="class-Xvolutions.AdminBundle.DependencyInjection.XvolutionsAdminExtension.html">Xvolutions\AdminBundle\DependencyInjection\XvolutionsAdminExtension</a></li> <li><a href="class-Xvolutions.AdminBundle.Entity.Alias.html">Xvolutions\AdminBundle\Entity\Alias</a></li> <li><a href="class-Xvolutions.AdminBundle.Entity.BlogPost.html">Xvolutions\AdminBundle\Entity\BlogPost</a></li> <li><a href="class-Xvolutions.AdminBundle.Entity.File.html">Xvolutions\AdminBundle\Entity\File</a></li> <li><a href="class-Xvolutions.AdminBundle.Entity.Language.html">Xvolutions\AdminBundle\Entity\Language</a></li> <li><a href="class-Xvolutions.AdminBundle.Entity.Menu.html">Xvolutions\AdminBundle\Entity\Menu</a></li> <li><a href="class-Xvolutions.AdminBundle.Entity.Page.html">Xvolutions\AdminBundle\Entity\Page</a></li> <li><a href="class-Xvolutions.AdminBundle.Entity.Role.html">Xvolutions\AdminBundle\Entity\Role</a></li> <li><a href="class-Xvolutions.AdminBundle.Entity.Section.html">Xvolutions\AdminBundle\Entity\Section</a></li> <li><a href="class-Xvolutions.AdminBundle.Entity.Setting.html">Xvolutions\AdminBundle\Entity\Setting</a></li> <li><a href="class-Xvolutions.AdminBundle.Entity.Status.html">Xvolutions\AdminBundle\Entity\Status</a></li> <li><a href="class-Xvolutions.AdminBundle.Entity.User.html">Xvolutions\AdminBundle\Entity\User</a></li> <li><a href="class-Xvolutions.AdminBundle.Form.AliasType.html">Xvolutions\AdminBundle\Form\AliasType</a></li> <li><a href="class-Xvolutions.AdminBundle.Form.BlogPostType.html">Xvolutions\AdminBundle\Form\BlogPostType</a></li> <li><a href="class-Xvolutions.AdminBundle.Form.FileType.html">Xvolutions\AdminBundle\Form\FileType</a></li> <li><a href="class-Xvolutions.AdminBundle.Form.LanguageType.html">Xvolutions\AdminBundle\Form\LanguageType</a></li> <li><a href="class-Xvolutions.AdminBundle.Form.PageType.html">Xvolutions\AdminBundle\Form\PageType</a></li> <li><a href="class-Xvolutions.AdminBundle.Form.RoleType.html">Xvolutions\AdminBundle\Form\RoleType</a></li> <li><a href="class-Xvolutions.AdminBundle.Form.SectionType.html">Xvolutions\AdminBundle\Form\SectionType</a></li> <li><a href="class-Xvolutions.AdminBundle.Form.SettingType.html">Xvolutions\AdminBundle\Form\SettingType</a></li> <li><a href="class-Xvolutions.AdminBundle.Form.UserType.html">Xvolutions\AdminBundle\Form\UserType</a></li> <li><a href="class-Xvolutions.AdminBundle.Helpers.Misc.html">Xvolutions\AdminBundle\Helpers\Misc</a></li> <li><a href="class-Xvolutions.AdminBundle.Helpers.Pagination.html">Xvolutions\AdminBundle\Helpers\Pagination</a></li> <li><a href="class-Xvolutions.AdminBundle.Helpers.PaginatorHelper.html">Xvolutions\AdminBundle\Helpers\PaginatorHelper</a></li> <li><a href="class-Xvolutions.AdminBundle.Helpers.Render.html">Xvolutions\AdminBundle\Helpers\Render</a></li> <li><a href="class-Xvolutions.AdminBundle.Helpers.Upload.html">Xvolutions\AdminBundle\Helpers\Upload</a></li> <li><a href="class-Xvolutions.AdminBundle.Tests.Controller.Admin.PagesControllerTest.html">Xvolutions\AdminBundle\Tests\Controller\Admin\PagesControllerTest</a></li> <li><a href="class-Xvolutions.AdminBundle.Tests.Controller.Admin.UsersControllerTest.html">Xvolutions\AdminBundle\Tests\Controller\Admin\UsersControllerTest</a></li> <li><a href="class-Xvolutions.AdminBundle.Tests.Controller.AdminControllerTest.html">Xvolutions\AdminBundle\Tests\Controller\AdminControllerTest</a></li> <li><a href="class-Xvolutions.AdminBundle.Tests.Entity.LanguageTest.html">Xvolutions\AdminBundle\Tests\Entity\LanguageTest</a></li> <li><a href="class-Xvolutions.AdminBundle.Tests.Entity.PageTest.html">Xvolutions\AdminBundle\Tests\Entity\PageTest</a></li> <li><a href="class-Xvolutions.AdminBundle.Tests.Entity.SectionTest.html">Xvolutions\AdminBundle\Tests\Entity\SectionTest</a></li> <li><a href="class-Xvolutions.AdminBundle.Tests.Helpers.PaginationTest.html">Xvolutions\AdminBundle\Tests\Helpers\PaginationTest</a></li> <li><a href="class-Xvolutions.AdminBundle.Tests.InitiateCommandTest.html">Xvolutions\AdminBundle\Tests\InitiateCommandTest</a></li> <li><a href="class-Xvolutions.AdminBundle.Tests.Selenium.SeleniumTest.html">Xvolutions\AdminBundle\Tests\Selenium\SeleniumTest</a></li> <li><a href="class-Xvolutions.AdminBundle.Tests.Selenium.Tests.MenuSeleniumTest.html">Xvolutions\AdminBundle\Tests\Selenium\Tests\MenuSeleniumTest</a></li> <li><a href="class-Xvolutions.AdminBundle.Tests.Selenium.Tests.PagesSeleniumTest.html">Xvolutions\AdminBundle\Tests\Selenium\Tests\PagesSeleniumTest</a></li> <li><a href="class-Xvolutions.AdminBundle.XvolutionsAdminBundle.html">Xvolutions\AdminBundle\XvolutionsAdminBundle</a></li> </ul> </div> </div> </div> <div id="splitter"></div> <div id="right"> <div id="rightInner"> <form id="search"> <input type="hidden" name="cx" value=""> <input type="hidden" name="ie" value="UTF-8"> <input type="text" name="q" class="text" placeholder="Search"> </form> <div id="navigation"> <ul> <li> <a href="index.html" title="Overview"><span>Overview</span></a> </li> <li> <span>Namespace</span> </li> <li> <span>Class</span> </li> </ul> <ul> </ul> <ul> </ul> </div> <pre><code><span id="1" class="l"><a href="#1"> 1: </a><span class="xlang">&lt;?php</span> </span><span id="2" class="l"><a href="#2"> 2: </a> </span><span id="3" class="l"><a href="#3"> 3: </a><span class="php-keyword1">namespace</span> Xvolutions\AdminBundle\Entity; </span><span id="4" class="l"><a href="#4"> 4: </a> </span><span id="5" class="l"><a href="#5"> 5: </a><span class="php-keyword1">use</span> Doctrine\ORM\Mapping <span class="php-keyword1">as</span> ORM; </span><span id="6" class="l"><a href="#6"> 6: </a><span class="php-keyword1">use</span> Doctrine\Common\Collections\ArrayCollection; </span><span id="7" class="l"><a href="#7"> 7: </a><span class="php-keyword1">use</span> Symfony\Component\Security\Core\User\AdvancedUserInterface; </span><span id="8" class="l"><a href="#8"> 8: </a> </span><span id="9" class="l"><a href="#9"> 9: </a><span class="php-comment">/** </span></span><span id="10" class="l"><a href="#10"> 10: </a><span class="php-comment"> * User </span></span><span id="11" class="l"><a href="#11"> 11: </a><span class="php-comment"> * </span></span><span id="12" class="l"><a href="#12"> 12: </a><span class="php-comment"> * @ORM\Table() </span></span><span id="13" class="l"><a href="#13"> 13: </a><span class="php-comment"> * @ORM\Entity </span></span><span id="14" class="l"><a href="#14"> 14: </a><span class="php-comment"> */</span> </span><span id="15" class="l"><a href="#15"> 15: </a><span class="php-keyword1">class</span> User <span class="php-keyword1">implements</span> AdvancedUserInterface, \Serializable, \Symfony\Component\Security\Core\Encoder\EncoderAwareInterface </span><span id="16" class="l"><a href="#16"> 16: </a>{ </span><span id="17" class="l"><a href="#17"> 17: </a> <span class="php-comment">/** </span></span><span id="18" class="l"><a href="#18"> 18: </a><span class="php-comment"> * @var integer </span></span><span id="19" class="l"><a href="#19"> 19: </a><span class="php-comment"> * </span></span><span id="20" class="l"><a href="#20"> 20: </a><span class="php-comment"> * @ORM\Column(name=&quot;id&quot;, type=&quot;integer&quot;) </span></span><span id="21" class="l"><a href="#21"> 21: </a><span class="php-comment"> * @ORM\Id </span></span><span id="22" class="l"><a href="#22"> 22: </a><span class="php-comment"> * @ORM\GeneratedValue(strategy=&quot;AUTO&quot;) </span></span><span id="23" class="l"><a href="#23"> 23: </a><span class="php-comment"> */</span> </span><span id="24" class="l"><a href="#24"> 24: </a> <span class="php-keyword1">private</span> <span class="php-var">$id</span>; </span><span id="25" class="l"><a href="#25"> 25: </a> </span><span id="26" class="l"><a href="#26"> 26: </a> <span class="php-comment">/** </span></span><span id="27" class="l"><a href="#27"> 27: </a><span class="php-comment"> * @var string </span></span><span id="28" class="l"><a href="#28"> 28: </a><span class="php-comment"> * </span></span><span id="29" class="l"><a href="#29"> 29: </a><span class="php-comment"> * @ORM\Column(name=&quot;username&quot;, type=&quot;string&quot;, length=25, unique=true) </span></span><span id="30" class="l"><a href="#30"> 30: </a><span class="php-comment"> */</span> </span><span id="31" class="l"><a href="#31"> 31: </a> <span class="php-keyword1">private</span> <span class="php-var">$username</span>; </span><span id="32" class="l"><a href="#32"> 32: </a> </span><span id="33" class="l"><a href="#33"> 33: </a> <span class="php-comment">/** </span></span><span id="34" class="l"><a href="#34"> 34: </a><span class="php-comment"> * @var string </span></span><span id="35" class="l"><a href="#35"> 35: </a><span class="php-comment"> * </span></span><span id="36" class="l"><a href="#36"> 36: </a><span class="php-comment"> * @ORM\Column(name=&quot;name&quot;, type=&quot;string&quot;, length=255) </span></span><span id="37" class="l"><a href="#37"> 37: </a><span class="php-comment"> */</span> </span><span id="38" class="l"><a href="#38"> 38: </a> <span class="php-keyword1">private</span> <span class="php-var">$name</span>; </span><span id="39" class="l"><a href="#39"> 39: </a> </span><span id="40" class="l"><a href="#40"> 40: </a> <span class="php-comment">/** </span></span><span id="41" class="l"><a href="#41"> 41: </a><span class="php-comment"> * @var string </span></span><span id="42" class="l"><a href="#42"> 42: </a><span class="php-comment"> * </span></span><span id="43" class="l"><a href="#43"> 43: </a><span class="php-comment"> * @ORM\Column(name=&quot;password&quot;, type=&quot;string&quot;, length=255) </span></span><span id="44" class="l"><a href="#44"> 44: </a><span class="php-comment"> */</span> </span><span id="45" class="l"><a href="#45"> 45: </a> <span class="php-keyword1">private</span> <span class="php-var">$password</span>; </span><span id="46" class="l"><a href="#46"> 46: </a> </span><span id="47" class="l"><a href="#47"> 47: </a> <span class="php-comment">/** </span></span><span id="48" class="l"><a href="#48"> 48: </a><span class="php-comment"> * @var string </span></span><span id="49" class="l"><a href="#49"> 49: </a><span class="php-comment"> * </span></span><span id="50" class="l"><a href="#50"> 50: </a><span class="php-comment"> * @ORM\Column(name=&quot;salt&quot;, type=&quot;string&quot;, length=256) </span></span><span id="51" class="l"><a href="#51"> 51: </a><span class="php-comment"> */</span> </span><span id="52" class="l"><a href="#52"> 52: </a> <span class="php-keyword1">private</span> <span class="php-var">$salt</span>; </span><span id="53" class="l"><a href="#53"> 53: </a> </span><span id="54" class="l"><a href="#54"> 54: </a> <span class="php-comment">/** </span></span><span id="55" class="l"><a href="#55"> 55: </a><span class="php-comment"> * @var string </span></span><span id="56" class="l"><a href="#56"> 56: </a><span class="php-comment"> * </span></span><span id="57" class="l"><a href="#57"> 57: </a><span class="php-comment"> * @ORM\Column(name=&quot;email&quot;, type=&quot;string&quot;, length=60, unique=true) </span></span><span id="58" class="l"><a href="#58"> 58: </a><span class="php-comment"> */</span> </span><span id="59" class="l"><a href="#59"> 59: </a> <span class="php-keyword1">private</span> <span class="php-var">$email</span>; </span><span id="60" class="l"><a href="#60"> 60: </a> </span><span id="61" class="l"><a href="#61"> 61: </a> <span class="php-comment">/** </span></span><span id="62" class="l"><a href="#62"> 62: </a><span class="php-comment"> * @var boolean </span></span><span id="63" class="l"><a href="#63"> 63: </a><span class="php-comment"> * </span></span><span id="64" class="l"><a href="#64"> 64: </a><span class="php-comment"> * @ORM\Column(name=&quot;isactive&quot;, type=&quot;boolean&quot;) </span></span><span id="65" class="l"><a href="#65"> 65: </a><span class="php-comment"> */</span> </span><span id="66" class="l"><a href="#66"> 66: </a> <span class="php-keyword1">private</span> <span class="php-var">$isactive</span>; </span><span id="67" class="l"><a href="#67"> 67: </a> </span><span id="68" class="l"><a href="#68"> 68: </a> <span class="php-comment">/** </span></span><span id="69" class="l"><a href="#69"> 69: </a><span class="php-comment"> * @ORM\ManyToMany(targetEntity=&quot;Role&quot;, inversedBy=&quot;users&quot;) </span></span><span id="70" class="l"><a href="#70"> 70: </a><span class="php-comment"> * </span></span><span id="71" class="l"><a href="#71"> 71: </a><span class="php-comment"> */</span> </span><span id="72" class="l"><a href="#72"> 72: </a> <span class="php-keyword1">private</span> <span class="php-var">$roles</span>; </span><span id="73" class="l"><a href="#73"> 73: </a> </span><span id="74" class="l"><a href="#74"> 74: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> __construct() </span><span id="75" class="l"><a href="#75"> 75: </a> { </span><span id="76" class="l"><a href="#76"> 76: </a> <span class="php-var">$this</span>-&gt;roles = <span class="php-keyword1">new</span> ArrayCollection(); </span><span id="77" class="l"><a href="#77"> 77: </a> } </span><span id="78" class="l"><a href="#78"> 78: </a> </span><span id="79" class="l"><a href="#79"> 79: </a> <span class="php-comment">/** </span></span><span id="80" class="l"><a href="#80"> 80: </a><span class="php-comment"> * Get id </span></span><span id="81" class="l"><a href="#81"> 81: </a><span class="php-comment"> * </span></span><span id="82" class="l"><a href="#82"> 82: </a><span class="php-comment"> * @return integer </span></span><span id="83" class="l"><a href="#83"> 83: </a><span class="php-comment"> */</span> </span><span id="84" class="l"><a href="#84"> 84: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> getId() </span><span id="85" class="l"><a href="#85"> 85: </a> { </span><span id="86" class="l"><a href="#86"> 86: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;id; </span><span id="87" class="l"><a href="#87"> 87: </a> } </span><span id="88" class="l"><a href="#88"> 88: </a> </span><span id="89" class="l"><a href="#89"> 89: </a> <span class="php-comment">/** </span></span><span id="90" class="l"><a href="#90"> 90: </a><span class="php-comment"> * Set username </span></span><span id="91" class="l"><a href="#91"> 91: </a><span class="php-comment"> * </span></span><span id="92" class="l"><a href="#92"> 92: </a><span class="php-comment"> * @param string $username </span></span><span id="93" class="l"><a href="#93"> 93: </a><span class="php-comment"> * @return User </span></span><span id="94" class="l"><a href="#94"> 94: </a><span class="php-comment"> */</span> </span><span id="95" class="l"><a href="#95"> 95: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> setUsername(<span class="php-var">$username</span>) </span><span id="96" class="l"><a href="#96"> 96: </a> { </span><span id="97" class="l"><a href="#97"> 97: </a> <span class="php-var">$this</span>-&gt;username = <span class="php-var">$username</span>; </span><span id="98" class="l"><a href="#98"> 98: </a> </span><span id="99" class="l"><a href="#99"> 99: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>; </span><span id="100" class="l"><a href="#100">100: </a> } </span><span id="101" class="l"><a href="#101">101: </a> </span><span id="102" class="l"><a href="#102">102: </a> <span class="php-comment">/** </span></span><span id="103" class="l"><a href="#103">103: </a><span class="php-comment"> * Get username </span></span><span id="104" class="l"><a href="#104">104: </a><span class="php-comment"> * </span></span><span id="105" class="l"><a href="#105">105: </a><span class="php-comment"> * @return string </span></span><span id="106" class="l"><a href="#106">106: </a><span class="php-comment"> */</span> </span><span id="107" class="l"><a href="#107">107: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> getUsername() </span><span id="108" class="l"><a href="#108">108: </a> { </span><span id="109" class="l"><a href="#109">109: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;username; </span><span id="110" class="l"><a href="#110">110: </a> } </span><span id="111" class="l"><a href="#111">111: </a> </span><span id="112" class="l"><a href="#112">112: </a> <span class="php-comment">/** </span></span><span id="113" class="l"><a href="#113">113: </a><span class="php-comment"> * Set name </span></span><span id="114" class="l"><a href="#114">114: </a><span class="php-comment"> * </span></span><span id="115" class="l"><a href="#115">115: </a><span class="php-comment"> * @param string $name </span></span><span id="116" class="l"><a href="#116">116: </a><span class="php-comment"> * @return User </span></span><span id="117" class="l"><a href="#117">117: </a><span class="php-comment"> */</span> </span><span id="118" class="l"><a href="#118">118: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> setName(<span class="php-var">$name</span>) </span><span id="119" class="l"><a href="#119">119: </a> { </span><span id="120" class="l"><a href="#120">120: </a> <span class="php-var">$this</span>-&gt;name = <span class="php-var">$name</span>; </span><span id="121" class="l"><a href="#121">121: </a> </span><span id="122" class="l"><a href="#122">122: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>; </span><span id="123" class="l"><a href="#123">123: </a> } </span><span id="124" class="l"><a href="#124">124: </a> </span><span id="125" class="l"><a href="#125">125: </a> <span class="php-comment">/** </span></span><span id="126" class="l"><a href="#126">126: </a><span class="php-comment"> * Get name </span></span><span id="127" class="l"><a href="#127">127: </a><span class="php-comment"> * </span></span><span id="128" class="l"><a href="#128">128: </a><span class="php-comment"> * @return string </span></span><span id="129" class="l"><a href="#129">129: </a><span class="php-comment"> */</span> </span><span id="130" class="l"><a href="#130">130: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> getName() </span><span id="131" class="l"><a href="#131">131: </a> { </span><span id="132" class="l"><a href="#132">132: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;name; </span><span id="133" class="l"><a href="#133">133: </a> } </span><span id="134" class="l"><a href="#134">134: </a> </span><span id="135" class="l"><a href="#135">135: </a> <span class="php-comment">/** </span></span><span id="136" class="l"><a href="#136">136: </a><span class="php-comment"> * Set password </span></span><span id="137" class="l"><a href="#137">137: </a><span class="php-comment"> * </span></span><span id="138" class="l"><a href="#138">138: </a><span class="php-comment"> * @param string $password </span></span><span id="139" class="l"><a href="#139">139: </a><span class="php-comment"> * @return User </span></span><span id="140" class="l"><a href="#140">140: </a><span class="php-comment"> */</span> </span><span id="141" class="l"><a href="#141">141: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> setPassword(<span class="php-var">$password</span>) </span><span id="142" class="l"><a href="#142">142: </a> { </span><span id="143" class="l"><a href="#143">143: </a> <span class="php-var">$this</span>-&gt;password = <span class="php-var">$password</span>; </span><span id="144" class="l"><a href="#144">144: </a> </span><span id="145" class="l"><a href="#145">145: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>; </span><span id="146" class="l"><a href="#146">146: </a> } </span><span id="147" class="l"><a href="#147">147: </a> </span><span id="148" class="l"><a href="#148">148: </a> <span class="php-comment">/** </span></span><span id="149" class="l"><a href="#149">149: </a><span class="php-comment"> * Get password </span></span><span id="150" class="l"><a href="#150">150: </a><span class="php-comment"> * </span></span><span id="151" class="l"><a href="#151">151: </a><span class="php-comment"> * @return string </span></span><span id="152" class="l"><a href="#152">152: </a><span class="php-comment"> */</span> </span><span id="153" class="l"><a href="#153">153: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> getPassword() </span><span id="154" class="l"><a href="#154">154: </a> { </span><span id="155" class="l"><a href="#155">155: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;password; </span><span id="156" class="l"><a href="#156">156: </a> } </span><span id="157" class="l"><a href="#157">157: </a> </span><span id="158" class="l"><a href="#158">158: </a> <span class="php-comment">/** </span></span><span id="159" class="l"><a href="#159">159: </a><span class="php-comment"> * Set email </span></span><span id="160" class="l"><a href="#160">160: </a><span class="php-comment"> * </span></span><span id="161" class="l"><a href="#161">161: </a><span class="php-comment"> * @param string $email </span></span><span id="162" class="l"><a href="#162">162: </a><span class="php-comment"> * @return User </span></span><span id="163" class="l"><a href="#163">163: </a><span class="php-comment"> */</span> </span><span id="164" class="l"><a href="#164">164: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> setEmail(<span class="php-var">$email</span>) </span><span id="165" class="l"><a href="#165">165: </a> { </span><span id="166" class="l"><a href="#166">166: </a> <span class="php-var">$this</span>-&gt;email = <span class="php-var">$email</span>; </span><span id="167" class="l"><a href="#167">167: </a> </span><span id="168" class="l"><a href="#168">168: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>; </span><span id="169" class="l"><a href="#169">169: </a> } </span><span id="170" class="l"><a href="#170">170: </a> </span><span id="171" class="l"><a href="#171">171: </a> <span class="php-comment">/** </span></span><span id="172" class="l"><a href="#172">172: </a><span class="php-comment"> * Get email </span></span><span id="173" class="l"><a href="#173">173: </a><span class="php-comment"> * </span></span><span id="174" class="l"><a href="#174">174: </a><span class="php-comment"> * @return string </span></span><span id="175" class="l"><a href="#175">175: </a><span class="php-comment"> */</span> </span><span id="176" class="l"><a href="#176">176: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> getEmail() </span><span id="177" class="l"><a href="#177">177: </a> { </span><span id="178" class="l"><a href="#178">178: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;email; </span><span id="179" class="l"><a href="#179">179: </a> } </span><span id="180" class="l"><a href="#180">180: </a> </span><span id="181" class="l"><a href="#181">181: </a> <span class="php-comment">/** </span></span><span id="182" class="l"><a href="#182">182: </a><span class="php-comment"> * Set isactive </span></span><span id="183" class="l"><a href="#183">183: </a><span class="php-comment"> * </span></span><span id="184" class="l"><a href="#184">184: </a><span class="php-comment"> * @param boolean $isactive </span></span><span id="185" class="l"><a href="#185">185: </a><span class="php-comment"> * @return User </span></span><span id="186" class="l"><a href="#186">186: </a><span class="php-comment"> */</span> </span><span id="187" class="l"><a href="#187">187: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> setIsactive(<span class="php-var">$isactive</span>) </span><span id="188" class="l"><a href="#188">188: </a> { </span><span id="189" class="l"><a href="#189">189: </a> <span class="php-var">$this</span>-&gt;isactive = <span class="php-var">$isactive</span>; </span><span id="190" class="l"><a href="#190">190: </a> </span><span id="191" class="l"><a href="#191">191: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>; </span><span id="192" class="l"><a href="#192">192: </a> } </span><span id="193" class="l"><a href="#193">193: </a> </span><span id="194" class="l"><a href="#194">194: </a> <span class="php-comment">/** </span></span><span id="195" class="l"><a href="#195">195: </a><span class="php-comment"> * Get isactive </span></span><span id="196" class="l"><a href="#196">196: </a><span class="php-comment"> * </span></span><span id="197" class="l"><a href="#197">197: </a><span class="php-comment"> * @return boolean </span></span><span id="198" class="l"><a href="#198">198: </a><span class="php-comment"> */</span> </span><span id="199" class="l"><a href="#199">199: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> getIsactive() </span><span id="200" class="l"><a href="#200">200: </a> { </span><span id="201" class="l"><a href="#201">201: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;isactive; </span><span id="202" class="l"><a href="#202">202: </a> } </span><span id="203" class="l"><a href="#203">203: </a> </span><span id="204" class="l"><a href="#204">204: </a> <span class="php-comment">/** </span></span><span id="205" class="l"><a href="#205">205: </a><span class="php-comment"> * @inheritDoc </span></span><span id="206" class="l"><a href="#206">206: </a><span class="php-comment"> */</span> </span><span id="207" class="l"><a href="#207">207: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> getSalt() </span><span id="208" class="l"><a href="#208">208: </a> { </span><span id="209" class="l"><a href="#209">209: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;salt; </span><span id="210" class="l"><a href="#210">210: </a> } </span><span id="211" class="l"><a href="#211">211: </a> </span><span id="212" class="l"><a href="#212">212: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> setSalt(<span class="php-var">$salt</span>) </span><span id="213" class="l"><a href="#213">213: </a> { </span><span id="214" class="l"><a href="#214">214: </a> <span class="php-var">$this</span>-&gt;salt = <span class="php-var">$salt</span>; </span><span id="215" class="l"><a href="#215">215: </a> </span><span id="216" class="l"><a href="#216">216: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>; </span><span id="217" class="l"><a href="#217">217: </a> } </span><span id="218" class="l"><a href="#218">218: </a> </span><span id="219" class="l"><a href="#219">219: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> eraseCredentials() </span><span id="220" class="l"><a href="#220">220: </a> { </span><span id="221" class="l"><a href="#221">221: </a> } </span><span id="222" class="l"><a href="#222">222: </a> </span><span id="223" class="l"><a href="#223">223: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> setRoles(<span class="php-var">$roles</span>) </span><span id="224" class="l"><a href="#224">224: </a> { </span><span id="225" class="l"><a href="#225">225: </a> <span class="php-var">$this</span>-&gt;roles = <span class="php-var">$roles</span>; </span><span id="226" class="l"><a href="#226">226: </a> </span><span id="227" class="l"><a href="#227">227: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>; </span><span id="228" class="l"><a href="#228">228: </a> } </span><span id="229" class="l"><a href="#229">229: </a> </span><span id="230" class="l"><a href="#230">230: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> getRoles() </span><span id="231" class="l"><a href="#231">231: </a> { </span><span id="232" class="l"><a href="#232">232: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;roles-&gt;toArray(); </span><span id="233" class="l"><a href="#233">233: </a> } </span><span id="234" class="l"><a href="#234">234: </a> </span><span id="235" class="l"><a href="#235">235: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <span class="php-keyword2">serialize</span>() </span><span id="236" class="l"><a href="#236">236: </a> { </span><span id="237" class="l"><a href="#237">237: </a> <span class="php-keyword1">return</span> <span class="php-keyword2">serialize</span>(<span class="php-keyword1">array</span>( </span><span id="238" class="l"><a href="#238">238: </a> <span class="php-var">$this</span>-&gt;id, </span><span id="239" class="l"><a href="#239">239: </a> <span class="php-var">$this</span>-&gt;username, </span><span id="240" class="l"><a href="#240">240: </a> <span class="php-var">$this</span>-&gt;password, </span><span id="241" class="l"><a href="#241">241: </a> <span class="php-comment">// see section on salt below</span> </span><span id="242" class="l"><a href="#242">242: </a> <span class="php-comment">// $this-&gt;salt,</span> </span><span id="243" class="l"><a href="#243">243: </a> )); </span><span id="244" class="l"><a href="#244">244: </a> } </span><span id="245" class="l"><a href="#245">245: </a> </span><span id="246" class="l"><a href="#246">246: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <span class="php-keyword2">unserialize</span>(<span class="php-var">$serialized</span>) </span><span id="247" class="l"><a href="#247">247: </a> { </span><span id="248" class="l"><a href="#248">248: </a> <span class="php-keyword1">list</span>( </span><span id="249" class="l"><a href="#249">249: </a> <span class="php-var">$this</span>-&gt;id, </span><span id="250" class="l"><a href="#250">250: </a> <span class="php-var">$this</span>-&gt;username, </span><span id="251" class="l"><a href="#251">251: </a> <span class="php-var">$this</span>-&gt;password, </span><span id="252" class="l"><a href="#252">252: </a> <span class="php-comment">// see section on salt below</span> </span><span id="253" class="l"><a href="#253">253: </a> <span class="php-comment">// $this-&gt;salt</span> </span><span id="254" class="l"><a href="#254">254: </a> ) = <span class="php-keyword2">unserialize</span>(<span class="php-var">$serialized</span>); </span><span id="255" class="l"><a href="#255">255: </a> } </span><span id="256" class="l"><a href="#256">256: </a> </span><span id="257" class="l"><a href="#257">257: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> getEncoderName() </span><span id="258" class="l"><a href="#258">258: </a> { </span><span id="259" class="l"><a href="#259">259: </a> <span class="php-keyword1">return</span> <span class="php-quote">'default'</span>; </span><span id="260" class="l"><a href="#260">260: </a> } </span><span id="261" class="l"><a href="#261">261: </a> </span><span id="262" class="l"><a href="#262">262: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> isAccountNonExpired() </span><span id="263" class="l"><a href="#263">263: </a> { </span><span id="264" class="l"><a href="#264">264: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">true</span>; </span><span id="265" class="l"><a href="#265">265: </a> } </span><span id="266" class="l"><a href="#266">266: </a> </span><span id="267" class="l"><a href="#267">267: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> isAccountNonLocked() </span><span id="268" class="l"><a href="#268">268: </a> { </span><span id="269" class="l"><a href="#269">269: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">true</span>; </span><span id="270" class="l"><a href="#270">270: </a> } </span><span id="271" class="l"><a href="#271">271: </a> </span><span id="272" class="l"><a href="#272">272: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> isCredentialsNonExpired() </span><span id="273" class="l"><a href="#273">273: </a> { </span><span id="274" class="l"><a href="#274">274: </a> <span class="php-keyword1">return</span> <span class="php-keyword1">true</span>; </span><span id="275" class="l"><a href="#275">275: </a> } </span><span id="276" class="l"><a href="#276">276: </a> </span><span id="277" class="l"><a href="#277">277: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> isEnabled() </span><span id="278" class="l"><a href="#278">278: </a> { </span><span id="279" class="l"><a href="#279">279: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>-&gt;isactive; </span><span id="280" class="l"><a href="#280">280: </a> } </span><span id="281" class="l"><a href="#281">281: </a> </span><span id="282" class="l"><a href="#282">282: </a> <span class="php-comment">/** </span></span><span id="283" class="l"><a href="#283">283: </a><span class="php-comment"> * Add roles </span></span><span id="284" class="l"><a href="#284">284: </a><span class="php-comment"> * </span></span><span id="285" class="l"><a href="#285">285: </a><span class="php-comment"> * @param \Xvolutions\AdminBundle\Entity\Role $roles </span></span><span id="286" class="l"><a href="#286">286: </a><span class="php-comment"> * @return User </span></span><span id="287" class="l"><a href="#287">287: </a><span class="php-comment"> */</span> </span><span id="288" class="l"><a href="#288">288: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> addRole(\Xvolutions\AdminBundle\Entity\Role <span class="php-var">$roles</span>) </span><span id="289" class="l"><a href="#289">289: </a> { </span><span id="290" class="l"><a href="#290">290: </a> <span class="php-var">$this</span>-&gt;roles[] = <span class="php-var">$roles</span>; </span><span id="291" class="l"><a href="#291">291: </a> </span><span id="292" class="l"><a href="#292">292: </a> <span class="php-keyword1">return</span> <span class="php-var">$this</span>; </span><span id="293" class="l"><a href="#293">293: </a> } </span><span id="294" class="l"><a href="#294">294: </a> </span><span id="295" class="l"><a href="#295">295: </a> <span class="php-comment">/** </span></span><span id="296" class="l"><a href="#296">296: </a><span class="php-comment"> * Remove roles </span></span><span id="297" class="l"><a href="#297">297: </a><span class="php-comment"> * </span></span><span id="298" class="l"><a href="#298">298: </a><span class="php-comment"> * @param \Xvolutions\AdminBundle\Entity\Role $roles </span></span><span id="299" class="l"><a href="#299">299: </a><span class="php-comment"> */</span> </span><span id="300" class="l"><a href="#300">300: </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> removeRole(\Xvolutions\AdminBundle\Entity\Role <span class="php-var">$roles</span>) </span><span id="301" class="l"><a href="#301">301: </a> { </span><span id="302" class="l"><a href="#302">302: </a> <span class="php-var">$this</span>-&gt;roles-&gt;removeElement(<span class="php-var">$roles</span>); </span><span id="303" class="l"><a href="#303">303: </a> } </span><span id="304" class="l"><a href="#304">304: </a>} </span><span id="305" class="l"><a href="#305">305: </a></span></code></pre> <div id="footer"> API documentation generated by <a href="http://apigen.org">ApiGen</a> </div> </div> </div> <script src="resources/combined.js?cd021bc814832c24a7cec5319ea03335bfba1caf"></script> <script src="elementlist.js?1012bcda95b3ad4b0f90fff7cbb1252666761d69"></script> </body> </html>
{ "content_hash": "7ecf1f89e742c01faa7c69cf1eef6599", "timestamp": "", "source": "github", "line_count": 521, "max_line_length": 244, "avg_line_length": 79.85028790786949, "alnum_prop": 0.6147781356665545, "repo_name": "Xvolutions/CMS", "id": "9f1799b25b550964bc1ca76cab99f1b92c2f68d7", "size": "41602", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "doc/source-class-Xvolutions.AdminBundle.Entity.User.html", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "2659" }, { "name": "CSS", "bytes": "41688" }, { "name": "HTML", "bytes": "48566" }, { "name": "JavaScript", "bytes": "9664" }, { "name": "PHP", "bytes": "197700" }, { "name": "Shell", "bytes": "1007" } ], "symlink_target": "" }
--TODO: Finish those marked with UNF local RuneMaster = Apollo.GetAddon("RuneMaster") local tStatData = { [5] = {--Focus Pool --UNFINISHED? fBase = Unit.CodeEnumProperties.BaseFocusPool, fCoeff = 1, bNoPercent = true }, [6] = {--Focus Recovery Rating ePercentId = Unit.CodeEnumProperties.BaseFocusRecoveryInCombat, fBase = 0.01, fCoeff = 0.000002, fSoftCap = 0.0150, nDR = 2000 }, [7] = {--Max Health --UNFINISHED? fBase = Unit.CodeEnumProperties.BaseHealth, fCoeff = 1, bNoPercent = true }, [25] = {--Lifesteal Rating ePercentId = Unit.CodeEnumProperties.BaseLifesteal, fBase = 0.00, fCoeff = 0.000021, fSoftCap = 0.10, nDR = 6200 }, [29] = {--Multi-Hit Rating ePercentId = Unit.CodeEnumProperties.BaseMultiHitChance, fBase = 0.05, fCoeff = 0.00006, fSoftCap = 0.60, nDR = 5000 }, [32] = {--Strikethrough Rating ePercentId = Unit.CodeEnumProperties.BaseAvoidReduceChance, fBase = 0.00, fCoeff = 0.00003, fSoftCap = 0.30, nDR = 5000 }, [33] = {--Deflect Chance Rating ePercentId = Unit.CodeEnumProperties.BaseAvoidChance, fBase = 0.05, fCoeff = 0.000015, fSoftCap = 0.30, nDR = 7000 }, [34] = {--Critical Hit Rating ePercentId = Unit.CodeEnumProperties.BaseCritChance, fBase = 0.05, fCoeff = 0.000025, fSoftCap = 0.30, nDR = 7000 }, [37] = {--Critical Mitigation Rating ePercentId = Unit.CodeEnumProperties.BaseCriticalMitigation, fBase = 0.00, fCoeff = 0.00015, fSoftCap = 1.5, nDR = 2750 }, [42] = {--Armor --TODO: This is special because of the 3 resists. Do something. ePercentId = nil, --UNF fBase = 0.00, fCoeff = 0.00008, fSoftCap = 0, nDR = 7250 }, [47] = {--Critical Hit Severity Rating ePercentId = Unit.CodeEnumProperties.CriticalHitSeverityMultiplier, fBase = 1.50, fCoeff = 0.0001, fSoftCap = 2.5, nDR = 5500 }, [56] = {--Intensity Rating ePercentId = Unit.CodeEnumProperties.BaseIntensity, fBase = 0.00, fCoeff = 0.000028, fSoftCap = 0.30, nDR = 5000 }, [57] = {--Vigor Rating ePercentId = Unit.CodeEnumProperties.BaseVigor, fBase = 0.00, fCoeff = 0.000028, fSoftCap = 0.30, nDR = 5000 }, [58] = {--Glance Rating ePercentId = Unit.CodeEnumProperties.BaseGlanceChance, fBase = 0.05, fCoeff = 0.0000275, fSoftCap = 0.30, nDR = 4000 }, [63] = {--Reflect Rating --UNF --[[fBase = Unit.CodeEnumProperties.BaseDamageReflectChance, fCoeff = 0.00005, fSoftCap = UNK, nDR = UNK--]] }, [64] = {--CC Resilience Rating --UNF --[[fBase = Unit.CodeEnumProperties.CCDurationModifier,--0.00, fCoeff = 0.00004, fSoftCap = 0.25, nDR = UNK (Cause of comment out)--]] } } local ktEnumPercentToRating = { [Unit.CodeEnumProperties.BaseFocusPool] = 5, [Unit.CodeEnumProperties.BaseFocusRecoveryInCombat] = 6, [Unit.CodeEnumProperties.BaseHealth] = 7, [Unit.CodeEnumProperties.BaseLifesteal] = 25, [Unit.CodeEnumProperties.BaseMultiHitChance] = 29, --[Unit.CodeEnumProperties.BaseMultiHitAmount] = 60, --112 [Unit.CodeEnumProperties.BaseAvoidReduceChance] = 32, [Unit.CodeEnumProperties.BaseAvoidChance] = 33, [Unit.CodeEnumProperties.BaseCritChance] = 34, [Unit.CodeEnumProperties.BaseCriticalMitigation] = 37, --[] = 42, [Unit.CodeEnumProperties.CriticalHitSeverityMultiplier] = 47, [Unit.CodeEnumProperties.BaseIntensity] = 56, [Unit.CodeEnumProperties.BaseVigor] = 57, [Unit.CodeEnumProperties.BaseGlanceChance] = 58, [Unit.CodeEnumProperties.BaseDamageReflectChance] = 63, [Unit.CodeEnumProperties.CCDurationModifier] = 64, } tStatReview_Armors = {} function RuneMaster:StatReview_UpdateArmorSlot(eArmorSlot, tStatReview) tStatReview_Armors = tStatReview_Armors or {} tStatReview_Armors[eArmorSlot] = tStatReview end function RuneMaster:StatReview_PopulateStatReview(tStatReview, itemCurrRune, itemPlanRune) local tCurrRuneInfo = itemCurrRune and itemCurrRune:GetDetailedInfo().tPrimary local tPlanRuneInfo = itemPlanRune and itemPlanRune:GetDetailedInfo().tPrimary --tStatReview Table Format as: tStatReview={stats={[eStat]={curr=#,plan=#}},sets={[eSet]={curr=#,plan=#}}} -------------------------------------------------------------------------------------------- if tCurrRuneInfo then local tStat = tCurrRuneInfo.arBudgetBasedProperties or tCurrRuneInfo.arInnateProperties if tStat then local eStat = tStat[1].eProperty local nValue = tStat[1].nValue tStatReview.stats[eStat] = tStatReview.stats[eStat] or {curr=0,plan=0} tStatReview.stats[eStat].curr = tStatReview.stats[eStat].curr+nValue end local tRuneSet = tCurrRuneInfo.tRuneSet if tRuneSet then local nSetId = tRuneSet.nSetId local nPower = tRuneSet.nPower tStatReview.sets[nSetId] = tStatReview.sets[nSetId] or {curr=0,plan=0} tStatReview.sets[nSetId].curr = tStatReview.sets[nSetId].curr+nPower end end if not tPlanRuneInfo then tPlanRuneInfo = tCurrRuneInfo end if tPlanRuneInfo then local tStat = tPlanRuneInfo.arBudgetBasedProperties or tPlanRuneInfo.arInnateProperties if tStat then local eStat = tStat[1].eProperty local nValue = tStat[1].nValue tStatReview.stats[eStat] = tStatReview.stats[eStat] or {curr=0,plan=0} tStatReview.stats[eStat].plan = tStatReview.stats[eStat].plan+nValue end local tRuneSet = tPlanRuneInfo.tRuneSet if tRuneSet then local nSetId = tRuneSet.nSetId local nPower = tRuneSet.nPower tStatReview.sets[nSetId] = tStatReview.sets[nSetId] or {curr=0,plan=0} tStatReview.sets[nSetId].plan = tStatReview.sets[nSetId].plan+nPower end end end function RuneMaster:StatReview_UpdateStatReviewV2() --V2 --[[{ bDefault = true, eProperty = 154, nPower = 2, nScalar = 0, nSortOrder = 0, nValue = 0.0035000001080334, strName = "Multi-Hit Chance" }--]] --TODO: Move this to self.ktSets local ktSetsTemp = CraftingLib.GetRuneSets() local ktSets = {} for _,tSet in pairs(ktSetsTemp) do ktSets[tSet.nSetId] = tSet end ktSetsTemp = nil --tStatReview Table Format as: tStatReview={stats={[eStat]={curr=#,plan=#}},sets={[eSet]={curr=#,plan=#}}} local tStatsCurrent, tStatsPlanned = {}, {} local tBonusesCurrent, tBonusesPlanned = {}, {} local tCurrBonTotals, tPlanBonTotals = {}, {} for nArmorSlot,tStatReview in pairs(tStatReview_Armors) do for eStat,tCurrVsPlan in pairs(tStatReview.stats) do tStatsCurrent[eStat] = tStatsCurrent[eStat] and tStatsCurrent[eStat]+tCurrVsPlan.curr or tCurrVsPlan.curr tStatsPlanned[eStat] = tStatsPlanned[eStat] and tStatsPlanned[eStat]+tCurrVsPlan.plan or tCurrVsPlan.plan end for nSetId,tCurrVsPlan in pairs(tStatReview.sets) do --Print(ktSets[nSetId].strName) --Print("-------------------") local nCurrPower, nPlanPower = tCurrVsPlan.curr, tCurrVsPlan.plan for _,tBonus in pairs(ktSets[nSetId].arBonuses) do --TODO: self.ktSets --Print(nCurrPower..":"..tBonus.nPower) local bFound = false if nCurrPower >= tBonus.nPower then local eStat = tBonus.eProperty local nValue = tBonus.nValue --tBonus.nScalar --TODO: Issue with nScalar if nValue then table.insert(tBonusesCurrent, {eStat,nValue}) else Print(string.format("[RM] Bonus Error with %s (%s), nScalar: %s",tostring(Item.GetPropertyName(eStat)), tostring(eStat), tostring(tBonus.nScalar))) end bFound = true end if nPlanPower >= tBonus.nPower then local eStat = tBonus.eProperty local nValue = tBonus.nValue --tBonus.nScalar --TODO: Issue with nScalar if nValue then table.insert(tBonusesPlanned, {eStat,nValue}) else --Print(string.format("[RM] Bonus Error with %s (%s), nScalar: %s",Item.GetPropertyName(eStat), eStat, tostring(tBonus.nScalar))) end bFound = true end if not bFound then break end end --Print("-------------------") end end for _,tBonus in pairs(tBonusesCurrent) do local eStat = tBonus[1] local fValue = tBonus[2] tCurrBonTotals[eStat] = tCurrBonTotals[eStat] and tCurrBonTotals[eStat]+fValue or fValue end for _,tBonus in pairs(tBonusesPlanned) do local eStat = tBonus[1] local fValue = tBonus[2] tPlanBonTotals[eStat] = tPlanBonTotals[eStat] and tPlanBonTotals[eStat]+fValue or fValue end local unitPlayer = GameLib.GetPlayerUnit() local tArmorRatings = {} local tStats = {} for eStat,nRuneRating in pairs(tStatsCurrent) do local tStatInfo = tStatData[eStat] if tStatInfo.fBase then --TODO: Hacky check to override unfinished stats. local fSetPercent = 0 local ePercentId = tStatInfo.ePercentId if ePercentId then --if tCurrBonTotals[ePercentId] then fSetPercent = tCurrBonTotals[ePercentId] or 0 local fCalcBase = unitPlayer:GetUnitProperty(ePercentId).fValue - fSetPercent tStatData[eStat].fBase = fCalcBase --[[Print(Item.GetPropertyName(eStat)) Print("-------------------") Print(string.format("Base: %.0f%%",fCalcBase*100)) Print(string.format("Sets: %.2f%%",fSetPercent*100))--]] --end end local nArmorRating = unitPlayer:GetUnitProperty(eStat).fValue - nRuneRating tArmorRatings[eStat] = nArmorRating --[[Print(string.format("Armor: %s rating.",nArmorRating)) Print(string.format("Runes: %s rating.",nRuneRating)) Print(string.format("Final: %.2f%%", self:StatReview_GetStatDR(eStat, nArmorRating+nRuneRating, fSetPercent))) Print("-------------------")--]] if not tStats[eStat] then tStats[eStat] = {curr={},plan={}} end tStats[eStat].curr = {self:StatReview_GetStatDR(eStat, nArmorRating+nRuneRating, fSetPercent)} end end for eStat,nRuneRating in pairs(tStatsPlanned) do local tStatInfo = tStatData[eStat] if tStatInfo.fBase then --TODO: Hacky check to override unfinished stats. local fSetPercent = 0 local ePercentId = tStatInfo.ePercentId if ePercentId then if tPlanBonTotals[ePercentId] then fSetPercent = tPlanBonTotals[ePercentId] --[[Print(Item.GetPropertyName(eStat)) Print("-------------------") Print(string.format("Base: %.0f%%",tStatInfo.fBase*100)) Print(string.format("Sets: %.2f%%",fSetPercent*100))--]] end end --local nArmorRating = unitPlayer:GetUnitProperty(eStat).fValue - nRuneRating --TODO: Error here. local nArmorRating = tArmorRatings[eStat] --[[Print(string.format("Armor: %s rating.",nArmorRating)) Print(string.format("Runes: %s rating.",nRuneRating)) Print(string.format("Final: %.2f%%", self:StatReview_GetStatDR(eStat, nArmorRating+nRuneRating, fSetPercent))) Print("-------------------")--]] if not tStats[eStat] then tStats[eStat] = {curr={},plan={}} end tStats[eStat].plan = {self:StatReview_GetStatDR(eStat, nArmorRating+nRuneRating, fSetPercent)} end end --Make GUI self.wndMain:FindChild("wndStatReview"):DestroyChildren() local unitPlayer = GameLib.GetPlayerUnit() --TODO: Too many unitplayer calls. for eStat,tPercent in pairs(tStats) do local wndStat = Apollo.LoadForm(self.xmlDoc, "StatReview_StatEntry", self.wndMain:FindChild("wndStatReview"), self) local strStat = string.gsub(Item.GetPropertyName(eStat)," Rating","") --TODO: Figure out how to handle this better. Locale? wndStat:FindChild("Name"):SetText(strStat) --TODO: Locale local fCurrPct, bCurrDR = unpack(tPercent.curr) local fPlanPct, bPlanDR = unpack(tPercent.plan) if not tStatData[eStat].bNoPercent then wndStat:FindChild("Curr"):SetText(string.format("%.2f%%",fCurrPct*100)) --wndStat:FindChild("Curr"):SetTooltip(math.floor(nCurr).." Rating") wndStat:FindChild("Plan"):SetText(string.format("%.2f%%",fPlanPct*100)) --wndStat:FindChild("Plan"):SetTooltip(math.floor(nFinal).." Rating") else local fCurrPct, bCurrDR = unpack(tPercent.curr) local fPlanPct, bPlanDR = unpack(tPercent.plan) wndStat:FindChild("Curr"):SetText(math.floor(fCurrPct)) wndStat:FindChild("Plan"):SetText(math.floor(fPlanPct)) end if bCurrDR then wndStat:FindChild("Curr"):SetTextColor("FFDDDD00") end if bPlanDR then wndStat:FindChild("Plan"):SetTextColor("FFDDDD00") end end self.wndMain:FindChild("wndStatReview"):ArrangeChildrenVert() end function RuneMaster:StatReview_UpdateStatReview() --V3 --TODO: Move this to self.ktSets local ktSetsTemp = CraftingLib.GetRuneSets() local ktSets = {} for _,tSet in pairs(ktSetsTemp) do ktSets[tSet.nSetId] = tSet end ktSetsTemp = nil --GUI Prep self.wndMain:FindChild("wndStatReview"):DestroyChildren() --tStatReview Table Format as: tStatReview={stats={[eStat]={curr=#,plan=#}},sets={[eSet]={curr=#,plan=#}}} --Get stats tStats = {} for nArmorSlot,tStatReview in pairs(tStatReview_Armors) do --Rune stats for eStatId, tRating in pairs(tStatReview.stats) do tStats[eStatId] = tStats[eStatId] or {rating={curr=0,plan=0},percent={curr=0,plan=0}} tStats[eStatId].rating.curr = tStats[eStatId].rating.curr + tRating.curr tStats[eStatId].rating.plan = tStats[eStatId].rating.plan + tRating.plan end --Set stats (ePercent -> eStat) for eSetId, tSetPower in pairs(tStatReview.sets) do --ktSets[eSetId] local tPercents = {} for _,tBonus in pairs(ktSets[eSetId].arBonuses) do --TODO: self.ktSets --Print(nCurrPower..":"..tBonus.nPower) local bFound = false if tSetPower.curr >= tBonus.nPower then local ePercentId = tBonus.eProperty local fValue = tBonus.nValue --tBonus.nScalar --TODO: Issue with nScalar if fValue then tPercents[ePercentId] = tPercents[ePercentId] or {curr=0,plan=0} tPercents[ePercentId].curr = tPercents[ePercentId].curr + fValue else --Print(string.format("[RM] Bonus Error with %s (%s), nScalar: %s",tostring(Item.GetPropertyName(eStat)), tostring(eStat), tostring(tBonus.nScalar))) end bFound = true end if tSetPower.plan >= tBonus.nPower then local ePercentId = tBonus.eProperty local fValue = tBonus.nValue --tBonus.nScalar --TODO: Issue with nScalar if fValue then tPercents[ePercentId] = tPercents[ePercentId] or {curr=0,plan=0} tPercents[ePercentId].plan = tPercents[ePercentId].plan + fValue else --Print(string.format("[RM] Bonus Error with %s (%s), nScalar: %s",Item.GetPropertyName(eStat), eStat, tostring(tBonus.nScalar))) end bFound = true end if not bFound then break end end for ePercentId, tPercent in pairs(tPercents) do local eStatId = ktEnumPercentToRating[ePercentId] if eStatId then tStats[eStatId] = tStats[eStatId] or {rating={curr=0,plan=0},percent={curr=0,plan=0}} tStats[eStatId].percent.curr = tStats[eStatId].percent.curr + tPercent.curr tStats[eStatId].percent.plan = tStats[eStatId].percent.plan + tPercent.plan else tStats[ePercentId] = tStats[ePercentId] or {rating={curr=0,plan=0},percent={curr=0,plan=0}} tStats[ePercentId].percent.curr = tStats[ePercentId].percent.curr + tPercent.curr tStats[ePercentId].percent.plan = tStats[ePercentId].percent.plan + tPercent.plan --Print(string.format("[RuneMaster] ERR-SR01 - %s %s - Please report to Curse.", ePercentId, Item.GetPropertyName(ePercentId))) end end end end local unitPlayer = GameLib.GetPlayerUnit() --Print("Stat // fBaseTotal, fBaseSets, fBase") for eStatId, tInfo in pairs(tStats) do local tStatInfo = tStatData[eStatId] if tStatInfo then local fBaseTotal, fBase, fBaseArmor, fBaseSets = 0, 0, 0 if tStatInfo.ePercentId then fBaseTotal = unitPlayer:GetUnitProperty(tStatInfo.ePercentId).fValue fBaseSets = tInfo.percent.curr or 0 fBase = fBaseTotal - fBaseSets --Print(string.format("%s // %.3f,%.3f,%.3f", Item.GetPropertyName(tStatInfo.ePercentId), fBaseTotal, fBaseSets, fBase)) end local nArmorRating = unitPlayer:GetUnitProperty(eStatId).fValue - tInfo.rating.curr --Print(Item.GetPropertyName(eStatId).." Armor Rating: "..string.format("%.0f",nArmorRating)) --tArmorRatings[eStat] = nArmorRating local fBasePlan = tInfo.percent.plan --self:StatReview_GetStatDR(eStat, nRating, fBase) returns fPercent, bDR local fCurr, bCurrDR = self:StatReview_GetStatDRV2(eStatId, tInfo.rating.curr + nArmorRating, fBaseTotal) local fPlan, bPlanDR = self:StatReview_GetStatDRV2(eStatId, tInfo.rating.plan + nArmorRating, fBase+fBasePlan) --Print(string.format("%s - Current: %.2f (%s), Planned: %.2f (%s)", Item.GetPropertyName(eStatId), fCurr, tostring(bCurrDR), fPlan, tostring(bPlanDR))) --Make GUI local wndStat = Apollo.LoadForm(self.xmlDoc, "StatReview_StatEntry", self.wndMain:FindChild("wndStatReview"), self) local strStat = string.gsub(Item.GetPropertyName(eStatId)," Rating","") --TODO: Figure out how to handle this better. Locale? wndStat:FindChild("Name"):SetText(strStat) --TODO: Locale local fDiff = fPlan-fCurr local strMod = "" if fDiff > 0 then strMod = "+" wndStat:FindChild("Diff"):SetTextColor("FF33DD33") elseif fDiff < 0 then wndStat:FindChild("Diff"):SetTextColor("FFDD3333") end if not tStatInfo.bNoPercent then wndStat:FindChild("Curr"):SetText(string.format("%.2f%%",fCurr*100)) --wndStat:FindChild("Curr"):SetTooltip(math.floor(nCurr).." Rating") wndStat:FindChild("Plan"):SetText(string.format("%.2f%%",fPlan*100)) --wndStat:FindChild("Plan"):SetTooltip(math.floor(nFinal).." Rating") wndStat:FindChild("Diff"):SetText(string.format(strMod.."%.2f%%",fDiff*100)) else wndStat:FindChild("Curr"):SetText(math.floor(fCurr)) wndStat:FindChild("Plan"):SetText(math.floor(fPlan)) wndStat:FindChild("Diff"):SetText(strMod..math.floor(fDiff)) end if bCurrDR then wndStat:FindChild("Curr"):SetTextColor("FFDDDD00") end if bPlanDR then wndStat:FindChild("Plan"):SetTextColor("FFDDDD00") end else local wndStat = Apollo.LoadForm(self.xmlDoc, "StatReview_StatEntry", self.wndMain:FindChild("wndStatReview"), self) local strStat = string.gsub(Item.GetPropertyName(eStatId)," Rating","") --TODO: Figure out how to handle this better. Locale? wndStat:FindChild("Name"):SetText(strStat) --TODO: Locale --wndStat:FindChild("Name"):SetTooltip("This stat is unsupported by RuneMaster. Please comment with the stat name on RuneMaster's Curse page.") local fCurr = tInfo.percent.curr local fPlan = tInfo.percent.plan local fDiff = fPlan-fCurr local strMod = "" if fDiff > 0 then strMod = "+" wndStat:FindChild("Diff"):SetTextColor("FF33DD33") elseif fDiff < 0 then wndStat:FindChild("Diff"):SetTextColor("FFDD3333") end wndStat:FindChild("Curr"):SetText(string.format("%.2f%%",fCurr*100)) --wndStat:FindChild("Curr"):SetTooltip(math.floor(nCurr).." Rating") wndStat:FindChild("Plan"):SetText(string.format("%.2f%%",fPlan*100)) --wndStat:FindChild("Plan"):SetTooltip(math.floor(nFinal).." Rating") wndStat:FindChild("Diff"):SetText(string.format(strMod.."%.2f%%",fDiff*100)) end end self.wndMain:FindChild("wndStatReview"):ArrangeChildrenVert() end function RuneMaster:StatReview_GetStatDR(eStat, nRating, fSetPercent) --Returns fRating, bDR, bNoPercent local tStatInfo = tStatData[eStat] local unitPlayer = GameLib.GetPlayerUnit() if tStatInfo and tStatInfo.fCoeff then --TODO: Hacky check to see if the stat values exist. When all stats are finalized, fix this. local fSoftCap = tStatInfo.fSoftCap local fCoeff = tStatInfo.fCoeff local fBase = tStatInfo.fBase + fSetPercent local nDR = tStatInfo.nDR --Figure out what DR represents. local fPreDRVal = nRating*fCoeff+fBase --fBase/fCoeff = nRatingBase local nTotalRating = fPreDRVal/fCoeff if fSoftCap then local nSCRating = fSoftCap/fCoeff local nOR = math.max(nTotalRating-nSCRating,0) --Figure out what OR represents. if fPreDRVal <= fSoftCap then return fPreDRVal, false else return fCoeff*nOR*math.cos(math.pi/2*(nOR/(nOR+(nDR))))+fSoftCap, true end else return nRating, false end else return 0 end end function RuneMaster:StatReview_GetStatDRV2(eStat, nRating, fBase) --Returns fRating, bDR, bNoPercent local tStatInfo = tStatData[eStat] local unitPlayer = GameLib.GetPlayerUnit() if tStatInfo and tStatInfo.fCoeff then --TODO: Hacky check to see if the stat values exist. When all stats are finalized, fix this. local fSoftCap = tStatInfo.fSoftCap local fCoeff = tStatInfo.fCoeff local nDR = tStatInfo.nDR --Figure out what DR represents. local fPreDRVal = nRating*fCoeff+fBase --fBase/fCoeff = nRatingBase local nTotalRating = fPreDRVal/fCoeff if fSoftCap then local nSCRating = fSoftCap/fCoeff local nOR = math.max(nTotalRating-nSCRating,0) --Figure out what OR represents. if fPreDRVal <= fSoftCap then return fPreDRVal, false else return fCoeff*nOR*math.cos(math.pi/2*(nOR/(nOR+(nDR))))+fSoftCap, true end else return nRating, false end else return 0 end end
{ "content_hash": "56789bafaa80dd0c2ac8721bbd9a84ae", "timestamp": "", "source": "github", "line_count": 569, "max_line_length": 155, "avg_line_length": 36.58523725834798, "alnum_prop": 0.7057212854878224, "repo_name": "scscgit/scsc_wildstar_addons", "id": "ff72110339d8360518a7a7599ba444650e0c0e35", "size": "21134", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "RuneMaster/RuneMaster_StatReview.lua", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "832" }, { "name": "Lua", "bytes": "9689906" } ], "symlink_target": "" }
SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
{ "content_hash": "ba9649ce14fb2d363de263923cf4ec66", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 39, "avg_line_length": 10.23076923076923, "alnum_prop": 0.6917293233082706, "repo_name": "mdoering/backbone", "id": "2aa8c3dde06db45cc765260775472ebfb1b3a814", "size": "192", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Magnoliophyta/Magnoliopsida/Malpighiales/Euphorbiaceae/Acalypha/Acalypha crenata/ Syn. Acalypha abortiva/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
/* * This file is part of the Indigo library. * * This program is licensed under the GNU General * Public License. To view the full license, check * LICENSE in the project root. */ #ifndef INDIGO_UTILITY_ACP_DUMP_H_ #define INDIGO_UTILITY_ACP_DUMP_H_ #include <stdint.h> #include <mutex> namespace indigo { class ACPDump { FILE *file_; bool is_open_; std::mutex mutex_; public: ACPDump(); bool Open(std::string file_name); void Close(); bool Write(int32_t type, int32_t protocol, uint32_t source_address, uint16_t source_port, uint32_t destination_address, uint16_t destination_port, char *buffer, size_t length) const; }; } #endif // INDIGO_UTILITY_ACP_DUMP_H_
{ "content_hash": "cfd38f1021ebd35880fd87d37b23e2bf", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 94, "avg_line_length": 21.4375, "alnum_prop": 0.7084548104956269, "repo_name": "Imposter/CurlDump", "id": "cff7321d3bf05bdbd7ce3365a7dd5e82e49ba20c", "size": "686", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Source/Utilities/Indigo/utility/acp_dump.hpp", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "96682" }, { "name": "C++", "bytes": "133632" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <TrufinaLoginRequest xmlns="http://www.trufina.com/truapi/1/0"> <PID><%= Trufina::Config.credentials[:PID] %></PID> <PRT><%= @prt %></PRT> <PAK><%= Trufina::Config.credentials[:PAK] %></PAK> <CancelURL><%= Trufina::Config.endpoints[:cancel] %></CancelURL> <SuccessURL><%= Trufina::Config.endpoints[:success] %></SuccessURL> <FailureURL><%= Trufina::Config.endpoints[:failure] %></FailureURL> <AccessRequest> <Name> <First /> </Name> <Age/> <ResidenceAddress> <State/> </ResidenceAddress> </AccessRequest> <SeedInfo> <Name> <First>John</First> <Surname>Doe</Surname> </Name> <DateOfBirth>1964-09-01</DateOfBirth> <ResidenceAddress> <StreetAddress>1 Main Street</StreetAddress> <StreetAddress>Suite E</StreetAddress> <City>Burlingame</City> <State>CA</State> <PostalCode>94010</PostalCode> </ResidenceAddress> </SeedInfo> </TrufinaLoginRequest>
{ "content_hash": "d677018304969743e24dbb0092e6ec42", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 69, "avg_line_length": 31.125, "alnum_prop": 0.6335341365461847, "repo_name": "kdonovan/trufina", "id": "82e1966ad50b4a45bcbc33acddaa6fbdefaad62e", "size": "996", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "test/fixtures/requests/login_request.xml", "mode": "33188", "license": "mit", "language": [ { "name": "Ruby", "bytes": "31166" } ], "symlink_target": "" }
<?php namespace Atompulse\Bundle\RadBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; class RadBundle extends Bundle { }
{ "content_hash": "4c61dcf6daec53180eb8f2932257d753", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 47, "avg_line_length": 14.444444444444445, "alnum_prop": 0.8, "repo_name": "atompulse/atompulse", "id": "efb4d9579cba6c7bd5c409ad3778b0ba40ba6a0b", "size": "130", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Atompulse/Bundle/RadBundle/RadBundle.php", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "7592" }, { "name": "JavaScript", "bytes": "245612" }, { "name": "PHP", "bytes": "391063" } ], "symlink_target": "" }
@interface VC_RootTable : UITableViewController @end
{ "content_hash": "333f89ccfc79df7d6f554106b9cb5a55", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 47, "avg_line_length": 18, "alnum_prop": 0.8148148148148148, "repo_name": "ZJM6658/TanTanDemo", "id": "bc6f599c6ac966c1ec5e5df17fc549d895f8fa06", "size": "219", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "TanTanDemo/VC_RootTable.h", "mode": "33188", "license": "mit", "language": [ { "name": "Objective-C", "bytes": "56786" } ], "symlink_target": "" }
<?php /** * @link https://github.com/old-town/old-town-workflow * @author Malofeykin Andrey <and-rey2@yandex.ru> */ namespace OldTown\Workflow\Util\PhpShell; use OldTown\PropertySet\PropertySetInterface; use OldTown\Workflow\ConditionInterface; use OldTown\Workflow\Exception\WorkflowException; use OldTown\Workflow\Spi\WorkflowEntryInterface; use OldTown\Workflow\TransientVars\TransientVarsInterface; use OldTown\Workflow\Util\TextUtils; use OldTown\Workflow\WorkflowContextInterface; /** * Class PhpShellConditionProvider * * @package OldTown\Workflow\Util\PhpShell */ class PhpShellConditionProvider implements ConditionInterface, PhpShellProviderInterface { /** * * @param TransientVarsInterface $transientVars * @param array $args * @param PropertySetInterface $ps * @return bool * * @throws \OldTown\Workflow\Exception\WorkflowException * @throws \OldTown\Workflow\Exception\RuntimeException * @throws \OldTown\Workflow\Exception\InvalidArgumentException */ public function passesCondition(TransientVarsInterface $transientVars, array $args = [], PropertySetInterface $ps) { $script = array_key_exists(static::PHP_SCRIPT, $args) ? $args[static::PHP_SCRIPT] : ''; /**@var WorkflowContextInterface $context */ $context = $transientVars->offsetExists('context') ? $transientVars['context'] : null; /**@var WorkflowEntryInterface $entry */ $entry = $transientVars->offsetExists('entry') ? $transientVars['entry'] : null; $i = new Interpreter($script); try { $i->setContextParam('entry', $entry); $i->setContextParam('context', $context); $i->setContextParam('transientVars', $transientVars); $i->setContextParam('propertySet', $ps); $i->setContextParam('args', $args); $o = $i->evalScript(); if (null === $o) { return false; } else { $oStr = $o; if (!settype($o, 'string')) { $errMsg = 'Результат скрипта должен быть строкой либо пребразовываться в строковое значение'; throw new WorkflowException($errMsg); } $result = TextUtils::parseBoolean($oStr); return $result; } } catch (\Exception $e) { $errMsg = 'Ошибка выполнения скрипта-условия'; throw new WorkflowException($errMsg, $e->getCode(), $e); } } }
{ "content_hash": "8ef98dace0c4e32e7825a2f64cf613b4", "timestamp": "", "source": "github", "line_count": 74, "max_line_length": 118, "avg_line_length": 34.33783783783784, "alnum_prop": 0.6296733569460842, "repo_name": "old-town/old-town-workflow", "id": "c5ee04be150806f158339ff9f56b0e4c25906f3a", "size": "2642", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Util/PhpShell/PhpShellConditionProvider.php", "mode": "33188", "license": "mit", "language": [ { "name": "Cucumber", "bytes": "178367" }, { "name": "PHP", "bytes": "575050" } ], "symlink_target": "" }
/*! \file smoothed_aggregation.h * \brief Algebraic multigrid preconditoner based on smoothed aggregation. * */ #pragma once #include <cusp/detail/config.h> #include <cusp/detail/spectral_radius.h> #include <cusp/linear_operator.h> #include <cusp/multilevel.h> #include <cusp/precond/aggregation/smoothed_aggregation_options.h> #include <cusp/relaxation/jacobi.h> #include <vector> // TODO replace with host_vector namespace cusp { namespace precond { namespace aggregation { /*! \addtogroup preconditioners Preconditioners * \ingroup preconditioners * \{ */ template<typename MatrixType> struct sa_level { typedef typename MatrixType::index_type IndexType; typedef typename MatrixType::value_type ValueType; typedef typename MatrixType::memory_space MemorySpace; MatrixType A_; // matrix cusp::array1d<IndexType,MemorySpace> aggregates; // aggregates cusp::array1d<ValueType,MemorySpace> B; // near-nullspace candidates ValueType rho_DinvA; sa_level() : rho_DinvA(0) {} template<typename SA_Level_Type> sa_level(const SA_Level_Type& sa_level) : A_(sa_level.A_), aggregates(sa_level.aggregates), B(sa_level.B), rho_DinvA(sa_level.rho_DinvA) {} }; /*! \p smoothed_aggregation : algebraic multigrid preconditoner based on * smoothed aggregation * */ template <typename IndexType, typename ValueType, typename MemorySpace, typename SmootherType = cusp::relaxation::jacobi<ValueType,MemorySpace>, typename SolverType = cusp::detail::lu_solver<ValueType,cusp::host_memory> > class smoothed_aggregation : public cusp::multilevel< typename amg_container<IndexType,ValueType,MemorySpace>::solve_type, SmootherType, SolverType> { typedef typename amg_container<IndexType,ValueType,MemorySpace>::setup_type SetupMatrixType; typedef typename amg_container<IndexType,ValueType,MemorySpace>::solve_type SolveMatrixType; typedef typename cusp::multilevel<SolveMatrixType,SmootherType,SolverType> Parent; public: const smoothed_aggregation_options<IndexType,ValueType,MemorySpace> & sa_options; const smoothed_aggregation_options<IndexType,ValueType,MemorySpace> default_sa_options; std::vector< sa_level<SetupMatrixType> > sa_levels; template <typename MatrixType> smoothed_aggregation(const MatrixType& A); template <typename MatrixType, typename Options> smoothed_aggregation(const MatrixType& A, const Options& sa_options); template <typename MatrixType> smoothed_aggregation(const MatrixType& A, const cusp::array1d<ValueType,MemorySpace>& B); template <typename MatrixType, typename Options> smoothed_aggregation(const MatrixType& A, const cusp::array1d<ValueType,MemorySpace>& B, const Options& sa_options); template <typename MemorySpace2,typename SmootherType2,typename SolverType2> smoothed_aggregation(const smoothed_aggregation<IndexType,ValueType,MemorySpace2,SmootherType2,SolverType2>& M); protected: template <typename MatrixType, typename ArrayType> void sa_initialize(const MatrixType& A, const ArrayType& B); void extend_hierarchy(void); }; /*! \} */ } // end namespace aggregation } // end namespace precond } // end namespace cusp #include <cusp/precond/aggregation/detail/smoothed_aggregation.inl>
{ "content_hash": "8ac3f680393ab36ac3c8b21d552f4f3f", "timestamp": "", "source": "github", "line_count": 108, "max_line_length": 121, "avg_line_length": 31.333333333333332, "alnum_prop": 0.733451536643026, "repo_name": "misztal/GRIT", "id": "1abb577fdccc98e3ae7306175b5a9779f412b575", "size": "4000", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "3RDPARTY/cusplibrary-master/cusp/precond/aggregation/smoothed_aggregation.h", "mode": "33261", "license": "mit", "language": [ { "name": "C", "bytes": "60469" }, { "name": "C++", "bytes": "7605518" }, { "name": "CMake", "bytes": "80506" }, { "name": "Cuda", "bytes": "383778" }, { "name": "GLSL", "bytes": "2231" }, { "name": "Matlab", "bytes": "50319" }, { "name": "Objective-C", "bytes": "120" }, { "name": "Python", "bytes": "87400" }, { "name": "Shell", "bytes": "3706" } ], "symlink_target": "" }
import React from 'react'; import { shallow, mount } from 'enzyme'; import { expect } from 'chai'; import Immutable from 'immutable'; import sinon from 'sinon'; import { Provider } from 'react-redux'; import configureStore from 'redux-mock-store'; // see: https://github.com/mochajs/mocha/issues/1847 const { describe, it } = global; import Visualizer from '../presenter'; import Help from '../Help'; import { defaultLabels } from '../../../defaults'; describe('<Visualizer />', () => { const sequence = new Immutable.List('ATTTGCGTCG'.split('')); const mockStore = configureStore(); const initialState = { label: { annotation: '' }, selection: { selections: [] }, exon: { exons: new Immutable.List() }, sequence: { positionFrom: 123 }, }; it('renders a SVG element with appropriate dimensions', () => { const wrapper = shallow( <Visualizer sequence={sequence} labels={defaultLabels} onFileSelectClick={() => {}} positionFrom={1} onNucleotideClick={() => {}} onAnnotationClick={() => {}} /> ); expect(wrapper.find('svg')).to.have.length(1); expect(wrapper.instance().state.width).to.equal('100%'); expect(wrapper.instance().state.height).to.equal('100%'); }); it('renders help panel if sequence is empty', () => { const wrapper = mount( <Visualizer sequence={new Immutable.List()} labels={defaultLabels} onFileSelectClick={() => {}} positionFrom={1} onNucleotideClick={() => {}} onAnnotationClick={() => {}} /> ); expect(wrapper.find(Help)).to.have.length(1); expect(wrapper.find('.help')).to.have.length(1); expect(wrapper.find('svg')).to.have.length(0); }); it('adds a listener to window resize', () => { window.addEventListener = sinon.spy(); const wrapper = mount( <Provider store={mockStore(initialState)}> <Visualizer sequence={sequence} labels={defaultLabels} onFileSelectClick={() => {}} positionFrom={1} onNucleotideClick={() => {}} onAnnotationClick={() => {}} /> </Provider> ); expect(window.addEventListener.calledWith('resize')).to.be.true; }); it('removes the resize listener to window', () => { window.addEventListener = sinon.spy(); window.removeEventListener = sinon.spy(); const wrapper = mount( <Provider store={mockStore(initialState)}> <Visualizer sequence={sequence} labels={defaultLabels} onFileSelectClick={() => {}} positionFrom={1} onNucleotideClick={() => {}} onAnnotationClick={() => {}} /> </Provider> ); wrapper.unmount(); expect(window.addEventListener.calledWith('resize')).to.be.true; const listener = window.addEventListener.args[0][1]; expect(window.removeEventListener.calledWith('resize', listener)).to.be .true; }); // SKIPPED it.skip('updates dimensions when receiving new props', () => { // Does not work because of: // - https://github.com/airbnb/enzyme/issues/472 // - https://github.com/airbnb/enzyme/issues/183 const wrapper = mount( <Visualizer sequence={sequence} labels={defaultLabels} onFileSelectClick={() => {}} positionFrom={1} onNucleotideClick={() => {}} onAnnotationClick={() => {}} /> ); expect(wrapper.state('nucleotidesPerRow')).to.equal(80); // test starts here wrapper.setProps({ labels: defaultLabels, sequence: new Immutable.List(), }); // Well... it works but we cannot assert something else since // it is not possible to get a valid value for `clientWidth` in // the method `updateVisualizerDimensions` of the component expect(wrapper.state('nucleotidesPerRow')).to.not.equal(80); }); });
{ "content_hash": "d3d0496f2e10da7e20549fce7b17dc08", "timestamp": "", "source": "github", "line_count": 137, "max_line_length": 75, "avg_line_length": 28.73722627737226, "alnum_prop": 0.5979171958343916, "repo_name": "TailorDev/franklin", "id": "0e4aa192b65a04261fce1e15353d6e837a2e10d0", "size": "3937", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/components/Visualizer/__tests__/Visualizer-test.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "20360" }, { "name": "HTML", "bytes": "938" }, { "name": "JavaScript", "bytes": "224135" }, { "name": "Shell", "bytes": "263" } ], "symlink_target": "" }
from server import db class AccessCodes(db.Model): id = db.Column(db.Integer, primary_key=True) code = db.Column(db.String(12)) used = db.Column(db.Integer) def __init__(self, code, used): self.code = code self.used = used def __repr__(self): return '<AccessCode %r>' % self.code class Snippets(db.Model): id = db.Column(db.Integer, primary_key=True) type = db.Column(db.String(45)) filename = db.Column(db.String(45)) output = db.Column(db.String(45)) def __init__(self, type, filename): self.type = type self.filename = filename def __repr__(self): return '<Snippet %r>' % self.filename class Trials(db.Model): id = db.Column(db.Integer, primary_key=True) access_code = db.Column(db.String(12)) snippet_id = db.Column(db.Integer) time_elapsed = db.Column(db.Integer) is_correct = db.Column(db.Integer) def __init__(self, access_code, snippet_id, time_elapsed, is_correct): self.access_code = access_code self.snippet_id = snippet_id self.time_elapsed = time_elapsed self.is_correct = is_correct def __repr__(self): return '<Trial %r>' % self.time_elapsed class Survey(db.Model): id = db.Column(db.Integer, primary_key=True) code = db.Column(db.String(12)) proficiency = db.Column(db.Integer) experience = db.Column(db.String(10)) education = db.Column(db.String(45)) interrupted = db.Column(db.Integer) def __init__(self, code, proficiency, experience, education, interrupted): self.code = code self.proficiency = proficiency self.experience = experience self.education = education self.interrupted = interrupted def __repr__(self): return '<Survey %r>' % self.code
{ "content_hash": "bf061526ee449abbbcf9f04adb2a3a73", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 78, "avg_line_length": 30.333333333333332, "alnum_prop": 0.6241758241758242, "repo_name": "davidadamojr/codescale", "id": "6a3020d970b43bff29ed41a25d6a3442b612fdd0", "size": "1820", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "api/models.py", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "504" }, { "name": "JavaScript", "bytes": "13681" }, { "name": "Python", "bytes": "6110" } ], "symlink_target": "" }
React's native state system works well for simple components with transient state (e.g. whether you're hovering over a button), but it becomes less useful when you want to be able to do things like coordinate state between multiple components or to export/serialize and load back the state. In Franchise's case, we often want to persist the contents of our cells, the results we're visualizing, and etc. A strategy that works for that case is to have a single source of truth at the root of the component hierarchy, and to simply different pieces of that truth to the sub-components through props. We don't want to generally pass all the information to all components, because that eliminates our ability to deliberately not re-render particular subtrees (we don't want to re-render components that don't change for performance reasons). In addition, for updates— we could choose to pass each component updater methods for all the pieces of information that they have access to. However, often event handlers and other functions need to be able to modify fairly different parts of the tree than they necessarily need to view. This is where the Franchise state management system differs from Redux. To update the state in Redux, you first create an action directly, or with an action creator, that then gets handled by a hierarchy of reducers. For Franchise's system, we just get access to the global state updater and update it however we choose to. Also, since we accomplish persistence by serializing the application state— we try to keep it made out of plain objects instead of class values and other tricky stuff. For example, the `Cell` component is passed props for view, connect, and deltas — so that when adjacent cells are updated, it doesn't bother re-rendering. Within a render function, no react component has access to state outside of that which it's being passed through its props. Additionally, within a render function we're not allowed to write to the state store (this is just a manifestation of the React no-render-side-effects principle). However, within event handlers and other function calls that happen outside of the render loop, we have full access (both read and write) to the entire application state. One example of this, is we sometimes need to get access to the current database connector (e.g. SQLite, Postgres, GraphQL, etc). If we're trying to get access within a render method, you'd need to ensure that you're being passed the `.connect.active` part of the state tree and pass it into the `DB()` function (which simply looks up the instance corresponding to that ID). However, if you're in some event handler, or some other piece of code that isn't explicitly in the render domain, you can simply call getDB() (which reads `.connect.active` from the global state store). ## State Overview ``` config graphql credentials endpoint: "http://whatever" sqlite credentials etc... open: true (whether or not the config bar at the top is expanded) connect active: "sqlite" (the ID of the database connector that is currently in use) status: "connected" error: null deltas changes: [] (a list of changes that that the user has created with the WYSIWYG interface, that can be committed to the database with a synthesized query) open: false (whether or not the dialog is expanded) notebook layout[] items[] error: null (errors associated with running this particular query) id: "sdfe8" query: "sdf" selected: "table" (this is the name of the selected view widget) suggestedName: (this is the name of the query that was automatically generated— used for referencing this query from other queries) name: (this is the user-input name of a query— used for referencing this query from other queries) result columns: (array of columns) values: (array of rows, each containing an array of values for each column) trash open: false (whether or not the trash view/archived cells pane is expanded) cells (the same stuff as within notebook.layout.items) ``` If you're developing with franchise, you can open up the developer console and run STATE.get() to access the current global application state. Outside of the developer console, you'd access with with "State" (and you'll need to import it first) ## Combinator System The particular way we retrieve and modify state is with a little combinator language— you don't generally need to understand the complete mechanics of it in order to use it (but it's a pretty neat and powerful way of accessing stuff— someone who knows math/haskell better would probably call it a variation of a "Lens"). In cell/index.js we have 3 notable functions: cellById, updateCell, and getCell. Note that these functions can only be used outside a render function (event handlers are allowed— as it's not actually being called in render time). You can usually just get by with updateCell(cellId, fieldsToChange) — this basically works the way this.setState does in react components (and it'll automatically trigger a re-render of the app). And likewise, you can use getCell(cellId) if you want to read the contents without explicitly writing to it. ``` export function cellById(cellId){ return ['notebook', 'layout', U.each, 'items', U.id(cellId)] } export function updateCell(cellId, update){ State.apply(...cellById(cellId), U.merge(update)) } export function getCell(cellId){ return State.get(...cellById(cellId)) } ``` Essentially we have three methods— `State.getAll`, `State.get` and `State.apply`. `State.get` is just shorthand for `State.getAll()[0]`. Each of those arguments is a little function (a "combinator") that chains together to select 0 or more bits of state based on the previous matches. For example, if we look at how cellById works— we start off with "notebook" which is just a shorthand for U.safe_key("notebook"). U.safe_key("notebook") returns a function where— if the input is an object, it'll return .notebook— and otherwise null. When we chain U.safe_key("notebook"), U.safe_key("layout") — that's essentially equivalent to .notebook.layout (with the notable difference that it doesn't throw "can not read property of undefined" if notebook doesn't exist). However, chaining doesn't just have to pass a single item forward— in fact it can pass an unlimited number of possibilities forward. So when it gets to U.each— that means at this point we've selected all the different rows of the layout. Then for each of these rows, we select all the columns with U.safe_key("items"). And finally we filter by objects which have an "id" property that matches cellId. When using `State.apply` your last argument can be something like U.merge(obj), or U.replace(obj) — where merge merges those fields into the elements at the cursor, and `replace` replaces it altogether. In fact you can also do a custom function which is just an arbitrary reducer: if you've selected a set of numbers that you want to increment, just pass in x => x + 1 as your last argument to increment them all. It's a rather powerful system. For instance, if you'd like to prepend the word "hello" to every cell on every other row in the notebook, you could run ``` State.apply("notebook", "layout", U.match((k, i) => i % 2 == 0), "items", "query", k => "hello " + k) ``` You can see the definition of the combinator system at (state/update.js). The core of it is only 10 lines.
{ "content_hash": "42192c5c96aa0a37f49ea4edc3c1683b", "timestamp": "", "source": "github", "line_count": 95, "max_line_length": 748, "avg_line_length": 79.85263157894737, "alnum_prop": 0.7496704455576061, "repo_name": "HVF/franchise", "id": "fb19a7bddc3929fa739fb4d74f66eac343930129", "size": "7660", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/state/README.md", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "26480" }, { "name": "Dockerfile", "bytes": "382" }, { "name": "HTML", "bytes": "6117" }, { "name": "JavaScript", "bytes": "546179" }, { "name": "Shell", "bytes": "78" }, { "name": "TSQL", "bytes": "11212" } ], "symlink_target": "" }
********* gopdf ********* gopdf is a Go library for creating PDF files. This repository was forked from bitbucket.org/zombiezen/gopdf/pdf To install gopdf:: go get github.com/bouticfactory/gopdf gopdf is released under a 2-clause BSD license.
{ "content_hash": "67e3e674ba16501e09f8706206ee95a8", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 65, "avg_line_length": 21.083333333333332, "alnum_prop": 0.7154150197628458, "repo_name": "bouticfactory/gopdf", "id": "fc213bbaeb762f22122206c57d712fa80021bc70", "size": "253", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.rst", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "Go", "bytes": "65842" }, { "name": "Shell", "bytes": "745" } ], "symlink_target": "" }
@interface XPNSXMLNodeImpl : XPAbstractNodeWrapper + (id <XPNodeInfo>)nodeInfoWithNode:(void *)node; - (id <XPNodeInfo>)initWithNode:(void *)node; @property (nonatomic, retain) id node; @end
{ "content_hash": "62804e8703747847311c2ad88712512b", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 50, "avg_line_length": 27.571428571428573, "alnum_prop": 0.7512953367875648, "repo_name": "itod/panthro", "id": "557c3465a35d36f5a1de932ad89498d2446490d7", "size": "327", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "nsxml/XPNSXMLNodeImpl.h", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "8421842" }, { "name": "C++", "bytes": "21793" }, { "name": "Makefile", "bytes": "964" }, { "name": "Objective-C", "bytes": "954930" }, { "name": "Shell", "bytes": "7333" } ], "symlink_target": "" }
package OptimizationTests.ShortMethodsInliningNonVirtualInvokes.InvokeStaticACharThrowNullGet_001; // The test checks that stack after NullPointerException occurs is correct despite inlining class Main { final static int iterations = 10; static char[] thingiesArray = new char[iterations]; public static int getThingies(char[] arr, int i) { return arr[i]; } public static void setThingies(char[] arr, char newThingy, int i) { arr[i] = newThingy; } public static void main(String[] args) { char nextThingy = 'a'; char sumArrElements = '0'; for(int i = 0; i < iterations; i++) { thingiesArray[i] = (char) (nextThingy + 1); sumArrElements = (char)(sumArrElements + thingiesArray[i]); } for(int i = 0; i < iterations + 1; i++) { if (i == iterations) thingiesArray = null; nextThingy = (char)(getThingies(thingiesArray, i) + 1); setThingies(thingiesArray, nextThingy, i); } } }
{ "content_hash": "a7c3eb9d9fb96ab7ab5e8ea0c90e137a", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 98, "avg_line_length": 32.03030303030303, "alnum_prop": 0.6064333017975402, "repo_name": "android-art-intel/Nougat", "id": "6aea1502f2d9a3206eb27976e11092ba74f98b60", "size": "1662", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "art-extension/opttests/src/OptimizationTests/ShortMethodsInliningNonVirtualInvokes/InvokeStaticACharThrowNullGet_001/Main.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Assembly", "bytes": "5001041" }, { "name": "C", "bytes": "289114" }, { "name": "C++", "bytes": "18340188" }, { "name": "CSS", "bytes": "892" }, { "name": "HTML", "bytes": "6648" }, { "name": "Java", "bytes": "8319441" }, { "name": "JavaScript", "bytes": "451" }, { "name": "Makefile", "bytes": "246269" }, { "name": "PHP", "bytes": "24634" }, { "name": "Perl", "bytes": "115844" }, { "name": "Python", "bytes": "230897" }, { "name": "Shell", "bytes": "1287151" }, { "name": "Smali", "bytes": "444462" } ], "symlink_target": "" }
<?php namespace k1lib\crudlexs; class object_base_strings { /** * __construct() */ static $error_bad_auth_code = "Bad, bad! auth code"; static $alert_empty_auth_code = "Auth code can't be empty"; // static $error_array_not_compatible = "The array is not compatible"; // static $error_no_table_data = "Can't work without table data loaded first"; // static $error_no_session_random = "There is not rand number on session data"; // static $error_no_row_keys_text = "The row keys can't be empty"; static $error_no_row_keys_array = "The row keys array can't be empty"; } class creating_strings { static $button_submit = "Insert"; static $button_cancel = "Cancel"; static $error_file_upload = "File upload error : "; static $error_new_password_not_match = "New password and confirmation must be equal"; static $error_actual_password_not_match = "Actual password is incorrect"; static $data_inserted = "Data saved"; static $data_not_inserted = "Data not saved"; } class listing_strings { /** * * @var string You can use: --totalrowsfilter--, --totalrows--, --firstrownumber--, --lastrownumber-- */ static $stats_default_message = "Showing --totalrowsfilter-- of --totalrows-- (rows: --firstrownumber-- to --lastrownumber--)"; // static $no_fk_search_here = "Search on another table is not possible here, use the Key value to search"; } class search_helper_strings { static $button_submit = "Search"; static $button_cancel = "Exit"; } class updating_strings { static $button_submit = "Update"; static $button_cancel = "Back"; static $password_set_successfully = "New password stored"; static $data_updated = "Data updated"; static $data_not_updated = "Data not updated"; } class input_helper_strings { static $button_remove = "Remove --fieldvalue--"; static $select_choose_option = "Select an option..."; static $input_date_placeholder = "Click here to pick a date"; static $input_fk_placeholder = "Use the reference ID"; }
{ "content_hash": "14b7174831e3ddc114f9fd4da651f6c9", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 131, "avg_line_length": 29.13888888888889, "alnum_prop": 0.6539561487130601, "repo_name": "klan1/k1.lib", "id": "ce077699a4c0656a8ef65d128f76129b21a8d28d", "size": "2098", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/__lang/en/crudlexs-object-classes.php", "mode": "33261", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "438" }, { "name": "JavaScript", "bytes": "642" }, { "name": "PHP", "bytes": "421689" }, { "name": "Shell", "bytes": "42" } ], "symlink_target": "" }
set -e # Build off the git repo. docker build \ -t auto-makemkv \ https://github.com/redeemed2011/makemkv.git # Run the container. It should attempt to execute MakeMKV on the device then self-destruct. docker run --rm \ --device=/dev/cdrom \ -e MKV_GID=$(id -g ${USER}) \ -e MKV_UID=$(id -u ${USER}) \ -v /data/makemkv:/output \ auto-makemkv
{ "content_hash": "ea964e00ed1c5dd63df7bdc3cb7f19b7", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 91, "avg_line_length": 25.571428571428573, "alnum_prop": 0.659217877094972, "repo_name": "redeemed2011/bb-file-server", "id": "eeb726e7d6663d943cd3b33a507471c0a48b72c0", "size": "379", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "run-auto-makemkv.sh", "mode": "33261", "license": "mit", "language": [ { "name": "Shell", "bytes": "9480" } ], "symlink_target": "" }
""" Class for reading data from NeuroExplorer (.nex) Documentation for dev : http://www.neuroexplorer.com/code.html Depend on: scipy Supported : Read Author: sgarcia,luc estebanez """ import os import struct import numpy as np import quantities as pq from neo.io.baseio import BaseIO from neo.core import Segment, AnalogSignal, SpikeTrain, EpochArray, EventArray class NeuroExplorerIO(BaseIO): """ Class for reading nex file. Usage: >>> from neo import io >>> r = io.NeuroExplorerIO(filename='File_neuroexplorer_1.nex') >>> seg = r.read_segment(lazy=False, cascade=True) >>> print seg.analogsignals # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE [<AnalogSignal(array([ 39.0625 , 0. , 0. , ..., -26.85546875, ... >>> print seg.spiketrains # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE [<SpikeTrain(array([ 2.29499992e-02, 6.79249987e-02, 1.13399997e-01, ... >>> print seg.eventarrays # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE [<EventArray: @21.1967754364 s, @21.2993755341 s, @21.350725174 s, @21.5048999786 s, ... >>> print seg.epocharrays # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE [<neo.core.epocharray.EpochArray object at 0x10561ba90>, <neo.core.epocharray.EpochArray object at 0x10561bad0>] """ is_readable = True is_writable = False supported_objects = [Segment , AnalogSignal, SpikeTrain, EventArray, EpochArray] readable_objects = [ Segment] writeable_objects = [] has_header = False is_streameable = False # This is for GUI stuf : a definition for parameters when reading. read_params = { Segment : [ ] } write_params = None name = 'NeuroExplorer' extensions = [ 'nex' ] mode = 'file' def __init__(self , filename = None) : """ This class read a nex file. Arguments: filename : the filename to read you can pu what ever it do not read anythings """ BaseIO.__init__(self) self.filename = filename def read_segment(self, lazy = False, cascade = True, ): fid = open(self.filename, 'rb') globalHeader = HeaderReader(fid , GlobalHeader ).read_f(offset = 0) #~ print globalHeader #~ print 'version' , globalHeader['version'] seg = Segment() seg.file_origin = os.path.basename(self.filename) seg.annotate(neuroexplorer_version = globalHeader['version']) seg.annotate(comment = globalHeader['comment']) if not cascade : return seg offset = 544 for i in range(globalHeader['nvar']): entityHeader = HeaderReader(fid , EntityHeader ).read_f(offset = offset+i*208) entityHeader['name'] = entityHeader['name'].decode().replace('\x00','') #print 'i',i, entityHeader['type'] if entityHeader['type'] == 0: # neuron if lazy: spike_times = [ ]*pq.s else: spike_times= np.memmap(self.filename , np.dtype('i4') ,'r' , shape = (entityHeader['n'] ), offset = entityHeader['offset'], ) spike_times = spike_times.astype('f8')/globalHeader['freq']*pq.s sptr = SpikeTrain( times= spike_times, t_start = globalHeader['tbeg']/globalHeader['freq']*pq.s, t_stop = globalHeader['tend']/globalHeader['freq']*pq.s, name = entityHeader['name'], ) if lazy: sptr.lazy_shape = entityHeader['n'] sptr.annotate(channel_index = entityHeader['WireNumber']) seg.spiketrains.append(sptr) if entityHeader['type'] == 1: # event if lazy: event_times = [ ]*pq.s else: event_times= np.memmap(self.filename , np.dtype('i4') ,'r' , shape = (entityHeader['n'] ), offset = entityHeader['offset'], ) event_times = event_times.astype('f8')/globalHeader['freq'] * pq.s labels = np.array(['']*event_times.size, dtype = 'S') evar = EventArray(times = event_times, labels=labels, channel_name = entityHeader['name'] ) if lazy: evar.lazy_shape = entityHeader['n'] seg.eventarrays.append(evar) if entityHeader['type'] == 2: # interval if lazy: start_times = [ ]*pq.s stop_times = [ ]*pq.s else: start_times= np.memmap(self.filename , np.dtype('i4') ,'r' , shape = (entityHeader['n'] ), offset = entityHeader['offset'], ) start_times = start_times.astype('f8')/globalHeader['freq']*pq.s stop_times= np.memmap(self.filename , np.dtype('i4') ,'r' , shape = (entityHeader['n'] ), offset = entityHeader['offset']+entityHeader['n']*4, ) stop_times = stop_times.astype('f')/globalHeader['freq']*pq.s epar = EpochArray(times = start_times, durations = stop_times - start_times, labels = np.array(['']*start_times.size, dtype = 'S'), channel_name = entityHeader['name']) if lazy: epar.lazy_shape = entityHeader['n'] seg.epocharrays.append(epar) if entityHeader['type'] == 3: # spiketrain and wavefoms if lazy: spike_times = [ ]*pq.s waveforms = None else: spike_times= np.memmap(self.filename , np.dtype('i4') ,'r' , shape = (entityHeader['n'] ), offset = entityHeader['offset'], ) spike_times = spike_times.astype('f8')/globalHeader['freq'] * pq.s waveforms = np.memmap(self.filename , np.dtype('i2') ,'r' , shape = (entityHeader['n'] , 1,entityHeader['NPointsWave']), offset = entityHeader['offset']+entityHeader['n'] *4, ) waveforms = (waveforms.astype('f')* entityHeader['ADtoMV'] + entityHeader['MVOffset'])*pq.mV t_stop = globalHeader['tend']/globalHeader['freq']*pq.s if spike_times.size>0: t_stop = max(t_stop, max(spike_times)) sptr = SpikeTrain( times = spike_times, t_start = globalHeader['tbeg']/globalHeader['freq']*pq.s, #~ t_stop = max(globalHeader['tend']/globalHeader['freq']*pq.s,max(spike_times)), t_stop = t_stop, name = entityHeader['name'], waveforms = waveforms, sampling_rate = entityHeader['WFrequency']*pq.Hz, left_sweep = 0*pq.ms, ) if lazy: sptr.lazy_shape = entityHeader['n'] sptr.annotate(channel_index = entityHeader['WireNumber']) seg.spiketrains.append(sptr) if entityHeader['type'] == 4: # popvectors pass if entityHeader['type'] == 5: # analog timestamps= np.memmap(self.filename , np.dtype('i4') ,'r' , shape = (entityHeader['n'] ), offset = entityHeader['offset'], ) timestamps = timestamps.astype('f8')/globalHeader['freq'] fragmentStarts = np.memmap(self.filename , np.dtype('i4') ,'r' , shape = (entityHeader['n'] ), offset = entityHeader['offset'], ) fragmentStarts = fragmentStarts.astype('f8')/globalHeader['freq'] t_start = timestamps[0] - fragmentStarts[0]/float(entityHeader['WFrequency']) del timestamps, fragmentStarts if lazy : signal = [ ]*pq.mV else: signal = np.memmap(self.filename , np.dtype('i2') ,'r' , shape = (entityHeader['NPointsWave'] ), offset = entityHeader['offset'], ) signal = signal.astype('f') signal *= entityHeader['ADtoMV'] signal += entityHeader['MVOffset'] signal = signal*pq.mV anaSig = AnalogSignal(signal=signal, t_start=t_start * pq.s, sampling_rate= entityHeader['WFrequency'] * pq.Hz, name=entityHeader['name'], channel_index=entityHeader['WireNumber']) if lazy: anaSig.lazy_shape = entityHeader['NPointsWave'] seg.analogsignals.append( anaSig ) if entityHeader['type'] == 6: # markers : TO TEST if lazy: times = [ ]*pq.s labels = np.array([ ], dtype = 'S') markertype = None else: times= np.memmap(self.filename , np.dtype('i4') ,'r' , shape = (entityHeader['n'] ), offset = entityHeader['offset'], ) times = times.astype('f8')/globalHeader['freq'] * pq.s fid.seek(entityHeader['offset'] + entityHeader['n']*4) markertype = fid.read(64).replace('\x00','') labels = np.memmap(self.filename, np.dtype('S' + str(entityHeader['MarkerLength'])) ,'r', shape = (entityHeader['n'] ), offset = entityHeader['offset'] + entityHeader['n']*4 + 64 ) ea = EventArray( times = times, labels = labels.view(np.ndarray), name = entityHeader['name'], channel_index = entityHeader['WireNumber'], marker_type = markertype ) if lazy: ea.lazy_shape = entityHeader['n'] seg.eventarrays.append(ea) seg.create_many_to_one_relationship() return seg GlobalHeader = [ ('signature' , '4s'), ('version','i'), ('comment','256s'), ('freq','d'), ('tbeg','i'), ('tend','i'), ('nvar','i'), ] EntityHeader = [ ('type' , 'i'), ('varVersion','i'), ('name','64s'), ('offset','i'), ('n','i'), ('WireNumber','i'), ('UnitNumber','i'), ('Gain','i'), ('Filter','i'), ('XPos','d'), ('YPos','d'), ('WFrequency','d'), ('ADtoMV','d'), ('NPointsWave','i'), ('NMarkers','i'), ('MarkerLength','i'), ('MVOffset','d'), ('dummy','60s'), ] MarkerHeader = [ ('type' , 'i'), ('varVersion','i'), ('name','64s'), ('offset','i'), ('n','i'), ('WireNumber','i'), ('UnitNumber','i'), ('Gain','i'), ('Filter','i'), ] class HeaderReader(): def __init__(self,fid ,description ): self.fid = fid self.description = description def read_f(self, offset =0): self.fid.seek(offset) d = { } for key, fmt in self.description : val = struct.unpack(fmt , self.fid.read(struct.calcsize(fmt))) if len(val) == 1: val = val[0] else : val = list(val) d[key] = val return d
{ "content_hash": "acfc8f9ad5a6fea0ce7ca507332a630c", "timestamp": "", "source": "github", "line_count": 340, "max_line_length": 129, "avg_line_length": 40.826470588235296, "alnum_prop": 0.4169728405734457, "repo_name": "guangxingli/python-neo", "id": "e3364298b83ce50292b1d1b10db0e7cb65df5110", "size": "13905", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "neo/io/neuroexplorerio.py", "mode": "33261", "license": "bsd-3-clause", "language": [ { "name": "Python", "bytes": "1369197" } ], "symlink_target": "" }
SYNONYM #### According to Database of Vascular Plants of Canada (VASCAN) #### Published in null #### Original name null ### Remarks null
{ "content_hash": "bdd2ab272d4db94c49e3ead474be3272", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 46, "avg_line_length": 10.76923076923077, "alnum_prop": 0.7, "repo_name": "mdoering/backbone", "id": "ae4b98d5b0663682ebd6d95a5032668753538dd1", "size": "187", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Magnoliophyta/Magnoliopsida/Rosales/Rosaceae/Rubus/Rubus idaeus/ Syn. Batidea itascica/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
package io.cloudslang.content.active_directory.services.users; import io.cloudslang.content.active_directory.entities.AuthenticateUserInput; import io.cloudslang.content.active_directory.utils.CustomSSLSocketFactory; import io.cloudslang.content.active_directory.utils.LDAPQuery; import io.cloudslang.content.active_directory.utils.ResultUtils; import javax.naming.NamingEnumeration; import javax.naming.directory.DirContext; import javax.naming.directory.SearchControls; import javax.naming.directory.SearchResult; import java.util.Map; import static io.cloudslang.content.constants.OutputNames.*; import static io.cloudslang.content.active_directory.utils.ResultUtils.replaceInvalidXMLCharacters; public class AuthenticateUserService { public Map<String, String> execute(AuthenticateUserInput input) { Map<String, String> results = ResultUtils.createNewResultsEmptyMap(); try { LDAPQuery ldap = new LDAPQuery(); String username = input.getUsername(); String rootDN = input.getRootDistinguishedName(); DirContext ctx; if (input.getProtocol().toLowerCase().trim().equals(input.getProtocol().toLowerCase())) { if (input.getTrustAllRoots()) { ctx = ldap.MakeDummySSLLDAPConnection(input.getHost(), input.getUsername(), input.getPassword(), input.getTimeout(), input.getTlsVersion(), input.getAllowedCiphers(), input.getProxyHost(), input.getProxyPort(), input.getProxyUsername(), input.getProxyPassword()); } else { ctx = ldap.MakeSSLLDAPConnection(input.getHost(), input.getUsername(), input.getPassword(), input.getTrustKeystore(), input.getTrustPassword(), input.getTimeout(), input.getTlsVersion(), input.getAllowedCiphers(), input.getProxyHost(), input.getProxyPort(), input.getProxyUsername(), input.getProxyPassword(), input.getX509HostnameVerifier()); } } else { ctx = ldap.MakeLDAPConnection(input.getHost(), input.getUsername(), input.getPassword(), input.getTimeout(), input.getProxyHost(), input.getProxyPort(), input.getProxyUsername(), input.getProxyPassword()); } // Specify the ids of the attributes to return String attrIDs[] = {"distinguishedName"}; SearchControls ctls = new SearchControls(); ctls.setReturningAttributes(attrIDs); ctls.setSearchScope(SearchControls.SUBTREE_SCOPE); String user = username.substring(username.lastIndexOf("\\") + 1); NamingEnumeration<?> result = ctx.search(rootDN, "(sAMAccountName=" + user + ")", ctls); // assume that the user is not authenticated results.put(RETURN_RESULT, "Authentication Failed."); results.put(RETURN_CODE, "-1"); if (result.hasMoreElements()) { // the user is successfully authenticated String res = ((SearchResult) result.next()).getAttributes().get("distinguishedName").get(0).toString(); results.put(RETURN_RESULT, "Successful Authentication: user DN=" + res); results.put(RETURN_CODE, "0"); } ctx.close(); } catch (Exception e) { Exception exception = CustomSSLSocketFactory.getException(); if (exception == null) exception = e; results.put(EXCEPTION, exception.toString()); results.put(RETURN_RESULT, replaceInvalidXMLCharacters(exception.getMessage())); results.put(RETURN_CODE, "-1"); } return results; } }
{ "content_hash": "8ded22c788a3f3c3ee145b44d5a8bd1e", "timestamp": "", "source": "github", "line_count": 80, "max_line_length": 140, "avg_line_length": 47.4875, "alnum_prop": 0.639642011055541, "repo_name": "CloudSlang/cs-actions", "id": "89e9d18dd7c31c3a755859887aade380ae8e95e3", "size": "4418", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "cs-active-directory/src/main/java/io/cloudslang/content/active_directory/services/users/AuthenticateUserService.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "168" }, { "name": "Java", "bytes": "10254264" }, { "name": "Scala", "bytes": "480429" }, { "name": "XSLT", "bytes": "544" } ], "symlink_target": "" }
// ********************************************************************** // // <copyright> // // BBN Technologies // 10 Moulton Street // Cambridge, MA 02138 // (617) 873-8000 // // Copyright (C) BBNT Solutions LLC. All rights reserved. // // </copyright> // ********************************************************************** // // $Source: /cvs/distapps/openmap/src/openmap/com/bbn/openmap/layer/vpf/DcwCrossTileID.java,v $ // $RCSfile: DcwCrossTileID.java,v $ // $Revision: 1.4 $ // $Date: 2005/08/09 19:29:39 $ // $Author: dietrick $ // // ********************************************************************** package com.bbn.openmap.layer.vpf; import java.io.EOFException; import java.io.IOException; import com.bbn.openmap.MoreMath; import com.bbn.openmap.io.BinaryFile; import com.bbn.openmap.io.FormatException; /** * Encapsulate the VPF Cross-Tile identifier primitive datatype. The * cross-tile identifier relates map features that cross multiple * tiles. <br> * Note: Mil-Std-2407 cross tile ids have a fourth, unused field. This * class will read that field, but does not use it. */ public class DcwCrossTileID { /** the 1-byte length specifier for the rest of the values... */ //private int funkyDcwKeyValue = -1; /** the key for this tile */ final public int currentTileKey; /** the id for the connected tile */ final public int nextTileID; /** the key in the adjoining tile */ final public int nextTileKey; /** unused value in VPF... */ //private int unusedDcwKey = -1; /** * Construct a DcwCrossTileID * * @param currentTileKey primitive ID in current tile * @param nextTileID tile ID * @param nextTileKey primitive ID in nextTileID */ public DcwCrossTileID(int currentTileKey, int nextTileID, int nextTileKey) { this.currentTileKey = currentTileKey; this.nextTileID = nextTileID; this.nextTileKey = nextTileKey; } /** * Construct a DcwCrossTileID from the specified input stream. * * @param in the filestream to construct from * @exception FormatException some error was detected while * reading the info for the column. * @exception EOFException EOF was encountered before reading any * data */ public DcwCrossTileID(BinaryFile in) throws FormatException, EOFException { int format; try { format = in.read(); } catch (IOException ioe) { throw new FormatException(ioe.getMessage()); } if (format == -1) { throw new EOFException(); } try { currentTileKey = readIntegerByKey(in, format >> 6); nextTileID = readIntegerByKey(in, format >> 4); nextTileKey = readIntegerByKey(in, format >> 2); /*int unusedDcwKey = */readIntegerByKey(in, format); } catch (EOFException e) { throw new FormatException("DcwCrossTileID: unexpected EOD " + e.getMessage()); } } /** * Reads an integer from the input stream * * @param in the stream to read from * @param key specifies the number of bytes to read (based on * bottom 2 bits) * @return the integer read. (-1 for a zero-length field) * @exception FormatException internal consistency failure * @exception EOFException hit end-of-file while reading data */ private int readIntegerByKey(BinaryFile in, int key) throws FormatException, EOFException { switch (key & 0x3) { case 0: return -1; case 1: { int byteval; try { byteval = in.read(); } catch (IOException ioe) { throw new FormatException(ioe.getMessage()); } if (byteval == -1) { throw new EOFException(); } return byteval; } case 2: return MoreMath.signedToInt(in.readShort()); case 3: return in.readInteger(); } throw new FormatException("This can't happen"); } /** * produce a nice printed version of all our contained information * * @return a nice little string */ public String toString() { StringBuffer output = new StringBuffer(); output.append(currentTileKey).append("/"); if ((nextTileID != -1) && (nextTileKey != -1)) { output.append(nextTileID).append(","); output.append(nextTileKey); } return output.toString(); } }
{ "content_hash": "e78091ba534daad9e5cf2cfa777aaecf", "timestamp": "", "source": "github", "line_count": 144, "max_line_length": 95, "avg_line_length": 32.236111111111114, "alnum_prop": 0.5710900473933649, "repo_name": "d2fn/passage", "id": "d634a3d439050be59fd2aa047c097243d4dc2b35", "size": "4642", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/com/bbn/openmap/layer/vpf/DcwCrossTileID.java", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "20513" }, { "name": "Java", "bytes": "16747828" }, { "name": "Perl", "bytes": "2123" }, { "name": "Shell", "bytes": "1070" } ], "symlink_target": "" }
module Sectioned class Engine < ::Rails::Engine isolate_namespace Sectioned end end
{ "content_hash": "54af2c7c6af52a28470edddc5a3bfd82", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 32, "avg_line_length": 18.4, "alnum_prop": 0.7391304347826086, "repo_name": "etewiah/sectioned-discourse-plugin", "id": "f92d5c906dbc458d6798cfc5c4e6a8d99f796cab", "size": "92", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "lib/sectioned/engine.rb", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "5773" }, { "name": "JavaScript", "bytes": "13491" }, { "name": "Ruby", "bytes": "9840" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <mapper namespace="com.demo.base.security.dao.SysAuthoritiesDao" > <resultMap id="BaseResultMap" type="com.demo.base.security.entity.SysAuthorities" > <id column="authority_id" property="authorityId" jdbcType="VARCHAR" /> <result column="authority_name" property="authorityName" jdbcType="VARCHAR" /> <result column="authority_desc" property="authorityDesc" jdbcType="VARCHAR" /> <result column="enabled" property="enabled" jdbcType="INTEGER" /> <result column="module" property="module" jdbcType="VARCHAR" /> </resultMap> <sql id="Example_Where_Clause" > <where > <foreach collection="oredCriteria" item="criteria" separator="or" > <if test="criteria.valid" > <trim prefix="(" suffix=")" prefixOverrides="and" > <foreach collection="criteria.criteria" item="criterion" > <choose > <when test="criterion.noValue" > and ${criterion.condition} </when> <when test="criterion.singleValue" > and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue" > and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue" > and ${criterion.condition} <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," > #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Update_By_Example_Where_Clause" > <where > <foreach collection="example.oredCriteria" item="criteria" separator="or" > <if test="criteria.valid" > <trim prefix="(" suffix=")" prefixOverrides="and" > <foreach collection="criteria.criteria" item="criterion" > <choose > <when test="criterion.noValue" > and ${criterion.condition} </when> <when test="criterion.singleValue" > and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue" > and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue" > and ${criterion.condition} <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," > #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Base_Column_List" > authority_id, authority_name, authority_desc, enabled, module </sql> <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.demo.base.security.entity.SysAuthoritiesExample" > select <if test="distinct" > distinct </if> <include refid="Base_Column_List" /> from sys_authorities <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null" > order by ${orderByClause} </if> <if test="page != null" > limit #{page.pageSize} offset #{page.begin} </if> </select> <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" > select <include refid="Base_Column_List" /> from sys_authorities where authority_id = #{authorityId,jdbcType=VARCHAR} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.String" > delete from sys_authorities where authority_id = #{authorityId,jdbcType=VARCHAR} </delete> <delete id="deleteByExample" parameterType="com.demo.base.security.entity.SysAuthoritiesExample" > delete from sys_authorities <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="com.demo.base.security.entity.SysAuthorities" > insert into sys_authorities (authority_id, authority_name, authority_desc, enabled, module) values (#{authorityId,jdbcType=VARCHAR}, #{authorityName,jdbcType=VARCHAR}, #{authorityDesc,jdbcType=VARCHAR}, #{enabled,jdbcType=INTEGER}, #{module,jdbcType=VARCHAR}) </insert> <insert id="insertSelective" parameterType="com.demo.base.security.entity.SysAuthorities" > insert into sys_authorities <trim prefix="(" suffix=")" suffixOverrides="," > <if test="authorityId != null" > authority_id, </if> <if test="authorityName != null" > authority_name, </if> <if test="authorityDesc != null" > authority_desc, </if> <if test="enabled != null" > enabled, </if> <if test="module != null" > module, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides="," > <if test="authorityId != null" > #{authorityId,jdbcType=VARCHAR}, </if> <if test="authorityName != null" > #{authorityName,jdbcType=VARCHAR}, </if> <if test="authorityDesc != null" > #{authorityDesc,jdbcType=VARCHAR}, </if> <if test="enabled != null" > #{enabled,jdbcType=INTEGER}, </if> <if test="module != null" > #{module,jdbcType=VARCHAR}, </if> </trim> </insert> <select id="countByExample" parameterType="com.demo.base.security.entity.SysAuthoritiesExample" resultType="java.lang.Integer" > select count(*) from sys_authorities <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> </select> <update id="updateByExampleSelective" parameterType="map" > update sys_authorities <set > <if test="record.authorityId != null" > authority_id = #{record.authorityId,jdbcType=VARCHAR}, </if> <if test="record.authorityName != null" > authority_name = #{record.authorityName,jdbcType=VARCHAR}, </if> <if test="record.authorityDesc != null" > authority_desc = #{record.authorityDesc,jdbcType=VARCHAR}, </if> <if test="record.enabled != null" > enabled = #{record.enabled,jdbcType=INTEGER}, </if> <if test="record.module != null" > module = #{record.module,jdbcType=VARCHAR}, </if> </set> <if test="_parameter != null" > <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByExample" parameterType="map" > update sys_authorities set authority_id = #{record.authorityId,jdbcType=VARCHAR}, authority_name = #{record.authorityName,jdbcType=VARCHAR}, authority_desc = #{record.authorityDesc,jdbcType=VARCHAR}, enabled = #{record.enabled,jdbcType=INTEGER}, module = #{record.module,jdbcType=VARCHAR} <if test="_parameter != null" > <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByPrimaryKeySelective" parameterType="com.demo.base.security.entity.SysAuthorities" > update sys_authorities <set > <if test="authorityName != null" > authority_name = #{authorityName,jdbcType=VARCHAR}, </if> <if test="authorityDesc != null" > authority_desc = #{authorityDesc,jdbcType=VARCHAR}, </if> <if test="enabled != null" > enabled = #{enabled,jdbcType=INTEGER}, </if> <if test="module != null" > module = #{module,jdbcType=VARCHAR}, </if> </set> where authority_id = #{authorityId,jdbcType=VARCHAR} </update> <update id="updateByPrimaryKey" parameterType="com.demo.base.security.entity.SysAuthorities" > update sys_authorities set authority_name = #{authorityName,jdbcType=VARCHAR}, authority_desc = #{authorityDesc,jdbcType=VARCHAR}, enabled = #{enabled,jdbcType=INTEGER}, module = #{module,jdbcType=VARCHAR} where authority_id = #{authorityId,jdbcType=VARCHAR} </update> </mapper>
{ "content_hash": "16f5f4b49cfe1800216172b419bb7f73", "timestamp": "", "source": "github", "line_count": 214, "max_line_length": 130, "avg_line_length": 39.177570093457945, "alnum_prop": 0.5991173664122137, "repo_name": "zhangzi0291/SpringDemo", "id": "91d08999cb49c0c99732c2c5d7589ee40bb05196", "size": "8384", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/resources/com/demo/base/security/dao/SysAuthoritiesMapper.xml", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "579323" }, { "name": "HTML", "bytes": "1899273" }, { "name": "Java", "bytes": "591309" }, { "name": "JavaScript", "bytes": "4343539" }, { "name": "PHP", "bytes": "3841" } ], "symlink_target": "" }
--- layout: post title: Introduction to Unit Testing the Zend Framework Quickstart Application date: 2009-02-23 16:11:48.000000000 +00:00 categories: web-dev tags: - php - phpunit - testing - unit testing - web dev - zend framework permalink: /2009/02/23/introduction-to-unit-testing-the-zend-framework-quickstart-application/ --- **Update:** Things are all change in Zend Framework 1.8, so this may require some adaptation in that version. If you've followed the Zend Framework quickstart tutorial like me, you may be wondering how to perform unit testing using it. The tutorial does set up the bootstrap file to allow for unit testing, but does not cover unit testing itself. The aim of this post is to  provide a quick guide to unit testing using the quickstart application, which will hopefully come in useful for a few people and myself when I inevitably forget this later on. # Step 0: Before Starting First, you should download and set up the guestbook application from the [Zend Framework website](http://framework.zend.com/docs/quickstart "Zend Framework quickstart tutorial"). Make sure you place the Zend library in the library folder and enable the read/write permissions for the sqlite database and the db directory for access by the web server. You will also want to install pear and, with it, install PHPUnit: > pear channel-discover pear.phpunit.de > > pear install phpunit/PHPUnit # Step 1: Create Test Folders Create a folder called "tests" in the root folder of the application. Inside that create a folder called "controllers" and "models". The  directory structure should be as follows: <pre>zendquickstart |-- application |-- data |-- library |-- public |-- scripts `--tests |-- controllers `-- models</pre> All your controller tests should go in the controllers folder, all your model tests should go in the models folder. # Step 2: Create Test Configuration Create the file TestConfiguration.php in the tests folder. This file will initially set up the testing configuration, inside place the following code: {% highlight php linenos %} <?php // Gets called when this file is included/required TestConfiguration::setUp(); class TestConfiguration { /** * Sets the environment up for testing */ static function setUp() { // Set the environment constant to testing which will load the testing // configuration in app.ini by the bootstrap define('APPLICATION_ENVIRONMENT', 'testing'); // Set the include path for locating the Zend library set_include_path(realpath(dirname(__FILE__)) . '/../library' . PATH_SEPARATOR . get_include_path()); // Use Autoload so that we don't have to include/require every class require_once "Zend/Loader.php"; Zend_Loader::registerAutoload(); } static function setUpDatabase() { require '../application/bootstrap.php'; $db = Zend_Registry::get('configuration')->database->params->dbname; // delete any pre-existing databases if(file_exists($db)) unlink($db); // run the database set up script to recreate the database require '../scripts/load.sqlite.php'; } } ?> {% endhighlight %} The setUp() function in this class will get called when the file is included or required. The APPLICATION_ENVIRONMENT constant is set to 'testing' so that the testing section of the app.ini file is read in the bootstrap, and the testing database is used. A testing database should be used so that testing does not interfere with the production or development databases, and no important  data is lost. The next step is to set the include path, which should contain the location of the Zend Framework library. The final step is to enable the Zend autoloader so that we don't have to explicitly require/include the Zend libraries. The setUpDatabase() function resets the database to a known state. When the tests are run we may wish to insert data to the database and this should be removed before every new test. We require the bootstrap file so we can get the database configuration and delete the database file, which is an easy way to reset an SQLite database. A different method will be necessary for other databases like MySQL or PostgreSQL. Finally, the setUpDatabase() function uses a script which comes with the quick start application to (re)create the database. # Step 3: Creating Controller Tests To test the IndexController, create the file IndexControllerTest.php in the tests/controller directory. The following is a simple example: {% highlight php linenos %} <?php // Set up the testing environment require 'TestConfiguration.php'; class controllers_IndexControllerTest extends Zend_Test_PHPUnit_ControllerTestCase { // Bootstraps the application public $bootstrap = '../application/bootstrap.php'; public function testHomePageIsASuccessfulRequest() { // Runs the test on /, the homepage $this->dispatch('/'); // Tests there are no exceptions on the home page $this->assertFalse($this->response->isException()); // Tests for redirection to the error handler $this->assertNotRedirect(); } public function testHomePageDisplaysCorrectContent() { // Runs the test on / $this->dispatch('/'); // Tests the page title is present $this->assertQueryContentContains( 'div#header-logo', 'ZF Quickstart Application' ); // Tests the guestbook link is present $this->assertQueryContentContains('a', 'Guestbook'); } } ?> {% endhighlight %} This is a very basic controller test. First note that you should extend Zend_Test_PHPUnit_ControllerTestCase for controller tests. This class extends PHPUnit_Framework_TestCase itself, but adds some assertions and other things specific to Zend Framework. The bootstrap instance variable must be set in order to test the controller, and in this case it points to the location of the bootstrap file. The testHomePageIsASuccessfulRequest() test is used to test that the homepage functions correctly; it should not contain any exceptions or redirect to the error controller. If it does then there is a problem somewhere and the test fails. The testHomePageDisplaysCorrectContent() is used to test that the page title and the link to the guestbook is present. # Step 4: Creating Model Tests To test the GuestBook model, create the file GuestBookTest.php in tests/models. {% highlight php linenos %} <?php require 'TestConfiguration.php'; require '../application/models/GuestBook.php'; class models_GuestBookTest extends PHPUnit_Framework_TestCase { public function setUp() { // Reset database state TestConfiguration::setUpDatabase(); } public function testFetchEntries() { // Instantiate the GuestBook model $guestBook = new Model_GuestBook(); // Get all entries from the database $entries = $guestBook->fetchEntries(); // Test that there are 2 entries in the guestbook $this->assertSame(2, count($entries)); } } ?> {% endhighlight %} Again, this is very basic. The setUp() function gets called by PHPUnit before the test is run, and it will reset the database. The testFetchEntries() function tests the fetchEntries() function in the model. Two rows in the guestbook table should be present, therefore there should be two elements in the array returned by fetchEntries(). # Step 5: Edit load.sqlite.php You may find it annoying to have to wait 5 seconds between model tests when the database is recreated. I worked around this problem by making a small change to the PHP script which loads the database schema: {% highlight php linenos %} <?php if (APPLICATION_ENVIRONMENT != 'testing') { echo 'Writing Database Guestbook in (control-c to cancel): ' . PHP_EOL; for ($x = 5; $x > 0; $x--) { echo $x . "\r"; sleep(1); } } ?> {% endhighlight %} If the application environment is not testing then the timeout should not be displayed. You may prefer to simply remove the timeout altogether. Additionally, you will need to change the lines that locate the SQL files to include dirname(__FILE__): {% highlight php linenos %} <?php $schemaSql = file_get_contents(dirname(__FILE__) . '/schema.sqlite.sql'); $dataSql = file_get_contents(dirname(__FILE__) . '/data.sqlite.sql'); ?> {% endhighlight %} # Step 6: Running the Tests To run the tests, navigate to the tests directory in a terminal/CMD, and type phpunit controllers_IndexControllerTest and models_GuestBookTest to test the IndexController and GuestBook model, respectively. > phpunit controllers_IndexControllerTest > > PHPUnit 3.3.14 by Sebastian Bergmann. > > .. > > Time: 0 seconds > > OK (2 tests, 4 assertions) > > phpunit models_GuestBookTest > > PHPUnit 3.3.14 by Sebastian Bergmann. > > Database Created > > Data Loaded. > > . > > Time: 0 seconds > > OK (1 test, 1 assertion) # Conclusion There you have it. This isn't necessarily the only way or the best way to perform unit testing, this is merely the way I got it to work with the quickstart application having had no prior experience with PHPUnit. Any suggestions or improvements are welcome. ## Credits I based this on the [Zend Framework manual](http://framework.zend.com/manual/en/zend.test.html) and the book Zend Framework in Action.
{ "content_hash": "a1143f5854d27f16cdefb41e5b811f86", "timestamp": "", "source": "github", "line_count": 237, "max_line_length": 628, "avg_line_length": 39.68354430379747, "alnum_prop": 0.7317384370015949, "repo_name": "lboynton/lboynton.github.io", "id": "b5360fb166b3e84883d157567b0f0d34e84144a1", "size": "9408", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "_posts/2009-02-23-introduction-to-unit-testing-the-zend-framework-quickstart-application.markdown", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "9932" }, { "name": "HTML", "bytes": "11677" }, { "name": "Ruby", "bytes": "1168" } ], "symlink_target": "" }
6502 simulator
{ "content_hash": "69fcbb5bf6eaaedfa8e1b9b325fbb4a8", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 14, "avg_line_length": 15, "alnum_prop": 0.8666666666666667, "repo_name": "LordCreepity/6502-simcore", "id": "6d59f11d2e66afcf33c9590d243a8f9419348cb3", "size": "30", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "4560" } ], "symlink_target": "" }
ACCEPTED #### According to Index Fungorum #### Published in in Timdal, Bryologist 105(2): 221 (2002) #### Original name Rimularia paradoxa Timdal & W.A. Weber ### Remarks null
{ "content_hash": "8e661ec5b91daaf8e620dcac8af27002", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 40, "avg_line_length": 13.76923076923077, "alnum_prop": 0.6983240223463687, "repo_name": "mdoering/backbone", "id": "9da37705c87b9460f6629d5378cb9317ba7a37b3", "size": "241", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Fungi/Ascomycota/Lecanoromycetes/Baeomycetales/Trapeliaceae/Rimularia/Rimularia paradoxa/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
'use strict'; /** * @ngdoc function * @name minovateApp.controller:SidebarsmlayoutCtrl * @description * # SidebarsmlayoutCtrl * Controller of the minovateApp */ app .controller('SidebarsmlayoutCtrl', function ($scope) { $scope.page = { title: 'Small Sidebar Layout', subtitle: 'Place subtitle here...' }; });
{ "content_hash": "65256f99f9f0b16b3cf4a525c670ae87", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 56, "avg_line_length": 21.25, "alnum_prop": 0.6588235294117647, "repo_name": "LineGuide/LG-web", "id": "09916ab139dac9982520874dfde51cfe7fa0d0ae", "size": "340", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "public/scripts/controllers/sidebarsmlayout.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "847027" }, { "name": "HTML", "bytes": "419254" }, { "name": "JavaScript", "bytes": "4415336" }, { "name": "PHP", "bytes": "414" } ], "symlink_target": "" }
layout: post title: Mathematics Teacher vacancy in Nagaland Schools last date 30th April-2016 date: 2016-04-07 07:02 comments: true tags: ContractJob Mathematics Nagaland North-East School Teacher archive: false --- Nagaland Education Mission Society  (NEMS) invites application from interested candidates for the following posts of Mathematics Teachers in Government High Schools upgraded under Rashtriya Madhyamik Shiksha Abhiyan (RMSA) : - Mathematics Teachers : 74 posts (On Contract Basis), Remuneration : Rs.31315/-, Qualification : BA/ B.Sc. with Mathematics and B.Ed., Age : 21-30 years as on  01/01/2016. Application Fee :  Rs. 100/-  through bank draft/ IPO  drawn in favour of State Mission Director, Rashtriya Madhyamik Shiksha Abhiyan. **How to Apply** : The application on the plain paper should reach  on or before 30/04/2016 to  The State Mission Director, Rashtriya Madhyamik Shiksha Abhiyan, Opp. Congress Bhavan,  Kohima, Nagaland - 797001. Please view <https://www.nagaland.gov.in/Nagaland/Advertisement/Recruitment%20for%20mathematics%20Teachers%20for%20Secondary%20Schools.pdf> for details.
{ "content_hash": "b79a1962829b4c2cb2d2f53f27f9eb1a", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 224, "avg_line_length": 70.0625, "alnum_prop": 0.7876895628902766, "repo_name": "anchalrani/getopportunity", "id": "be1f99176d6d3587ca8581c9d86a86143f612f45", "size": "1133", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "_posts/2016-04-07-mathematics-teacher-vacancy-in-nagaland.md", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "132450" }, { "name": "HTML", "bytes": "19402" }, { "name": "JavaScript", "bytes": "10482" }, { "name": "Ruby", "bytes": "6139" } ], "symlink_target": "" }
I18n.available_locales = %i[en fr zh-CN] # If we don't have text, fall back to English. That obviously isn't # ideal, but it's better to show *some* text to the user than leave it # a mystery. Rails.application.config.i18n.fallbacks = [:en]
{ "content_hash": "1c682bb3261b32154dc659b43d9888fc", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 70, "avg_line_length": 40.5, "alnum_prop": 0.720164609053498, "repo_name": "wanganyv/cii-best-practices-badge", "id": "45ef531a86bbdd7657fef847cddbd598d157c415", "size": "940", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "config/initializers/i18n.rb", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "12097" }, { "name": "HTML", "bytes": "105379" }, { "name": "JavaScript", "bytes": "24248" }, { "name": "Makefile", "bytes": "384" }, { "name": "Ruby", "bytes": "335774" }, { "name": "Shell", "bytes": "16579" } ], "symlink_target": "" }
package rrd import ( "bufio" "fmt" "io" "net" "regexp" "strconv" "strings" "time" ) const ( // DefaultPort is the default rrdcached port. DefaultPort = 42217 ) var ( respRe = regexp.MustCompile(`^(-?\d+)\s+(.*)$`) // DefaultTimeout is the default read / write / dial timeout for Clients. DefaultTimeout = time.Second * 10 ) // Client is a rrdcached client. type Client struct { conn net.Conn addr string network string timeout time.Duration scanner *bufio.Scanner } // Timeout sets read / write / dial timeout for a rrdcached Client. func Timeout(timeout time.Duration) func(*Client) error { return func(c *Client) error { c.timeout = timeout return nil } } // Unix sets the client to use a unix socket. func Unix(c *Client) error { c.network = "unix" return nil } // NewClient returns a new rrdcached client connected to addr. // By default addr is treated as a TCP address to use UNIX sockets pass Unix as an option. // If addr for a TCP address doesn't include a port the DefaultPort will be used. func NewClient(addr string, options ...func(c *Client) error) (*Client, error) { c := &Client{timeout: DefaultTimeout, network: "tcp", addr: addr} for _, f := range options { if f == nil { return nil, ErrNilOption } if err := f(c); err != nil { return nil, err } } if c.network == "tcp" { if !strings.Contains(c.addr, ":") { c.addr = fmt.Sprintf("%v:%v", c.addr, DefaultPort) } } var err error if c.conn, err = net.DialTimeout(c.network, c.addr, c.timeout); err != nil { return nil, err } c.scanner = bufio.NewScanner(bufio.NewReader(c.conn)) c.scanner.Split(bufio.ScanLines) return c, nil } // setDeadline updates the deadline on the connection based on the clients configured timeout. func (c *Client) setDeadline() error { return c.conn.SetDeadline(time.Now().Add(c.timeout)) } // Exec executes cmd on the server and returns the response. func (c *Client) Exec(cmd string) ([]string, error) { return c.ExecCmd(NewCmd(cmd)) } // ExecCmd executes cmd on the server and returns the response. func (c *Client) ExecCmd(cmd *Cmd) ([]string, error) { if err := c.setDeadline(); err != nil { return nil, err } if _, err := c.conn.Write([]byte(cmd.String())); err != nil { return nil, err } if err := c.setDeadline(); err != nil { return nil, err } if !c.scanner.Scan() { return nil, c.scanErr() } l := c.scanner.Text() matches := respRe.FindStringSubmatch(l) if len(matches) != 3 { return nil, NewInvalidResponseError("bad header", l) } cnt, err := strconv.Atoi(matches[1]) if err != nil { // This should be impossible given the regexp matched. return nil, NewInvalidResponseError("bad header count", l) } switch { case cnt < 0: // rrdcached reported an error. return nil, NewError(cnt, matches[2]) case cnt == 0: // message is the line e.g. first. return []string{matches[2]}, nil } if err := c.setDeadline(); err != nil { return nil, err } lines := make([]string, 0, cnt) for len(lines) < cnt && c.scanner.Scan() { lines = append(lines, c.scanner.Text()) if err := c.setDeadline(); err != nil { return nil, err } } if len(lines) != cnt { // Short response. return nil, c.scanErr() } return lines, nil } // Close closes the connection to the server. func (c *Client) Close() error { errD := c.setDeadline() _, errW := c.conn.Write([]byte("quit")) err := c.conn.Close() if err != nil { return err } else if errD != nil { return errD } return errW } // scanError returns the error from the scanner if non-nil, // io.ErrUnexpectedEOF otherwise. func (c *Client) scanErr() error { if err := c.scanner.Err(); err != nil { return err } return io.ErrUnexpectedEOF }
{ "content_hash": "db14eef77ec6ce190e0e77c7af7e10d4", "timestamp": "", "source": "github", "line_count": 167, "max_line_length": 94, "avg_line_length": 22.32934131736527, "alnum_prop": 0.6578171091445427, "repo_name": "multiplay/go-rrd", "id": "72c5b66bff56576f022da8b71a18e628ae897fb9", "size": "3885", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "client.go", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "Go", "bytes": "49935" } ], "symlink_target": "" }
import React from 'react'; import { AssetsGroupPage } from './groups/AssetsGroupPage'; import { OAuthGroupPage } from './groups/OAuthGroupPage'; import { GenericGroupPage } from './groups/GenericGroupPage'; import { GroupPage } from './GroupPage'; import { useGroup } from './SettingsState'; export function GroupSelector({ groupId }) { const group = useGroup(groupId); if (!group) { return <GroupPage.Skeleton />; } if (groupId === 'Assets') { return <AssetsGroupPage {...group} />; } if (groupId === 'OAuth') { return <OAuthGroupPage {...group} />; } return <GenericGroupPage {...group} />; }
{ "content_hash": "91bc52fbc93437926e230ba65dbb7a66", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 61, "avg_line_length": 24.6, "alnum_prop": 0.6715447154471544, "repo_name": "subesokun/Rocket.Chat", "id": "6cbd557b740edab50683c90c4cb251d84c3a7ce1", "size": "615", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "client/admin/settings/GroupSelector.js", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "549" }, { "name": "CSS", "bytes": "397150" }, { "name": "Cap'n Proto", "bytes": "3960" }, { "name": "CoffeeScript", "bytes": "30843" }, { "name": "Dockerfile", "bytes": "1874" }, { "name": "HTML", "bytes": "443704" }, { "name": "JavaScript", "bytes": "4470036" }, { "name": "Ruby", "bytes": "4653" }, { "name": "Shell", "bytes": "32549" }, { "name": "Standard ML", "bytes": "1843" } ], "symlink_target": "" }
from base.input_program import InputProgram class PDDLInputProgram(InputProgram): """A generic PDDL program""" def __init__(self, progType): super(PDDLInputProgram, self).__init__() self.__programs_type = progType # Where type of program are stored def get_programs_type(self): """Return type of program""" return self.__programs_type
{ "content_hash": "5807066636e17e313e2fc63ad64ce782", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 75, "avg_line_length": 32.833333333333336, "alnum_prop": 0.6395939086294417, "repo_name": "SimoneLucia/EmbASP-Python", "id": "02aa771ab2ffbace2a7994715eff496b17b3f8c6", "size": "394", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "languages/pddl/pddl_input_program.py", "mode": "33188", "license": "mit", "language": [ { "name": "Python", "bytes": "85601" } ], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_31) on Mon Oct 01 06:51:22 PDT 2012 --> <TITLE> Uses of Class org.apache.hadoop.mapreduce.lib.reduce.LongSumReducer (Hadoop 1.0.3.16 API) </TITLE> <META NAME="date" CONTENT="2012-10-01"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.apache.hadoop.mapreduce.lib.reduce.LongSumReducer (Hadoop 1.0.3.16 API)"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../org/apache/hadoop/mapreduce/lib/reduce/LongSumReducer.html" title="class in org.apache.hadoop.mapreduce.lib.reduce"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../../index.html?org/apache/hadoop/mapreduce/lib/reduce//class-useLongSumReducer.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="LongSumReducer.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <CENTER> <H2> <B>Uses of Class<br>org.apache.hadoop.mapreduce.lib.reduce.LongSumReducer</B></H2> </CENTER> No usage of org.apache.hadoop.mapreduce.lib.reduce.LongSumReducer <P> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../org/apache/hadoop/mapreduce/lib/reduce/LongSumReducer.html" title="class in org.apache.hadoop.mapreduce.lib.reduce"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../../index.html?org/apache/hadoop/mapreduce/lib/reduce//class-useLongSumReducer.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="LongSumReducer.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> Copyright &copy; 2009 The Apache Software Foundation </BODY> </HTML>
{ "content_hash": "4bccbd3e7483b67ab077007daaa78dbc", "timestamp": "", "source": "github", "line_count": 144, "max_line_length": 254, "avg_line_length": 43.416666666666664, "alnum_prop": 0.6124440179142674, "repo_name": "Seagate/hadoop-on-lustre", "id": "2ef1a62bcb30e17fe3a2204a12bdeb9cf7fecf7b", "size": "6252", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docs/api/org/apache/hadoop/mapreduce/lib/reduce/class-use/LongSumReducer.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "AspectJ", "bytes": "64797" }, { "name": "C", "bytes": "403835" }, { "name": "C++", "bytes": "404241" }, { "name": "CSS", "bytes": "80840" }, { "name": "Java", "bytes": "16252425" }, { "name": "JavaScript", "bytes": "94382" }, { "name": "Objective-C", "bytes": "118273" }, { "name": "PHP", "bytes": "152555" }, { "name": "Perl", "bytes": "149888" }, { "name": "Python", "bytes": "1074813" }, { "name": "Ruby", "bytes": "28485" }, { "name": "Shell", "bytes": "1808653" }, { "name": "Smalltalk", "bytes": "56562" }, { "name": "TeX", "bytes": "26547" }, { "name": "XSLT", "bytes": "217046" } ], "symlink_target": "" }
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("01.CountValueOccurences")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("01.CountValueOccurences")] [assembly: AssemblyCopyright("Copyright © 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("a4728a12-7798-45e7-9567-3a5b08537ff7")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
{ "content_hash": "da50ca76f7259f65acd8eb89fcaacaec", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 84, "avg_line_length": 39.416666666666664, "alnum_prop": 0.7477096546863988, "repo_name": "bozhidar-slavov/12.Data-Structures-and-Algorithms", "id": "848e1519b20a096b84b7e241d39579d0caae8548", "size": "1422", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "09.Dictionaries-Hash-Tables-and-Sets/01.CountValueOccurences/Properties/AssemblyInfo.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "208938" } ], "symlink_target": "" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Hold Shift to Check Multiple Checkboxes</title> </head> <body> <style> html { font-family: sans-serif; background:#ffc600; } .inbox { max-width:400px; margin:50px auto; background:white; border-radius:5px; box-shadow:10px 10px 0 rgba(0,0,0,0.1); } .item { display:flex; align-items:center; border-bottom: 1px solid #F1F1F1; } .item:last-child { border-bottom:0; } input:checked + p { background:#F9F9F9; text-decoration: line-through; } input[type="checkbox"] { margin:20px; } p { margin:0; padding:20px; transition:background 0.2s; flex:1; font-family:'helvetica neue'; font-size: 20px; font-weight: 200; border-left: 1px solid #D1E2FF; } .details { text-align: center; font-size: 15px; } </style> <!-- The following is a common layout you would see in an email client. When a user clicks a checkbox, holds Shift, and then clicks another checkbox a few rows down, all the checkboxes inbetween those two checkboxes should be checked. --> <div class="inbox"> <div class="item"> <input type="checkbox"> <p>This is an inbox layout.</p> </div> <div class="item"> <input type="checkbox"> <p>Check one item</p> </div> <div class="item"> <input type="checkbox"> <p>Hold down your Shift key</p> </div> <div class="item"> <input type="checkbox"> <p>Check a lower item</p> </div> <div class="item"> <input type="checkbox"> <p>Everything inbetween should also be set to checked</p> </div> <div class="item"> <input type="checkbox"> <p>Try do it with out any libraries</p> </div> <div class="item"> <input type="checkbox"> <p>Just regular JavaScript</p> </div> <div class="item"> <input type="checkbox"> <p>Good Luck!</p> </div> <div class="item"> <input type="checkbox"> <p>Don't forget to tweet your result!</p> </div> </div> <script> const checkboxes = document.querySelectorAll('.inbox input[type="checkbox"]'); let lastChecked; function handleCheck(event) { let inBetween = false; if(event.shiftKey && this.checked) { checkboxes.forEach((checkbox) => { if(checkbox === this || checkbox === lastChecked) { inBetween = !inBetween; } if(inBetween) { checkbox.checked = true; } }) } lastChecked = this; } checkboxes.forEach(checkbox => checkbox.addEventListener('click', handleCheck)); </script> </body> </html>
{ "content_hash": "a19848110005126773bccb6d2df69173", "timestamp": "", "source": "github", "line_count": 131, "max_line_length": 165, "avg_line_length": 21.03053435114504, "alnum_prop": 0.5782214156079855, "repo_name": "daraclare/JSTuts", "id": "0b1fde480625e89cedc499c1f807671810bf6a13", "size": "2755", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "public/dara/js30/10/index.html", "mode": "33261", "license": "mit", "language": [ { "name": "CSS", "bytes": "9092" }, { "name": "HTML", "bytes": "139865" }, { "name": "JavaScript", "bytes": "6551" } ], "symlink_target": "" }
package com.facebook.react.bridge.queue; import com.facebook.jni.Countable; import com.facebook.jni.HybridData; import com.facebook.proguard.annotations.DoNotStrip; /** * A Runnable that has a native run implementation. */ @DoNotStrip public class NativeRunnableDeprecated extends Countable implements Runnable { @DoNotStrip private NativeRunnableDeprecated() { } public native void run(); }
{ "content_hash": "d2a9bc565c1abe008352e112b35087ff", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 77, "avg_line_length": 20.4, "alnum_prop": 0.7794117647058824, "repo_name": "hoastoolshop/react-native", "id": "4da397799cef429e0b77b94ea40a37fa8f7f299e", "size": "590", "binary": false, "copies": "14", "ref": "refs/heads/master", "path": "ReactAndroid/src/main/java/com/facebook/react/bridge/queue/NativeRunnableDeprecated.java", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "AppleScript", "bytes": "1171" }, { "name": "Assembly", "bytes": "13072" }, { "name": "Awk", "bytes": "121" }, { "name": "Batchfile", "bytes": "301" }, { "name": "C", "bytes": "63225" }, { "name": "C++", "bytes": "298434" }, { "name": "CSS", "bytes": "17957" }, { "name": "HTML", "bytes": "28846" }, { "name": "IDL", "bytes": "617" }, { "name": "Java", "bytes": "978002" }, { "name": "JavaScript", "bytes": "1311897" }, { "name": "Makefile", "bytes": "6060" }, { "name": "Objective-C", "bytes": "1007700" }, { "name": "Objective-C++", "bytes": "7940" }, { "name": "Prolog", "bytes": "311" }, { "name": "Python", "bytes": "32195" }, { "name": "Ruby", "bytes": "4501" }, { "name": "Shell", "bytes": "12697" } ], "symlink_target": "" }
using Aspose.Pdf.LogicalStructure; using Aspose.Pdf.Tagged; using Aspose.Pdf.Text; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Aspose.Pdf.Examples.CSharp.AsposePDF.Working_with_TaggedPDFs { public class CreatePDFwithTaggedText { public static void Run() { // ExStart:CreatePDFwithTaggedText // The path to the documents directory. string dataDir = RunExamples.GetDataDir_AsposePdf_WorkingDocuments(); // Create Pdf Document Document document = new Document(); // Get Content for work with TaggedPdf ITaggedContent taggedContent = document.TaggedContent; // Set Title and Language for Documnet taggedContent.SetTitle("Tagged Pdf Document"); taggedContent.SetLanguage("en-US"); // Create Text Block-Level Structure Elements HeaderElement headerElement = taggedContent.CreateHeaderElement(); headerElement.ActualText = "Heading 1"; ParagraphElement paragraphElement1 = taggedContent.CreateParagraphElement(); paragraphElement1.ActualText = "test1"; ParagraphElement paragraphElement2 = taggedContent.CreateParagraphElement(); paragraphElement2.ActualText = "test 2"; ParagraphElement paragraphElement3 = taggedContent.CreateParagraphElement(); paragraphElement3.ActualText = "test 3"; ParagraphElement paragraphElement4 = taggedContent.CreateParagraphElement(); paragraphElement4.ActualText = "test 4"; ParagraphElement paragraphElement5 = taggedContent.CreateParagraphElement(); paragraphElement5.ActualText = "test 5"; ParagraphElement paragraphElement6 = taggedContent.CreateParagraphElement(); paragraphElement6.ActualText = "test 6"; ParagraphElement paragraphElement7 = taggedContent.CreateParagraphElement(); paragraphElement7.ActualText = "test 7"; // Save PDF Document document.Save( dataDir + "PDFwithTaggedText.pdf"); // ExEnd:CreatePDFwithTaggedText } } }
{ "content_hash": "46face6fa78e842eb6dca7c69b6e37e9", "timestamp": "", "source": "github", "line_count": 52, "max_line_length": 88, "avg_line_length": 42.69230769230769, "alnum_prop": 0.6747747747747748, "repo_name": "aspose-pdf/Aspose.Pdf-for-.NET", "id": "9ce67b0e0c7066384cf955d1299a06f2f8d69943", "size": "2222", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Examples/CSharp/AsposePDF/Working-with-TaggedPDFs/CreatePDFwithTaggedText.cs", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "23534" }, { "name": "C#", "bytes": "190683" }, { "name": "CSS", "bytes": "4298" }, { "name": "HTML", "bytes": "405" }, { "name": "JavaScript", "bytes": "122079" } ], "symlink_target": "" }