code
stringlengths
3
1.05M
repo_name
stringlengths
4
116
path
stringlengths
4
991
language
stringclasses
9 values
license
stringclasses
15 values
size
int32
3
1.05M
import isEnabled from 'ember-metal/features'; import run from 'ember-metal/run_loop'; import { observer } from 'ember-metal/mixin'; import { set } from 'ember-metal/property_set'; import { bind } from 'ember-metal/binding'; import { beginPropertyChanges, endPropertyChanges } from 'ember-metal/property_events'; import { testBoth } from 'ember-metal/tests/props_helper'; import EmberObject from 'ember-runtime/system/object'; import { peekMeta } from 'ember-metal/meta'; QUnit.module('ember-runtime/system/object/destroy_test'); testBoth('should schedule objects to be destroyed at the end of the run loop', function(get, set) { var obj = EmberObject.create(); var meta; run(function() { obj.destroy(); meta = peekMeta(obj); ok(meta, 'meta is not destroyed immediately'); ok(get(obj, 'isDestroying'), 'object is marked as destroying immediately'); ok(!get(obj, 'isDestroyed'), 'object is not destroyed immediately'); }); meta = peekMeta(obj); ok(!meta, 'meta is destroyed after run loop finishes'); ok(get(obj, 'isDestroyed'), 'object is destroyed after run loop finishes'); }); if (isEnabled('mandatory-setter')) { // MANDATORY_SETTER moves value to meta.values // a destroyed object removes meta but leaves the accessor // that looks it up QUnit.test('should raise an exception when modifying watched properties on a destroyed object', function() { var obj = EmberObject.extend({ fooDidChange: observer('foo', function() { }) }).create({ foo: 'bar' }); run(function() { obj.destroy(); }); throws(function() { set(obj, 'foo', 'baz'); }, Error, 'raises an exception'); }); } QUnit.test('observers should not fire after an object has been destroyed', function() { var count = 0; var obj = EmberObject.extend({ fooDidChange: observer('foo', function() { count++; }) }).create(); obj.set('foo', 'bar'); equal(count, 1, 'observer was fired once'); run(function() { beginPropertyChanges(); obj.set('foo', 'quux'); obj.destroy(); endPropertyChanges(); }); equal(count, 1, 'observer was not called after object was destroyed'); }); QUnit.test('destroyed objects should not see each others changes during teardown but a long lived object should', function () { var shouldChange = 0; var shouldNotChange = 0; var objs = {}; var A = EmberObject.extend({ objs: objs, isAlive: true, willDestroy() { this.set('isAlive', false); }, bDidChange: observer('objs.b.isAlive', function () { shouldNotChange++; }), cDidChange: observer('objs.c.isAlive', function () { shouldNotChange++; }) }); var B = EmberObject.extend({ objs: objs, isAlive: true, willDestroy() { this.set('isAlive', false); }, aDidChange: observer('objs.a.isAlive', function () { shouldNotChange++; }), cDidChange: observer('objs.c.isAlive', function () { shouldNotChange++; }) }); var C = EmberObject.extend({ objs: objs, isAlive: true, willDestroy() { this.set('isAlive', false); }, aDidChange: observer('objs.a.isAlive', function () { shouldNotChange++; }), bDidChange: observer('objs.b.isAlive', function () { shouldNotChange++; }) }); var LongLivedObject = EmberObject.extend({ objs: objs, isAliveDidChange: observer('objs.a.isAlive', function () { shouldChange++; }) }); objs.a = new A(); objs.b = new B(); objs.c = new C(); new LongLivedObject(); run(function () { var keys = Object.keys(objs); for (var i = 0; i < keys.length; i++) { objs[keys[i]].destroy(); } }); equal(shouldNotChange, 0, 'destroyed graph objs should not see change in willDestroy'); equal(shouldChange, 1, 'long lived should see change in willDestroy'); }); QUnit.test('bindings should be synced when are updated in the willDestroy hook', function() { var bar = EmberObject.create({ value: false, willDestroy() { this.set('value', true); } }); var foo = EmberObject.create({ value: null, bar: bar }); run(function() { bind(foo, 'value', 'bar.value'); }); ok(bar.get('value') === false, 'the initial value has been bound'); run(function() { bar.destroy(); }); ok(foo.get('value'), 'foo is synced when the binding is updated in the willDestroy hook'); });
topaxi/ember.js
packages/ember-runtime/tests/system/object/destroy_test.js
JavaScript
mit
4,435
package seedu.tache.ui; import java.util.logging.Logger; //import org.controlsfx.control.Notifications; import com.google.common.eventbus.Subscribe; import javafx.application.Platform; //import javafx.geometry.Pos; import javafx.scene.control.Alert; import javafx.scene.control.Alert.AlertType; import javafx.scene.image.Image; //import javafx.scene.image.ImageView; import javafx.stage.Stage; //import javafx.util.Duration; import seedu.tache.MainApp; import seedu.tache.commons.core.ComponentManager; import seedu.tache.commons.core.Config; import seedu.tache.commons.core.LogsCenter; import seedu.tache.commons.events.model.TaskManagerChangedEvent; import seedu.tache.commons.events.storage.DataSavingExceptionEvent; import seedu.tache.commons.events.ui.JumpToListRequestEvent; import seedu.tache.commons.events.ui.PopulateRecurringGhostTaskEvent; import seedu.tache.commons.events.ui.ShowHelpRequestEvent; import seedu.tache.commons.events.ui.TaskPanelConnectionChangedEvent; import seedu.tache.commons.util.StringUtil; import seedu.tache.logic.Logic; import seedu.tache.model.UserPrefs; /** * The manager of the UI component. */ public class UiManager extends ComponentManager implements Ui { private static final Logger logger = LogsCenter.getLogger(UiManager.class); private static final String ICON_APPLICATION = "/images/tache.png"; public static final String ALERT_DIALOG_PANE_FIELD_ID = "alertDialogPane"; private Logic logic; private Config config; private UserPrefs prefs; private HotkeyManager hotkeyManager; private NotificationManager notificationManager; private MainWindow mainWindow; public UiManager(Logic logic, Config config, UserPrefs prefs) { super(); this.logic = logic; this.config = config; this.prefs = prefs; } @Override public void start(Stage primaryStage) { logger.info("Starting UI..."); primaryStage.setTitle(config.getAppTitle()); //Set the application icon. primaryStage.getIcons().add(getImage(ICON_APPLICATION)); hotkeyManager = new HotkeyManager(primaryStage); hotkeyManager.start(); try { mainWindow = new MainWindow(primaryStage, config, prefs, logic); mainWindow.show(); //This should be called before creating other UI parts mainWindow.fillInnerParts(); } catch (Throwable e) { logger.severe(StringUtil.getDetails(e)); showFatalErrorDialogAndShutdown("Fatal error during initializing", e); } notificationManager = new NotificationManager(logic); notificationManager.start(); } @Override public void stop() { prefs.updateLastUsedGuiSetting(mainWindow.getCurrentGuiSetting()); mainWindow.hide(); mainWindow.releaseResources(); hotkeyManager.stop(); notificationManager.stop(); } private void showFileOperationAlertAndWait(String description, String details, Throwable cause) { final String content = details + ":\n" + cause.toString(); showAlertDialogAndWait(AlertType.ERROR, "File Op Error", description, content); } private Image getImage(String imagePath) { return new Image(MainApp.class.getResourceAsStream(imagePath)); } void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) { showAlertDialogAndWait(mainWindow.getPrimaryStage(), type, title, headerText, contentText); } private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText, String contentText) { final Alert alert = new Alert(type); alert.getDialogPane().getStylesheets().add("view/TacheTheme.css"); alert.initOwner(owner); alert.setTitle(title); alert.setHeaderText(headerText); alert.setContentText(contentText); alert.getDialogPane().setId(ALERT_DIALOG_PANE_FIELD_ID); alert.showAndWait(); } private void showFatalErrorDialogAndShutdown(String title, Throwable e) { logger.severe(title + " " + e.getMessage() + StringUtil.getDetails(e)); showAlertDialogAndWait(Alert.AlertType.ERROR, title, e.getMessage(), e.toString()); Platform.exit(); System.exit(1); } //==================== Event Handling Code =============================================================== @Subscribe private void handleDataSavingExceptionEvent(DataSavingExceptionEvent event) { logger.info(LogsCenter.getEventHandlingLogMessage(event)); showFileOperationAlertAndWait("Could not save data", "Could not save data to file", event.exception); } @Subscribe private void handleShowHelpEvent(ShowHelpRequestEvent event) { logger.info(LogsCenter.getEventHandlingLogMessage(event)); mainWindow.handleHelp(); } @Subscribe private void handleJumpToListRequestEvent(JumpToListRequestEvent event) { logger.info(LogsCenter.getEventHandlingLogMessage(event)); mainWindow.getTaskListPanel().scrollTo(event.targetIndex); } //@@author A0139925U @Subscribe private void handleTaskPanelConnectionChangedEvent(TaskPanelConnectionChangedEvent event) { logger.info(LogsCenter.getEventHandlingLogMessage(event)); if (mainWindow.getTaskListPanel() != null) { mainWindow.getTaskListPanel().resetConnections(event.getNewConnection()); } } @Subscribe private void handlePopulateRecurringGhostTaskEvent(PopulateRecurringGhostTaskEvent event) { logger.info(LogsCenter.getEventHandlingLogMessage(event)); if (mainWindow.getTaskListPanel() != null) { mainWindow.getCalendarPanel().addAllEvents(event.getAllCompletedRecurringGhostTasks()); mainWindow.getCalendarPanel().addAllEvents(event.getAllUncompletedRecurringGhostTasks()); } } @Subscribe public void handleUpdateNotificationsEvent(TaskManagerChangedEvent event) { logger.info(LogsCenter.getEventHandlingLogMessage(event)); notificationManager.updateNotifications(event); } }
CS2103JAN2017-T09-B4/main
src/main/java/seedu/tache/ui/UiManager.java
Java
mit
6,234
// softlayer_billing_item_cancellation_request - SoftLayer customers can use this API to submit a // cancellation request. A single service cancellation can contain multiple cancellation items which // contain a billing item. package softlayer_billing_item_cancellation_request // DO NOT EDIT. THIS FILE WAS AUTOMATICALLY GENERATED
sudorandom/softlayer-go-gen
methods/softlayer_billing_item_cancellation_request/doc.go
GO
mit
333
#define VMA_IMPLEMENTATION #include <vk_mem_alloc.h> #include "VulkanMemoryAllocator.h" #include "VulkanUtility.h" #include "Core/Assertion.h" namespace cube { namespace rapi { void VulkanMemoryAllocator::Initialize(VkInstance instance, VkPhysicalDevice GPU, VkDevice device) { VkResult res; VmaAllocatorCreateInfo info = {}; info.instance = instance; info.physicalDevice = GPU; info.device = device; res = vmaCreateAllocator(&info, &mAllocator); CHECK_VK(res, "Failed to create vulkan memory allocator."); } void VulkanMemoryAllocator::Shutdown() { } VulkanAllocation VulkanMemoryAllocator::Allocate(ResourceUsage usage, VkBufferCreateInfo& bufCreateInfo, VkBuffer* pBuf) { VmaAllocationCreateInfo createInfo = CreateVmaAllocationCreateInfo(usage); VmaAllocationInfo allocationInfo; VmaAllocation allocation; vmaCreateBuffer(mAllocator, &bufCreateInfo, &createInfo, pBuf, &allocation, &allocationInfo); VulkanAllocation res; res.resourceType = VulkanAllocation::ResourceType::Buffer; res.pResource = pBuf; UpdateVulkanAllocation(res, allocation, allocationInfo); return res; } VulkanAllocation VulkanMemoryAllocator::Allocate(ResourceUsage usage, VkImageCreateInfo& imageCreateInfo, VkImage* pImage) { VmaAllocationCreateInfo createInfo = CreateVmaAllocationCreateInfo(usage); VmaAllocationInfo allocationInfo; VmaAllocation allocation; vmaCreateImage(mAllocator, &imageCreateInfo, &createInfo, pImage, &allocation, &allocationInfo); VulkanAllocation res; res.resourceType = VulkanAllocation::ResourceType::Texture; res.pResource = pImage; UpdateVulkanAllocation(res, allocation, allocationInfo); return res; } void VulkanMemoryAllocator::Free(VulkanAllocation alloc) { switch(alloc.resourceType) { case VulkanAllocation::ResourceType::Buffer: vmaDestroyBuffer(mAllocator, *(VkBuffer*)alloc.pResource, alloc.allocation); break; case VulkanAllocation::ResourceType::Texture: vmaDestroyImage(mAllocator, *(VkImage*)alloc.pResource, alloc.allocation); break; default: ASSERTION_FAILED("Invalid resource type in vulkan allocation. ({})", (int)alloc.resourceType); break; } } VmaAllocationCreateInfo VulkanMemoryAllocator::CreateVmaAllocationCreateInfo(ResourceUsage usage) { VmaAllocationCreateInfo info = {}; switch(usage) { case ResourceUsage::Default: case ResourceUsage::Immutable: info.usage = VMA_MEMORY_USAGE_GPU_ONLY; break; case ResourceUsage::Dynamic: info.usage = VMA_MEMORY_USAGE_CPU_TO_GPU; info.flags = VMA_ALLOCATION_CREATE_MAPPED_BIT; break; case ResourceUsage::Staging: info.usage = VMA_MEMORY_USAGE_GPU_TO_CPU; break; default: ASSERTION_FAILED("Invalid resource type {}", (int)usage); break; } return info; } void VulkanMemoryAllocator::UpdateVulkanAllocation(VulkanAllocation& allocation, VmaAllocation vmaAllocation, const VmaAllocationInfo& info) { allocation.allocator = mAllocator; allocation.allocation = vmaAllocation; allocation.pMappedPtr = info.pMappedData; allocation.size = info.size; VkMemoryPropertyFlags memFlags; vmaGetMemoryTypeProperties(mAllocator, info.memoryType, &memFlags); if((memFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) > 0) { allocation.isHostVisible = true; } else { allocation.isHostVisible = false; } } } // namespace rapi } // namespace cube
Cube219/CubeEngine
Source/RenderAPIs/VulkanAPI/VulkanMemoryAllocator.cpp
C++
mit
4,378
#ifndef VPP_OPENCV_UTILS_HH_ # define VPP_OPENCV_UTILS_HH_ # include <iostream> # include <regex> # include <opencv2/highgui/highgui.hpp> # include <vpp/core/boxNd.hh> # include <vpp/core/image2d.hh> inline bool open_videocapture(const char* str, cv::VideoCapture& cap) { if (std::regex_match(str, std::regex("[0-9]+"))) cap.open(atoi(str)); else cap.open(str); if (!cap.isOpened()) { std::cerr << "Error: Cannot open " << str << std::endl; return false; } return true; } inline vpp::box2d videocapture_domain(cv::VideoCapture& cap) { return vpp::make_box2d(cap.get(CV_CAP_PROP_FRAME_HEIGHT), cap.get(CV_CAP_PROP_FRAME_WIDTH)); } inline vpp::box2d videocapture_domain(const char* f) { cv::VideoCapture cap; open_videocapture(f, cap); return vpp::make_box2d(cap.get(CV_CAP_PROP_FRAME_HEIGHT), cap.get(CV_CAP_PROP_FRAME_WIDTH)); } struct foreach_videoframe { foreach_videoframe(const char* f) { open_videocapture(f, cap_); frame_ = vpp::image2d<vpp::vuchar3>(videocapture_domain(cap_)); cvframe_ = to_opencv(frame_); } template <typename F> void operator| (F f) { while (cap_.read(cvframe_)) f(frame_); } private: cv::Mat cvframe_; vpp::image2d<vpp::vuchar3> frame_; cv::VideoCapture cap_; }; #endif
pdebus/MTVMTL
thirdparty/vpp/vpp/utils/opencv_utils.hh
C++
mit
1,322
import collections puzzle_input = (0,13,1,8,6,15) test_inputs = [ ([(0,3,6), 10], 0), ([(1,3,2)], 1), ([(2,1,3)], 10), ([(1,2,3)], 27), ([(2,3,1)], 78), ([(3,2,1)], 438), ([(3,1,2)], 1836), # Expensive Tests # ([(0,3,6), 30000000], 175594), # ([(1,3,2), 30000000], 2578), # ([(2,1,3), 30000000], 3544142), # ([(1,2,3), 30000000], 261214), # ([(2,3,1), 30000000], 6895259), # ([(3,2,1), 30000000], 18), # ([(3,1,2), 30000000], 362), ] def iterate(input_, iterations=2020) -> int: turn = 0 turn_last_spoken = collections.defaultdict(int) prev_number = None for value in input_: turn_last_spoken[prev_number] = turn prev_number = value turn += 1 while turn < iterations: current_number = turn_last_spoken[prev_number] turn_last_spoken[prev_number] = turn if current_number != 0: current_number = turn - current_number prev_number = current_number turn += 1 return prev_number for _input, expected_output in test_inputs: print("Testing:", *_input, "...") actual_output = iterate(*_input) assert actual_output == expected_output, f"Expected: {expected_output}. Actual {actual_output}" print("Part 1:", iterate(puzzle_input)) print("Part 2:", iterate(puzzle_input, 30000000))
AustinTSchaffer/DailyProgrammer
AdventOfCode/2020/day_15/solution.py
Python
mit
1,352
import { DomSanitizer } from '@angular/platform-browser'; export declare class IndexTrack { transform(_x: any): (index: any) => any; } export declare class Stringify { transform(input: any, spaces?: number): string; } export declare class ForceArray { transform(input: any, repeat?: any, repeatValue?: any): any[]; } export declare class ArrayOfObjects { transform(input: any, repeat?: number | undefined, repeatValue?: unknown): any[]; } export declare class SafeUrl { private domSanitizer; constructor(domSanitizer: DomSanitizer); transform(input: any): import("@angular/platform-browser").SafeResourceUrl; } export declare class NumberWord { constructor(); transform(input: any, number: any): string; } export declare class EndNumberWord { constructor(); transform(input: any): "" | "s"; } export declare class SafeHtml { private domSanitizer; constructor(domSanitizer: DomSanitizer); transform(input: any): import("@angular/platform-browser").SafeHtml; } export declare class SafeStyle { private domSanitizer; constructor(domSanitizer: DomSanitizer); transform(input: any): import("@angular/platform-browser").SafeStyle; } /** (input>=a && input<=b) || (input>=b && input<=a) */ export declare class Between { transform(input: any, a: any, b: any): boolean; } export declare class ReplaceMaxLength { transform(input: string, max: number, replacement?: string): string; } /** use with bypassSecurityTrustResourceUrl for href */ export declare class TextDownload { transform(input: string): any; } export declare class NumberToPhone { transform(input: string | number): unknown; } export declare class toNumber { transform(input: string): number; } export declare class NumberSuffix { transform(input: number | string, rtnInput?: any): string; } export declare class MarkdownAnchor { transform(input: string): string; } export declare class Capitalize { transform(input: any): any; } export declare class CapitalizeWords { transform(input: any): any; } export declare class Yesno { transform(input: any): any; } export declare class YesNo { transform(input: any): any; } export declare class BooleanPipe { transform(input: any): boolean; } export declare class Bit { transform(input: any): 0 | 1; } export declare class Numbers { transform(input: any): any; } export declare class ADate { transform(...args: any): any; } export declare class AMath { transform(...args: any): any; } export declare class AString { transform(...args: any): any; } export declare class ATime { transform(...args: any): any; } export declare class Ack { transform(...args: any): any; } export declare class Keys { transform(input: any): any; } export declare class TypeofPipe { transform(input: any): "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"; } export declare class ConsolePipe { transform(): any; } export declare const declarations: (typeof SafeUrl | typeof SafeHtml | typeof SafeStyle | typeof ADate)[];
AckerApple/ack-angular
pipes.d.ts
TypeScript
mit
3,095
<?php namespace Fdr\UserBundle\Form\Type; //use Symfony\Component\Form\FormBuilder; //use FOS\UserBundle\Form\Type\RegistrationFormType as BaseType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Doctrine\ORM\EntityRepository; class RegistrationFormType extends AbstractType //extends BaseType getParent { //public function buildForm(FormBuilder $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options) { //parent::buildForm($builder, $options); $builder->add('nom'); $builder->add('prenom'); $builder->add('matricule',null,array('required'=>false)); $builder->add('tel'); $builder->add('adresse'); $builder->add('plainPassword', 'repeated', array('label'=>false, 'type' => 'password', 'first_options' => array('label' => 'Taper mdp. securisé ','attr'=>array('class'=>'')), 'second_options' => array('label' =>'Confirmation de mdp ','attr'=>array('class'=>'')), 'invalid_message' => 'Les deux mots de passe ne sont pas identiques', )); $builder->add('email'); $builder->add('cin'); $builder->add('depot',null,array('placeholder'=>'Choisir un depot','attr'=>array('title'=>'Choisir un depot'))); $builder->add("locked",null,array('label'=>'Compte verrouillé','required'=>false)); $builder->add("expired",null,array('label'=>'Compte expiré ','required'=>false)); $builder->add("expiresAt",'datetime', array('date_widget' => "single_text", 'time_widget' => "single_text",'required'=>false)); $builder->add('roles', 'entity', array('required'=>true, 'placeholder'=>'Choisir un rôle', 'mapped'=>false, 'attr'=>array('title'=>'Choisir un rôle'), 'class' => 'FdrAdminBundle:Role', 'query_builder' => function(EntityRepository $er) { return $er->createQueryBuilder('c'); })); $builder->add('submit','submit',array('label'=>'Enregistrer','attr'=>array('class'=>'btn btn-default'))); } public function getName() { return 'fdr_user_registration'; } public function getParent() { return 'fos_user_registration'; } }
ingetat2014/www
src/Fdr/UserBundle/Form/Type/RegistrationFormType.php
PHP
mit
2,730
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. using UnityEngine; namespace Microsoft.MixedReality.Toolkit.Physics { /// <summary> /// A Distorter that distorts points based on their distance and direction to the world /// center of gravity as defined by WorldCenterOfGravity. /// </summary> [AddComponentMenu("Scripts/MRTK/Core/DistorterGravity")] public class DistorterGravity : Distorter { [SerializeField] private Vector3 localCenterOfGravity; public Vector3 LocalCenterOfGravity { get { return localCenterOfGravity; } set { localCenterOfGravity = value; } } public Vector3 WorldCenterOfGravity { get { return transform.TransformPoint(localCenterOfGravity); } set { localCenterOfGravity = transform.InverseTransformPoint(value); } } [SerializeField] private Vector3 axisStrength = Vector3.one; public Vector3 AxisStrength { get { return axisStrength; } set { axisStrength = value; } } [Range(0f, 10f)] [SerializeField] private float radius = 0.5f; public float Radius { get { return radius; } set { radius = Mathf.Clamp(value, 0f, 10f); } } [SerializeField] private AnimationCurve gravityStrength = AnimationCurve.EaseInOut(0, 0, 1, 1); public AnimationCurve GravityStrength { get { return gravityStrength; } set { gravityStrength = value; } } /// <inheritdoc /> protected override Vector3 DistortPointInternal(Vector3 point, float strength) { Vector3 target = WorldCenterOfGravity; float normalizedDistance = 1f - Mathf.Clamp01(Vector3.Distance(point, target) / radius); strength *= gravityStrength.Evaluate(normalizedDistance); point.x = Mathf.Lerp(point.x, target.x, Mathf.Clamp01(strength * axisStrength.x)); point.y = Mathf.Lerp(point.y, target.y, Mathf.Clamp01(strength * axisStrength.y)); point.z = Mathf.Lerp(point.z, target.z, Mathf.Clamp01(strength * axisStrength.z)); return point; } /// <inheritdoc /> protected override Vector3 DistortScaleInternal(Vector3 point, float strength) { return point; } public void OnDrawGizmos() { Gizmos.color = Color.cyan; Gizmos.DrawSphere(WorldCenterOfGravity, 0.01f); } } }
SystemFriend/HoloLensUnityChan
Assets/MRTK/Core/Utilities/Physics/Distorters/DistorterGravity.cs
C#
mit
2,822
#include "questdisplay.h" #include "../core/global.h" //QuestLister stuff QuestLister::QuestLister(int xp, int yp, int wp, int hp) : BasicGUI(xp, yp, wp, hp) { headerSize = 35; //-1 due to the header displayableQuestCount = h / headerSize - 1; padding = 5; selectedElementPos = 0; defaultBGTexture = Global::resourceHandler->getATexture(TT::GUI, "questlistdefaultbg"); headBGTexture = Global::resourceHandler->getATexture(TT::GUI, "questlistheadbg"); selectedBGTexture = Global::resourceHandler->getATexture(TT::GUI, "questlistselectedbg"); questDisplay = NULL; } void QuestLister::render() { //Setting rectangle SDL_Rect destinationRect = {x, y, w, headerSize}; headBGTexture->render(destinationRect); ATexture* headerText = Global::resourceHandler->getTextTexture("Active quests", Global::resourceHandler->getColor("iteminfo-desc"), headerSize * 3 / 4); Dimension d = headerText->getDimensions(); SDL_Rect textDestRect = destinationRect; textDestRect.x += padding; textDestRect.y += padding; textDestRect.w = d.W(); textDestRect.h = d.H(); headerText->render(textDestRect); for (int i = 0; i < displayableQuestCount; i++) { destinationRect.y += headerSize; if (selectedElementPos == i) { selectedBGTexture->render(destinationRect); } else { defaultBGTexture->render(destinationRect); } Quest* currentQuest = getQuest(i); if (currentQuest != NULL) { ATexture* headerText = Global::resourceHandler->getTextTexture(currentQuest->getName(), Global::resourceHandler->getColor("iteminfo-desc"), headerSize * 2 / 3); Dimension d = headerText->getDimensions(); textDestRect = destinationRect; textDestRect.x += padding; textDestRect.y += padding; textDestRect.w = d.W(); textDestRect.h = d.H(); headerText->render(textDestRect); } } } Quest* QuestLister::getQuest(unsigned int index) { //NULL checking if (index >= questsToDisplay.size()) { return NULL; } return questsToDisplay[index]; } int QuestLister::getHeaderSize() { return headerSize; } int QuestLister::getPadding() { return padding; } QuestDisplay* QuestLister::getQuestDisplay() { return questDisplay; } void QuestLister::addQuest(Quest* questToAdd) { questsToDisplay.push_back(questToAdd); } void QuestLister::setPadding(int newPadding) { padding = newPadding; } void QuestLister::setQuestDisplay(QuestDisplay* newQuestDisplay) { questDisplay = newQuestDisplay; } void QuestLister::handleLeftClickEvent(int xp, int yp) { selectedElementPos = (yp - y) / headerSize - 1; Quest* currentQuest = getQuest(selectedElementPos); questDisplay->setQuest(currentQuest); } void QuestLister::handleMouseWheelEvent(bool up) { //TODO implementation } //QuestDisplay stuff QuestDisplay::QuestDisplay(int xp, int yp, int wp, int hp) : BasicGUI(xp, yp, wp, hp) { currentQuest = NULL; bgTexture = Global::resourceHandler->getATexture(TT::GUI, "questlistselectedbg"); titleSize = 36; descSize = 22; padding = 12; } void QuestDisplay::render() { //Setting rectangle SDL_Rect destinationRect = {x, y, w, h}; bgTexture->render(destinationRect); if (currentQuest != NULL) { SDL_Rect textDestRect; ATexture* titleText = Global::resourceHandler->getTextTexture(currentQuest->getName(), Global::resourceHandler->getColor("iteminfo-desc"), titleSize); Dimension d = titleText->getDimensions(); textDestRect = destinationRect; textDestRect.x += (textDestRect.w - d.W()) / 2; textDestRect.w = d.W(); textDestRect.h = d.H(); titleText->render(textDestRect); ATexture* descText = Global::resourceHandler->getTextTexture(currentQuest->getDescription(), Global::resourceHandler->getColor("iteminfo-desc"), descSize); d = descText->getDimensions(); textDestRect = destinationRect; textDestRect.x += padding; textDestRect.y += textDestRect.h / 6; textDestRect.w = d.W(); textDestRect.h = d.H(); descText->render(textDestRect); int size = 100; ATexture* objText = NULL; ATexture* oText = NULL; switch(currentQuest->getQuestObjective()) { case QuestObjective::TALK_WITH_NPC: objText = Global::resourceHandler->getTextTexture("Talk to:", Global::resourceHandler->getColor("iteminfo-desc"), descSize); oText = currentQuest->getQOTalkTarget()->texture; break; case QuestObjective::KILL_NPC: objText = Global::resourceHandler->getTextTexture("Kill:", Global::resourceHandler->getColor("iteminfo-desc"), descSize); oText = currentQuest->getQOKillTarget()->texture; break; case QuestObjective::VISIT_STRUCTURE: objText = Global::resourceHandler->getTextTexture("Visit:", Global::resourceHandler->getColor("iteminfo-desc"), descSize); oText = currentQuest->getQOStructTarget()->texture; break; } d = objText->getDimensions(); textDestRect = destinationRect; textDestRect.x += padding; textDestRect.y += textDestRect.h * 2 / 6; textDestRect.w = d.W(); textDestRect.h = d.H(); objText->render(textDestRect); oText->render({x + textDestRect.w + padding * 4, textDestRect.y, size, size}); ATexture* rewardText = Global::resourceHandler->getTextTexture("Reward:", Global::resourceHandler->getColor("iteminfo-desc"), descSize); d = rewardText->getDimensions(); textDestRect = destinationRect; textDestRect.x += padding; textDestRect.y += textDestRect.h * 3 / 6; textDestRect.w = d.W(); textDestRect.h = d.H(); rewardText->render(textDestRect); Global::resourceHandler->getATexture(TT::GUI, "gold")->render({x + textDestRect.w + padding * 4, textDestRect.y, size, size}); ATexture* goldText = Global::resourceHandler->getTextTexture(std::to_string(currentQuest->getRewardGold()), Global::resourceHandler->getColor("gold"), descSize * 3); d = goldText->getDimensions(); textDestRect.x += textDestRect.w + size + padding * 6; textDestRect.w = d.W(); textDestRect.h = d.H(); goldText->render(textDestRect); int rowLength = w / size; //int rows = (int)std::ceil((double)currentQuest->getRewardItemsSize() / rowLength); for (unsigned int i = 0; i < currentQuest->getRewardItemsSize(); i++) { destinationRect.x = x + (i % rowLength) * size; destinationRect.y = y + h * 4 / 6 + ((i / rowLength) * size); destinationRect.w = size; destinationRect.h = size; currentQuest->getRewardItem(i)->render(destinationRect, false); } } } Quest* QuestDisplay::getQuest() { return currentQuest; } void QuestDisplay::setQuest(Quest* newQuest) { currentQuest = newQuest; }
kovleventer/FoD
src/player/questdisplay.cpp
C++
mit
6,449
package com.github.gilz688.mifeditor; import com.github.gilz688.mifeditor.proto.MIEView; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Scene; import javafx.scene.layout.AnchorPane; import javafx.stage.Stage; public class MIEApplication extends Application { private Stage primaryStage; private AnchorPane rootLayout; public static final String APPLICATION_NAME = "MIF Image Editor"; @Override public void start(Stage primaryStage) { this.primaryStage = primaryStage; try { // Load root layout from fxml file. FXMLLoader loader = new FXMLLoader(); loader.setLocation(MIEApplication.class .getResource("view/MIE.fxml")); rootLayout = (AnchorPane) loader.load(); // Show the scene containing the root layout. Scene scene = new Scene(rootLayout); scene.getStylesheets().add( getClass().getResource("application.css").toExternalForm()); primaryStage.setTitle(APPLICATION_NAME); primaryStage.setScene(scene); primaryStage.show(); final MIEView view = (MIEView) loader.getController(); view.setStage(primaryStage); } catch (Exception e) { e.printStackTrace(); } } public static void main(String[] args) { launch(args); } }
gilz688/MIF-ImageEditor
MIFImageEditor/src/main/java/com/github/gilz688/mifeditor/MIEApplication.java
Java
mit
1,289
<?xml version="1.0" ?><!DOCTYPE TS><TS language="pl" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About ShadowCoin</source> <translation>O ShadowCoin</translation> </message> <message> <location line="+39"/> <source>&lt;b&gt;ShadowCoin&lt;/b&gt; version</source> <translation>&lt;b&gt;ShadowCoin&lt;/b&gt; wersja</translation> </message> <message> <location line="+41"/> <source>Copyright © 2009-2014 The Bitcoin developers Copyright © 2012-2014 The NovaCoin developers Copyright © 2014 The BlackCoin developers Copyright © 2014 The ShadowCoin developers</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source> <translation> Oprogramowanie eksperymentalne. 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.</translation> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation>Książka Adresowa</translation> </message> <message> <location line="+22"/> <source>Double-click to edit address or label</source> <translation>Kliknij dwukrotnie, aby edytować adres lub etykietę</translation> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation>Utwórz nowy adres</translation> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation>Skopiuj aktualnie wybrany adres do schowka</translation> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation>Nowy Adres</translation> </message> <message> <location line="-46"/> <source>These are your ShadowCoin 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>Tutaj znajdują się twoje adresy do odbierania wpłat. Możesz dodać kolejny adres dla każdego wysyłającego aby określić od kogo pochodzi wpłata.</translation> </message> <message> <location line="+60"/> <source>&amp;Copy Address</source> <translation>&amp;Kopiuj adres</translation> </message> <message> <location line="+11"/> <source>Show &amp;QR Code</source> <translation>Pokaż &amp;Kod QR</translation> </message> <message> <location line="+11"/> <source>Sign a message to prove you own a ShadowCoin address</source> <translation>Podpisz wiadomość by udowodnić, że jesteś właścicielem adresu ShadowCoin</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation>Podpisz &amp;Wiadomość</translation> </message> <message> <location line="+25"/> <source>Delete the currently selected address from the list</source> <translation>Usuń zaznaczony adres z listy</translation> </message> <message> <location line="-14"/> <source>Verify a message to ensure it was signed with a specified ShadowCoin address</source> <translation>Zweryfikuj wiadomość, w celu zapewnienia, że została podpisana z określonego adresu ShadowCoin</translation> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation>&amp;Zweryfikuj wiadomość</translation> </message> <message> <location line="+14"/> <source>&amp;Delete</source> <translation>&amp;Usuń</translation> </message> <message> <location filename="../addressbookpage.cpp" line="+65"/> <source>Copy &amp;Label</source> <translation>Kopiuj &amp;Etykietę</translation> </message> <message> <location line="+2"/> <source>&amp;Edit</source> <translation>&amp;Edytuj</translation> </message> <message> <location line="+250"/> <source>Export Address Book Data</source> <translation>Exportuj Książkę Adresową</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Plik *.CSV (rozdzielany przecinkami)</translation> </message> <message> <location line="+13"/> <source>Error exporting</source> <translation>Błąd exportowania</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>Nie mogę zapisać do pliku %1</translation> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+144"/> <source>Label</source> <translation>Etykieta</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Adres</translation> </message> <message> <location line="+36"/> <source>(no label)</source> <translation>(bez etykiety)</translation> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation>Okienko Hasła</translation> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation>Wpisz hasło</translation> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation>Nowe hasło</translation> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation>Powtórz nowe hasło</translation> </message> <message> <location line="+33"/> <source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>For staking only</source> <translation type="unfinished"/> </message> <message> <location filename="../askpassphrasedialog.cpp" line="+35"/> <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source> <translation>Wprowadź nowe hasło dla portfela.&lt;br/&gt;Proszę użyć hasła składającego się z &lt;b&gt;10 lub więcej losowych znaków&lt;/b&gt; lub &lt;b&gt;ośmiu lub więcej słów&lt;/b&gt;.</translation> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation>Zaszyfruj portfel</translation> </message> <message> <location line="+7"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation>Ta operacja wymaga hasła do portfela ażeby odblokować portfel.</translation> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation>Odblokuj portfel</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation>Ta operacja wymaga hasła do portfela ażeby odszyfrować portfel.</translation> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation>Odszyfruj portfel</translation> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation>Zmień hasło</translation> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation>Podaj stare i nowe hasło do portfela.</translation> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation>Potwierdź szyfrowanie portfela</translation> </message> <message> <location line="+1"/> <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR COINS&lt;/b&gt;!</source> <translation>Uwaga: Jeśli zaszyfrujesz swój portfel i zgubisz hasło, wtedy&lt;b&gt;UTRACISZ SWOJE MONETY!&lt;/b&gt;!</translation> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation>Jesteś pewien, że chcesz zaszyfrować swój portfel?</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>WAŻNE: Wszystkie wykonane wcześniej kopie pliku portfela powinny być zamienione na nowe, szyfrowane pliki. Z powodów bezpieczeństwa, poprzednie kopie nieszyfrowanych plików portfela staną się bezużyteczne jak tylko zaczniesz korzystać z nowego, szyfrowanego portfela.</translation> </message> <message> <location line="+103"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation>Uwaga: Klawisz Caps Lock jest włączony</translation> </message> <message> <location line="-133"/> <location line="+60"/> <source>Wallet encrypted</source> <translation>Portfel zaszyfrowany</translation> </message> <message> <location line="-58"/> <source>ShadowCoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer.</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+44"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation>Szyfrowanie portfela nie powiodło się</translation> </message> <message> <location line="-56"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation>Szyfrowanie portfela nie powiodło się z powodu wewnętrznego błędu. Twój portfel nie został zaszyfrowany.</translation> </message> <message> <location line="+7"/> <location line="+50"/> <source>The supplied passphrases do not match.</source> <translation>Podane hasła nie są takie same.</translation> </message> <message> <location line="-38"/> <source>Wallet unlock failed</source> <translation>Odblokowanie portfela nie powiodło się</translation> </message> <message> <location line="+1"/> <location line="+12"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation>Wprowadzone hasło do odszyfrowania portfela jest niepoprawne.</translation> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation>Odszyfrowanie portfela nie powiodło się</translation> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation>Hasło portfela zostało pomyślnie zmienione.</translation> </message> </context> <context> <name>BitcoinGUI</name> <message> <location filename="../bitcoingui.cpp" line="+280"/> <source>Sign &amp;message...</source> <translation>Podpisz wiado&amp;mość...</translation> </message> <message> <location line="+242"/> <source>Synchronizing with network...</source> <translation>Synchronizacja z siecią...</translation> </message> <message> <location line="-308"/> <source>&amp;Overview</source> <translation>P&amp;odsumowanie</translation> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation>Pokazuje ogólny zarys portfela</translation> </message> <message> <location line="+17"/> <source>&amp;Transactions</source> <translation>&amp;Transakcje</translation> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation>Przeglądaj historię transakcji</translation> </message> <message> <location line="+5"/> <source>&amp;Address Book</source> <translation>&amp;Książka Adresowa</translation> </message> <message> <location line="+1"/> <source>Edit the list of stored addresses and labels</source> <translation>Edytuj listę przechowywanych adresów i etykiet</translation> </message> <message> <location line="-13"/> <source>&amp;Receive coins</source> <translation>&amp;Odbierz monety</translation> </message> <message> <location line="+1"/> <source>Show the list of addresses for receiving payments</source> <translation>Pokaż listę adresów do odbierania wpłat</translation> </message> <message> <location line="-7"/> <source>&amp;Send coins</source> <translation>&amp;Wyślij monety</translation> </message> <message> <location line="+35"/> <source>E&amp;xit</source> <translation>&amp;Zakończ</translation> </message> <message> <location line="+1"/> <source>Quit application</source> <translation>Zamknij program</translation> </message> <message> <location line="+4"/> <source>Show information about ShadowCoin</source> <translation>Pokaż informacje dotyczące ShadowCoin</translation> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation>O &amp;Qt</translation> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation>Pokazuje informacje o Qt</translation> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation>&amp;Opcje...</translation> </message> <message> <location line="+4"/> <source>&amp;Encrypt Wallet...</source> <translation>Zaszyfruj Portf&amp;el</translation> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation>Wykonaj kopię zapasową...</translation> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation>&amp;Zmień hasło...</translation> </message> <message numerus="yes"> <location line="+250"/> <source>~%n block(s) remaining</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+6"/> <source>Downloaded %1 of %2 blocks of transaction history (%3% done).</source> <translation>Pobrano %1 z %2 bloków historii transakcji (%3% gotowe).</translation> </message> <message> <location line="-247"/> <source>&amp;Export...</source> <translation>&amp;Exportuj</translation> </message> <message> <location line="-62"/> <source>Send coins to a ShadowCoin address</source> <translation>Wyślij monety na adres ShadowCoin</translation> </message> <message> <location line="+45"/> <source>Modify configuration options for ShadowCoin</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"/> </message> <message> <location line="-14"/> <source>Encrypt or decrypt wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Backup wallet to another location</source> <translation>Zapasowy portfel w innej lokalizacji</translation> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation>Zmień hasło użyte do szyfrowania portfela</translation> </message> <message> <location line="+10"/> <source>&amp;Debug window</source> <translation>&amp;Okno debugowania</translation> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation>Otwórz konsolę debugowania i diagnostyki</translation> </message> <message> <location line="-5"/> <source>&amp;Verify message...</source> <translation>&amp;Zweryfikuj wiadomość...</translation> </message> <message> <location line="-200"/> <source>ShadowCoin</source> <translation>ShadowCoin</translation> </message> <message> <location line="+0"/> <source>Wallet</source> <translation>Portfel</translation> </message> <message> <location line="+178"/> <source>&amp;About ShadowCoin</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation>&amp;Pokaż / Ukryj</translation> </message> <message> <location line="+9"/> <source>Unlock wallet</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>&amp;Lock Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Lock wallet</source> <translation type="unfinished"/> </message> <message> <location line="+34"/> <source>&amp;File</source> <translation>&amp;Plik</translation> </message> <message> <location line="+8"/> <source>&amp;Settings</source> <translation>P&amp;referencje</translation> </message> <message> <location line="+8"/> <source>&amp;Help</source> <translation>Pomo&amp;c</translation> </message> <message> <location line="+9"/> <source>Tabs toolbar</source> <translation>Pasek zakładek</translation> </message> <message> <location line="+8"/> <source>Actions toolbar</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <location line="+9"/> <source>[testnet]</source> <translation>[testnet]</translation> </message> <message> <location line="+0"/> <location line="+60"/> <source>ShadowCoin client</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+70"/> <source>%n active connection(s) to ShadowCoin network</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+40"/> <source>Downloaded %1 blocks of transaction history.</source> <translation type="unfinished"/> </message> <message> <location line="+413"/> <source>Staking.&lt;br&gt;Your weight is %1&lt;br&gt;Network weight is %2&lt;br&gt;Expected time to earn reward is %3</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Not staking because wallet is locked</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Not staking because wallet is offline</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Not staking because wallet is syncing</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Not staking because you don&apos;t have mature coins</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-403"/> <source>%n second(s) ago</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="-284"/> <source>&amp;Unlock Wallet...</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+288"/> <source>%n minute(s) ago</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n hour(s) ago</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s) ago</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+6"/> <source>Up to date</source> <translation>Aktualny</translation> </message> <message> <location line="+7"/> <source>Catching up...</source> <translation>Łapanie bloków...</translation> </message> <message> <location line="+10"/> <source>Last received block was generated %1.</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Confirm transaction fee</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Sent transaction</source> <translation>Transakcja wysłana</translation> </message> <message> <location line="+1"/> <source>Incoming transaction</source> <translation>Transakcja przychodząca</translation> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation>Data: %1 Kwota: %2 Typ: %3 Adres: %4 </translation> </message> <message> <location line="+100"/> <location line="+15"/> <source>URI handling</source> <translation type="unfinished"/> </message> <message> <location line="-15"/> <location line="+15"/> <source>URI can not be parsed! This can be caused by an invalid ShadowCoin address or malformed URI parameters.</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation>Portfel jest &lt;b&gt;zaszyfrowany&lt;/b&gt; i obecnie &lt;b&gt;niezablokowany&lt;/b&gt;</translation> </message> <message> <location line="+10"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source> <translation>Portfel jest &lt;b&gt;zaszyfrowany&lt;/b&gt; i obecnie &lt;b&gt;zablokowany&lt;/b&gt;</translation> </message> <message> <location line="+25"/> <source>Backup Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Wallet Data (*.dat)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Backup Failed</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+76"/> <source>%n second(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n minute(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n hour(s)</source> <translation><numerusform>%n godzina</numerusform><numerusform>%n godzin</numerusform><numerusform>%n godzin</numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation><numerusform>%n dzień</numerusform><numerusform>%n dni</numerusform><numerusform>%n dni</numerusform></translation> </message> <message> <location line="+18"/> <source>Not staking</source> <translation type="unfinished"/> </message> <message> <location filename="../bitcoin.cpp" line="+109"/> <source>A fatal error occurred. ShadowCoin can no longer continue safely and will quit.</source> <translation type="unfinished"/> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+90"/> <source>Network Alert</source> <translation>Sieć Alert</translation> </message> </context> <context> <name>CoinControlDialog</name> <message> <location filename="../forms/coincontroldialog.ui" line="+14"/> <source>Coin Control</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Quantity:</source> <translation>Ilość:</translation> </message> <message> <location line="+32"/> <source>Bytes:</source> <translation>Bajtów:</translation> </message> <message> <location line="+48"/> <source>Amount:</source> <translation>Kwota:</translation> </message> <message> <location line="+32"/> <source>Priority:</source> <translation>Priorytet:</translation> </message> <message> <location line="+48"/> <source>Fee:</source> <translation>Opłata:</translation> </message> <message> <location line="+35"/> <source>Low Output:</source> <translation type="unfinished"/> </message> <message> <location filename="../coincontroldialog.cpp" line="+551"/> <source>no</source> <translation>nie</translation> </message> <message> <location filename="../forms/coincontroldialog.ui" line="+51"/> <source>After Fee:</source> <translation>Po opłacie:</translation> </message> <message> <location line="+35"/> <source>Change:</source> <translation>Reszta:</translation> </message> <message> <location line="+69"/> <source>(un)select all</source> <translation>Zaznacz/Odznacz wszystko</translation> </message> <message> <location line="+13"/> <source>Tree mode</source> <translation>Widok drzewa</translation> </message> <message> <location line="+16"/> <source>List mode</source> <translation>Widok listy</translation> </message> <message> <location line="+45"/> <source>Amount</source> <translation>Kwota</translation> </message> <message> <location line="+5"/> <source>Label</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Address</source> <translation>Adres</translation> </message> <message> <location line="+5"/> <source>Date</source> <translation>Data</translation> </message> <message> <location line="+5"/> <source>Confirmations</source> <translation>Potwierdzenia</translation> </message> <message> <location line="+3"/> <source>Confirmed</source> <translation>Potwierdzony</translation> </message> <message> <location line="+5"/> <source>Priority</source> <translation>Priorytet</translation> </message> <message> <location filename="../coincontroldialog.cpp" line="-515"/> <source>Copy address</source> <translation>Kopiuj adres</translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>Kopiuj etykietę</translation> </message> <message> <location line="+1"/> <location line="+26"/> <source>Copy amount</source> <translation>Kopiuj kwotę</translation> </message> <message> <location line="-25"/> <source>Copy transaction ID</source> <translation>Skopiuj ID transakcji</translation> </message> <message> <location line="+24"/> <source>Copy quantity</source> <translation>Skopiuj ilość</translation> </message> <message> <location line="+2"/> <source>Copy fee</source> <translation>Skopiuj opłatę</translation> </message> <message> <location line="+1"/> <source>Copy after fee</source> <translation>Skopiuj ilość po opłacie</translation> </message> <message> <location line="+1"/> <source>Copy bytes</source> <translation>Skopiuj ilość bajtów</translation> </message> <message> <location line="+1"/> <source>Copy priority</source> <translation>Skopiuj priorytet</translation> </message> <message> <location line="+1"/> <source>Copy low output</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy change</source> <translation>Skopiuj resztę</translation> </message> <message> <location line="+317"/> <source>highest</source> <translation>najwyższa</translation> </message> <message> <location line="+1"/> <source>high</source> <translation>wysoka</translation> </message> <message> <location line="+1"/> <source>medium-high</source> <translation>średnio wysoki</translation> </message> <message> <location line="+1"/> <source>medium</source> <translation>średnia</translation> </message> <message> <location line="+4"/> <source>low-medium</source> <translation>średnio niski</translation> </message> <message> <location line="+1"/> <source>low</source> <translation>niski</translation> </message> <message> <location line="+1"/> <source>lowest</source> <translation>najniższy</translation> </message> <message> <location line="+155"/> <source>DUST</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>yes</source> <translation>tak</translation> </message> <message> <location line="+10"/> <source>This label turns red, if the transaction size is bigger than 10000 bytes. This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transactions with higher priority get more likely into a block. This label turns red, if the priority is smaller than &quot;medium&quot;. This means a fee of at least %1 per kb is required.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This label turns red, if any recipient receives an amount smaller than %1. This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required.</source> <translation type="unfinished"/> </message> <message> <location line="+37"/> <location line="+66"/> <source>(no label)</source> <translation>(bez etykiety)</translation> </message> <message> <location line="-9"/> <source>change from %1 (%2)</source> <translation>reszta z %1 (%2)</translation> </message> <message> <location line="+1"/> <source>(change)</source> <translation>(reszta)</translation> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation>Edytuj adres</translation> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation>&amp;Etykieta</translation> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation>&amp;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 type="unfinished"/> </message> <message> <location filename="../editaddressdialog.cpp" line="+20"/> <source>New receiving address</source> <translation>Nowy adres odbiorczy</translation> </message> <message> <location line="+4"/> <source>New sending address</source> <translation>Nowy adres wysyłania</translation> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation>Edytuj adres odbioru</translation> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation>Edytuj adres wysyłania</translation> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation>Wprowadzony adres &quot;%1&quot; już istnieje w książce adresowej.</translation> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid ShadowCoin address.</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation>Nie można było odblokować portfela.</translation> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation>Tworzenie nowego klucza nie powiodło się.</translation> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+420"/> <location line="+12"/> <source>ShadowCoin-Qt</source> <translation type="unfinished"/> </message> <message> <location line="-12"/> <source>version</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Usage:</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>command-line options</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>UI options</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation type="unfinished"/> </message> </context> <context> <name>OptionsDialog</name> <message> <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation>Opcje</translation> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation>Główne</translation> </message> <message> <location line="+6"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation>Płać prowizję za transakcje</translation> </message> <message> <location line="+31"/> <source>Reserved amount does not participate in staking and is therefore spendable at any time.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Reserve</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Automatically start ShadowCoin after logging in to the system.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Start ShadowCoin on system login</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Detach block and address databases at shutdown. This means they can be moved to another data directory, but it slows down shutdown. The wallet is always detached.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Detach databases at shutdown</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>&amp;Network</source> <translation>&amp;Sieć</translation> </message> <message> <location line="+6"/> <source>Automatically open the ShadowCoin client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Map port using &amp;UPnP</source> <translation>Mapuj port używając &amp;UPnP</translation> </message> <message> <location line="+7"/> <source>Connect to the ShadowCoin network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy:</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Proxy &amp;IP:</source> <translation>Proxy &amp;IP: </translation> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation>&amp;Port:</translation> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation>Port proxy (np. 9050)</translation> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation>Wersja &amp;SOCKS</translation> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation>SOCKS wersja serwera proxy (np. 5)</translation> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation>&amp;Okno</translation> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation>Pokazuj tylko ikonę przy zegarku po zminimalizowaniu okna.</translation> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation>&amp;Minimalizuj do paska przy zegarku zamiast do paska zadań</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>Minimalizuje zamiast zakończyć działanie programu przy zamykaniu okna. Kiedy ta opcja jest włączona, program zakończy działanie po wybieraniu Zamknij w menu.</translation> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation>M&amp;inimalizuj przy zamknięciu</translation> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation>&amp;Wyświetlanie</translation> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation>Język &amp;Użytkownika:</translation> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting ShadowCoin.</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation>&amp;Jednostka pokazywana przy kwocie:</translation> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation>Wybierz podział jednostki pokazywany w interfejsie oraz podczas wysyłania monet</translation> </message> <message> <location line="+9"/> <source>Whether to show ShadowCoin addresses in the transaction list or not.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation>&amp;Wyświetlaj adresy w liście transakcji</translation> </message> <message> <location line="+7"/> <source>Whether to show coin control features or not.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Display coin &amp;control features (experts only!)</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>&amp;OK</source> <translation>&amp;OK</translation> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation>&amp;Anuluj</translation> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation type="unfinished"/> </message> <message> <location filename="../optionsdialog.cpp" line="+55"/> <source>default</source> <translation>domyślny</translation> </message> <message> <location line="+149"/> <location line="+9"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="-9"/> <location line="+9"/> <source>This setting will take effect after restarting ShadowCoin.</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation>Adres podanego proxy jest nieprawidłowy</translation> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation>Formularz</translation> </message> <message> <location line="+33"/> <location line="+231"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the ShadowCoin network after a connection is established, but this process has not completed yet.</source> <translation type="unfinished"/> </message> <message> <location line="-160"/> <source>Stake:</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>Unconfirmed:</source> <translation type="unfinished"/> </message> <message> <location line="-107"/> <source>Wallet</source> <translation>Portfel</translation> </message> <message> <location line="+49"/> <source>Spendable:</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Your current spendable balance</source> <translation>Twoje obecne saldo</translation> </message> <message> <location line="+71"/> <source>Immature:</source> <translation>Niedojrzały: </translation> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation>Balans wydobycia, który jeszcze nie dojrzał</translation> </message> <message> <location line="+20"/> <source>Total:</source> <translation>Wynosi ogółem:</translation> </message> <message> <location line="+16"/> <source>Your current total balance</source> <translation>Twoje obecne saldo</translation> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation>&lt;b&gt;Ostatnie transakcje&lt;/b&gt;</translation> </message> <message> <location line="-108"/> <source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source> <translation type="unfinished"/> </message> <message> <location line="-29"/> <source>Total of coins that was staked, and do not yet count toward the current balance</source> <translation type="unfinished"/> </message> <message> <location filename="../overviewpage.cpp" line="+113"/> <location line="+1"/> <source>out of sync</source> <translation>desynchronizacja</translation> </message> </context> <context> <name>QRCodeDialog</name> <message> <location filename="../forms/qrcodedialog.ui" line="+14"/> <source>QR Code Dialog</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <source>Request Payment</source> <translation type="unfinished"/> </message> <message> <location line="+56"/> <source>Amount:</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>Label:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Message:</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>&amp;Save As...</source> <translation type="unfinished"/> </message> <message> <location filename="../qrcodedialog.cpp" line="+62"/> <source>Error encoding URI into QR Code.</source> <translation type="unfinished"/> </message> <message> <location line="+40"/> <source>The entered amount is invalid, please check.</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Save QR Code</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>PNG Images (*.png)</source> <translation type="unfinished"/> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation>Nazwa klienta</translation> </message> <message> <location line="+10"/> <location line="+23"/> <location line="+26"/> <location line="+23"/> <location line="+23"/> <location line="+36"/> <location line="+53"/> <location line="+23"/> <location line="+23"/> <location filename="../rpcconsole.cpp" line="+348"/> <source>N/A</source> <translation>NIEDOSTĘPNE</translation> </message> <message> <location line="-217"/> <source>Client version</source> <translation>Wersja klienta</translation> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation>&amp;Informacje</translation> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation>Używana wersja OpenSSL</translation> </message> <message> <location line="+49"/> <source>Startup time</source> <translation>Czas uruchomienia</translation> </message> <message> <location line="+29"/> <source>Network</source> <translation>Sieć</translation> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation>Liczba połączeń</translation> </message> <message> <location line="+23"/> <source>On testnet</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Block chain</source> <translation>Ciąg bloków</translation> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation>Aktualna liczba bloków</translation> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation>Szacowana ilość bloków</translation> </message> <message> <location line="+23"/> <source>Last block time</source> <translation>Czas ostatniego bloku</translation> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation>&amp;Otwórz</translation> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Show the ShadowCoin-Qt help message to get a list with possible ShadowCoin command-line options.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Show</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation>&amp;Konsola</translation> </message> <message> <location line="-260"/> <source>Build date</source> <translation>Data kompilacji</translation> </message> <message> <location line="-104"/> <source>ShadowCoin - Debug window</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>ShadowCoin Core</source> <translation type="unfinished"/> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation>Plik logowania debugowania</translation> </message> <message> <location line="+7"/> <source>Open the ShadowCoin debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation type="unfinished"/> </message> <message> <location line="+102"/> <source>Clear console</source> <translation>Wyczyść konsolę</translation> </message> <message> <location filename="../rpcconsole.cpp" line="-33"/> <source>Welcome to the ShadowCoin RPC console.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source> <translation>Użyj strzałek do przewijania historii i &lt;b&gt;Ctrl-L&lt;/b&gt; aby wyczyścić ekran</translation> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation>Wpisz &lt;b&gt;help&lt;/b&gt; aby uzyskać listę dostępnych komend</translation> </message> </context> <context> <name>SendCoinsDialog</name> <message> <location filename="../forms/sendcoinsdialog.ui" line="+14"/> <location filename="../sendcoinsdialog.cpp" line="+182"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+6"/> <location line="+5"/> <location line="+5"/> <source>Send Coins</source> <translation>Wyślij Monety</translation> </message> <message> <location line="+76"/> <source>Coin Control Features</source> <translation type="unfinished"/> </message> <message> <location line="+20"/> <source>Inputs...</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>automatically selected</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Insufficient funds!</source> <translation type="unfinished"/> </message> <message> <location line="+77"/> <source>Quantity:</source> <translation>Ilość:</translation> </message> <message> <location line="+22"/> <location line="+35"/> <source>0</source> <translation type="unfinished"/> </message> <message> <location line="-19"/> <source>Bytes:</source> <translation>Bajtów:</translation> </message> <message> <location line="+51"/> <source>Amount:</source> <translation>Kwota:</translation> </message> <message> <location line="+22"/> <location line="+86"/> <location line="+86"/> <location line="+32"/> <source>0.00 SDC</source> <translation type="unfinished"/> </message> <message> <location line="-191"/> <source>Priority:</source> <translation>Priorytet:</translation> </message> <message> <location line="+19"/> <source>medium</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>Fee:</source> <translation>Opłata:</translation> </message> <message> <location line="+35"/> <source>Low Output:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>no</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>After Fee:</source> <translation>Po opłacie:</translation> </message> <message> <location line="+35"/> <source>Change</source> <translation type="unfinished"/> </message> <message> <location line="+50"/> <source>custom change address</source> <translation type="unfinished"/> </message> <message> <location line="+106"/> <source>Send to multiple recipients at once</source> <translation>Wyślij do wielu odbiorców na raz</translation> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation>Dodaj Odbio&amp;rce</translation> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation>Wyczyść &amp;wszystko</translation> </message> <message> <location line="+28"/> <source>Balance:</source> <translation>Saldo:</translation> </message> <message> <location line="+16"/> <source>123.456 SDC</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Confirm the send action</source> <translation>Potwierdź akcję wysyłania</translation> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation>Wy&amp;syłka</translation> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-173"/> <source>Enter a ShadowCoin address (e.g. SXywGBZBowrppUwwNUo1GCRDTibzJi7g2M)</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Copy quantity</source> <translation>Skopiuj ilość</translation> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation>Kopiuj kwotę</translation> </message> <message> <location line="+1"/> <source>Copy fee</source> <translation>Skopiuj opłatę</translation> </message> <message> <location line="+1"/> <source>Copy after fee</source> <translation>Skopiuj ilość po opłacie</translation> </message> <message> <location line="+1"/> <source>Copy bytes</source> <translation>Skopiuj ilość bajtów</translation> </message> <message> <location line="+1"/> <source>Copy priority</source> <translation>Skopiuj priorytet</translation> </message> <message> <location line="+1"/> <source>Copy low output</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy change</source> <translation>Skopiuj resztę</translation> </message> <message> <location line="+86"/> <source>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Confirm send coins</source> <translation>Potwierdź wysyłanie monet</translation> </message> <message> <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source> and </source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>The recipient address is not valid, please recheck.</source> <translation>Adres odbiorcy jest nieprawidłowy, proszę poprawić</translation> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation>Kwota do zapłacenia musi być większa od 0.</translation> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation>Kwota przekracza twoje saldo.</translation> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation>Suma przekracza twoje saldo, gdy doliczymy %1 prowizji transakcyjnej.</translation> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation>Znaleziono powtórzony adres, można wysłać tylko raz na każdy adres podczas operacji wysyłania.</translation> </message> <message> <location line="+5"/> <source>Error: Transaction creation failed.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> <message> <location line="+251"/> <source>WARNING: Invalid ShadowCoin address</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>(no label)</source> <translation>(bez etykiety)</translation> </message> <message> <location line="+4"/> <source>WARNING: unknown change address</source> <translation type="unfinished"/> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>A&amp;mount:</source> <translation>Su&amp;ma:</translation> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation>Zapłać &amp;dla:</translation> </message> <message> <location line="+24"/> <location filename="../sendcoinsentry.cpp" line="+25"/> <source>Enter a label for this address to add it to your address book</source> <translation>Wprowadź etykietę dla tego adresu by dodać go do książki adresowej</translation> </message> <message> <location line="+9"/> <source>&amp;Label:</source> <translation>&amp;Etykieta:</translation> </message> <message> <location line="+18"/> <source>The address to send the payment to (e.g. SXywGBZBowrppUwwNUo1GCRDTibzJi7g2M)</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Choose address from address book</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="+7"/> <source>Paste address from clipboard</source> <translation>Wklej adres ze schowka</translation> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation>Alt+P</translation> </message> <message> <location line="+7"/> <source>Remove this recipient</source> <translation type="unfinished"/> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a ShadowCoin address (e.g. SXywGBZBowrppUwwNUo1GCRDTibzJi7g2M)</source> <translation type="unfinished"/> </message> </context> <context> <name>SignVerifyMessageDialog</name> <message> <location filename="../forms/signverifymessagedialog.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation>Podpisy - Podpisz / zweryfikuj wiadomość</translation> </message> <message> <location line="+13"/> <location line="+124"/> <source>&amp;Sign Message</source> <translation>Podpi&amp;sz Wiadomość</translation> </message> <message> <location line="-118"/> <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source> <translation>Możesz podpisywać wiadomości swoimi adresami aby udowodnić, że jesteś ich właścicielem. Uważaj, aby nie podpisywać niczego co wzbudza Twoje podejrzenia, ponieważ ktoś może stosować phishing próbując nakłonić Cię do ich podpisania. Akceptuj i podpisuj tylko w pełni zrozumiałe komunikaty i wiadomości.</translation> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. SXywGBZBowrppUwwNUo1GCRDTibzJi7g2M)</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <location line="+203"/> <source>Choose an address from the address book</source> <translation type="unfinished"/> </message> <message> <location line="-193"/> <location line="+203"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="-193"/> <source>Paste address from clipboard</source> <translation>Wklej adres ze schowka</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>Wprowadź wiadomość, którą chcesz podpisać, tutaj</translation> </message> <message> <location line="+24"/> <source>Copy the current signature to the system clipboard</source> <translation>Kopiuje aktualny podpis do schowka systemowego</translation> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this ShadowCoin address</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Reset all sign message fields</source> <translation>Zresetuj wszystkie pola podpisanej wiadomości</translation> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation>Wyczyść &amp;wszystko</translation> </message> <message> <location line="-87"/> <location line="+70"/> <source>&amp;Verify Message</source> <translation>&amp;Zweryfikuj wiadomość</translation> </message> <message> <location line="-64"/> <source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source> <translation>Wpisz adres podpisu, wiadomość (upewnij się, że dokładnie skopiujesz wszystkie zakończenia linii, spacje, tabulacje itp.) oraz podpis poniżej by sprawdzić wiadomość. Uważaj by nie dodać więcej do podpisu niż do samej podpisywanej wiadomości by uniknąć ataku man-in-the-middle (człowiek pośrodku)</translation> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. SXywGBZBowrppUwwNUo1GCRDTibzJi7g2M)</source> <translation type="unfinished"/> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified ShadowCoin address</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Reset all verify message fields</source> <translation>Resetuje wszystkie pola weryfikacji wiadomości</translation> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a ShadowCoin address (e.g. SXywGBZBowrppUwwNUo1GCRDTibzJi7g2M)</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation>Kliknij &quot;Podpisz Wiadomość&quot; żeby uzyskać podpis</translation> </message> <message> <location line="+3"/> <source>Enter ShadowCoin signature</source> <translation type="unfinished"/> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation>Podany adres jest nieprawidłowy.</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>Proszę sprawdzić adres i spróbować ponownie.</translation> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation>Wprowadzony adres nie odnosi się do klucza.</translation> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation>Odblokowanie portfela zostało anulowane.</translation> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation>Klucz prywatny dla podanego adresu nie jest dostępny</translation> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation>Podpisanie wiadomości nie powiodło się</translation> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation>Wiadomość podpisana.</translation> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation>Podpis nie może zostać zdekodowany.</translation> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation>Sprawdź podpis i spróbuj ponownie.</translation> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation>Podpis nie odpowiadał streszczeniu wiadomości</translation> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation>Weryfikacja wiadomości nie powiodła się.</translation> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation>Wiadomość zweryfikowana.</translation> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+19"/> <source>Open until %1</source> <translation>Otwórz do %1</translation> </message> <message numerus="yes"> <location line="-2"/> <source>Open for %n block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+8"/> <source>conflicted</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1/offline</source> <translation>%1/offline</translation> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation>%1/niezatwierdzone</translation> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation>%1 potwierdzeń</translation> </message> <message> <location line="+18"/> <source>Status</source> <translation>Status</translation> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation><numerusform>, emitowany przez %n węzeł</numerusform><numerusform>, emitowany przez %n węzły</numerusform><numerusform>, emitowany przez %n węzłów</numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation>Data</translation> </message> <message> <location line="+7"/> <source>Source</source> <translation>Źródło</translation> </message> <message> <location line="+0"/> <source>Generated</source> <translation>Wygenerowano</translation> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation>Od</translation> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation>Do</translation> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation>własny adres</translation> </message> <message> <location line="-2"/> <source>label</source> <translation>etykieta</translation> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation>Przypisy</translation> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation><numerusform>potwierdzona przy %n bloku więcej</numerusform><numerusform>potwierdzona przy %n blokach więcej</numerusform><numerusform>potwierdzona przy %n blokach więcej</numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation>niezaakceptowane</translation> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation>Debet</translation> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation>Prowizja transakcji</translation> </message> <message> <location line="+16"/> <source>Net amount</source> <translation>Kwota netto</translation> </message> <message> <location line="+6"/> <source>Message</source> <translation>Wiadomość</translation> </message> <message> <location line="+2"/> <source>Comment</source> <translation>Komentarz</translation> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation>ID transakcji</translation> </message> <message> <location line="+3"/> <source>Generated coins must mature 50 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Debug information</source> <translation>Informacje debugowania</translation> </message> <message> <location line="+8"/> <source>Transaction</source> <translation>Transakcja</translation> </message> <message> <location line="+5"/> <source>Inputs</source> <translation>Wejścia</translation> </message> <message> <location line="+23"/> <source>Amount</source> <translation>Kwota</translation> </message> <message> <location line="+1"/> <source>true</source> <translation>prawda</translation> </message> <message> <location line="+0"/> <source>false</source> <translation>fałsz</translation> </message> <message> <location line="-211"/> <source>, has not been successfully broadcast yet</source> <translation>, nie został jeszcze pomyślnie wyemitowany</translation> </message> <message> <location line="+35"/> <source>unknown</source> <translation>nieznany</translation> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation>Szczegóły transakcji</translation> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation>Ten panel pokazuje szczegółowy opis transakcji</translation> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+226"/> <source>Date</source> <translation>Data</translation> </message> <message> <location line="+0"/> <source>Type</source> <translation>Typ</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Adres</translation> </message> <message> <location line="+0"/> <source>Amount</source> <translation>Kwota</translation> </message> <message> <location line="+60"/> <source>Open until %1</source> <translation>Otwórz do %1</translation> </message> <message> <location line="+12"/> <source>Confirmed (%1 confirmations)</source> <translation>Zatwierdzony (%1 potwierdzeń)</translation> </message> <message numerus="yes"> <location line="-15"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+6"/> <source>Offline</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Unconfirmed</source> <translation>Niepotwierdzone:</translation> </message> <message> <location line="+3"/> <source>Confirming (%1 of %2 recommended confirmations)</source> <translation>Potwierdzanie (%1 z %2 rekomendowanych potwierdzeń)</translation> </message> <message> <location line="+6"/> <source>Conflicted</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Immature (%1 confirmations, will be available after %2)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>This block was not received by any other nodes and will probably not be accepted!</source> <translation>Ten blok nie został odebrany przez jakikolwiek inny węzeł i prawdopodobnie nie zostanie zaakceptowany!</translation> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation>Wygenerowano ale nie zaakceptowano</translation> </message> <message> <location line="+42"/> <source>Received with</source> <translation>Otrzymane przez</translation> </message> <message> <location line="+2"/> <source>Received from</source> <translation>Odebrano od</translation> </message> <message> <location line="+3"/> <source>Sent to</source> <translation>Wysłano do</translation> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation>Płatność do siebie</translation> </message> <message> <location line="+2"/> <source>Mined</source> <translation>Wydobyto</translation> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation>(brak)</translation> </message> <message> <location line="+190"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation>Status transakcji. Najedź na pole, aby zobaczyć liczbę potwierdzeń.</translation> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation>Data i czas odebrania transakcji.</translation> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation>Rodzaj transakcji.</translation> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation>Adres docelowy transakcji.</translation> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation>Kwota usunięta z lub dodana do konta.</translation> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+55"/> <location line="+16"/> <source>All</source> <translation>Wszystko</translation> </message> <message> <location line="-15"/> <source>Today</source> <translation>Dzisiaj</translation> </message> <message> <location line="+1"/> <source>This week</source> <translation>W tym tygodniu</translation> </message> <message> <location line="+1"/> <source>This month</source> <translation>W tym miesiącu</translation> </message> <message> <location line="+1"/> <source>Last month</source> <translation>W zeszłym miesiącu</translation> </message> <message> <location line="+1"/> <source>This year</source> <translation>W tym roku</translation> </message> <message> <location line="+1"/> <source>Range...</source> <translation>Zakres...</translation> </message> <message> <location line="+11"/> <source>Received with</source> <translation>Otrzymane przez</translation> </message> <message> <location line="+2"/> <source>Sent to</source> <translation>Wysłano do</translation> </message> <message> <location line="+2"/> <source>To yourself</source> <translation>Do siebie</translation> </message> <message> <location line="+1"/> <source>Mined</source> <translation>Wydobyto</translation> </message> <message> <location line="+1"/> <source>Other</source> <translation>Inne</translation> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation>Wprowadź adres albo etykietę żeby wyszukać</translation> </message> <message> <location line="+7"/> <source>Min amount</source> <translation>Min suma</translation> </message> <message> <location line="+34"/> <source>Copy address</source> <translation>Kopiuj adres</translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>Kopiuj etykietę</translation> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation>Kopiuj kwotę</translation> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation>Skopiuj ID transakcji</translation> </message> <message> <location line="+1"/> <source>Edit label</source> <translation>Edytuj etykietę</translation> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation>Pokaż szczegóły transakcji</translation> </message> <message> <location line="+144"/> <source>Export Transaction Data</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>CSV (rozdzielany przecinkami)</translation> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation>Potwierdzony</translation> </message> <message> <location line="+1"/> <source>Date</source> <translation>Data</translation> </message> <message> <location line="+1"/> <source>Type</source> <translation>Typ</translation> </message> <message> <location line="+1"/> <source>Label</source> <translation>Etykieta</translation> </message> <message> <location line="+1"/> <source>Address</source> <translation>Adres</translation> </message> <message> <location line="+1"/> <source>Amount</source> <translation>Kwota</translation> </message> <message> <location line="+1"/> <source>ID</source> <translation>ID</translation> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation type="unfinished"/> </message> <message> <location line="+100"/> <source>Range:</source> <translation>Zakres:</translation> </message> <message> <location line="+8"/> <source>to</source> <translation>do</translation> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+206"/> <source>Sending...</source> <translation type="unfinished"/> </message> </context> <context> <name>bitcoin-core</name> <message> <location filename="../bitcoinstrings.cpp" line="+33"/> <source>ShadowCoin version</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Usage:</source> <translation>Użycie:</translation> </message> <message> <location line="+1"/> <source>Send command to -server or shadowcoind</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>List commands</source> <translation>Lista poleceń</translation> </message> <message> <location line="+1"/> <source>Get help for a command</source> <translation>Uzyskaj pomoc do polecenia</translation> </message> <message> <location line="+2"/> <source>Options:</source> <translation>Opcje:</translation> </message> <message> <location line="+2"/> <source>Specify configuration file (default: shadowcoin.conf)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Specify pid file (default: shadowcoind.pid)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify wallet file (within data directory)</source> <translation>Określ plik portfela (w obrębie folderu danych)</translation> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation>Wskaż folder danych</translation> </message> <message> <location line="+2"/> <source>Set database cache size in megabytes (default: 25)</source> <translation>Ustaw rozmiar w megabajtach cache-u bazy danych (domyślnie: 25)</translation> </message> <message> <location line="+1"/> <source>Set database disk log size in megabytes (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Listen for connections on &lt;port&gt; (default: 42112 or testnet: 42111)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation>Utrzymuj maksymalnie &lt;n&gt; połączeń z peerami (domyślnie: 125)</translation> </message> <message> <location line="+3"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation>Podłącz się do węzła aby otrzymać adresy peerów i rozłącz</translation> </message> <message> <location line="+1"/> <source>Specify your own public address</source> <translation>Podaj swój publiczny adres</translation> </message> <message> <location line="+5"/> <source>Bind to given address. Use [host]:port notation for IPv6</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Stake your coins to support network and gain reward (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation>Próg po którym nastąpi rozłączenie nietrzymających się zasad peerów (domyślnie: 100)</translation> </message> <message> <location line="+1"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation>Czas w sekundach, przez jaki nietrzymający się zasad peerzy nie będą mogli ponownie się podłączyć (domyślnie: 86400)</translation> </message> <message> <location line="-44"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation>Wystąpił błąd podczas ustawiania portu RPC %u w tryb nasłuchu: %s</translation> </message> <message> <location line="+51"/> <source>Detach block and address databases. Increases shutdown time (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+109"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> <message> <location line="-5"/> <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds </source> <translation type="unfinished"/> </message> <message> <location line="-87"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 51736 or testnet: 51996)</source> <translation type="unfinished"/> </message> <message> <location line="-11"/> <source>Accept command line and JSON-RPC commands</source> <translation>Akceptuj linię poleceń oraz polecenia JSON-RPC</translation> </message> <message> <location line="+101"/> <source>Error: Transaction creation failed </source> <translation type="unfinished"/> </message> <message> <location line="-5"/> <source>Error: Wallet locked, unable to create transaction </source> <translation type="unfinished"/> </message> <message> <location line="-8"/> <source>Importing blockchain data file.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Importing bootstrap blockchain data file.</source> <translation type="unfinished"/> </message> <message> <location line="-88"/> <source>Run in the background as a daemon and accept commands</source> <translation>Uruchom w tle jako daemon i przyjmuj polecenia</translation> </message> <message> <location line="+1"/> <source>Use the test network</source> <translation>Użyj sieci testowej</translation> </message> <message> <location line="-24"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation>Akceptuj połączenia z zewnątrz (domyślnie: 1 jeśli nie ustawiono -proxy lub -connect)</translation> </message> <message> <location line="-38"/> <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source> <translation>Wystąpił błąd podczas ustawiania portu RPC %u w tryb nasłuchu dla IPv6, korzystam z IPv4: %s</translation> </message> <message> <location line="+117"/> <source>Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat.</source> <translation type="unfinished"/> </message> <message> <location line="-20"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source> <translation>Ostrzeżenie: -paytxfee jest bardzo duży. To jest prowizja za transakcje, którą płacisz, gdy wysyłasz monety.</translation> </message> <message> <location line="+61"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong ShadowCoin will not work properly.</source> <translation type="unfinished"/> </message> <message> <location line="-31"/> <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> <translation>Ostrzeżenie: błąd odczytu wallet.dat! Wszystkie klucze zostały odczytane, ale może brakować pewnych danych transakcji lub wpisów w książce adresowej lub mogą one być nieprawidłowe.</translation> </message> <message> <location line="-18"/> <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source> <translation>Ostrzeżenie: Odtworzono dane z uszkodzonego pliku wallet.dat! Oryginalny wallet.dat został zapisany jako wallet.{timestamp}.bak w %s; jeśli twoje saldo lub transakcje są niepoprawne powinieneś odtworzyć kopię zapasową.</translation> </message> <message> <location line="-30"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation>Próbuj odzyskać klucze prywatne z uszkodzonego wallet.dat</translation> </message> <message> <location line="+4"/> <source>Block creation options:</source> <translation>Opcje tworzenia bloku:</translation> </message> <message> <location line="-62"/> <source>Connect only to the specified node(s)</source> <translation>Łącz tylko do wskazanego węzła</translation> </message> <message> <location line="+4"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation>Odkryj własny adres IP (domyślnie: 1 kiedy w trybie nasłuchu i brak -externalip )</translation> </message> <message> <location line="+94"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation>Próba otwarcia jakiegokolwiek portu nie powiodła się. Użyj -listen=0 jeśli tego chcesz.</translation> </message> <message> <location line="-90"/> <source>Find peers using DNS lookup (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Sync checkpoints policy (default: strict)</source> <translation type="unfinished"/> </message> <message> <location line="+83"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Invalid amount for -reservebalance=&lt;amount&gt;</source> <translation type="unfinished"/> </message> <message> <location line="-82"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation>Maksymalny bufor odbioru na połączenie, &lt;n&gt;*1000 bajtów (domyślnie: 5000)</translation> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation>Maksymalny bufor wysyłu na połączenie, &lt;n&gt;*1000 bajtów (domyślnie: 1000)</translation> </message> <message> <location line="-16"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation>Łącz z węzłami tylko w sieci &lt;net&gt; (IPv4, IPv6 lub Tor)</translation> </message> <message> <location line="+28"/> <source>Output extra debugging information. Implies all other -debug* options</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Output extra network debugging information</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Prepend debug output with timestamp</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source> <translation>Opcje SSL: (odwiedź Bitcoin Wiki w celu uzyskania instrukcji)</translation> </message> <message> <location line="-74"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation type="unfinished"/> </message> <message> <location line="+41"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation>Wyślij informację/raport do konsoli zamiast do pliku debug.log.</translation> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>Set maximum block size in bytes (default: 250000)</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Set minimum block size in bytes (default: 0)</source> <translation>Ustaw minimalny rozmiar bloku w bajtach (domyślnie: 0)</translation> </message> <message> <location line="-29"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation>Zmniejsz plik debug.log przy starcie programu (domyślnie: 1 jeśli nie użyto -debug)</translation> </message> <message> <location line="-42"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation>Wskaż czas oczekiwania bezczynności połączenia w milisekundach (domyślnie: 5000)</translation> </message> <message> <location line="+109"/> <source>Unable to sign checkpoint, wrong checkpointkey? </source> <translation type="unfinished"/> </message> <message> <location line="-80"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation>Używaj UPnP do mapowania portu nasłuchu (domyślnie: 0)</translation> </message> <message> <location line="-1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation>Używaj UPnP do mapowania portu nasłuchu (domyślnie: 1 gdy nasłuchuje)</translation> </message> <message> <location line="-25"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation type="unfinished"/> </message> <message> <location line="+42"/> <source>Username for JSON-RPC connections</source> <translation>Nazwa użytkownika dla połączeń JSON-RPC</translation> </message> <message> <location line="+47"/> <source>Verifying database integrity...</source> <translation type="unfinished"/> </message> <message> <location line="+57"/> <source>WARNING: syncronized checkpoint violation detected, but skipped!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Warning: Disk space is low!</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation>Uwaga: Ta wersja jest przestarzała, aktualizacja wymagana!</translation> </message> <message> <location line="-48"/> <source>wallet.dat corrupt, salvage failed</source> <translation>wallet.dat uszkodzony, odtworzenie się nie powiodło</translation> </message> <message> <location line="-54"/> <source>Password for JSON-RPC connections</source> <translation>Hasło do połączeń JSON-RPC</translation> </message> <message> <location line="-84"/> <source>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: rpcuser=shadowcoinrpc 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;ShadowCoin Alert&quot; admin@foo.com </source> <translation type="unfinished"/> </message> <message> <location line="+51"/> <source>Find peers using internet relay chat (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>When creating transactions, ignore inputs with value less than this (default: 0.01)</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation>Przyjmuj połączenia JSON-RPC ze wskazanego adresu IP</translation> </message> <message> <location line="+1"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation>Wysyłaj polecenia do węzła działającego na &lt;ip&gt; (domyślnie: 127.0.0.1)</translation> </message> <message> <location line="+1"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation>Wykonaj polecenie kiedy najlepszy blok ulegnie zmianie (%s w komendzie zastanie zastąpione przez hash bloku)</translation> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation>Wykonaj polecenie, kiedy transakcja portfela ulegnie zmianie (%s w poleceniu zostanie zastąpione przez TxID)</translation> </message> <message> <location line="+3"/> <source>Require a confirmations for change (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Enforce transaction scripts to use canonical PUSH operators (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Upgrade wallet to latest format</source> <translation>Zaktualizuj portfel do najnowszego formatu.</translation> </message> <message> <location line="+1"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation>Ustaw rozmiar puli kluczy na &lt;n&gt; (domyślnie: 100)</translation> </message> <message> <location line="+1"/> <source>Rescan the block chain for missing wallet transactions</source> <translation>Przeskanuj blok łańcuchów żeby znaleźć zaginione transakcje portfela</translation> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 2500, 0 = all)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>How thorough the block verification is (0-6, default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Imports blocks from external blk000?.dat file</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation>Użyj OpenSSL (https) do połączeń JSON-RPC</translation> </message> <message> <location line="+1"/> <source>Server certificate file (default: server.cert)</source> <translation>Plik certyfikatu serwera (domyślnie: server.cert)</translation> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation>Klucz prywatny serwera (domyślnie: server.pem)</translation> </message> <message> <location line="+1"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation type="unfinished"/> </message> <message> <location line="+53"/> <source>Error: Wallet unlocked for staking only, unable to create transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers.</source> <translation type="unfinished"/> </message> <message> <location line="-158"/> <source>This help message</source> <translation>Ta wiadomość pomocy</translation> </message> <message> <location line="+95"/> <source>Wallet %s resides outside data directory %s.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Cannot obtain a lock on data directory %s. ShadowCoin is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="-98"/> <source>ShadowCoin</source> <translation type="unfinished"/> </message> <message> <location line="+140"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation>Nie można przywiązać %s na tym komputerze (bind returned error %d, %s)</translation> </message> <message> <location line="-130"/> <source>Connect through socks proxy</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation>Zezwól -addnode, -seednode i -connect na łączenie się z serwerem DNS</translation> </message> <message> <location line="+122"/> <source>Loading addresses...</source> <translation>Wczytywanie adresów...</translation> </message> <message> <location line="-15"/> <source>Error loading blkindex.dat</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation>Błąd ładowania wallet.dat: Uszkodzony portfel</translation> </message> <message> <location line="+4"/> <source>Error loading wallet.dat: Wallet requires newer version of ShadowCoin</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Wallet needed to be rewritten: restart ShadowCoin to complete</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading wallet.dat</source> <translation>Błąd ładowania wallet.dat</translation> </message> <message> <location line="-16"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation>Nieprawidłowy adres -proxy: &apos;%s&apos;</translation> </message> <message> <location line="-1"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation>Nieznana sieć w -onlynet: &apos;%s&apos;</translation> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation>Nieznana wersja proxy w -socks: %i</translation> </message> <message> <location line="+4"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation>Nie można uzyskać adresu -bind: &apos;%s&apos;</translation> </message> <message> <location line="+2"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation>Nie można uzyskać adresu -externalip: &apos;%s&apos;</translation> </message> <message> <location line="-24"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>Nieprawidłowa kwota dla -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation> </message> <message> <location line="+44"/> <source>Error: could not start node</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Sending...</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Invalid amount</source> <translation>Nieprawidłowa kwota</translation> </message> <message> <location line="+1"/> <source>Insufficient funds</source> <translation>Niewystarczające środki</translation> </message> <message> <location line="-34"/> <source>Loading block index...</source> <translation>Ładowanie indeksu bloku...</translation> </message> <message> <location line="-103"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation>Dodaj węzeł do łączenia się and attempt to keep the connection open</translation> </message> <message> <location line="+122"/> <source>Unable to bind to %s on this computer. ShadowCoin is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="-97"/> <source>Fee per KB to add to transactions you send</source> <translation type="unfinished"/> </message> <message> <location line="+55"/> <source>Invalid amount for -mininput=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Loading wallet...</source> <translation>Wczytywanie portfela...</translation> </message> <message> <location line="+8"/> <source>Cannot downgrade wallet</source> <translation>Nie można dezaktualizować portfela</translation> </message> <message> <location line="+1"/> <source>Cannot initialize keypool</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Cannot write default address</source> <translation>Nie można zapisać domyślnego adresu</translation> </message> <message> <location line="+1"/> <source>Rescanning...</source> <translation>Ponowne skanowanie...</translation> </message> <message> <location line="+5"/> <source>Done loading</source> <translation>Wczytywanie zakończone</translation> </message> <message> <location line="-167"/> <source>To use the %s option</source> <translation>Aby użyć opcji %s</translation> </message> <message> <location line="+14"/> <source>Error</source> <translation>Błąd</translation> </message> <message> <location line="+6"/> <source>You must set rpcpassword=&lt;password&gt; in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions.</source> <translation>Musisz ustawić rpcpassword=&lt;hasło&gt; w pliku configuracyjnym: %s Jeżeli plik nie istnieje, utwórz go z uprawnieniami właściciela-tylko-do-odczytu.</translation> </message> </context> </TS>
hansacoin/hansacoin
src/qt/locale/bitcoin_pl.ts
TypeScript
mit
119,674
var axios = require('axios') module.exports = function (app) { app.get('/context_all.jsonld', function (req, res) { axios.get(app.API_URL + 'context_all.jsonld') .then(function (response) { res.type('application/ld+json') res.status(200).send(JSON.stringify(response.data, null, 2)) }) .catch(function (response) { res.type('application/ld+json') res.status(500).send('{}') }) return }) // other routes.. }
nypl-registry/browse
routes/context.js
JavaScript
mit
477
module Githu3 class Tag < Githu3::Resource end end
sbellity/githu3
lib/githu3/tag.rb
Ruby
mit
55
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; import { Component } from '@angular/core'; import { SettingsService } from "../../shared/service/settings.service"; import { DataService } from "../../shared/service/data.service"; var SettingsComponent = (function () { function SettingsComponent(settingsService, dataService) { this.settingsService = settingsService; this.dataService = dataService; // Do stuff } SettingsComponent.prototype.save = function () { this.settingsService.save(); this.dataService.getParameterNames(); }; return SettingsComponent; }()); SettingsComponent = __decorate([ Component({ selector: 'my-home', templateUrl: 'settings.component.html', styleUrls: ['settings.component.scss'] }), __metadata("design:paramtypes", [SettingsService, DataService]) ], SettingsComponent); export { SettingsComponent }; //# sourceMappingURL=settings.component.js.map
Ragingart/TRage
src/app/page/settings/settings.component.js
JavaScript
mit
1,673
using System; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel.DataAnnotations; using System.Globalization; using System.Reflection; using System.Runtime.Serialization; using System.Web.Http; using System.Web.Http.Description; using System.Xml.Serialization; using Newtonsoft.Json; namespace Betabit.Lora.Nuget.EventHub.Areas.HelpPage.ModelDescriptions { /// <summary> /// Generates model descriptions for given types. /// </summary> public class ModelDescriptionGenerator { // Modify this to support more data annotation attributes. private readonly IDictionary<Type, Func<object, string>> AnnotationTextGenerator = new Dictionary<Type, Func<object, string>> { { typeof(RequiredAttribute), a => "Required" }, { typeof(RangeAttribute), a => { RangeAttribute range = (RangeAttribute)a; return String.Format(CultureInfo.CurrentCulture, "Range: inclusive between {0} and {1}", range.Minimum, range.Maximum); } }, { typeof(MaxLengthAttribute), a => { MaxLengthAttribute maxLength = (MaxLengthAttribute)a; return String.Format(CultureInfo.CurrentCulture, "Max length: {0}", maxLength.Length); } }, { typeof(MinLengthAttribute), a => { MinLengthAttribute minLength = (MinLengthAttribute)a; return String.Format(CultureInfo.CurrentCulture, "Min length: {0}", minLength.Length); } }, { typeof(StringLengthAttribute), a => { StringLengthAttribute strLength = (StringLengthAttribute)a; return String.Format(CultureInfo.CurrentCulture, "String length: inclusive between {0} and {1}", strLength.MinimumLength, strLength.MaximumLength); } }, { typeof(DataTypeAttribute), a => { DataTypeAttribute dataType = (DataTypeAttribute)a; return String.Format(CultureInfo.CurrentCulture, "Data type: {0}", dataType.CustomDataType ?? dataType.DataType.ToString()); } }, { typeof(RegularExpressionAttribute), a => { RegularExpressionAttribute regularExpression = (RegularExpressionAttribute)a; return String.Format(CultureInfo.CurrentCulture, "Matching regular expression pattern: {0}", regularExpression.Pattern); } }, }; // Modify this to add more default documentations. private readonly IDictionary<Type, string> DefaultTypeDocumentation = new Dictionary<Type, string> { { typeof(Int16), "integer" }, { typeof(Int32), "integer" }, { typeof(Int64), "integer" }, { typeof(UInt16), "unsigned integer" }, { typeof(UInt32), "unsigned integer" }, { typeof(UInt64), "unsigned integer" }, { typeof(Byte), "byte" }, { typeof(Char), "character" }, { typeof(SByte), "signed byte" }, { typeof(Uri), "URI" }, { typeof(Single), "decimal number" }, { typeof(Double), "decimal number" }, { typeof(Decimal), "decimal number" }, { typeof(String), "string" }, { typeof(Guid), "globally unique identifier" }, { typeof(TimeSpan), "time interval" }, { typeof(DateTime), "date" }, { typeof(DateTimeOffset), "date" }, { typeof(Boolean), "boolean" }, }; private Lazy<IModelDocumentationProvider> _documentationProvider; public ModelDescriptionGenerator(HttpConfiguration config) { if (config == null) { throw new ArgumentNullException("config"); } _documentationProvider = new Lazy<IModelDocumentationProvider>(() => config.Services.GetDocumentationProvider() as IModelDocumentationProvider); GeneratedModels = new Dictionary<string, ModelDescription>(StringComparer.OrdinalIgnoreCase); } public Dictionary<string, ModelDescription> GeneratedModels { get; private set; } private IModelDocumentationProvider DocumentationProvider { get { return _documentationProvider.Value; } } public ModelDescription GetOrCreateModelDescription(Type modelType) { if (modelType == null) { throw new ArgumentNullException("modelType"); } Type underlyingType = Nullable.GetUnderlyingType(modelType); if (underlyingType != null) { modelType = underlyingType; } ModelDescription modelDescription; string modelName = ModelNameHelper.GetModelName(modelType); if (GeneratedModels.TryGetValue(modelName, out modelDescription)) { if (modelType != modelDescription.ModelType) { throw new InvalidOperationException( String.Format( CultureInfo.CurrentCulture, "A model description could not be created. Duplicate model name '{0}' was found for types '{1}' and '{2}'. " + "Use the [ModelName] attribute to change the model name for at least one of the types so that it has a unique name.", modelName, modelDescription.ModelType.FullName, modelType.FullName)); } return modelDescription; } if (DefaultTypeDocumentation.ContainsKey(modelType)) { return GenerateSimpleTypeModelDescription(modelType); } if (modelType.IsEnum) { return GenerateEnumTypeModelDescription(modelType); } if (modelType.IsGenericType) { Type[] genericArguments = modelType.GetGenericArguments(); if (genericArguments.Length == 1) { Type enumerableType = typeof(IEnumerable<>).MakeGenericType(genericArguments); if (enumerableType.IsAssignableFrom(modelType)) { return GenerateCollectionModelDescription(modelType, genericArguments[0]); } } if (genericArguments.Length == 2) { Type dictionaryType = typeof(IDictionary<,>).MakeGenericType(genericArguments); if (dictionaryType.IsAssignableFrom(modelType)) { return GenerateDictionaryModelDescription(modelType, genericArguments[0], genericArguments[1]); } Type keyValuePairType = typeof(KeyValuePair<,>).MakeGenericType(genericArguments); if (keyValuePairType.IsAssignableFrom(modelType)) { return GenerateKeyValuePairModelDescription(modelType, genericArguments[0], genericArguments[1]); } } } if (modelType.IsArray) { Type elementType = modelType.GetElementType(); return GenerateCollectionModelDescription(modelType, elementType); } if (modelType == typeof(NameValueCollection)) { return GenerateDictionaryModelDescription(modelType, typeof(string), typeof(string)); } if (typeof(IDictionary).IsAssignableFrom(modelType)) { return GenerateDictionaryModelDescription(modelType, typeof(object), typeof(object)); } if (typeof(IEnumerable).IsAssignableFrom(modelType)) { return GenerateCollectionModelDescription(modelType, typeof(object)); } return GenerateComplexTypeModelDescription(modelType); } // Change this to provide different name for the member. private static string GetMemberName(MemberInfo member, bool hasDataContractAttribute) { JsonPropertyAttribute jsonProperty = member.GetCustomAttribute<JsonPropertyAttribute>(); if (jsonProperty != null && !String.IsNullOrEmpty(jsonProperty.PropertyName)) { return jsonProperty.PropertyName; } if (hasDataContractAttribute) { DataMemberAttribute dataMember = member.GetCustomAttribute<DataMemberAttribute>(); if (dataMember != null && !String.IsNullOrEmpty(dataMember.Name)) { return dataMember.Name; } } return member.Name; } private static bool ShouldDisplayMember(MemberInfo member, bool hasDataContractAttribute) { JsonIgnoreAttribute jsonIgnore = member.GetCustomAttribute<JsonIgnoreAttribute>(); XmlIgnoreAttribute xmlIgnore = member.GetCustomAttribute<XmlIgnoreAttribute>(); IgnoreDataMemberAttribute ignoreDataMember = member.GetCustomAttribute<IgnoreDataMemberAttribute>(); NonSerializedAttribute nonSerialized = member.GetCustomAttribute<NonSerializedAttribute>(); ApiExplorerSettingsAttribute apiExplorerSetting = member.GetCustomAttribute<ApiExplorerSettingsAttribute>(); bool hasMemberAttribute = member.DeclaringType.IsEnum ? member.GetCustomAttribute<EnumMemberAttribute>() != null : member.GetCustomAttribute<DataMemberAttribute>() != null; // Display member only if all the followings are true: // no JsonIgnoreAttribute // no XmlIgnoreAttribute // no IgnoreDataMemberAttribute // no NonSerializedAttribute // no ApiExplorerSettingsAttribute with IgnoreApi set to true // no DataContractAttribute without DataMemberAttribute or EnumMemberAttribute return jsonIgnore == null && xmlIgnore == null && ignoreDataMember == null && nonSerialized == null && (apiExplorerSetting == null || !apiExplorerSetting.IgnoreApi) && (!hasDataContractAttribute || hasMemberAttribute); } private string CreateDefaultDocumentation(Type type) { string documentation; if (DefaultTypeDocumentation.TryGetValue(type, out documentation)) { return documentation; } if (DocumentationProvider != null) { documentation = DocumentationProvider.GetDocumentation(type); } return documentation; } private void GenerateAnnotations(MemberInfo property, ParameterDescription propertyModel) { List<ParameterAnnotation> annotations = new List<ParameterAnnotation>(); IEnumerable<Attribute> attributes = property.GetCustomAttributes(); foreach (Attribute attribute in attributes) { Func<object, string> textGenerator; if (AnnotationTextGenerator.TryGetValue(attribute.GetType(), out textGenerator)) { annotations.Add( new ParameterAnnotation { AnnotationAttribute = attribute, Documentation = textGenerator(attribute) }); } } // Rearrange the annotations annotations.Sort((x, y) => { // Special-case RequiredAttribute so that it shows up on top if (x.AnnotationAttribute is RequiredAttribute) { return -1; } if (y.AnnotationAttribute is RequiredAttribute) { return 1; } // Sort the rest based on alphabetic order of the documentation return String.Compare(x.Documentation, y.Documentation, StringComparison.OrdinalIgnoreCase); }); foreach (ParameterAnnotation annotation in annotations) { propertyModel.Annotations.Add(annotation); } } private CollectionModelDescription GenerateCollectionModelDescription(Type modelType, Type elementType) { ModelDescription collectionModelDescription = GetOrCreateModelDescription(elementType); if (collectionModelDescription != null) { return new CollectionModelDescription { Name = ModelNameHelper.GetModelName(modelType), ModelType = modelType, ElementDescription = collectionModelDescription }; } return null; } private ModelDescription GenerateComplexTypeModelDescription(Type modelType) { ComplexTypeModelDescription complexModelDescription = new ComplexTypeModelDescription { Name = ModelNameHelper.GetModelName(modelType), ModelType = modelType, Documentation = CreateDefaultDocumentation(modelType) }; GeneratedModels.Add(complexModelDescription.Name, complexModelDescription); bool hasDataContractAttribute = modelType.GetCustomAttribute<DataContractAttribute>() != null; PropertyInfo[] properties = modelType.GetProperties(BindingFlags.Public | BindingFlags.Instance); foreach (PropertyInfo property in properties) { if (ShouldDisplayMember(property, hasDataContractAttribute)) { ParameterDescription propertyModel = new ParameterDescription { Name = GetMemberName(property, hasDataContractAttribute) }; if (DocumentationProvider != null) { propertyModel.Documentation = DocumentationProvider.GetDocumentation(property); } GenerateAnnotations(property, propertyModel); complexModelDescription.Properties.Add(propertyModel); propertyModel.TypeDescription = GetOrCreateModelDescription(property.PropertyType); } } FieldInfo[] fields = modelType.GetFields(BindingFlags.Public | BindingFlags.Instance); foreach (FieldInfo field in fields) { if (ShouldDisplayMember(field, hasDataContractAttribute)) { ParameterDescription propertyModel = new ParameterDescription { Name = GetMemberName(field, hasDataContractAttribute) }; if (DocumentationProvider != null) { propertyModel.Documentation = DocumentationProvider.GetDocumentation(field); } complexModelDescription.Properties.Add(propertyModel); propertyModel.TypeDescription = GetOrCreateModelDescription(field.FieldType); } } return complexModelDescription; } private DictionaryModelDescription GenerateDictionaryModelDescription(Type modelType, Type keyType, Type valueType) { ModelDescription keyModelDescription = GetOrCreateModelDescription(keyType); ModelDescription valueModelDescription = GetOrCreateModelDescription(valueType); return new DictionaryModelDescription { Name = ModelNameHelper.GetModelName(modelType), ModelType = modelType, KeyModelDescription = keyModelDescription, ValueModelDescription = valueModelDescription }; } private EnumTypeModelDescription GenerateEnumTypeModelDescription(Type modelType) { EnumTypeModelDescription enumDescription = new EnumTypeModelDescription { Name = ModelNameHelper.GetModelName(modelType), ModelType = modelType, Documentation = CreateDefaultDocumentation(modelType) }; bool hasDataContractAttribute = modelType.GetCustomAttribute<DataContractAttribute>() != null; foreach (FieldInfo field in modelType.GetFields(BindingFlags.Public | BindingFlags.Static)) { if (ShouldDisplayMember(field, hasDataContractAttribute)) { EnumValueDescription enumValue = new EnumValueDescription { Name = field.Name, Value = field.GetRawConstantValue().ToString() }; if (DocumentationProvider != null) { enumValue.Documentation = DocumentationProvider.GetDocumentation(field); } enumDescription.Values.Add(enumValue); } } GeneratedModels.Add(enumDescription.Name, enumDescription); return enumDescription; } private KeyValuePairModelDescription GenerateKeyValuePairModelDescription(Type modelType, Type keyType, Type valueType) { ModelDescription keyModelDescription = GetOrCreateModelDescription(keyType); ModelDescription valueModelDescription = GetOrCreateModelDescription(valueType); return new KeyValuePairModelDescription { Name = ModelNameHelper.GetModelName(modelType), ModelType = modelType, KeyModelDescription = keyModelDescription, ValueModelDescription = valueModelDescription }; } private ModelDescription GenerateSimpleTypeModelDescription(Type modelType) { SimpleTypeModelDescription simpleModelDescription = new SimpleTypeModelDescription { Name = ModelNameHelper.GetModelName(modelType), ModelType = modelType, Documentation = CreateDefaultDocumentation(modelType) }; GeneratedModels.Add(simpleModelDescription.Name, simpleModelDescription); return simpleModelDescription; } } }
kpnlora/LoRaClient
examples/Betabit EventHub Example/Betabit.Lora.Nuget.EventHub/Betabit.Lora.Nuget.EventHub/Areas/HelpPage/ModelDescriptions/ModelDescriptionGenerator.cs
C#
mit
19,100
<?php \Larakit\StaticFiles\Manager::package('larakit/sf-grid') ->cssPackage('lk-grid.css') ->setSourceDir('public');
larakit/sf-grid
init.php
PHP
mit
124
'use strict'; import React from 'react-native' import { AppRegistry, Component, Navigator, ToolbarAndroid, View, } from 'react-native'; import globalStyle, { colors } from './globalStyle'; class NavBar extends Component { onClickBackToHome() { this.props.navigator.push({ name: 'home', sceneConfig: Navigator.SceneConfigs.FloatFromLeft, }); } getToolbarActions(route) { const actionsByRoute = { 'home': [], 'boop-view': [{ title: 'Back', show: 'always' }], } if (actionsByRoute[route.name]) { return actionsByRoute[route.name]; } return []; } render() { const { navigator } = this.props; const currentRoute = navigator.getCurrentRoutes()[navigator.getCurrentRoutes().length - 1]; const toolbarActions = this.getToolbarActions(currentRoute); return ( <ToolbarAndroid style={globalStyle.toolbar} title='boop' titleColor={colors.darkTheme.text1} actions={toolbarActions} onActionSelected={this.onClickBackToHome.bind(this)} /> ); } }; AppRegistry.registerComponent('NavBar', () => NavBar); export default NavBar;
kmjennison/boop
components/NavBar.js
JavaScript
mit
1,192
<?php namespace App; use App\models\User; use Illuminate\Database\Eloquent\Model; class InstDepartment extends Model { public static function get_departments_by_inst_id($id) { $departments = InstDepartment::where('institution_id', $id)->get(); return $departments; } public static function get_departments_by_inst_id_with_faculty($id) { $departments = InstDepartment::where('institution_id', $id)->get(); $iterator = 0; foreach ($departments as $department) { $users = UserDept::get_user_objects_by_dept_id($department['id']); $departments[$iterator]['users'] = $users; $dept_head = User::get_user_by_id($department['dept_head_id']); $departments[$iterator]['head'] = $dept_head; $iterator++; } return $departments; } public static function get_all_departments() { $departments = InstDepartment::all(); return $departments; } public static function get_all_departments_with_faculty() { $departments = InstDepartment::all(); $iterator = 0; foreach ($departments as $department) { $users = UserDept::get_users_by_dept_id($department['id']); $departments[$iterator]['users'] = $users; $iterator++; } return $departments; } public static function add_department($input) { // dd($input); $department = new InstDepartment; $department->institution_id = $input['institution_id']; $department->department_name = $input['dept_name']; $department->dept_head_id = $input['dept_head_id']; $department->save(); } public static function remove_department($input) { $department = InstDepartment::find($input['department_id']); $department->delete(); } public static function update_department($input) { $department = InstDepartment::find($input['department_id']); $department->institution_id = $input['institution_id']; $department->department_name = $input['dept_name']; $department->dept_head_id = $input['dept_head_id']; $department->save(); } public static function update_department_faculty($input) { if($input['action'] == 'delete') { $user_dept = UserDept::find('id', $input['user_dept_id']); $user_dept->delete(); } if($input['action'] == 'insert') { $user_dept = new UserDept(); $user_dept->user_id = $input['user_id']; $user_dept->department_id = $input['dept_id']; $user_dept->save(); } } }
Webnician/EduForum
app/InstDepartment.php
PHP
mit
2,871
# Copyright (c) 2015 Jean Dias require 'test_helper' class PublicidadesControllerTest < ActionController::TestCase # test "the truth" do # assert true # end end
jeanmfdias/blog-initial
test/controllers/publicidades_controller_test.rb
Ruby
mit
171
class CreateTakedowns < ActiveRecord::Migration[5.0] def change create_table :takedowns do |t| t.integer :linked_account_id, null: false t.timestamps end end end
bountysource/core
db/migrate/20171126185423_create_takedowns.rb
Ruby
mit
186
package fpr9.com.nbalivefeed.entities; /** * Created by FranciscoPR on 07/11/16. */ public class RecordContainer { private String id; private Record record; public String getId() { return id; } public void setId(String id) { this.id = id; } public Record getRecord() { return record; } public void setRecord(Record record) { this.record = record; } }
FranPR9/NBALIVEFEED
app/src/main/java/fpr9/com/nbalivefeed/entities/RecordContainer.java
Java
mit
430
import React, { Component, PropTypes } from 'react'; import ItemTypes from './ItemTypes'; import { DragSource, DropTarget } from 'react-dnd'; import flow from 'lodash.flow'; function isNullOrUndefined(o) { return o == null; } const cardSource = { beginDrag(props) { return { id: props.id, index: props.index, originalIndex: props.index }; }, endDrag(props, monitor) { if (props.noDropOutside) { const { id, index, originalIndex } = monitor.getItem(); const didDrop = monitor.didDrop(); if (!didDrop) { props.moveCard(isNullOrUndefined(id) ? index : id, originalIndex); } } if (props.endDrag) { props.endDrag(); } } }; const cardTarget = { hover(props, monitor) { const { id: dragId, index: dragIndex } = monitor.getItem(); const { id: hoverId, index: hoverIndex } = props; if (!isNullOrUndefined(dragId)) { // use id if (dragId !== hoverId) { props.moveCard(dragId, hoverIndex); } } else { // use index if (dragIndex !== hoverIndex) { props.moveCard(dragIndex, hoverIndex); // Note: we're mutating the monitor item here! // Generally it's better to avoid mutations, // but it's good here for the sake of performance // to avoid expensive index searches. monitor.getItem().index = hoverIndex; } } } }; const propTypes = { index: PropTypes.number.isRequired, source: PropTypes.any.isRequired, createItem: PropTypes.func.isRequired, moveCard: PropTypes.func.isRequired, endDrag: PropTypes.func, isDragging: PropTypes.bool.isRequired, connectDragSource: PropTypes.func.isRequired, connectDropTarget: PropTypes.func.isRequired, noDropOutside: PropTypes.bool }; class DndCard extends Component { render() { const { id, index, source, createItem, noDropOutside, // remove from restProps moveCard, // remove from restProps endDrag, // remove from restProps isDragging, connectDragSource, connectDropTarget, ...restProps } = this.props; if (id === null) { console.warn('Warning: `id` is null. Set to undefined to get better performance.'); } const item = createItem(source, isDragging, index); if (typeof item === 'undefined') { console.warn('Warning: `createItem` returns undefined. It should return a React element or null.'); } const finalProps = Object.keys(restProps).reduce((result, k) => { const prop = restProps[k]; result[k] = typeof prop === 'function' ? prop(isDragging) : prop; return result; }, {}); return connectDragSource(connectDropTarget( <div {...finalProps}> {item} </div> )); } } DndCard.propTypes = propTypes; export default flow( DropTarget(ItemTypes.DND_CARD, cardTarget, connect => ({ connectDropTarget: connect.dropTarget() })), DragSource(ItemTypes.DND_CARD, cardSource, (connect, monitor) => ({ connectDragSource: connect.dragSource(), isDragging: monitor.isDragging() })) )(DndCard);
jas-chen/react-dnd-card
src/index.js
JavaScript
mit
3,144
using System; using Microsoft.Hadoop.MapReduce; namespace MapReduceSamples.Utils { public class TestReducerCombinerContext : ReducerCombinerContext { public TestReducerCombinerContext(bool isCombiner) : base(isCombiner) { } public override void EmitKeyValue(string key, string value) { Console.WriteLine("EmitKeyValue: Key \"{0}\", \"{1}\"", key, value); } public override void EmitLine(string line) { Console.WriteLine("EmitLine: {0}", line); } public override void IncrementCounter(string category, string counterName, int increment) { Console.WriteLine( "IncrementCounter: Category \"{0}\", Counter Name \"{1}\", Increment \"{2}\"", category, counterName, increment); } public override void IncrementCounter(string counterName, int increment) { Console.WriteLine( "IncrementCounter: Counter Name \"{0}\", Increment \"{1}\"", counterName, increment); } public override void IncrementCounter(string counterName) { Console.WriteLine( "IncrementCounter: Counter Name \"{0}\"", counterName); } public override void Log(string message) { Console.WriteLine( "Log: {0}", message); } } }
SaschaDittmann/MapReduceSamples
MapReduceSamples/MapReduceSamples.Utils/TestReducerCombinerContext.cs
C#
mit
1,520
#!/usr/bin/env python import os import time import argparse import tempfile import PyPDF2 import datetime from reportlab.pdfgen import canvas parser = argparse.ArgumentParser("Add signatures to PDF files") parser.add_argument("pdf", help="The pdf file to annotate") parser.add_argument("signature", help="The signature file (png, jpg)") parser.add_argument("--date", action='store_true') parser.add_argument("--output", nargs='?', help="Output file. Defaults to input filename plus '_signed'") parser.add_argument("--coords", nargs='?', default='2x100x100x125x40', help="Coordinates to place signature. Format: PAGExXxYxWIDTHxHEIGHT. 1x200x300x125x40 means page 1, 200 units horizontally from the bottom left, 300 units vertically from the bottom left, 125 units wide, 40 units tall. Pages count starts at 1 (1-based indexing). Units are pdf-standard units (1/72 inch).") def _get_tmp_filename(suffix=".pdf"): with tempfile.NamedTemporaryFile(suffix=".pdf") as fh: return fh.name def sign_pdf(args): #TODO: use a gui or something.... for now, just trial-and-error the coords page_num, x1, y1, width, height = [int(a) for a in args.coords.split("x")] page_num -= 1 output_filename = args.output or "{}_signed{}".format( *os.path.splitext(args.pdf) ) pdf_fh = open(args.pdf, 'rb') sig_tmp_fh = None pdf = PyPDF2.PdfFileReader(pdf_fh) writer = PyPDF2.PdfFileWriter() sig_tmp_filename = None for i in range(0, pdf.getNumPages()): page = pdf.getPage(i) if i == page_num: # Create PDF for signature sig_tmp_filename = _get_tmp_filename() c = canvas.Canvas(sig_tmp_filename, pagesize=page.cropBox) c.drawImage(args.signature, x1, y1, width, height, mask='auto') if args.date: c.drawString(x1 + width, y1, datetime.datetime.now().strftime("%Y-%m-%d")) c.showPage() c.save() # Merge PDF in to original page sig_tmp_fh = open(sig_tmp_filename, 'rb') sig_tmp_pdf = PyPDF2.PdfFileReader(sig_tmp_fh) sig_page = sig_tmp_pdf.getPage(0) sig_page.mediaBox = page.mediaBox page.mergePage(sig_page) writer.addPage(page) with open(output_filename, 'wb') as fh: writer.write(fh) for handle in [pdf_fh, sig_tmp_fh]: if handle: handle.close() if sig_tmp_filename: os.remove(sig_tmp_filename) def main(): sign_pdf(parser.parse_args()) if __name__ == "__main__": main()
yourcelf/signpdf
signpdf.py
Python
mit
2,594
# frozen_string_literal: true require 'vk/api/responses' module Vk module API class Likes < Vk::Schema::Namespace module Responses # @see https://github.com/VKCOM/vk-api-schema/blob/master/objects.json class IsLikedResponse < Vk::Schema::Response # @return [Object] @see https://github.com/VKCOM/vk-api-schema/blob/master/objects.json attribute :response, API::Types::Coercible::Hash end end end end end
alsemyonov/vk
lib/vk/api/likes/responses/is_liked_response.rb
Ruby
mit
473
import { AppPage } from './app.po'; import { browser, logging } from 'protractor'; describe('workspace-project App', () => { let page: AppPage; beforeEach(() => { page = new AppPage(); }); it('should display welcome message', () => { page.navigateTo(); expect(page.getTitleText()).toEqual('sandbox app is running!'); }); afterEach(async () => { // Assert that there are no errors emitted from the browser const logs = await browser.manage().logs().get(logging.Type.BROWSER); expect(logs).not.toContain(jasmine.objectContaining({ level: logging.Level.SEVERE, } as logging.Entry)); }); });
basp/sandbox
e2e/src/app.e2e-spec.ts
TypeScript
mit
640
// @license // Redistribution and use in source and binary forms ... // Copyright 2012 Carnegie Mellon University. All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, are // permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, this list of // conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright notice, this list // of conditions and the following disclaimer in the documentation and/or other materials // provided with the distribution. // // THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ''AS IS'' AND ANY EXPRESS OR IMPLIED // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY OR // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // The views and conclusions contained in the software and documentation are those of the // authors and should not be interpreted as representing official policies, either expressed // or implied, of Carnegie Mellon University. // // Author: // Randy Sargent (randy.sargent@cs.cmu.edu) "use strict"; var org; org = org || {}; org.gigapan = org.gigapan || {}; org.gigapan.timelapse = org.gigapan.timelapse || {}; org.gigapan.timelapse.MercatorProjection = function(west, north, east, south, width, height) { function rawProjectLat(lat) { return Math.log((1 + Math.sin(lat * Math.PI / 180)) / Math.cos(lat * Math.PI / 180)); } function rawUnprojectLat(y) { return (2 * Math.atan(Math.exp(y)) - Math.PI / 2) * 180 / Math.PI; } function interpolate(x, fromLow, fromHigh, toLow, toHigh) { return (x - fromLow) / (fromHigh - fromLow) * (toHigh - toLow) + toLow; } this.latlngToPoint = function(latlng) { var x = interpolate(latlng.lng, west, east, 0, width); var y = interpolate(rawProjectLat(latlng.lat), rawProjectLat(north), rawProjectLat(south), 0, height); return { "x": x, "y": y }; }; this.pointToLatlng = function(point) { var lng = interpolate(point.x, 0, width, west, east); var lat = rawUnprojectLat(interpolate(point.y, 0, height, rawProjectLat(north), rawProjectLat(south))); return { "lat": lat, "lng": lng }; }; };
CI-WATER/tmaps
tmc-1.2.1-linux/timemachine-viewer/js/org/gigapan/timelapse/mercator.js
JavaScript
mit
2,858
<?xml version="1.0" ?><!DOCTYPE TS><TS language="es" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About GoldDiggerCoin</source> <translation>Acerca de GoldDiggerCoin</translation> </message> <message> <location line="+39"/> <source>&lt;b&gt;GoldDiggerCoin&lt;/b&gt; version</source> <translation>Versión de &lt;b&gt;GoldDiggerCoin&lt;/b&gt;</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> Este es un software experimental. Distribuido bajo la licencia MIT/X11, vea el archivo adjunto COPYING o http://www.opensource.org/licenses/mit-license.php. Este producto incluye software desarrollado por OpenSSL Project para su uso en el OpenSSL Toolkit (http://www.openssl.org/) y software criptográfico escrito por Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</translation> </message> <message> <location filename="../aboutdialog.cpp" line="+14"/> <source>Copyright</source> <translation>Copyright</translation> </message> <message> <location line="+0"/> <source>The GoldDiggerCoin developers</source> <translation>Los programadores GoldDiggerCoin</translation> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation>Libreta de direcciones</translation> </message> <message> <location line="+19"/> <source>Double-click to edit address or label</source> <translation>Haga doble clic para editar una dirección o etiqueta</translation> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation>Crear una nueva dirección</translation> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation>Copiar la dirección seleccionada al portapapeles del sistema</translation> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation>&amp;Añadir dirección</translation> </message> <message> <location filename="../addressbookpage.cpp" line="+63"/> <source>These are your GoldDiggerCoin 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>Estas son sus direcciones GoldDiggerCoin para recibir pagos. Puede utilizar una diferente por cada persona emisora para saber quién le está pagando.</translation> </message> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>&amp;Copy Address</source> <translation>&amp;Copiar dirección</translation> </message> <message> <location line="+11"/> <source>Show &amp;QR Code</source> <translation>Mostrar código &amp;QR </translation> </message> <message> <location line="+11"/> <source>Sign a message to prove you own a GoldDiggerCoin address</source> <translation>Firmar un mensaje para demostrar que se posee una dirección GoldDiggerCoin</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation>&amp;Firmar mensaje</translation> </message> <message> <location line="+25"/> <source>Delete the currently selected address from the list</source> <translation>Borrar de la lista la dirección seleccionada</translation> </message> <message> <location line="+27"/> <source>Export the data in the current tab to a file</source> <translation>Exportar a un archivo los datos de esta pestaña</translation> </message> <message> <location line="+3"/> <source>&amp;Export</source> <translation>&amp;Exportar</translation> </message> <message> <location line="-44"/> <source>Verify a message to ensure it was signed with a specified GoldDiggerCoin address</source> <translation>Verificar un mensaje para comprobar que fue firmado con la dirección GoldDiggerCoin indicada</translation> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation>&amp;Verificar mensaje</translation> </message> <message> <location line="+14"/> <source>&amp;Delete</source> <translation>&amp;Eliminar</translation> </message> <message> <location filename="../addressbookpage.cpp" line="-5"/> <source>These are your GoldDiggerCoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source> <translation>Estas son sus direcciones GoldDiggerCoin para enviar pagos. Compruebe siempre la cantidad y la dirección receptora antes de transferir monedas.</translation> </message> <message> <location line="+13"/> <source>Copy &amp;Label</source> <translation>Copiar &amp;etiqueta</translation> </message> <message> <location line="+1"/> <source>&amp;Edit</source> <translation>&amp;Editar</translation> </message> <message> <location line="+1"/> <source>Send &amp;Coins</source> <translation>Enviar &amp;monedas</translation> </message> <message> <location line="+260"/> <source>Export Address Book Data</source> <translation>Exportar datos de la libreta de direcciones</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Archivos de columnas separadas por coma (*.csv)</translation> </message> <message> <location line="+13"/> <source>Error exporting</source> <translation>Error al exportar</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>No se pudo escribir en el archivo %1.</translation> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+144"/> <source>Label</source> <translation>Etiqueta</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Dirección</translation> </message> <message> <location line="+36"/> <source>(no label)</source> <translation>(sin etiqueta)</translation> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation>Diálogo de contraseña</translation> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation>Introducir contraseña</translation> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation>Nueva contraseña</translation> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation>Repita la nueva contraseña</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>Introduzca la nueva contraseña del monedero.&lt;br/&gt;Por favor elija una con &lt;b&gt;10 o más caracteres aleatorios&lt;/b&gt; u &lt;b&gt;ocho o más palabras&lt;/b&gt;.</translation> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation>Cifrar el monedero</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation>Esta operación requiere su contraseña para desbloquear el monedero.</translation> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation>Desbloquear monedero</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation>Esta operación requiere su contraseña para descifrar el monedero.</translation> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation>Descifrar el monedero</translation> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation>Cambiar contraseña</translation> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation>Introduzca la contraseña anterior del monedero y la nueva. </translation> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation>Confirmar cifrado del monedero</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 GOLDDIGGERCOINS&lt;/b&gt;!</source> <translation>Atencion: ¡Si cifra su monedero y pierde la contraseña perderá &lt;b&gt;TODOS SUS GOLDDIGGERCOINS&lt;/b&gt;!&quot;</translation> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation>¿Seguro que desea cifrar su monedero?</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>IMPORTANTE: Cualquier copia de seguridad que haya realizado previamente de su archivo de monedero debe reemplazarse con el nuevo archivo de monedero cifrado. Por razones de seguridad, las copias de seguridad previas del archivo de monedero no cifradas serán inservibles en cuanto comience a usar el nuevo monedero cifrado.</translation> </message> <message> <location line="+100"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation>Aviso: ¡La tecla de bloqueo de mayúsculas está activada!</translation> </message> <message> <location line="-130"/> <location line="+58"/> <source>Wallet encrypted</source> <translation>Monedero cifrado</translation> </message> <message> <location line="-56"/> <source>GoldDiggerCoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your golddiggercoins from being stolen by malware infecting your computer.</source> <translation>GoldDiggerCoin se cerrará para finalizar el proceso de cifrado. Recuerde que el cifrado de su monedero no puede proteger totalmente sus golddiggercoins de robo por malware que infecte su sistema.</translation> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+42"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation>Ha fallado el cifrado del monedero</translation> </message> <message> <location line="-54"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation>Ha fallado el cifrado del monedero debido a un error interno. El monedero no ha sido cifrado.</translation> </message> <message> <location line="+7"/> <location line="+48"/> <source>The supplied passphrases do not match.</source> <translation>Las contraseñas no coinciden.</translation> </message> <message> <location line="-37"/> <source>Wallet unlock failed</source> <translation>Ha fallado el desbloqueo del monedero</translation> </message> <message> <location line="+1"/> <location line="+11"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation>La contraseña introducida para descifrar el monedero es incorrecta.</translation> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation>Ha fallado el descifrado del monedero</translation> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation>Se ha cambiado correctamente la contraseña del monedero.</translation> </message> </context> <context> <name>BitcoinGUI</name> <message> <location filename="../bitcoingui.cpp" line="+233"/> <source>Sign &amp;message...</source> <translation>Firmar &amp;mensaje...</translation> </message> <message> <location line="+280"/> <source>Synchronizing with network...</source> <translation>Sincronizando con la red…</translation> </message> <message> <location line="-349"/> <source>&amp;Overview</source> <translation>&amp;Vista general</translation> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation>Mostrar vista general del monedero</translation> </message> <message> <location line="+20"/> <source>&amp;Transactions</source> <translation>&amp;Transacciones</translation> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation>Examinar el historial de transacciones</translation> </message> <message> <location line="+7"/> <source>Edit the list of stored addresses and labels for sending</source> <translation>Editar la lista de las direcciones y etiquetas almacenadas</translation> </message> <message> <location line="-14"/> <source>Show the list of addresses for receiving payments</source> <translation>Mostrar la lista de direcciones utilizadas para recibir pagos</translation> </message> <message> <location line="+31"/> <source>E&amp;xit</source> <translation>&amp;Salir</translation> </message> <message> <location line="+1"/> <source>Quit application</source> <translation>Salir de la aplicación</translation> </message> <message> <location line="+4"/> <source>Show information about GoldDiggerCoin</source> <translation>Mostrar información acerca de GoldDiggerCoin</translation> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation>Acerca de &amp;Qt</translation> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation>Mostrar información acerca de Qt</translation> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation>&amp;Opciones...</translation> </message> <message> <location line="+6"/> <source>&amp;Encrypt Wallet...</source> <translation>&amp;Cifrar monedero…</translation> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation>Copia de &amp;respaldo del monedero...</translation> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation>&amp;Cambiar la contraseña…</translation> </message> <message> <location line="+285"/> <source>Importing blocks from disk...</source> <translation>Importando bloques de disco...</translation> </message> <message> <location line="+3"/> <source>Reindexing blocks on disk...</source> <translation>Reindexando bloques en disco...</translation> </message> <message> <location line="-347"/> <source>Send coins to a GoldDiggerCoin address</source> <translation>Enviar monedas a una dirección GoldDiggerCoin</translation> </message> <message> <location line="+49"/> <source>Modify configuration options for GoldDiggerCoin</source> <translation>Modificar las opciones de configuración de GoldDiggerCoin</translation> </message> <message> <location line="+9"/> <source>Backup wallet to another location</source> <translation>Copia de seguridad del monedero en otra ubicación</translation> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation>Cambiar la contraseña utilizada para el cifrado del monedero</translation> </message> <message> <location line="+6"/> <source>&amp;Debug window</source> <translation>Ventana de &amp;depuración</translation> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation>Abrir la consola de depuración y diagnóstico</translation> </message> <message> <location line="-4"/> <source>&amp;Verify message...</source> <translation>&amp;Verificar mensaje...</translation> </message> <message> <location line="-165"/> <location line="+530"/> <source>GoldDiggerCoin</source> <translation>GoldDiggerCoin</translation> </message> <message> <location line="-530"/> <source>Wallet</source> <translation>Monedero</translation> </message> <message> <location line="+101"/> <source>&amp;Send</source> <translation>&amp;Enviar</translation> </message> <message> <location line="+7"/> <source>&amp;Receive</source> <translation>&amp;Recibir</translation> </message> <message> <location line="+14"/> <source>&amp;Addresses</source> <translation>&amp;Direcciones</translation> </message> <message> <location line="+22"/> <source>&amp;About GoldDiggerCoin</source> <translation>&amp;Acerca de GoldDiggerCoin</translation> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation>Mo&amp;strar/ocultar</translation> </message> <message> <location line="+1"/> <source>Show or hide the main Window</source> <translation>Mostrar u ocultar la ventana principal</translation> </message> <message> <location line="+3"/> <source>Encrypt the private keys that belong to your wallet</source> <translation>Cifrar las claves privadas de su monedero</translation> </message> <message> <location line="+7"/> <source>Sign messages with your GoldDiggerCoin addresses to prove you own them</source> <translation>Firmar mensajes con sus direcciones GoldDiggerCoin para demostrar la propiedad</translation> </message> <message> <location line="+2"/> <source>Verify messages to ensure they were signed with specified GoldDiggerCoin addresses</source> <translation>Verificar mensajes comprobando que están firmados con direcciones GoldDiggerCoin concretas</translation> </message> <message> <location line="+28"/> <source>&amp;File</source> <translation>&amp;Archivo</translation> </message> <message> <location line="+7"/> <source>&amp;Settings</source> <translation>&amp;Configuración</translation> </message> <message> <location line="+6"/> <source>&amp;Help</source> <translation>A&amp;yuda</translation> </message> <message> <location line="+9"/> <source>Tabs toolbar</source> <translation>Barra de pestañas</translation> </message> <message> <location line="+17"/> <location line="+10"/> <source>[testnet]</source> <translation>[testnet]</translation> </message> <message> <location line="+47"/> <source>GoldDiggerCoin client</source> <translation>Cliente GoldDiggerCoin</translation> </message> <message numerus="yes"> <location line="+141"/> <source>%n active connection(s) to GoldDiggerCoin network</source> <translation><numerusform>%n conexión activa hacia la red GoldDiggerCoin</numerusform><numerusform>%n conexiones activas hacia la red GoldDiggerCoin</numerusform></translation> </message> <message> <location line="+22"/> <source>No block source available...</source> <translation>Ninguna fuente de bloques disponible ...</translation> </message> <message> <location line="+12"/> <source>Processed %1 of %2 (estimated) blocks of transaction history.</source> <translation>Se han procesado %1 de %2 bloques (estimados) del historial de transacciones.</translation> </message> <message> <location line="+4"/> <source>Processed %1 blocks of transaction history.</source> <translation>Procesados %1 bloques del historial de transacciones.</translation> </message> <message numerus="yes"> <location line="+20"/> <source>%n hour(s)</source> <translation><numerusform>%n hora</numerusform><numerusform>%n horas</numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation><numerusform>%n día</numerusform><numerusform>%n días</numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n week(s)</source> <translation><numerusform>%n semana</numerusform><numerusform>%n semanas</numerusform></translation> </message> <message> <location line="+4"/> <source>%1 behind</source> <translation>%1 atrás</translation> </message> <message> <location line="+14"/> <source>Last received block was generated %1 ago.</source> <translation>El último bloque recibido fue generado hace %1.</translation> </message> <message> <location line="+2"/> <source>Transactions after this will not yet be visible.</source> <translation>Las transacciones posteriores a esta aún no están visibles.</translation> </message> <message> <location line="+22"/> <source>Error</source> <translation>Error</translation> </message> <message> <location line="+3"/> <source>Warning</source> <translation>Aviso</translation> </message> <message> <location line="+3"/> <source>Information</source> <translation>Información</translation> </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>Esta transacción supera el límite de tamaño. Puede enviarla con una comisión de %1, destinada a los nodos que procesen su transacción para contribuir al mantenimiento de la red. ¿Desea pagar esta comisión?</translation> </message> <message> <location line="-140"/> <source>Up to date</source> <translation>Actualizado</translation> </message> <message> <location line="+31"/> <source>Catching up...</source> <translation>Actualizando...</translation> </message> <message> <location line="+113"/> <source>Confirm transaction fee</source> <translation>Confirme la tarifa de la transacción</translation> </message> <message> <location line="+8"/> <source>Sent transaction</source> <translation>Transacción enviada</translation> </message> <message> <location line="+0"/> <source>Incoming transaction</source> <translation>Transacción entrante</translation> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation>Fecha: %1 Cantidad: %2 Tipo: %3 Dirección: %4 </translation> </message> <message> <location line="+33"/> <location line="+23"/> <source>URI handling</source> <translation>Gestión de URI</translation> </message> <message> <location line="-23"/> <location line="+23"/> <source>URI can not be parsed! This can be caused by an invalid GoldDiggerCoin address or malformed URI parameters.</source> <translation>¡No se puede interpretar la URI! Esto puede deberse a una dirección GoldDiggerCoin inválida o a parámetros de URI mal formados.</translation> </message> <message> <location line="+17"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation>El monedero está &lt;b&gt;cifrado&lt;/b&gt; y actualmente &lt;b&gt;desbloqueado&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>El monedero está &lt;b&gt;cifrado&lt;/b&gt; y actualmente &lt;b&gt;bloqueado&lt;/b&gt;</translation> </message> <message> <location filename="../bitcoin.cpp" line="+111"/> <source>A fatal error occurred. GoldDiggerCoin can no longer continue safely and will quit.</source> <translation>Ha ocurrido un error crítico. GoldDiggerCoin ya no puede continuar con seguridad y se cerrará.</translation> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+104"/> <source>Network Alert</source> <translation>Alerta de red</translation> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation>Editar Dirección</translation> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation>&amp;Etiqueta</translation> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation>La etiqueta asociada con esta entrada en la libreta</translation> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation>&amp;Dirección</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>La dirección asociada con esta entrada en la guía. Solo puede ser modificada para direcciones de envío.</translation> </message> <message> <location filename="../editaddressdialog.cpp" line="+21"/> <source>New receiving address</source> <translation>Nueva dirección para recibir</translation> </message> <message> <location line="+4"/> <source>New sending address</source> <translation>Nueva dirección para enviar</translation> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation>Editar dirección de recepción</translation> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation>Editar dirección de envío</translation> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation>La dirección introducida &quot;%1&quot; ya está presente en la libreta de direcciones.</translation> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid GoldDiggerCoin address.</source> <translation>La dirección introducida &quot;%1&quot; no es una dirección GoldDiggerCoin válida.</translation> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation>No se pudo desbloquear el monedero.</translation> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation>Ha fallado la generación de la nueva clave.</translation> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+424"/> <location line="+12"/> <source>GoldDiggerCoin-Qt</source> <translation>GoldDiggerCoin-Qt</translation> </message> <message> <location line="-12"/> <source>version</source> <translation>versión</translation> </message> <message> <location line="+2"/> <source>Usage:</source> <translation>Uso:</translation> </message> <message> <location line="+1"/> <source>command-line options</source> <translation>opciones de la línea de órdenes</translation> </message> <message> <location line="+4"/> <source>UI options</source> <translation>Opciones GUI</translation> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation>Establecer el idioma, por ejemplo, &quot;es_ES&quot; (predeterminado: configuración regional del sistema)</translation> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation>Arrancar minimizado</translation> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation>Mostrar pantalla de bienvenida en el inicio (predeterminado: 1)</translation> </message> </context> <context> <name>OptionsDialog</name> <message> <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation>Opciones</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>Tarifa de transacción opcional por kB que ayuda a asegurar que sus transacciones sean procesadas rápidamente. La mayoría de transacciones son de 1kB.</translation> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation>Comisión de &amp;transacciones</translation> </message> <message> <location line="+31"/> <source>Automatically start GoldDiggerCoin after logging in to the system.</source> <translation>Iniciar GoldDiggerCoin automáticamente al encender el sistema.</translation> </message> <message> <location line="+3"/> <source>&amp;Start GoldDiggerCoin on system login</source> <translation>&amp;Iniciar GoldDiggerCoin al iniciar el sistema</translation> </message> <message> <location line="+35"/> <source>Reset all client options to default.</source> <translation>Restablecer todas las opciones del cliente a las predeterminadas.</translation> </message> <message> <location line="+3"/> <source>&amp;Reset Options</source> <translation>&amp;Restablecer opciones</translation> </message> <message> <location line="+13"/> <source>&amp;Network</source> <translation>&amp;Red</translation> </message> <message> <location line="+6"/> <source>Automatically open the GoldDiggerCoin client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation>Abrir automáticamente el puerto del cliente GoldDiggerCoin en el router. Esta opción solo funciona si el router admite UPnP y está activado.</translation> </message> <message> <location line="+3"/> <source>Map port using &amp;UPnP</source> <translation>Mapear el puerto usando &amp;UPnP</translation> </message> <message> <location line="+7"/> <source>Connect to the GoldDiggerCoin network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation>Conectar a la red GoldDiggerCoin a través de un proxy SOCKS (ej. para conectar con la red Tor)</translation> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy:</source> <translation>&amp;Conectar a través de un proxy SOCKS:</translation> </message> <message> <location line="+9"/> <source>Proxy &amp;IP:</source> <translation>Dirección &amp;IP del proxy:</translation> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation>Dirección IP del proxy (ej. 127.0.0.1)</translation> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation>&amp;Puerto:</translation> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation>Puerto del servidor proxy (ej. 9050)</translation> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation>&amp;Versión SOCKS:</translation> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation>Versión del proxy SOCKS (ej. 5)</translation> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation>&amp;Ventana</translation> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation>Minimizar la ventana a la bandeja de iconos del sistema.</translation> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation>&amp;Minimizar a la bandeja en vez de a la barra de tareas</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>Minimizar en lugar de salir de la aplicación al cerrar la ventana.Cuando esta opción está activa, la aplicación solo se puede cerrar seleccionando Salir desde el menú.</translation> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation>M&amp;inimizar al cerrar</translation> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation>&amp;Interfaz</translation> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation>I&amp;dioma de la interfaz de usuario</translation> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting GoldDiggerCoin.</source> <translation>El idioma de la interfaz de usuario puede establecerse aquí. Este ajuste se aplicará cuando se reinicie GoldDiggerCoin.</translation> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation>Mostrar las cantidades en la &amp;unidad:</translation> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation>Elegir la subdivisión predeterminada para mostrar cantidades en la interfaz y cuando se envían monedas.</translation> </message> <message> <location line="+9"/> <source>Whether to show GoldDiggerCoin addresses in the transaction list or not.</source> <translation>Mostrar o no las direcciones GoldDiggerCoin en la lista de transacciones.</translation> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation>&amp;Mostrar las direcciones en la lista de transacciones</translation> </message> <message> <location line="+71"/> <source>&amp;OK</source> <translation>&amp;Aceptar</translation> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation>&amp;Cancelar</translation> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation>&amp;Aplicar</translation> </message> <message> <location filename="../optionsdialog.cpp" line="+53"/> <source>default</source> <translation>predeterminado</translation> </message> <message> <location line="+130"/> <source>Confirm options reset</source> <translation>Confirme el restablecimiento de las opciones</translation> </message> <message> <location line="+1"/> <source>Some settings may require a client restart to take effect.</source> <translation>Algunas configuraciones pueden requerir un reinicio del cliente para que sean efectivas.</translation> </message> <message> <location line="+0"/> <source>Do you want to proceed?</source> <translation>¿Quiere proceder?</translation> </message> <message> <location line="+42"/> <location line="+9"/> <source>Warning</source> <translation>Aviso</translation> </message> <message> <location line="-9"/> <location line="+9"/> <source>This setting will take effect after restarting GoldDiggerCoin.</source> <translation>Esta configuración tendrá efecto tras reiniciar GoldDiggerCoin.</translation> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation>La dirección proxy indicada es inválida.</translation> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation>Desde</translation> </message> <message> <location line="+50"/> <location line="+166"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the GoldDiggerCoin network after a connection is established, but this process has not completed yet.</source> <translation>La información mostrada puede estar desactualizada. Su monedero se sincroniza automáticamente con la red GoldDiggerCoin después de que se haya establecido una conexión , pero este proceso aún no se ha completado.</translation> </message> <message> <location line="-124"/> <source>Balance:</source> <translation>Saldo:</translation> </message> <message> <location line="+29"/> <source>Unconfirmed:</source> <translation>No confirmado(s):</translation> </message> <message> <location line="-78"/> <source>Wallet</source> <translation>Monedero</translation> </message> <message> <location line="+107"/> <source>Immature:</source> <translation>No disponible:</translation> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation>Saldo recién minado que aún no está disponible.</translation> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation>&lt;b&gt;Movimientos recientes&lt;/b&gt;</translation> </message> <message> <location line="-101"/> <source>Your current balance</source> <translation>Su saldo actual</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>Total de las transacciones que faltan por confirmar y que no contribuyen al saldo actual</translation> </message> <message> <location filename="../overviewpage.cpp" line="+116"/> <location line="+1"/> <source>out of sync</source> <translation>desincronizado</translation> </message> </context> <context> <name>PaymentServer</name> <message> <location filename="../paymentserver.cpp" line="+107"/> <source>Cannot start golddiggercoin: click-to-pay handler</source> <translation>No se pudo iniciar golddiggercoin: manejador de pago-al-clic</translation> </message> </context> <context> <name>QRCodeDialog</name> <message> <location filename="../forms/qrcodedialog.ui" line="+14"/> <source>QR Code Dialog</source> <translation>Diálogo de códigos QR</translation> </message> <message> <location line="+59"/> <source>Request Payment</source> <translation>Solicitud de pago</translation> </message> <message> <location line="+56"/> <source>Amount:</source> <translation>Cuantía:</translation> </message> <message> <location line="-44"/> <source>Label:</source> <translation>Etiqueta:</translation> </message> <message> <location line="+19"/> <source>Message:</source> <translation>Mensaje:</translation> </message> <message> <location line="+71"/> <source>&amp;Save As...</source> <translation>&amp;Guardar como...</translation> </message> <message> <location filename="../qrcodedialog.cpp" line="+62"/> <source>Error encoding URI into QR Code.</source> <translation>Error al codificar la URI en el código QR.</translation> </message> <message> <location line="+40"/> <source>The entered amount is invalid, please check.</source> <translation>La cantidad introducida es inválida. Compruébela, por favor.</translation> </message> <message> <location line="+23"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation>URI esultante demasiado larga. Intente reducir el texto de la etiqueta / mensaje.</translation> </message> <message> <location line="+25"/> <source>Save QR Code</source> <translation>Guardar código QR</translation> </message> <message> <location line="+0"/> <source>PNG Images (*.png)</source> <translation>Imágenes PNG (*.png)</translation> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation>Nombre del cliente</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/D</translation> </message> <message> <location line="-217"/> <source>Client version</source> <translation>Versión del cliente</translation> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation>&amp;Información</translation> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation>Utilizando la versión OpenSSL</translation> </message> <message> <location line="+49"/> <source>Startup time</source> <translation>Hora de inicio</translation> </message> <message> <location line="+29"/> <source>Network</source> <translation>Red</translation> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation>Número de conexiones</translation> </message> <message> <location line="+23"/> <source>On testnet</source> <translation>En la red de pruebas</translation> </message> <message> <location line="+23"/> <source>Block chain</source> <translation>Cadena de bloques</translation> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation>Número actual de bloques</translation> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation>Bloques totales estimados</translation> </message> <message> <location line="+23"/> <source>Last block time</source> <translation>Hora del último bloque</translation> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation>&amp;Abrir</translation> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation>Opciones de la línea de órdenes</translation> </message> <message> <location line="+7"/> <source>Show the GoldDiggerCoin-Qt help message to get a list with possible GoldDiggerCoin command-line options.</source> <translation>Mostrar el mensaje de ayuda de GoldDiggerCoin-Qt que enumera las opciones disponibles de línea de órdenes para GoldDiggerCoin.</translation> </message> <message> <location line="+3"/> <source>&amp;Show</source> <translation>&amp;Mostrar</translation> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation>&amp;Consola</translation> </message> <message> <location line="-260"/> <source>Build date</source> <translation>Fecha de compilación</translation> </message> <message> <location line="-104"/> <source>GoldDiggerCoin - Debug window</source> <translation>GoldDiggerCoin - Ventana de depuración</translation> </message> <message> <location line="+25"/> <source>GoldDiggerCoin Core</source> <translation>Núcleo de GoldDiggerCoin</translation> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation>Archivo de registro de depuración</translation> </message> <message> <location line="+7"/> <source>Open the GoldDiggerCoin debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation>Abrir el archivo de registro de depuración en el directorio actual de datos. Esto puede llevar varios segundos para archivos de registro grandes.</translation> </message> <message> <location line="+102"/> <source>Clear console</source> <translation>Borrar consola</translation> </message> <message> <location filename="../rpcconsole.cpp" line="-30"/> <source>Welcome to the GoldDiggerCoin RPC console.</source> <translation>Bienvenido a la consola RPC de GoldDiggerCoin</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>Use las flechas arriba y abajo para navegar por el historial y &lt;b&gt;Control+L&lt;/b&gt; para limpiar la pantalla.</translation> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation>Escriba &lt;b&gt;help&lt;/b&gt; para ver un resumen de los comandos disponibles.</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>Enviar monedas</translation> </message> <message> <location line="+50"/> <source>Send to multiple recipients at once</source> <translation>Enviar a multiples destinatarios de una vez</translation> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation>Añadir &amp;destinatario</translation> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation>Eliminar todos los campos de las transacciones</translation> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation>Limpiar &amp;todo</translation> </message> <message> <location line="+22"/> <source>Balance:</source> <translation>Saldo:</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>Confirmar el envío</translation> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation>&amp;Enviar</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; a %2 (%3)</translation> </message> <message> <location line="+5"/> <source>Confirm send coins</source> <translation>Confirmar el envío de monedas</translation> </message> <message> <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation>¿Está seguro de que desea enviar %1?</translation> </message> <message> <location line="+0"/> <source> and </source> <translation>y</translation> </message> <message> <location line="+23"/> <source>The recipient address is not valid, please recheck.</source> <translation>La dirección de recepción no es válida, compruébela de nuevo.</translation> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation>La cantidad por pagar tiene que ser mayor de 0.</translation> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation>La cantidad sobrepasa su saldo.</translation> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation>El total sobrepasa su saldo cuando se incluye la tasa de envío de %1</translation> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation>Se ha encontrado una dirección duplicada. Solo se puede enviar a cada dirección una vez por operación de envío.</translation> </message> <message> <location line="+5"/> <source>Error: Transaction creation failed!</source> <translation>Error: ¡Ha fallado la creación de la transacción!</translation> </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>Error: transacción rechazada. Puede haber ocurrido si alguna de las monedas ya estaba gastada o si ha usado una copia de wallet.dat y las monedas se gastaron en la copia pero no se han marcado así aquí.</translation> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation>Envío</translation> </message> <message> <location line="+15"/> <source>A&amp;mount:</source> <translation>Ca&amp;ntidad:</translation> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation>&amp;Pagar a:</translation> </message> <message> <location line="+34"/> <source>The address to send the payment to (e.g. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</source> <translation>La dirección a la que enviar el pago (p. ej. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</translation> </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>Etiquete esta dirección para añadirla a la libreta</translation> </message> <message> <location line="-78"/> <source>&amp;Label:</source> <translation>&amp;Etiqueta:</translation> </message> <message> <location line="+28"/> <source>Choose address from address book</source> <translation>Elija una dirección de la libreta de direcciones</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>Pegar dirección desde portapapeles</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>Eliminar destinatario</translation> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a GoldDiggerCoin address (e.g. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</source> <translation>Introduzca una dirección GoldDiggerCoin (ej. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</translation> </message> </context> <context> <name>SignVerifyMessageDialog</name> <message> <location filename="../forms/signverifymessagedialog.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation>Firmas - Firmar / verificar un mensaje</translation> </message> <message> <location line="+13"/> <source>&amp;Sign Message</source> <translation>&amp;Firmar mensaje</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>Puede firmar mensajes con sus direcciones para demostrar que las posee. Tenga cuidado de no firmar cualquier cosa vaga, ya que los ataques de phishing pueden tratar de engañarle para suplantar su identidad. Firme solo declaraciones totalmente detalladas con las que usted esté de acuerdo.</translation> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</source> <translation>La dirección con la que firmar el mensaje (ej. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</translation> </message> <message> <location line="+10"/> <location line="+213"/> <source>Choose an address from the address book</source> <translation>Elija una dirección de la libreta de direcciones</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>Pegar dirección desde portapapeles</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>Introduzca el mensaje que desea firmar aquí</translation> </message> <message> <location line="+7"/> <source>Signature</source> <translation>Firma</translation> </message> <message> <location line="+27"/> <source>Copy the current signature to the system clipboard</source> <translation>Copiar la firma actual al portapapeles del sistema</translation> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this GoldDiggerCoin address</source> <translation>Firmar el mensaje para demostrar que se posee esta dirección GoldDiggerCoin</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation>Firmar &amp;mensaje</translation> </message> <message> <location line="+14"/> <source>Reset all sign message fields</source> <translation>Limpiar todos los campos de la firma de mensaje</translation> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation>Limpiar &amp;todo</translation> </message> <message> <location line="-87"/> <source>&amp;Verify Message</source> <translation>&amp;Verificar mensaje</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>Introduzca la dirección para la firma, el mensaje (asegurándose de copiar tal cual los saltos de línea, espacios, tabulaciones, etc.) y la firma a continuación para verificar el mensaje. Tenga cuidado de no asumir más información de lo que dice el propio mensaje firmado para evitar fraudes basados en ataques de tipo man-in-the-middle.</translation> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</source> <translation>La dirección con la que se firmó el mensaje (ej. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</translation> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified GoldDiggerCoin address</source> <translation>Verificar el mensaje para comprobar que fue firmado con la dirección GoldDiggerCoin indicada</translation> </message> <message> <location line="+3"/> <source>Verify &amp;Message</source> <translation>Verificar &amp;mensaje</translation> </message> <message> <location line="+14"/> <source>Reset all verify message fields</source> <translation>Limpiar todos los campos de la verificación de mensaje</translation> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a GoldDiggerCoin address (e.g. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</source> <translation>Introduzca una dirección GoldDiggerCoin (ej. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</translation> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation>Haga clic en &quot;Firmar mensaje&quot; para generar la firma</translation> </message> <message> <location line="+3"/> <source>Enter GoldDiggerCoin signature</source> <translation>Introduzca una firma GoldDiggerCoin</translation> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation>La dirección introducida es inválida.</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>Verifique la dirección e inténtelo de nuevo.</translation> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation>La dirección introducida no corresponde a una clave.</translation> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation>Se ha cancelado el desbloqueo del monedero. </translation> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation>No se dispone de la clave privada para la dirección introducida.</translation> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation>Ha fallado la firma del mensaje.</translation> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation>Mensaje firmado.</translation> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation>No se puede decodificar la firma.</translation> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation>Compruebe la firma e inténtelo de nuevo.</translation> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation>La firma no coincide con el resumen del mensaje.</translation> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation>La verificación del mensaje ha fallado.</translation> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation>Mensaje verificado.</translation> </message> </context> <context> <name>SplashScreen</name> <message> <location filename="../splashscreen.cpp" line="+22"/> <source>The GoldDiggerCoin developers</source> <translation>Los programadores GoldDiggerCoin</translation> </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>Abierto hasta %1</translation> </message> <message> <location line="+6"/> <source>%1/offline</source> <translation>%1/fuera de línea</translation> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation>%1/no confirmado</translation> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation>%1 confirmaciones</translation> </message> <message> <location line="+18"/> <source>Status</source> <translation>Estado</translation> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation><numerusform>, transmitir a través de %n nodo</numerusform><numerusform>, transmitir a través de %n nodos</numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation>Fecha</translation> </message> <message> <location line="+7"/> <source>Source</source> <translation>Fuente</translation> </message> <message> <location line="+0"/> <source>Generated</source> <translation>Generado</translation> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation>De</translation> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation>Para</translation> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation>dirección propia</translation> </message> <message> <location line="-2"/> <source>label</source> <translation>etiqueta</translation> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation>Crédito</translation> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation><numerusform>disponible en %n bloque más</numerusform><numerusform>disponible en %n bloques más</numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation>no aceptada</translation> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation>Débito</translation> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation>Comisión de transacción</translation> </message> <message> <location line="+16"/> <source>Net amount</source> <translation>Cantidad neta</translation> </message> <message> <location line="+6"/> <source>Message</source> <translation>Mensaje</translation> </message> <message> <location line="+2"/> <source>Comment</source> <translation>Comentario</translation> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation>Identificador de transacción</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>Las monedas generadas deben esperar 120 bloques antes de que se puedan gastar. Cuando se generó este bloque, se emitió a la red para ser agregado a la cadena de bloques. Si no consigue incorporarse a la cadena, su estado cambiará a &quot;no aceptado&quot; y las monedas no se podrán gastar. Esto puede ocurrir ocasionalmente si otro nodo genera un bloque casi al mismo tiempo que el suyo.</translation> </message> <message> <location line="+7"/> <source>Debug information</source> <translation>Información de depuración</translation> </message> <message> <location line="+8"/> <source>Transaction</source> <translation>Transacción</translation> </message> <message> <location line="+3"/> <source>Inputs</source> <translation>entradas</translation> </message> <message> <location line="+23"/> <source>Amount</source> <translation>Cantidad</translation> </message> <message> <location line="+1"/> <source>true</source> <translation>verdadero</translation> </message> <message> <location line="+0"/> <source>false</source> <translation>falso</translation> </message> <message> <location line="-209"/> <source>, has not been successfully broadcast yet</source> <translation>, todavía no se ha sido difundido satisfactoriamente</translation> </message> <message numerus="yes"> <location line="-35"/> <source>Open for %n more block(s)</source> <translation><numerusform>Abrir para %n bloque más</numerusform><numerusform>Abrir para %n bloques más</numerusform></translation> </message> <message> <location line="+70"/> <source>unknown</source> <translation>desconocido</translation> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation>Detalles de transacción</translation> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation>Esta ventana muestra información detallada sobre la transacción</translation> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+225"/> <source>Date</source> <translation>Fecha</translation> </message> <message> <location line="+0"/> <source>Type</source> <translation>Tipo</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Dirección</translation> </message> <message> <location line="+0"/> <source>Amount</source> <translation>Cantidad</translation> </message> <message numerus="yes"> <location line="+57"/> <source>Open for %n more block(s)</source> <translation><numerusform>Abrir para %n bloque más</numerusform><numerusform>Abrir para %n bloques más</numerusform></translation> </message> <message> <location line="+3"/> <source>Open until %1</source> <translation>Abierto hasta %1</translation> </message> <message> <location line="+3"/> <source>Offline (%1 confirmations)</source> <translation>Fuera de línea (%1 confirmaciones)</translation> </message> <message> <location line="+3"/> <source>Unconfirmed (%1 of %2 confirmations)</source> <translation>No confirmado (%1 de %2 confirmaciones)</translation> </message> <message> <location line="+3"/> <source>Confirmed (%1 confirmations)</source> <translation>Confirmado (%1 confirmaciones)</translation> </message> <message numerus="yes"> <location line="+8"/> <source>Mined balance will be available when it matures in %n more block(s)</source> <translation><numerusform>El saldo recién minado estará disponible cuando venza el plazo en %n bloque más</numerusform><numerusform>El saldo recién minado estará disponible cuando venza el plazo en %n bloques más</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>Este bloque no ha sido recibido por otros nodos y probablemente no sea aceptado!</translation> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation>Generado pero no aceptado</translation> </message> <message> <location line="+43"/> <source>Received with</source> <translation>Recibido con</translation> </message> <message> <location line="+2"/> <source>Received from</source> <translation>Recibidos de</translation> </message> <message> <location line="+3"/> <source>Sent to</source> <translation>Enviado a</translation> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation>Pago propio</translation> </message> <message> <location line="+2"/> <source>Mined</source> <translation>Minado</translation> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation>(nd)</translation> </message> <message> <location line="+199"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation>Estado de transacción. Pasa el ratón sobre este campo para ver el número de confirmaciones.</translation> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation>Fecha y hora en que se recibió la transacción.</translation> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation>Tipo de transacción.</translation> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation>Dirección de destino de la transacción.</translation> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation>Cantidad retirada o añadida al saldo.</translation> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+52"/> <location line="+16"/> <source>All</source> <translation>Todo</translation> </message> <message> <location line="-15"/> <source>Today</source> <translation>Hoy</translation> </message> <message> <location line="+1"/> <source>This week</source> <translation>Esta semana</translation> </message> <message> <location line="+1"/> <source>This month</source> <translation>Este mes</translation> </message> <message> <location line="+1"/> <source>Last month</source> <translation>Mes pasado</translation> </message> <message> <location line="+1"/> <source>This year</source> <translation>Este año</translation> </message> <message> <location line="+1"/> <source>Range...</source> <translation>Rango...</translation> </message> <message> <location line="+11"/> <source>Received with</source> <translation>Recibido con</translation> </message> <message> <location line="+2"/> <source>Sent to</source> <translation>Enviado a</translation> </message> <message> <location line="+2"/> <source>To yourself</source> <translation>A usted mismo</translation> </message> <message> <location line="+1"/> <source>Mined</source> <translation>Minado</translation> </message> <message> <location line="+1"/> <source>Other</source> <translation>Otra</translation> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation>Introduzca una dirección o etiqueta que buscar</translation> </message> <message> <location line="+7"/> <source>Min amount</source> <translation>Cantidad mínima</translation> </message> <message> <location line="+34"/> <source>Copy address</source> <translation>Copiar dirección</translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>Copiar etiqueta</translation> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation>Copiar cuantía</translation> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation>Copiar identificador de transacción</translation> </message> <message> <location line="+1"/> <source>Edit label</source> <translation>Editar etiqueta</translation> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation>Mostrar detalles de la transacción</translation> </message> <message> <location line="+139"/> <source>Export Transaction Data</source> <translation>Exportar datos de la transacción</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Archivos de columnas separadas por coma (*.csv)</translation> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation>Confirmado</translation> </message> <message> <location line="+1"/> <source>Date</source> <translation>Fecha</translation> </message> <message> <location line="+1"/> <source>Type</source> <translation>Tipo</translation> </message> <message> <location line="+1"/> <source>Label</source> <translation>Etiqueta</translation> </message> <message> <location line="+1"/> <source>Address</source> <translation>Dirección</translation> </message> <message> <location line="+1"/> <source>Amount</source> <translation>Cantidad</translation> </message> <message> <location line="+1"/> <source>ID</source> <translation>ID</translation> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation>Error exportando</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>No se pudo escribir en el archivo %1.</translation> </message> <message> <location line="+100"/> <source>Range:</source> <translation>Rango:</translation> </message> <message> <location line="+8"/> <source>to</source> <translation>para</translation> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+193"/> <source>Send Coins</source> <translation>Enviar monedas</translation> </message> </context> <context> <name>WalletView</name> <message> <location filename="../walletview.cpp" line="+42"/> <source>&amp;Export</source> <translation>&amp;Exportar</translation> </message> <message> <location line="+1"/> <source>Export the data in the current tab to a file</source> <translation>Exportar a un archivo los datos de esta pestaña</translation> </message> <message> <location line="+193"/> <source>Backup Wallet</source> <translation>Respaldo de monedero</translation> </message> <message> <location line="+0"/> <source>Wallet Data (*.dat)</source> <translation>Datos de monedero (*.dat)</translation> </message> <message> <location line="+3"/> <source>Backup Failed</source> <translation>Ha fallado el respaldo</translation> </message> <message> <location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation>Se ha producido un error al intentar guardar los datos del monedero en la nueva ubicación.</translation> </message> <message> <location line="+4"/> <source>Backup Successful</source> <translation>Se ha completado con éxito la copia de respaldo</translation> </message> <message> <location line="+0"/> <source>The wallet data was successfully saved to the new location.</source> <translation>Los datos del monedero se han guardado con éxito en la nueva ubicación.</translation> </message> </context> <context> <name>bitcoin-core</name> <message> <location filename="../bitcoinstrings.cpp" line="+94"/> <source>GoldDiggerCoin version</source> <translation>Versión de GoldDiggerCoin</translation> </message> <message> <location line="+102"/> <source>Usage:</source> <translation>Uso:</translation> </message> <message> <location line="-29"/> <source>Send command to -server or golddiggercoind</source> <translation>Envíar comando a -server o golddiggercoind</translation> </message> <message> <location line="-23"/> <source>List commands</source> <translation>Muestra comandos </translation> </message> <message> <location line="-12"/> <source>Get help for a command</source> <translation>Recibir ayuda para un comando </translation> </message> <message> <location line="+24"/> <source>Options:</source> <translation>Opciones: </translation> </message> <message> <location line="+24"/> <source>Specify configuration file (default: golddiggercoin.conf)</source> <translation>Especificar archivo de configuración (predeterminado: golddiggercoin.conf) </translation> </message> <message> <location line="+3"/> <source>Specify pid file (default: golddiggercoind.pid)</source> <translation>Especificar archivo pid (predeterminado: golddiggercoin.pid) </translation> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation>Especificar directorio para los datos</translation> </message> <message> <location line="-9"/> <source>Set database cache size in megabytes (default: 25)</source> <translation>Establecer el tamaño de caché de la base de datos en megabytes (predeterminado: 25)</translation> </message> <message> <location line="-28"/> <source>Listen for connections on &lt;port&gt; (default: 22556 or testnet: 44556)</source> <translation>Escuchar conexiones en &lt;puerto&gt; (predeterminado: 22556 o testnet: 44556)</translation> </message> <message> <location line="+5"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation>Mantener como máximo &lt;n&gt; conexiones a pares (predeterminado: 125)</translation> </message> <message> <location line="-48"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation>Conectar a un nodo para obtener direcciones de pares y desconectar</translation> </message> <message> <location line="+82"/> <source>Specify your own public address</source> <translation>Especifique su propia dirección pública</translation> </message> <message> <location line="+3"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation>Umbral para la desconexión de pares con mal comportamiento (predeterminado: 100)</translation> </message> <message> <location line="-134"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation>Número de segundos en que se evita la reconexión de pares con mal comportamiento (predeterminado: 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>Ha ocurrido un error al configurar el puerto RPC %u para escucha en IPv4: %s</translation> </message> <message> <location line="+27"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 22555 or testnet: 44555)</source> <translation>Escuchar conexiones JSON-RPC en &lt;puerto&gt; (predeterminado: 22555 o testnet:44555)</translation> </message> <message> <location line="+37"/> <source>Accept command line and JSON-RPC commands</source> <translation>Aceptar comandos consola y JSON-RPC </translation> </message> <message> <location line="+76"/> <source>Run in the background as a daemon and accept commands</source> <translation>Correr como demonio y aceptar comandos </translation> </message> <message> <location line="+37"/> <source>Use the test network</source> <translation>Usar la red de pruebas </translation> </message> <message> <location line="-112"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation>Aceptar conexiones desde el exterior (predeterminado: 1 si no -proxy o -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=golddiggercoinrpc 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;GoldDiggerCoin Alert&quot; admin@foo.com </source> <translation>%s, debe establecer un valor rpcpassword en el archivo de configuración: %s Se recomienda utilizar la siguiente contraseña aleatoria: rpcuser=golddiggercoinrpc rpcpassword=%s (no es necesario recordar esta contraseña) El nombre de usuario y la contraseña DEBEN NO ser iguales. Si el archivo no existe, créelo con permisos de archivo de solo lectura. Se recomienda también establecer alertnotify para recibir notificaciones de problemas. Por ejemplo: alertnotify=echo %%s | mail -s &quot;GoldDiggerCoin Alert&quot; admin@foo.com </translation> </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>Ha ocurrido un error al configurar el puerto RPC %u para escuchar mediante IPv6. Recurriendo a IPv4: %s</translation> </message> <message> <location line="+3"/> <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source> <translation>Vincular a la dirección dada y escuchar siempre en ella. Utilice la notación [host]:port para IPv6</translation> </message> <message> <location line="+3"/> <source>Cannot obtain a lock on data directory %s. GoldDiggerCoin is probably already running.</source> <translation>No se puede bloquear el directorio de datos %s. Probablemente GoldDiggerCoin ya se está ejecutando.</translation> </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>¡Error: se ha rechazado la transacción! Esto puede ocurrir si ya se han gastado algunas de las monedas del monedero, como ocurriría si hubiera hecho una copia de wallet.dat y se hubieran gastado monedas a partir de la copia, con lo que no se habrían marcado aquí como gastadas.</translation> </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>¡Error: Esta transacción requiere una comisión de al menos %s debido a su monto, complejidad, o al uso de fondos recién recibidos!</translation> </message> <message> <location line="+3"/> <source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source> <translation>Ejecutar orden cuando se reciba un aviso relevante (%s en cmd se reemplazará por el mensaje)</translation> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation>Ejecutar comando cuando una transacción del monedero cambia (%s en cmd se remplazará por TxID)</translation> </message> <message> <location line="+11"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation>Establecer el tamaño máximo de las transacciones de alta prioridad/comisión baja en bytes (predeterminado: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>Esta es una versión de pre-prueba - utilícela bajo su propio riesgo. No la utilice para usos comerciales o de minería.</translation> </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>Aviso: ¡-paytxfee tiene un valor muy alto! Esta es la comisión que pagará si envía una transacción.</translation> </message> <message> <location line="+3"/> <source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source> <translation>Aviso: ¡Las transacciones mostradas pueden no ser correctas! Puede necesitar una actualización o bien otros nodos necesitan actualizarse.</translation> </message> <message> <location line="+3"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong GoldDiggerCoin will not work properly.</source> <translation>Precaución: Por favor, ¡revise que la fecha y hora de su ordenador son correctas! Si su reloj está mal, GoldDiggerCoin no funcionará correctamente.</translation> </message> <message> <location line="+3"/> <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> <translation>Aviso: ¡Error al leer wallet.dat! Todas las claves se han leído correctamente, pero podrían faltar o ser incorrectos los datos de transacciones o las entradas de la libreta de direcciones.</translation> </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>Aviso: ¡Recuperados datos de wallet.dat corrupto! El wallet.dat original se ha guardado como wallet.{timestamp}.bak en %s; si hubiera errores en su saldo o transacciones, deberá restaurar una copia de seguridad.</translation> </message> <message> <location line="+14"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation>Intento de recuperar claves privadas de un wallet.dat corrupto</translation> </message> <message> <location line="+2"/> <source>Block creation options:</source> <translation>Opciones de creación de bloques:</translation> </message> <message> <location line="+5"/> <source>Connect only to the specified node(s)</source> <translation>Conectar sólo a los nodos (o nodo) especificados</translation> </message> <message> <location line="+3"/> <source>Corrupted block database detected</source> <translation>Corrupción de base de datos de bloques detectada.</translation> </message> <message> <location line="+1"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation>Descubrir dirección IP propia (predeterminado: 1 al escuchar sin -externalip)</translation> </message> <message> <location line="+1"/> <source>Do you want to rebuild the block database now?</source> <translation>¿Quieres reconstruir la base de datos de bloques ahora?</translation> </message> <message> <location line="+2"/> <source>Error initializing block database</source> <translation>Error al inicializar la base de datos de bloques</translation> </message> <message> <location line="+1"/> <source>Error initializing wallet database environment %s!</source> <translation>Error al inicializar el entorno de la base de datos del monedero %s</translation> </message> <message> <location line="+1"/> <source>Error loading block database</source> <translation>Error cargando base de datos de bloques</translation> </message> <message> <location line="+4"/> <source>Error opening block database</source> <translation>Error al abrir base de datos de bloques.</translation> </message> <message> <location line="+2"/> <source>Error: Disk space is low!</source> <translation>Error: ¡Espacio en disco bajo!</translation> </message> <message> <location line="+1"/> <source>Error: Wallet locked, unable to create transaction!</source> <translation>Error: ¡El monedero está bloqueado; no se puede crear la transacción!</translation> </message> <message> <location line="+1"/> <source>Error: system error: </source> <translation>Error: error de sistema: </translation> </message> <message> <location line="+1"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation>Ha fallado la escucha en todos los puertos. Use -listen=0 si desea esto.</translation> </message> <message> <location line="+1"/> <source>Failed to read block info</source> <translation>No se ha podido leer la información de bloque</translation> </message> <message> <location line="+1"/> <source>Failed to read block</source> <translation>No se ha podido leer el bloque</translation> </message> <message> <location line="+1"/> <source>Failed to sync block index</source> <translation>No se ha podido sincronizar el índice de bloques</translation> </message> <message> <location line="+1"/> <source>Failed to write block index</source> <translation>No se ha podido escribir en el índice de bloques</translation> </message> <message> <location line="+1"/> <source>Failed to write block info</source> <translation>No se ha podido escribir la información de bloques</translation> </message> <message> <location line="+1"/> <source>Failed to write block</source> <translation>No se ha podido escribir el bloque</translation> </message> <message> <location line="+1"/> <source>Failed to write file info</source> <translation>No se ha podido escribir la información de archivo</translation> </message> <message> <location line="+1"/> <source>Failed to write to coin database</source> <translation>No se ha podido escribir en la base de datos de monedas</translation> </message> <message> <location line="+1"/> <source>Failed to write transaction index</source> <translation>No se ha podido escribir en el índice de transacciones</translation> </message> <message> <location line="+1"/> <source>Failed to write undo data</source> <translation>No se han podido escribir los datos de deshacer</translation> </message> <message> <location line="+2"/> <source>Find peers using DNS lookup (default: 1 unless -connect)</source> <translation>Encontrar pares mediante búsqueda de DNS (predeterminado: 1 salvo con -connect)</translation> </message> <message> <location line="+1"/> <source>Generate coins (default: 0)</source> <translation>Generar monedas (por defecto: 0)</translation> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 288, 0 = all)</source> <translation>Cuántos bloques comprobar al iniciar (predeterminado: 288, 0 = todos)</translation> </message> <message> <location line="+1"/> <source>How thorough the block verification is (0-4, default: 3)</source> <translation>Como es de exhaustiva la verificación de bloques (0-4, por defecto 3)</translation> </message> <message> <location line="+19"/> <source>Not enough file descriptors available.</source> <translation>No hay suficientes descriptores de archivo disponibles. </translation> </message> <message> <location line="+8"/> <source>Rebuild block chain index from current blk000??.dat files</source> <translation>Reconstruir el índice de la cadena de bloques a partir de los archivos blk000??.dat actuales</translation> </message> <message> <location line="+16"/> <source>Set the number of threads to service RPC calls (default: 4)</source> <translation>Establecer el número de hilos para atender las llamadas RPC (predeterminado: 4)</translation> </message> <message> <location line="+26"/> <source>Verifying blocks...</source> <translation>Verificando bloques...</translation> </message> <message> <location line="+1"/> <source>Verifying wallet...</source> <translation>Verificando monedero...</translation> </message> <message> <location line="-69"/> <source>Imports blocks from external blk000??.dat file</source> <translation>Importa los bloques desde un archivo blk000??.dat externo</translation> </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>Configura el número de hilos para el script de verificación (hasta 16, 0 = auto, &lt;0 = leave that many cores free, por fecto: 0)</translation> </message> <message> <location line="+77"/> <source>Information</source> <translation>Información</translation> </message> <message> <location line="+3"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation>Dirección -tor inválida: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>Inválido por el monto -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>Inválido por el monto -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation> </message> <message> <location line="+8"/> <source>Maintain a full transaction index (default: 0)</source> <translation>Mantener índice de transacciones completo (predeterminado: 0)</translation> </message> <message> <location line="+2"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation>Búfer de recepción máximo por conexión, &lt;n&gt;*1000 bytes (predeterminado: 5000)</translation> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation>Búfer de recepción máximo por conexión, , &lt;n&gt;*1000 bytes (predeterminado: 1000)</translation> </message> <message> <location line="+2"/> <source>Only accept block chain matching built-in checkpoints (default: 1)</source> <translation>Aceptar solamente cadena de bloques que concuerde con los puntos de control internos (predeterminado: 1)</translation> </message> <message> <location line="+1"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation>Conectarse solo a nodos de la red &lt;net&gt; (IPv4, IPv6 o Tor)</translation> </message> <message> <location line="+2"/> <source>Output extra debugging information. Implies all other -debug* options</source> <translation>Mostrar información de depuración adicional. Implica todos los demás opciones -debug*</translation> </message> <message> <location line="+1"/> <source>Output extra network debugging information</source> <translation>Mostrar información de depuración adicional</translation> </message> <message> <location line="+2"/> <source>Prepend debug output with timestamp (default: 1)</source> <translation>Anteponer marca temporal a la información de depuración</translation> </message> <message> <location line="+5"/> <source>SSL options: (see the GoldDiggerCoin Wiki for SSL setup instructions)</source> <translation>Opciones SSL: (ver la GoldDiggerCoin Wiki para instrucciones de configuración SSL)</translation> </message> <message> <location line="+1"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation>Elija la versión del proxy socks a usar (4-5, predeterminado: 5)</translation> </message> <message> <location line="+3"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation>Enviar información de trazas/depuración a la consola en lugar de al archivo debug.log</translation> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation>Enviar información de trazas/depuración al depurador</translation> </message> <message> <location line="+5"/> <source>Set maximum block size in bytes (default: 250000)</source> <translation>Establecer tamaño máximo de bloque en bytes (predeterminado: 250000)</translation> </message> <message> <location line="+1"/> <source>Set minimum block size in bytes (default: 0)</source> <translation>Establecer tamaño mínimo de bloque en bytes (predeterminado: 0)</translation> </message> <message> <location line="+2"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation>Reducir el archivo debug.log al iniciar el cliente (predeterminado: 1 sin -debug)</translation> </message> <message> <location line="+1"/> <source>Signing transaction failed</source> <translation>Transacción falló</translation> </message> <message> <location line="+2"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation>Especificar el tiempo máximo de conexión en milisegundos (predeterminado: 5000)</translation> </message> <message> <location line="+4"/> <source>System error: </source> <translation>Error de sistema: </translation> </message> <message> <location line="+4"/> <source>Transaction amount too small</source> <translation>Monto de la transacción muy pequeño</translation> </message> <message> <location line="+1"/> <source>Transaction amounts must be positive</source> <translation>Montos de transacciones deben ser positivos</translation> </message> <message> <location line="+1"/> <source>Transaction too large</source> <translation>Transacción demasiado grande</translation> </message> <message> <location line="+7"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation>Usar UPnP para asignar el puerto de escucha (predeterminado: 0)</translation> </message> <message> <location line="+1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation>Usar UPnP para asignar el puerto de escucha (predeterminado: 1 al escuchar)</translation> </message> <message> <location line="+1"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation>Utilizar proxy para conectar a Tor servicios ocultos (predeterminado: igual que -proxy)</translation> </message> <message> <location line="+2"/> <source>Username for JSON-RPC connections</source> <translation>Nombre de usuario para las conexiones JSON-RPC </translation> </message> <message> <location line="+4"/> <source>Warning</source> <translation>Aviso</translation> </message> <message> <location line="+1"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation>Aviso: Esta versión es obsoleta, actualización necesaria!</translation> </message> <message> <location line="+1"/> <source>You need to rebuild the databases using -reindex to change -txindex</source> <translation>Necesita reconstruir las bases de datos con la opción -reindex para modificar -txindex</translation> </message> <message> <location line="+1"/> <source>wallet.dat corrupt, salvage failed</source> <translation>wallet.dat corrupto. Ha fallado la recuperación.</translation> </message> <message> <location line="-50"/> <source>Password for JSON-RPC connections</source> <translation>Contraseña para las conexiones JSON-RPC </translation> </message> <message> <location line="-67"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation>Permitir conexiones JSON-RPC desde la dirección IP especificada </translation> </message> <message> <location line="+76"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation>Enviar comando al nodo situado en &lt;ip&gt; (predeterminado: 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>Ejecutar un comando cuando cambia el mejor bloque (%s en cmd se sustituye por el hash de bloque)</translation> </message> <message> <location line="+147"/> <source>Upgrade wallet to latest format</source> <translation>Actualizar el monedero al último formato</translation> </message> <message> <location line="-21"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation>Ajustar el número de claves en reserva &lt;n&gt; (predeterminado: 100) </translation> </message> <message> <location line="-12"/> <source>Rescan the block chain for missing wallet transactions</source> <translation>Volver a examinar la cadena de bloques en busca de transacciones del monedero perdidas</translation> </message> <message> <location line="+35"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation>Usar OpenSSL (https) para las conexiones JSON-RPC </translation> </message> <message> <location line="-26"/> <source>Server certificate file (default: server.cert)</source> <translation>Certificado del servidor (predeterminado: server.cert) </translation> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation>Clave privada del servidor (predeterminado: server.pem) </translation> </message> <message> <location line="-151"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation>Cifrados aceptados (predeterminado: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) </translation> </message> <message> <location line="+165"/> <source>This help message</source> <translation>Este mensaje de ayuda </translation> </message> <message> <location line="+6"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation>No es posible conectar con %s en este sistema (bind ha dado el error %d, %s)</translation> </message> <message> <location line="-91"/> <source>Connect through socks proxy</source> <translation>Conectar mediante proxy socks</translation> </message> <message> <location line="-10"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation>Permitir búsquedas DNS para -addnode, -seednode y -connect</translation> </message> <message> <location line="+55"/> <source>Loading addresses...</source> <translation>Cargando direcciones...</translation> </message> <message> <location line="-35"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation>Error al cargar wallet.dat: el monedero está dañado</translation> </message> <message> <location line="+1"/> <source>Error loading wallet.dat: Wallet requires newer version of GoldDiggerCoin</source> <translation>Error al cargar wallet.dat: El monedero requiere una versión más reciente de GoldDiggerCoin</translation> </message> <message> <location line="+93"/> <source>Wallet needed to be rewritten: restart GoldDiggerCoin to complete</source> <translation>El monedero ha necesitado ser reescrito. Reinicie GoldDiggerCoin para completar el proceso</translation> </message> <message> <location line="-95"/> <source>Error loading wallet.dat</source> <translation>Error al cargar wallet.dat</translation> </message> <message> <location line="+28"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation>Dirección -proxy inválida: &apos;%s&apos;</translation> </message> <message> <location line="+56"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation>La red especificada en -onlynet &apos;%s&apos; es desconocida</translation> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation>Solicitada versión de proxy -socks desconocida: %i</translation> </message> <message> <location line="-96"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation>No se puede resolver la dirección de -bind: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation>No se puede resolver la dirección de -externalip: &apos;%s&apos;</translation> </message> <message> <location line="+44"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>Cantidad inválida para -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Invalid amount</source> <translation>Cuantía no válida</translation> </message> <message> <location line="-6"/> <source>Insufficient funds</source> <translation>Fondos insuficientes</translation> </message> <message> <location line="+10"/> <source>Loading block index...</source> <translation>Cargando el índice de bloques...</translation> </message> <message> <location line="-57"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation>Añadir un nodo al que conectarse y tratar de mantener la conexión abierta</translation> </message> <message> <location line="-25"/> <source>Unable to bind to %s on this computer. GoldDiggerCoin is probably already running.</source> <translation>No es posible conectar con %s en este sistema. Probablemente GoldDiggerCoin ya está ejecutándose.</translation> </message> <message> <location line="+64"/> <source>Fee per KB to add to transactions you send</source> <translation>Tarifa por KB que añadir a las transacciones que envíe</translation> </message> <message> <location line="+19"/> <source>Loading wallet...</source> <translation>Cargando monedero...</translation> </message> <message> <location line="-52"/> <source>Cannot downgrade wallet</source> <translation>No se puede rebajar el monedero</translation> </message> <message> <location line="+3"/> <source>Cannot write default address</source> <translation>No se puede escribir la dirección predeterminada</translation> </message> <message> <location line="+64"/> <source>Rescanning...</source> <translation>Reexplorando...</translation> </message> <message> <location line="-57"/> <source>Done loading</source> <translation>Generado pero no aceptado</translation> </message> <message> <location line="+82"/> <source>To use the %s option</source> <translation>Para utilizar la opción %s</translation> </message> <message> <location line="-74"/> <source>Error</source> <translation>Error</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>Tiene que establecer rpcpassword=&lt;contraseña&gt; en el fichero de configuración: ⏎ %s ⏎ Si el archivo no existe, créelo con permiso de lectura solamente del propietario.</translation> </message> </context> </TS>
golddiggercoin/golddiggercoin
src/qt/locale/bitcoin_es.ts
TypeScript
mit
120,085
#include "../../include/domains/AODeterminization.h" #include "../../include/domains/DummyAction.h" AllOutcomesDeterminization:: AllOutcomesDeterminization(mlcore::Problem* problem) { originalProblem_ = problem; problem->generateAll(); int s_idx = 0; for (mlcore::State* s : problem->states()) { states_.insert(s); if (s == problem->initialState()) this->s0 = s; stateIndexMap_[s] = s_idx; transitionGraph_.push_back(std::unordered_map<int, int>()); allStates_.push_back(s); s_idx++; } int action_idx = 0; for (mlcore::State* s : problem->states()) { int s_idx = stateIndexMap_[s]; for (mlcore::Action* a : problem->actions()) { if (!problem->applicable(s, a)) continue; for (auto& successor : problem->transition(s, a)) { int s_prime_idx = stateIndexMap_[successor.su_state]; transitionGraph_[s_idx][action_idx] = s_prime_idx; actionCosts_.push_back(problem->cost(s, a)); actions_.push_back(new DummyAction(action_idx)); actionsVector_.push_back(actions_.back()); action_idx++; } } } } std::list<mlcore::Action*> AllOutcomesDeterminization::actions(mlcore::State* s) const { int s_idx = stateIndexMap_.at(s); std::list<mlcore::Action*> stateActions; for (auto& entry : transitionGraph_.at(s_idx)) { stateActions.push_back(actionsVector_[entry.first]); } return stateActions; } bool AllOutcomesDeterminization::goal(mlcore::State* s) const { return originalProblem_->goal(s); } std::list<mlcore::Successor> AllOutcomesDeterminization::transition(mlcore::State* s, mlcore::Action* a) { int s_idx = stateIndexMap_[s]; DummyAction* dummya = static_cast<DummyAction*>(a); int s_prime_idx = transitionGraph_[s_idx][dummya->id()]; std::list<mlcore::Successor> successors; successors.push_back(mlcore::Successor(allStates_[s_prime_idx], 1.0)); return successors; } double AllOutcomesDeterminization::cost(mlcore::State* s, mlcore::Action* a) const { DummyAction* dummya = static_cast<DummyAction*>(a); return actionCosts_[dummya->id()]; } bool AllOutcomesDeterminization:: applicable(mlcore::State* s, mlcore::Action* a) const { int s_idx = stateIndexMap_.at(s); DummyAction* dummya = static_cast<DummyAction*>(a); return transitionGraph_.at(s_idx).count(dummya->id()) > 0; }
luisenp/mdp-lib
src/domains/AODeterminization.cpp
C++
mit
2,532
<?php namespace BigD\ThemeBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; /** * This is the class that validates and merges configuration from your app/config files * * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class} */ class Configuration implements ConfigurationInterface { /** * {@inheritDoc} */ public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder(); $rootNode = $treeBuilder->root('theme'); // Here you should define the parameters that are allowed to // configure your bundle. See the documentation linked above for // more information on that topic. return $treeBuilder; } }
matudelatower/BigD
src/BigD/ThemeBundle/DependencyInjection/Configuration.php
PHP
mit
870
<?php /* * This file is part of Flarum. * * For detailed copyright and license information, please view the * LICENSE file that was distributed with this source code. */ namespace Flarum\Post; /** * @property array $content */ abstract class AbstractEventPost extends Post { /** * Unserialize the content attribute from the database's JSON value. * * @param string $value * @return array */ public function getContentAttribute($value) { return json_decode($value, true); } /** * Serialize the content attribute to be stored in the database as JSON. * * @param string $value */ public function setContentAttribute($value) { $this->attributes['content'] = json_encode($value); } }
flarum/core
src/Post/AbstractEventPost.php
PHP
mit
783
var searchData= [ ['setdebugflags',['setDebugFlags',['../dwarfDbgDebugInfo_8c.html#ab42dd1f5e0f83cb14eed0902aa036a95',1,'dwarfDbgDebugInfo.c']]], ['showchildren',['showChildren',['../dwarfDbgDieInfo_8c.html#a7e7301f838fc67cbb4555c6c250c2dc0',1,'dwarfDbgDieInfo.c']]], ['showcontents',['showContents',['../dwarfDbgLocationInfo_8c.html#af177f930f13d0122065173a8bfbd0317',1,'dwarfDbgLocationInfo.c']]], ['showdieentries',['showDieEntries',['../dwarfDbgDieInfo_8c.html#a01c1ab81a588e24d9d82a9aa8ace1a09',1,'dwarfDbgDieInfo.c']]], ['showsiblings',['showSiblings',['../dwarfDbgDieInfo_8c.html#a6d210b422753428ebf1edc2694a5563f',1,'dwarfDbgDieInfo.c']]] ];
apwiede/nodemcu-firmware
docs/dwarfDbg/search/functions_8.js
JavaScript
mit
660
/*Owner & Copyrights: Vance King Saxbe. A.*//*Copyright (c) <2014> Author Vance King Saxbe. A, and contributors Power Dominion Enterprise, Precieux Consulting and other contributors. Modelled, Architected and designed by Vance King Saxbe. A. with the geeks from GoldSax Consulting and GoldSax Technologies email @vsaxbe@yahoo.com. Development teams from Power Dominion Enterprise, Precieux Consulting. Project sponsored by GoldSax Foundation, GoldSax Group and executed by GoldSax Manager.*/ $stream = file_get_contents('HITEJINROLAST.txt'); $avgp = "21500.00"; $high = "21750.00"; $low = "21250.00"; echo "&L=".$stream."&N=HITEJINRO&"; $temp = file_get_contents("HITEJINROTEMP.txt", "r"); if ($stream != $temp ) { $mhigh = ($avgp + $high)/2; $mlow = ($avgp + $low)/2; $llow = ($low - (($avgp - $low)/2)); $hhigh = ($high + (($high - $avgp)/2)); $diff = $stream - $temp; $diff = number_format($diff, 2, '.', ''); $avgp = number_format($avgp, 2, '.', ''); if ( $stream > $temp ) { if ( ($stream > $mhigh ) && ($stream < $high)) { echo "&sign=au" ; } if ( ($stream < $mlow ) && ($stream > $low)) { echo "&sign=ad" ; } if ( $stream < $llow ) { echo "&sign=as" ; } if ( $stream > $hhigh ) { echo "&sign=al" ; } if ( ($stream < $hhigh) && ($stream > $high)) { echo "&sign=auu" ; } if ( ($stream > $llow) && ($stream < $low)) { echo "&sign=add" ; } //else { echo "&sign=a" ; } $filedish = fopen("C:\wamp\www\malert.txt", "a+"); $write = fputs($filedish, "HITEJINRO:".$stream. ":Moving up:".$diff.":".$high.":".$low.":".$avgp."\r\n"); fclose( $filedish );} if ( $stream < $temp ) { if ( ($stream >$mhigh) && ($stream < $high)) { echo "&sign=bu" ; } if ( ($stream < $mlow) && ($stream > $low)) { echo "&sign=bd" ; } if ( $stream < $llow ) { echo "&sign=bs" ; } if ( $stream > $hhigh ) { echo "&sign=bl" ; } if ( ($stream < $hhigh) && ($stream > $high)) { echo "&sign=buu" ; } if ( ($stream > $llow) && ($stream < $low)) { echo "&sign=bdd" ; } // else { echo "&sign=b" ; } $filedish = fopen("C:\wamp\www\malert.txt", "a+"); $write = fputs($filedish, "HITEJINRO:".$stream. ":Moving down:".$diff.":".$high.":".$low.":".$avgp."\r\n"); fclose( $filedish );} $my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $time = date('h:i:s',$new_time); $filename= 'HITEJINRO.txt'; $file = fopen($filename, "a+" ); fwrite( $file, $stream.":".$time."\r\n" ); fclose( $file ); if (($stream > $mhigh ) && ($temp<= $mhigh )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $time = date('h:i:s',$new_time); $risk = ($stream - $low) * (200000/$stream); $risk = (int)$risk; $filedash = fopen("C:\wamp\www\alert.txt", "a+"); $wrote = fputs($filedash, "HITEJINRO:".$stream. ":Approaching:PHIGH:".$high.":Buy Cost:".$risk."\r\n"); fclose( $filedash ); } if (($stream < $mhigh ) && ($temp>= $mhigh )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $risk = ($high - $stream) * (200000/$stream); $risk = (int)$risk; $time = date('h:i:s',$new_time); $filedash = fopen("C:\wamp\www\alert.txt", "a+"); $wrote = fputs($filedash, "HITEJINRO:". $stream.":Moving Down:PHIGH:".$high.":short Cost:".$risk."\r\n"); fclose( $filedash ); } if (($stream > $mlow ) && ($temp<= $mlow )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $time = date('h:i:s',$new_time); $risk = ($stream - $low) * (200000/$stream); $risk = (int)$risk; $filedash = fopen("C:\wamp\www\alert.txt", "a+"); $wrote = fputs($filedash, "HITEJINRO:".$stream. ":Moving Up:PLOW:".$low.":Buy Cost:".$risk."\r\n"); fclose( $filedash ); } if (($stream < $mlow ) && ($temp>= $mlow )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $risk = ($high - $stream) * (200000/$stream); $risk = (int)$risk; $time = date('h:i:s',$new_time); $filedash = fopen("C:\wamp\www\alert.txt", "a+"); $wrote = fputs($filedash, "HITEJINRO:". $stream.":Approaching:PLOW:".$low.":short Cost:".$risk."\r\n"); fclose( $filedash ); } if (($stream > $high ) && ($temp<= $high )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $time = date('h:i:s',$new_time); $risk = ($stream - $low) * (200000/$stream); $risk = (int)$risk; $filedash = fopen("C:\wamp\www\alert.txt", "a+"); $wrote = fputs($filedash, "HITEJINRO:".$stream. ":Breaking:PHIGH:".$high.":Buy Cost:".$risk."\r\n"); fclose( $filedash ); } if (($stream > $hhigh ) && ($temp<= $hhigh )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $time = date('h:i:s',$new_time); $risk = ($stream - $low) * (200000/$stream); $risk = (int)$risk; $filedash = fopen("C:\wamp\www\alert.txt", "a+"); $wrote = fputs($filedash, "HITEJINRO:".$stream. ":Moving Beyond:PHIGH:".$high.":Buy Cost:".$risk."\r\n"); fclose( $filedash ); } if (($stream < $hhigh ) && ($temp>= $hhigh )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $time = date('h:i:s',$new_time); $filedash = fopen("C:\wamp\www\alert.txt", "a+"); $wrote = fputs($filedash, "HITEJINRO:". $stream. ":Coming near:PHIGH:".$high.":Buy Cost:".$risk."\r\n"); fclose( $filedash ); } if (($stream < $high ) && ($temp>= $high )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $time = date('h:i:s',$new_time); $filedash = fopen("C:\wamp\www\alert.txt", "a+"); $wrote = fputs($filedash, "HITEJINRO:". $stream. ":Retracing:PHIGH:".$high."\r\n"); fclose( $filedash ); } if (($stream < $llow ) && ($temp>= $llow )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $risk = ($high - $stream) * (200000/$stream); $risk = (int)$risk; $time = date('h:i:s',$new_time); $filedash = fopen("C:\wamp\www\alert.txt", "a+"); $wrote = fputs($filedash, "HITEJINRO:". $stream.":Breaking Beyond:PLOW:".$low.":short Cost:".$risk."\r\n"); fclose( $filedash ); } if (($stream < $low ) && ($temp>= $low )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $risk = ($high - $stream) * (200000/$stream); $risk = (int)$risk; $time = date('h:i:s',$new_time); $filedash = fopen("C:\wamp\www\alert.txt", "a+"); $wrote = fputs($filedash, "HITEJINRO:". $stream.":Breaking:PLOW:".$low.":short Cost:".$risk."\r\n"); fclose( $filedash ); } if (($stream > $llow ) && ($temp<= $llow )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $time = date('h:i:s',$new_time); $filedash = fopen("C:\wamp\www\alert.txt", "a+"); $wrote = fputs($filedash, "HITEJINRO:". $stream.":Coming near:PLOW:".$low.":short Cost:".$risk."\r\n"); fclose( $filedash ); } if (($stream > $low ) && ($temp<= $low )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $time = date('h:i:s',$new_time); $filedash = fopen("C:\wamp\www\alert.txt", "a+"); $wrote = fputs($filedash, "HITEJINRO:". $stream.":Retracing:PLOW:".$low."\r\n"); fclose( $filedash ); } if (($stream > $avgp ) && ($temp<= $avgp )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $risk = ($stream - $low) * (200000/$stream); $risk = (int)$risk; $avgp = number_format($avgp, 2, '.', ''); $time = date('h:i:s',$new_time); $filedash = fopen("C:\wamp\www\alert.txt", "a+"); $wrote = fputs($filedash, "HITEJINRO:".$stream. ":Sliding up:PAVG:".$avgp.":Buy Cost:".$risk."\r\n"); fclose( $filedash ); } if (($stream < $avgp ) && ($temp>= $avgp )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $risk = ($high - $stream) * (200000/$stream); $risk = (int)$risk; $avgp = number_format($avgp, 2, '.', ''); $time = date('h:i:s',$new_time); $filedash = fopen("C:\wamp\www\alert.txt", "a+"); $wrote = fputs($filedash, "HITEJINRO:".$stream. ":Sliding down:PAVG:".$avgp.":Short Cost:".$risk."\r\n"); fclose( $filedash ); } } $filedash = fopen("HITEJINROTEMP.txt", "w"); $wrote = fputs($filedash, $stream); fclose( $filedash ); //echo "&chg=".$json_output['cp']."&"; ?> /*email to provide support at vancekingsaxbe@powerdominionenterprise.com, businessaffairs@powerdominionenterprise.com, For donations please write to fundraising@powerdominionenterprise.com*/
VanceKingSaxbeA/KOSPI-Engine
App/HITEJINRO.php
PHP
mit
9,175
import 'reflect-metadata'; import 'rxjs/Rx'; import 'zone.js'; import AppComponent from './components/AppComponent.js'; import { bootstrap } from 'angular2/platform/browser'; bootstrap(AppComponent);
Scoutlit/realtimeSyncing
webclient/app/app.js
JavaScript
mit
201
#!/usr/bin/python import pexpect import sys import logging import vt102 import os import time def termcheck(child, timeout=0): time.sleep(0.05) try: logging.debug("Waiting for EOF or timeout=%d"%timeout) child.expect(pexpect.EOF, timeout=timeout) except pexpect.exceptions.TIMEOUT: logging.debug("Hit timeout and have %d characters in child.before"%len(child.before)) return child.before def termkey(child, stream, screen, key, timeout=0): logging.debug("Sending '%s' to child"%key) child.send(key) s = termcheck(child) logging.debug("Sending child.before text to vt102 stream") stream.process(child.before) logging.debug("vt102 screen dump") logging.debug(screen) # START LOGGING logging.basicConfig(filename='menu_demo.log',level=logging.DEBUG) # SETUP VT102 EMULATOR #rows, columns = os.popen('stty size', 'r').read().split() rows, columns = (50,120) stream=vt102.stream() screen=vt102.screen((int(rows), int(columns))) screen.attach(stream) logging.debug("Setup vt102 with %d %d"%(int(rows),int(columns))) logging.debug("Starting demo2.py child process...") child = pexpect.spawn('./demo2.py', maxread=65536, dimensions=(int(rows),int(columns))) s = termcheck(child) logging.debug("Sending child.before (len=%d) text to vt102 stream"%len(child.before)) stream.process(child.before) logging.debug("vt102 screen dump") logging.debug(screen) termkey(child, stream, screen, "a") termkey(child, stream, screen, "1") logging.debug("Quiting...")
paulboal/pexpect-curses
demo/demo3.py
Python
mit
1,476
<?php namespace Outil\ServiceBundle\Param; use Symfony\Component\HttpKernel\Exception\Exception; class Param{ // private $mailer; // private $locale; // private $minLength; // public function __construct(\Swift_Mailer $mailer, $locale, $minLength) // { // $this->mailer = $mailer; // $this->locale = $locale; // $this->minLength = (int) $minLength; // } /** * Vérifie si le texte est un spam ou non * * param string $text * return bool */ public function except($text) { throw new \Exception('Votre message a été détecté comme spam !'); } }
junioraby/architec.awardspace.info
src/Outil/ServiceBundle/Param/Param.php
PHP
mit
605
#include "CharTypes.h" namespace GeneHunter { bool firstMatchSecond( char c1, char c2 ) { if ( c1 == c2 ) return true; if ( c1 == 'U' and c2 == 'T' ) return true; if ( c1 == 'T' and c2 == 'U' ) return true; if ( c1 == 'K' and ( c2 == 'G' or c2 == 'T' )) return true; if ( c1 == 'S' and ( c2 == 'G' or c2 == 'C' )) return true; if ( c1 == 'R' and ( c2 == 'G' or c2 == 'A' )) return true; if ( c1 == 'M' and ( c2 == 'A' or c2 == 'C' )) return true; if ( c1 == 'W' and ( c2 == 'A' or c2 == 'T' )) return true; if ( c1 == 'Y' and ( c2 == 'T' or c2 == 'C' )) return true; return false; } } // namespace GeneHunter
BrainTwister/GeneHunter
src/GenomeLib/CharTypes.cpp
C++
mit
652
using System; using System.Collections.Generic; using System.Text; namespace DesignPatterns.Behavioral.Visitor { public class Director : Employee { public Director(string name, double income, int vacationDays) : base(name, income, vacationDays) { } } }
Ysovuka/design-patterns
src/c-sharp/DesignPatterns/Behavioral/Visitor/Director.cs
C#
mit
289
class CreateImages < ActiveRecord::Migration def change create_table :images do |t| t.string :title, :null => false t.boolean :free_shipping, :null => false, :default => false t.timestamps end end end
piggybak/piggybak_free_shipping_by_product
test/dummy/db/migrate/20111231040354_create_images.rb
Ruby
mit
231
class VideoRepliesController < ApplicationController before_filter :require_user, :only => [:create, :delete] def create @reply = VideoReply.new(params[:video_reply]) @reply.user = @current_user if @reply.save flash[:notice] = 'Reply Submitted Successfully' redirect_to @reply.video else render @reply.video end end def delete @reply = VideoReply.find(params[:id]) @video = @reply.video @reply.destroy redirect_to @video end end
AlexChien/shadowgraph
app/controllers/video_replies_controller.rb
Ruby
mit
492
// Copyright (c) Microsoft Corporation // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Runtime.InteropServices; namespace Microsoft.Xbox.Services.Leaderboard { public partial class LeaderboardQuery { public string StatName { get; internal set; } public string SocialGroup { get; internal set; } public bool HasNext { get; internal set; } public uint SkipResultToRank { get { return pImpl.GetSkipResultToRank(); } set { pImpl.SetSkipResultToRank(value); } } public bool SkipResultToMe { get { return pImpl.GetSkipResultToMe(); } set { pImpl.SetSkipResultToMe(value); } } public SortOrder Order { get { return pImpl.GetOrder(); } set { pImpl.SetOrder(value); } } public uint MaxItems { get { return pImpl.GetMaxItems(); } set { pImpl.SetMaxItems(value); } } ILeaderboardQueryImpl pImpl; internal IntPtr GetPtr() { return pImpl.GetPtr(); } internal LeaderboardQuery(IntPtr ptr) { pImpl = new LeaderboardQueryImpl(ptr, this); } // todo remove after removing leaderboard service internal LeaderboardQuery(LeaderboardQuery query, string continuation) { } } }
MSFT-Heba/xbox-live-unity-plugin
CSharpSource/Source/api/Leaderboard/LeaderboardQuery.cs
C#
mit
1,787
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("SmallestElementInArray")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("SmallestElementInArray")] [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("96634337-40b8-4f26-ab7b-dea8a2771ef1")] // 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")]
Shtereva/Fundamentals-with-CSharp
Lists-ProcessingVariable-LengthSequences/SmallestElementInArray/Properties/AssemblyInfo.cs
C#
mit
1,420
/** * Returns an Express Router with bindings for the Admin UI static resources, * i.e files, less and browserified scripts. * * Should be included before other middleware (e.g. session management, * logging, etc) for reduced overhead. */ var browserify = require('../middleware/browserify'); var express = require('express'); var less = require('less-middleware'); var path = require('path'); module.exports = function createStaticRouter (keystone) { var router = express.Router(); /* Prepare browserify bundles */ var bundles = { fields: browserify('utils/fields.js', 'FieldTypes'), signin: browserify('Signin/index.js'), index: browserify('index.js'), }; // prebuild static resources on the next tick // improves first-request performance process.nextTick(function () { bundles.fields.build(); bundles.signin.build(); bundles.index.build(); }); /* Prepare LESS options */ var elementalPath = path.join(path.dirname(require.resolve('elemental')), '..'); var reactSelectPath = path.join(path.dirname(require.resolve('react-select')), '..'); var customStylesPath = keystone.getPath('adminui custom styles') || ''; var lessOptions = { render: { modifyVars: { elementalPath: JSON.stringify(elementalPath), reactSelectPath: JSON.stringify(reactSelectPath), customStylesPath: JSON.stringify(customStylesPath), adminPath: JSON.stringify(keystone.get('admin path')), }, }, }; /* Configure router */ router.use('/styles', less(path.resolve(__dirname + '/../../public/styles'), lessOptions)); router.use('/styles/fonts', express.static(path.resolve(__dirname + '/../../public/js/lib/tinymce/skins/keystone/fonts'))); router.get('/js/fields.js', bundles.fields.serve); router.get('/js/signin.js', bundles.signin.serve); router.get('/js/index.js', bundles.index.serve); router.use(express.static(path.resolve(__dirname + '/../../public'))); return router; };
joerter/keystone
admin/server/app/createStaticRouter.js
JavaScript
mit
1,923
/* * User: aleksey.nakoryakov * Date: 03.08.12 * Time: 12:32 */ using System; using System.Reflection; using Autodesk.AutoCAD.ApplicationServices; namespace LayoutsFromModel { /// <summary> /// Класс для работы с настройками AutoCAD /// </summary> public static class AcadPreferencesHelper { /// <summary> /// Метод задаёт значение для настройки LayoutCreateViewport /// </summary> /// <param name="newValue">Новое значение настройки</param> /// <returns>Старое значение настройки</returns> public static bool SetLayoutCreateViewportProperty(bool newValue) { object acadObject = Application.AcadApplication; object preferences = acadObject.GetType().InvokeMember("Preferences", BindingFlags.GetProperty, null, acadObject, null); object display = preferences.GetType().InvokeMember("Display", BindingFlags.GetProperty, null, preferences, null); object layoutProperty = display .GetType().InvokeMember("LayoutCreateViewport", BindingFlags.GetProperty, null, display, null); bool layoutCreateViewportProperty = Convert.ToBoolean(layoutProperty); object[] dataArray = new object[]{newValue}; display.GetType() .InvokeMember("LayoutCreateViewport", BindingFlags.SetProperty, null, display, dataArray); return layoutCreateViewportProperty; } } }
bargool/LayoutsFromModel
LayoutsFromModel/Helpers/AcadPreferencesHelper.cs
C#
mit
1,694
package org.nextrtc.signalingserver.api; import lombok.extern.log4j.Log4j; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Service; import com.google.common.eventbus.EventBus; @Log4j @Service("nextRTCEventBus") @Scope("singleton") public class NextRTCEventBus { private EventBus eventBus; public NextRTCEventBus() { this.eventBus = new EventBus(); } public void post(NextRTCEvent event) { log.info("POSTED EVENT: " + event); eventBus.post(event); } @Deprecated public void post(Object o) { eventBus.post(o); } public void register(Object listeners) { log.info("REGISTERED LISTENER: " + listeners); eventBus.register(listeners); } }
kevintanhongann/nextrtc-signaling-server
src/main/java/org/nextrtc/signalingserver/api/NextRTCEventBus.java
Java
mit
719
'use strict' const isPlainObject = require('lodash.isplainobject') const getPath = require('lodash.get') const StaticComponent = require('./StaticComponent') const DynamicComponent = require('./DynamicComponent') const LinkedComponent = require('./LinkedComponent') const ContainerComponent = require('./ContainerComponent') const MissingComponent = require('./MissingComponent') module.exports = { coerce, value: makeStaticComponent, factory: makeDynamicComponent, link: makeLinkedComponent, container: makeContainerComponent, missing: makeMissingComponent } function makeStaticComponent(value) { return new StaticComponent(value) } makeDynamicComponent.predefinedFrom = PredefinedComponentBuilder function makeDynamicComponent(factory, context) { return new DynamicComponent(factory, context) } function PredefinedComponentBuilder(implementations) { return function PredefinedComponent(implementationName, context) { let implementation = getPath(implementations, implementationName) return makeDynamicComponent(implementation, context) } } makeLinkedComponent.boundTo = BoundLinkBuilder function makeLinkedComponent(context, targetKey) { return new LinkedComponent(context, targetKey) } function BoundLinkBuilder(container) { return function BoundLink(targetKey) { return makeLinkedComponent(container, targetKey) } } function makeContainerComponent(container) { return new ContainerComponent(container) } function makeMissingComponent(key) { return new MissingComponent(key) } function coerce(component) { switch (true) { case _isComponent(component): return component case isPlainObject(component): return makeContainerComponent(component) default: return makeStaticComponent(component) } } function _isComponent(component) { return component && component.instantiate && component.unwrap && true }
zaboco/deependr
src/components/index.js
JavaScript
mit
1,892
# Include hook code here require 'active_record' require 'qds' ActiveRecord::Base.extend MindAsLab::Searchable
mindaslab/qds
init.rb
Ruby
mit
112
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe "Cards" do it "fails" do fail "hey buddy, you should probably rename this file and start specing for real" end end
rhyhann/cards
spec/cards_spec.rb
Ruby
mit
199
//----------------------------------------------------------------------- // <copyright file="PropertiesFileGenerator.cs" company="SonarSource SA and Microsoft Corporation"> // Copyright (c) SonarSource SA and Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // </copyright> //----------------------------------------------------------------------- using SonarQube.Common; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; namespace SonarRunner.Shim { public static class PropertiesFileGenerator { private const string ProjectPropertiesFileName = "sonar-project.properties"; public const string VSBootstrapperPropertyKey = "sonar.visualstudio.enable"; public const string BuildWrapperOutputDirectoryKey = "sonar.cfamily.build-wrapper-output"; #region Public methods /// <summary> /// Locates the ProjectInfo.xml files and uses the information in them to generate /// a sonar-runner properties file /// </summary> /// <returns>Information about each of the project info files that was processed, together with /// the full path to generated file. /// Note: the path to the generated file will be null if the file could not be generated.</returns> public static ProjectInfoAnalysisResult GenerateFile(AnalysisConfig config, ILogger logger) { return GenerateFile(config, logger, new RoslynV1SarifFixer()); } public /* for test */ static ProjectInfoAnalysisResult GenerateFile(AnalysisConfig config, ILogger logger, IRoslynV1SarifFixer fixer) { if (config == null) { throw new ArgumentNullException("config"); } if (logger == null) { throw new ArgumentNullException("logger"); } string fileName = Path.Combine(config.SonarOutputDir, ProjectPropertiesFileName); logger.LogDebug(Resources.MSG_GeneratingProjectProperties, fileName); IEnumerable<ProjectInfo> projects = ProjectLoader.LoadFrom(config.SonarOutputDir); if (projects == null || !projects.Any()) { logger.LogError(Resources.ERR_NoProjectInfoFilesFound); return new ProjectInfoAnalysisResult(); } FixSarifReport(logger, projects, fixer); PropertiesWriter writer = new PropertiesWriter(config); ProjectInfoAnalysisResult result = ProcessProjectInfoFiles(projects, writer, logger); IEnumerable<ProjectInfo> validProjects = result.GetProjectsByStatus(ProjectInfoValidity.Valid); if (validProjects.Any()) { // Handle global settings AnalysisProperties properties = GetAnalysisPropertiesToWrite(config, logger); writer.WriteGlobalSettings(properties); string contents = writer.Flush(); result.FullPropertiesFilePath = fileName; File.WriteAllText(result.FullPropertiesFilePath, contents, Encoding.ASCII); } else { // if the user tries to build multiple configurations at once there will be duplicate projects if (result.GetProjectsByStatus(ProjectInfoValidity.DuplicateGuid).Any()) { logger.LogError(Resources.ERR_NoValidButDuplicateProjects); } else { logger.LogError(Resources.ERR_NoValidProjectInfoFiles); } } return result; } /// <summary> /// Loads SARIF reports from the given projects and attempts to fix /// improper escaping from Roslyn V1 (VS 2015 RTM) where appropriate. /// </summary> private static void FixSarifReport(ILogger logger, IEnumerable<ProjectInfo> projects, IRoslynV1SarifFixer fixer /* for test */) { // attempt to fix invalid project-level SARIF emitted by Roslyn 1.0 (VS 2015 RTM) foreach (ProjectInfo project in projects) { Property reportPathProperty; bool tryResult = project.TryGetAnalysisSetting(RoslynV1SarifFixer.ReportFilePropertyKey, out reportPathProperty); if (tryResult) { string reportPath = reportPathProperty.Value; string fixedPath = fixer.LoadAndFixFile(reportPath, logger); if (!reportPath.Equals(fixedPath)) // only need to alter the property if there was no change { // remove the property ahead of changing it // if the new path is null, the file was unfixable and we should leave the property out project.AnalysisSettings.Remove(reportPathProperty); if (fixedPath != null) { // otherwise, set the property value (results in no change if the file was already valid) Property newReportPathProperty = new Property(); newReportPathProperty.Id = RoslynV1SarifFixer.ReportFilePropertyKey; newReportPathProperty.Value = fixedPath; project.AnalysisSettings.Add(newReportPathProperty); } } } } } #endregion #region Private methods private static ProjectInfoAnalysisResult ProcessProjectInfoFiles(IEnumerable<ProjectInfo> projects, PropertiesWriter writer, ILogger logger) { ProjectInfoAnalysisResult result = new ProjectInfoAnalysisResult(); foreach (ProjectInfo projectInfo in projects) { ProjectInfoValidity status = ClassifyProject(projectInfo, projects, logger); if (status == ProjectInfoValidity.Valid) { IEnumerable<string> files = GetFilesToAnalyze(projectInfo, logger); if (files == null || !files.Any()) { status = ProjectInfoValidity.NoFilesToAnalyze; } else { string fxCopReport = TryGetFxCopReport(projectInfo, logger); string vsCoverageReport = TryGetCodeCoverageReport(projectInfo, logger); writer.WriteSettingsForProject(projectInfo, files, fxCopReport, vsCoverageReport); } } result.Projects.Add(projectInfo, status); } return result; } private static ProjectInfoValidity ClassifyProject(ProjectInfo projectInfo, IEnumerable<ProjectInfo> projects, ILogger logger) { if (projectInfo.IsExcluded) { logger.LogInfo(Resources.MSG_ProjectIsExcluded, projectInfo.FullPath); return ProjectInfoValidity.ExcludeFlagSet; } if (!IsProjectGuidValue(projectInfo)) { logger.LogWarning(Resources.WARN_InvalidProjectGuid, projectInfo.ProjectGuid, projectInfo.FullPath); return ProjectInfoValidity.InvalidGuid; } if (HasDuplicateGuid(projectInfo, projects)) { logger.LogWarning(Resources.WARN_DuplicateProjectGuid, projectInfo.ProjectGuid, projectInfo.FullPath); return ProjectInfoValidity.DuplicateGuid; } return ProjectInfoValidity.Valid; } private static bool IsProjectGuidValue(ProjectInfo project) { return project.ProjectGuid != Guid.Empty; } private static bool HasDuplicateGuid(ProjectInfo projectInfo, IEnumerable<ProjectInfo> projects) { return projects.Count(p => !p.IsExcluded && p.ProjectGuid == projectInfo.ProjectGuid) > 1; } /// <summary> /// Returns all of the valid files that can be analyzed. Logs warnings/info about /// files that cannot be analyzed. /// </summary> private static IEnumerable<string> GetFilesToAnalyze(ProjectInfo projectInfo, ILogger logger) { // We're only interested in files that exist and that are under the project root var result = new List<string>(); var baseDir = projectInfo.GetProjectDirectory(); foreach (string file in projectInfo.GetAllAnalysisFiles()) { if (File.Exists(file)) { if (IsInFolder(file, baseDir)) { result.Add(file); } else { logger.LogWarning(Resources.WARN_FileIsOutsideProjectDirectory, file, projectInfo.FullPath); } } else { logger.LogWarning(Resources.WARN_FileDoesNotExist, file); } } return result; } private static bool IsInFolder(string filePath, string folder) { string normalizedPath = Path.GetDirectoryName(Path.GetFullPath(filePath)); return normalizedPath.StartsWith(folder, StringComparison.OrdinalIgnoreCase); } private static string TryGetFxCopReport(ProjectInfo project, ILogger logger) { string fxCopReport = project.TryGetAnalysisFileLocation(AnalysisType.FxCop); if (fxCopReport != null) { if (!File.Exists(fxCopReport)) { fxCopReport = null; logger.LogWarning(Resources.WARN_FxCopReportNotFound, fxCopReport); } } return fxCopReport; } private static string TryGetCodeCoverageReport(ProjectInfo project, ILogger logger) { string vsCoverageReport = project.TryGetAnalysisFileLocation(AnalysisType.VisualStudioCodeCoverage); if (vsCoverageReport != null) { if (!File.Exists(vsCoverageReport)) { vsCoverageReport = null; logger.LogWarning(Resources.WARN_CodeCoverageReportNotFound, vsCoverageReport); } } return vsCoverageReport; } /// <summary> /// Returns all of the analysis properties that should /// be written to the sonar-project properties file /// </summary> private static AnalysisProperties GetAnalysisPropertiesToWrite(AnalysisConfig config, ILogger logger) { AnalysisProperties properties = new AnalysisProperties(); properties.AddRange(config.GetAnalysisSettings(false).GetAllProperties() // Strip out any sensitive properties .Where(p => !p.ContainsSensitiveData())); // There are some properties we want to override regardless of what the user sets AddOrSetProperty(VSBootstrapperPropertyKey, "false", properties, logger); // Special case processing for known properties RemoveBuildWrapperSettingIfDirectoryEmpty(properties, logger); return properties; } private static void AddOrSetProperty(string key, string value, AnalysisProperties properties, ILogger logger) { Property property; Property.TryGetProperty(key, properties, out property); if (property == null) { logger.LogDebug(Resources.MSG_SettingAnalysisProperty, key, value); property = new Property() { Id = key, Value = value }; properties.Add(property); } else { if (string.Equals(property.Value, value, StringComparison.InvariantCulture)) { logger.LogDebug(Resources.MSG_MandatorySettingIsCorrectlySpecified, key, value); } else { logger.LogWarning(Resources.WARN_OverridingAnalysisProperty, key, value); property.Value = value; } } } /// <summary> /// Passing in an invalid value for the build wrapper output directory will cause the C++ plugin to /// fail (invalid = missing or empty directory) so we'll remove invalid settings /// </summary> private static void RemoveBuildWrapperSettingIfDirectoryEmpty(AnalysisProperties properties, ILogger logger) { // The property is set early in the analysis process before any projects are analysed. We can't // tell at this point if the directory missing/empty is error or not - it could just be that all // of the Cpp projects have been excluded from analysis. // We're assuming that if the build wrapper output was not written due to an error elsewhere then // that error will have been logged or reported at the point it occurred. Consequently, we;ll // just write debug output to record what we're doing. Property directoryProperty; if (Property.TryGetProperty(BuildWrapperOutputDirectoryKey, properties, out directoryProperty)) { string path = directoryProperty.Value; if (!Directory.Exists(path) || IsDirectoryEmpty(path)) { logger.LogDebug(Resources.MSG_RemovingBuildWrapperAnalysisProperty, BuildWrapperOutputDirectoryKey, path); properties.Remove(directoryProperty); } else { logger.LogDebug(Resources.MSG_BuildWrapperPropertyIsValid, BuildWrapperOutputDirectoryKey, path); } } } private static bool IsDirectoryEmpty(string path) { return Directory.GetFiles(path, "*.*", SearchOption.AllDirectories).Length == 0; } #endregion } }
HSAR/sonar-msbuild-runner
SonarRunner.Shim/PropertiesFileGenerator.cs
C#
mit
14,482
'use strict'; var program = require('commander'); var Q = require('q'); var fs = require('fs'); var resolve = require('path').resolve; var stat = Q.denodeify(fs.stat); var readFile = Q.denodeify(fs.readFile); var writeFile = Q.denodeify(fs.writeFile); var assign = require('./util/assign'); program .option('--get', 'Gets configuration property') .option('--set', 'Sets a configuration value: Ex: "hello=world". If no value is set, then the property is unset from the config file'); program.parse(process.argv); var args = program.args; var opts = program.opts(); // Remove options that are not set in the same order as described above var selectedOpt = Object.keys(opts).reduce(function (arr, next) { if (opts[next]) { arr.push(next); } return arr; }, [])[0]; if (!args.length) { process.exit(1); } args = []; args.push(program.args[0].replace(/=.*$/, '')); args.push(program.args[0].replace(new RegExp(args[0] + '=?'), '')); if (args[1] === '') { args[1] = undefined; } stat(resolve('./fxc.json')) .then(function (stat) { if (stat.isFile()) { return readFile(resolve('./fxc.json')); } }) .catch(function () { return Q.when(null); }) .then(function (fileContent) { fileContent = assign({}, fileContent && JSON.parse(fileContent.toString('utf8'))); if (selectedOpt === 'get') { return fileContent[args[0]]; } if (typeof args[1] !== 'undefined') { fileContent[args[0]] = args[1]; } else { delete fileContent[args[0]]; } return writeFile(resolve('./fxc.json'), JSON.stringify(fileContent)); }) .then(function (output) { if (output) { console.log(output); } else { console.log('Property "' + args[0] + '" ' + (args[1] ? ('set to "' + args[1] + '"') : 'removed')); } process.exit(); });
zorrodg/fox-cove
lib/config.js
JavaScript
mit
1,822
require "pubdraft/version" require "pubdraft/engine" require "pubdraft/state" require "pubdraft/model" module Pubdraft def pubdraft(**options) include Model::InstanceMethods extend Model::ClassMethods cattr_accessor :pubdraft_states cattr_accessor :pubdraft_options before_create :set_pubdraft_default, unless: -> { pubdraft_options[:default] == false } states = options.delete(:states) || Pubdraft.default_states self.pubdraft_states = State.new_set(states) self.pubdraft_options = Pubdraft.default_options.merge(options) build_pubdraft_methods! end def self.default_states { drafted: :draft, published: :publish } end def self.default_options { field: 'state', default: 'published' } end end
neotericdesign/pubdraft
lib/pubdraft.rb
Ruby
mit
772
package pt.lsts.imc; import java.io.IOException; import java.net.URI; import java.util.concurrent.Future; import org.eclipse.jetty.websocket.api.Session; import org.eclipse.jetty.websocket.api.annotations.OnWebSocketConnect; import org.eclipse.jetty.websocket.api.annotations.OnWebSocketMessage; import org.eclipse.jetty.websocket.api.annotations.WebSocket; import org.eclipse.jetty.websocket.client.ClientUpgradeRequest; import org.eclipse.jetty.websocket.client.WebSocketClient; @WebSocket public class ImcClientSocket { protected Session remote; protected WebSocketClient client = new WebSocketClient(); @OnWebSocketConnect public void onConnect(Session remote) { this.remote = remote; } @OnWebSocketMessage public void onBinary(Session session, byte buff[], int offset, int length) { try { IMCMessage msg = ImcProxyServer.deserialize(buff, offset, length); onMessage(msg); } catch (Exception e) { e.printStackTrace(); } } public void onMessage(IMCMessage msg) { msg.dump(System.out); } public void sendMessage(IMCMessage msg) throws IOException { if (remote == null || !remote.isOpen()) throw new IOException("Error sending message: not connected"); remote.getRemote().sendBytes(ImcProxyServer.wrap(msg)); } public Future<Session> connect(URI server) throws Exception { client.start(); return client.connect(this, server, new ClientUpgradeRequest()); } public void close() throws Exception { client.stop(); } public static void main(String[] args) throws Exception { ImcClientSocket socket = new ImcClientSocket(); Future<Session> future = socket.connect(new URI("ws://localhost:9090")); System.out.printf("Connecting..."); future.get(); socket.sendMessage(new Temperature(10.67f)); socket.close(); } }
LSTS/imcproxy
src/pt/lsts/imc/ImcClientSocket.java
Java
mit
1,796
<?php namespace Core; use Silex\ControllerCollection; abstract class AbstractController { /** * * @var Application */ protected $app; public function __construct( Application $app ) { $this->app = $app; } /** * * @param \Silex\ControllerCollection $controllers * @return \Silex\ControllerCollection */ public function __invoke( ControllerCollection $controllers = null ) { return $this->connect( $controllers ?: $this->app['controllers_factory'] ); } /** * @param \Silex\ControllerCollection $controllers * @return \Silex\ControllerCollection */ abstract protected function connect( ControllerCollection $controllers ); }
kor3k/silex
src/Core/AbstractController.php
PHP
mit
714
# -*- coding: utf-8 -*- import json from axe.http_exceptions import BadJSON def get_request(request): return request def get_query(request): return request.args def get_form(request): return request.form def get_body(request): return request.data def get_headers(request): return request.headers def get_cookies(request): return request.cookies def get_method(request): return request.method def get_json(headers, body): content_type = headers.get('Content-Type') if content_type != 'application/json': return data = body.decode('utf8') try: return json.loads(data) except ValueError: raise BadJSON
soasme/axe
axe/default_exts.py
Python
mit
680
# This file should contain all the record creation needed to seed the database with its default values. # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). # # Examples: # # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }]) # Mayor.create(:name => 'Emanuel', :city => cities.first)
warolv/wikydoc
db/seeds.rb
Ruby
mit
362
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ComponentModel; using System.Reflection; using System.Net.Http; using Newtonsoft.Json; namespace Codenesium.DataConversionExtensions { public static class ObjectExtensions { /// <summary> /// Converts a HttpContent response to a string /// </summary> /// <param name="httpContent"></param> /// <returns></returns> public static string ContentToString(this HttpContent httpContent) { var readAsStringAsync = httpContent.ReadAsStringAsync(); return readAsStringAsync.Result; } /// <summary> /// Returns the int converted value of the field decorated with [Key] in a class. /// Refer to how System.ComponentModel.DataAnnotations.KeyAttribute works for an example /// Throws an argument exception if the passed object does not have a decorated field /// </summary> /// <param name="obj"></param> /// <returns></returns> public static Nullable<int> GetNullableKey(this object obj) { if (obj == null) { return null; } Type type = obj.GetType(); foreach (PropertyInfo property in type.GetProperties()) { object[] attribute = property.GetCustomAttributes(typeof(System.ComponentModel.DataAnnotations.KeyAttribute), true); if (attribute.Length > 0) { object value = property.GetValue(obj, null); return value.ToString().ToInt(); } } throw new ArgumentException("The passed object does not have a property decorated with the [Key] attribute"); } public static int GetKey(this object obj) { var returnValue = obj.GetNullableKey(); return returnValue.HasValue ? returnValue.Value : 0; } /// <summary> /// Serializes the parameter and returns it as a json string /// </summary> /// <param name="obj"></param> /// <returns></returns> public static string ToJSONString(this object obj) { return JsonConvert.SerializeObject(obj, Formatting.Indented); } public static bool IsEmptyOrZeroOrNull(this object obj) { if (obj == null) { return true; } else { string parsed = obj.ToString(); if (parsed == String.Empty || parsed == "0" || parsed == "0.0") { return true; } else { return false; } } } } }
codenesium/DataConversionExtensions
DataConversionExtensions/ObjectExtensions.cs
C#
mit
2,903
import qambi, { getMIDIInputs } from 'qambi' document.addEventListener('DOMContentLoaded', function(){ console.time('loading and parsing assets took') qambi.init({ song: { type: 'Song', url: '../data/minute_waltz.mid' }, piano: { type: 'Instrument', url: '../../instruments/heartbeat/city-piano-light-concat.json' } }) .then(main) }) function main(data){ console.timeEnd('loading and parsing assets took') let {song, piano} = data song.getTracks().forEach(track => { track.setInstrument(piano) track.monitor = true track.connectMIDIInputs(...getMIDIInputs()) }) let btnPlay = document.getElementById('play') let btnPause = document.getElementById('pause') let btnStop = document.getElementById('stop') let divLoading = document.getElementById('loading') divLoading.innerHTML = '' btnPlay.disabled = false btnPause.disabled = false btnStop.disabled = false btnPlay.addEventListener('click', function(){ song.play() }) btnPause.addEventListener('click', function(){ song.pause() }) btnStop.addEventListener('click', function(){ song.stop() }) }
abudaan/qambi
examples/concat/main.js
JavaScript
mit
1,165
<?php /* * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * and is licensed under the MIT license. For more information, see * <http://www.doctrine-project.org>. */ namespace Doctrine\ORM\Query\AST; /** * DeleteClause ::= "DELETE" ["FROM"] AbstractSchemaName [["AS"] AliasIdentificationVariable] * * @link www.doctrine-project.org */ class DeleteClause extends Node { /** @var string */ public $abstractSchemaName; /** @var string */ public $aliasIdentificationVariable; /** * @param string $abstractSchemaName */ public function __construct($abstractSchemaName) { $this->abstractSchemaName = $abstractSchemaName; } /** * {@inheritdoc} */ public function dispatch($sqlWalker) { return $sqlWalker->walkDeleteClause($this); } }
bigfoot90/doctrine2
lib/Doctrine/ORM/Query/AST/DeleteClause.php
PHP
mit
1,646
module Doorkeeper class TokensController < Doorkeeper::ApplicationMetalController def create response = authorize_response headers.merge! response.headers self.response_body = response.body.to_json self.status = response.status rescue Errors::DoorkeeperError => e handle_token_exception e end # OAuth 2.0 Token Revocation - http://tools.ietf.org/html/rfc7009 def revoke # The authorization server, if applicable, first authenticates the client # and checks its ownership of the provided token. # # Doorkeeper does not use the token_type_hint logic described in the # RFC 7009 due to the refresh token implementation that is a field in # the access token model. if authorized? revoke_token end # The authorization server responds with HTTP status code 200 if the token # has been revoked successfully or if the client submitted an invalid # token render json: {}, status: 200 end private # OAuth 2.0 Section 2.1 defines two client types, "public" & "confidential". # Public clients (as per RFC 7009) do not require authentication whereas # confidential clients must be authenticated for their token revocation. # # Once a confidential client is authenticated, it must be authorized to # revoke the provided access or refresh token. This ensures one client # cannot revoke another's tokens. # # Doorkeeper determines the client type implicitly via the presence of the # OAuth client associated with a given access or refresh token. Since public # clients authenticate the resource owner via "password" or "implicit" grant # types, they set the application_id as null (since the claim cannot be # verified). # # https://tools.ietf.org/html/rfc6749#section-2.1 # https://tools.ietf.org/html/rfc7009 def authorized? if token.present? # Client is confidential, therefore client authentication & authorization # is required if token.application_uid # We authorize client by checking token's application server.client && server.client.application.uid == token.application_uid else # Client is public, authentication unnecessary true end end end def revoke_token if token.accessible? token.revoke end end def token @token ||= AccessToken.by_token(request.POST['token']) || AccessToken.by_refresh_token(request.POST['token']) end def strategy @strategy ||= server.token_request params[:grant_type] end def authorize_response @authorize_response ||= strategy.authorize end end end
EasterAndJay/doorkeeper
app/controllers/doorkeeper/tokens_controller.rb
Ruby
mit
2,774
export default function widget(widget=null, action) { switch (action.type) { case 'widget.edit': return action.widget; case 'widget.edit.close': return null; default: return widget; } }
KevinAst/astx-redux-util
src/reducer/spec/samples/hash/widgetOld.js
JavaScript
mit
223
def tryprint(): return ('it will be oke')
cherylyli/stress-aid
env/lib/python3.5/site-packages/helowrld/__init__.py
Python
mit
45
/* * JBox2D - A Java Port of Erin Catto's Box2D * * JBox2D homepage: http://jbox2d.sourceforge.net/ * Box2D homepage: http://www.gphysics.com * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. */ package org.jbox2d.testbed; public class TestSettings { public int hz; public int iterationCount; public boolean enableWarmStarting; public boolean enablePositionCorrection; public boolean enableTOI; public boolean pause; public boolean singleStep; public boolean drawShapes; public boolean drawJoints; public boolean drawCoreShapes; public boolean drawOBBs; public boolean drawCOMs; public boolean drawStats; public boolean drawImpulses; public boolean drawAABBs; public boolean drawPairs; public boolean drawContactPoints; public boolean drawContactNormals; public boolean drawContactForces; public boolean drawFrictionForces; public TestSettings() { hz = 60; iterationCount = 10; drawStats = true; drawAABBs = false; drawPairs = false; drawShapes = true; drawJoints = true; drawCoreShapes = false; drawContactPoints = false; drawContactNormals = false; drawContactForces = false; drawFrictionForces = false; drawOBBs = false; drawCOMs = false; enableWarmStarting = true; enablePositionCorrection = true; enableTOI = true; pause = false; singleStep = false; } }
cr0ybot/MIRROR
libraries/JBox2D/src/org/jbox2d/testbed/TestSettings.java
Java
mit
2,286
<?php /* * This file is part of the AntiMattr Content MongoDB Bundle, a Symfony Bundle by Matthew Fitzgerald. * * (c) 2014 Matthew Fitzgerald * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace AntiMattr\Bundle\ContentMongoDBBundle\Form\Document; use Symfony\Component\Form\AbstractType; use Symfony\Component\OptionsResolver\OptionsResolverInterface; use Symfony\Component\Form\FormBuilderInterface; class PageSectionFormType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('position', 'integer', [ 'attr' => [ 'input_group' => [ 'prepend' => 'Order', 'size' => 'small', ], ], 'label' => false, ]) ->add('slug', 'text', [ 'attr' => [ 'input_group' => [ 'prepend' => 'Slug', 'size' => 'small', ], ], 'label' => false, ]) ->add('title', 'text', [ 'attr' => [ 'input_group' => [ 'prepend' => 'Subtitle', 'size' => 'small', ], ], 'label' => false, ]) ->add('description', 'textarea', [ 'label' => false, ]) ; } public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setDefaults([ 'data_class' => 'AntiMattr\Bundle\ContentMongoDBBundle\Document\Page\Section', ]); } public function getName() { return 'content_page_section'; } }
antimattr/symfony-demo-app-01
src/vendor/content-mongodb-bundle/src/AntiMattr/Bundle/ContentMongoDBBundle/Form/Document/PageSectionFormType.php
PHP
mit
1,927
require "rails_helper" RSpec.describe GoogleUrlValidator do include GoogleSheetHelper it "validates an incorrect host name" do record = build_stubbed(:tagging_spreadsheet, url: "https://invalid.com") GoogleUrlValidator.new.validate(record) expect(record.errors[:url]).to include(/is not a google docs url/i) end it "validates an incorrect path" do record = build_stubbed(:tagging_spreadsheet, url: "https://docs.google.com/something/else") GoogleUrlValidator.new.validate(record) expect(record.errors[:url]).to include(/does not have the expected public path/i) end it "validates missing param gid" do record = build_stubbed(:tagging_spreadsheet, url: "https://docs.google.com/path?p=1&p=2") GoogleUrlValidator.new.validate(record) expect(record.errors[:url]).to include(/is missing a google spreadsheet id/i) end it "validates missing param output" do record = build_stubbed(:tagging_spreadsheet, url: "https://docs.google.com/path") GoogleUrlValidator.new.validate(record) expect(record.errors[:url]).to include(/is missing the parameter output as csv/i) end it "validates incorrect param output" do record = build_stubbed(:tagging_spreadsheet, url: "https://docs.google.com/path?output=pdf") GoogleUrlValidator.new.validate(record) expect(record.errors[:url]).to include(/is missing the parameter output as csv/i) end it "does not add validation errors for a correct URL" do valid_url = google_sheet_url(key: "mykey", gid: "mygid") record = build_stubbed(:tagging_spreadsheet, url: valid_url) GoogleUrlValidator.new.validate(record) expect(record.errors[:url]).to be_empty end end
alphagov/content-tagger
spec/validators/google_url_validator_spec.rb
Ruby
mit
1,701
<div class="post"> <h1><a href="{{ Cupboard::route('posts.show', $post->slug) }}">{{ $post->title }}</a></h1> <div class="date">{{ date("M/d/Y", strtotime($post->publish_date)) }}</div> <div class="content"> {{ $post->parsed_intro }} </div> </div>
CupboardCMS/core
public/themes/default/inc/post.blade.php
PHP
mit
254
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("Series of Letters")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Series of Letters")] [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("28bb92e2-4a4c-41a0-8929-113edb6462a8")] // 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")]
BlueDress/School
C# Advanced/Regular Expressions Exercises/Series of Letters/Properties/AssemblyInfo.cs
C#
mit
1,410
package be.swsb.productivity.chapter5.beans; public abstract class CoffeeBeans { public abstract String scent(); }
Sch3lp/ProductivityWithShortcuts
src/main/java/be/swsb/productivity/chapter5/beans/CoffeeBeans.java
Java
mit
120
'use strict'; var MemoryStats = require('../../src/models/memory_stats') , SQliteAdapter = require('../../src/models/sqlite_adapter') , chai = require('chai') , expect = chai.expect , chaiAsPromised = require('chai-as-promised'); chai.use(chaiAsPromised); describe('MemoryStats', function() { describe('.constructor', function() { it('returns an instantiated memory stats and its schema attributes', function() { expect(MemoryStats().schemaAttrs).to.include.members(['container_name', 'timestamp_day']); }); it('returns an instantiated memory stats and its table name', function() { expect(MemoryStats().tableName).to.eql('memory_stats'); }); }); after(function() { return SQliteAdapter.deleteDB() .then(null) .catch(function(err) { console.log(err.stack); }); }); });
davidcunha/wharf
test/models/memory_stats_test.js
JavaScript
mit
848
package com.zs.leetcode.array; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; public class MergeIntervals { public static void main(String[] args) { } public List<Interval> merge(List<Interval> intervals) { List<Interval> list = new ArrayList<Interval>(); if (intervals.size() == 0) { return list; } Collections.sort(intervals, new MyComparator()); int start = intervals.get(0).start; int end = intervals.get(0).end; for (int i = 1; i < intervals.size(); i++) { Interval inter = intervals.get(i); if (inter.start > end) { list.add(new Interval(start, end)); start = inter.start; end = inter.end; }else{ end = Math.max(end, inter.end); } } list.add(new Interval(start, end)); return list; } class MyComparator implements Comparator<Interval> { @Override public int compare(Interval o1, Interval o2) { return o1.start - o2.start; } } }
zsgithub3895/common.code
src/com/zs/leetcode/array/MergeIntervals.java
Java
mit
1,011
module.exports = { resolve: { alias: { 'vue': 'vue/dist/vue.js' } } }
ye-will/vue-factory
webpack.config.js
JavaScript
mit
88
/** * Created by kalle on 12.5.2014. */ /// <reference path="jquery.d.ts" /> var TheBall; (function (TheBall) { (function (Interface) { (function (UI) { var ResourceLocatedObject = (function () { function ResourceLocatedObject(isJSONUrl, urlKey, onUpdate, boundToElements, boundToObjects, dataSourceObjects) { this.isJSONUrl = isJSONUrl; this.urlKey = urlKey; this.onUpdate = onUpdate; this.boundToElements = boundToElements; this.boundToObjects = boundToObjects; this.dataSourceObjects = dataSourceObjects; // Initialize to empty arrays if not given this.onUpdate = onUpdate || []; this.boundToElements = boundToElements || []; this.boundToObjects = boundToObjects || []; this.dataSourceObjects = dataSourceObjects || []; } return ResourceLocatedObject; })(); UI.ResourceLocatedObject = ResourceLocatedObject; var UpdatingDataGetter = (function () { function UpdatingDataGetter() { this.TrackedURLDictionary = {}; } UpdatingDataGetter.prototype.registerSourceUrls = function (sourceUrls) { var _this = this; sourceUrls.forEach(function (sourceUrl) { if (!_this.TrackedURLDictionary[sourceUrl]) { var sourceIsJson = _this.isJSONUrl(sourceUrl); if (!sourceIsJson) throw "Local source URL needs to be defined before using as source"; var source = new ResourceLocatedObject(sourceIsJson, sourceUrl); _this.TrackedURLDictionary[sourceUrl] = source; } }); }; UpdatingDataGetter.prototype.isJSONUrl = function (url) { return url.indexOf("/") != -1; }; UpdatingDataGetter.prototype.getOrRegisterUrl = function (url) { var rlObj = this.TrackedURLDictionary[url]; if (!rlObj) { var sourceIsJson = this.isJSONUrl(url); rlObj = new ResourceLocatedObject(sourceIsJson, url); this.TrackedURLDictionary[url] = rlObj; } return rlObj; }; UpdatingDataGetter.prototype.RegisterAndBindDataToElements = function (boundToElements, url, onUpdate, sourceUrls) { var _this = this; if (sourceUrls) this.registerSourceUrls(sourceUrls); var rlObj = this.getOrRegisterUrl(url); if (sourceUrls) { rlObj.dataSourceObjects = sourceUrls.map(function (sourceUrl) { return _this.TrackedURLDictionary[sourceUrl]; }); } }; UpdatingDataGetter.prototype.RegisterDataURL = function (url, onUpdate, sourceUrls) { if (sourceUrls) this.registerSourceUrls(sourceUrls); var rlObj = this.getOrRegisterUrl(url); }; UpdatingDataGetter.prototype.UnregisterDataUrl = function (url) { if (this.TrackedURLDictionary[url]) delete this.TrackedURLDictionary[url]; }; UpdatingDataGetter.prototype.GetData = function (url, callback) { var rlObj = this.TrackedURLDictionary[url]; if (!rlObj) throw "Data URL needs to be registered before GetData: " + url; if (rlObj.isJSONUrl) { $.getJSON(url, function (content) { callback(content); }); } }; return UpdatingDataGetter; })(); UI.UpdatingDataGetter = UpdatingDataGetter; })(Interface.UI || (Interface.UI = {})); var UI = Interface.UI; })(TheBall.Interface || (TheBall.Interface = {})); var Interface = TheBall.Interface; })(TheBall || (TheBall = {})); //# sourceMappingURL=UpdatingDataGetter.js.map
abstractiondev/TheBallDeveloperExamples
WebTemplates/AdminTemplates/categoriesandcontent/assets/oiplib1.0/TheBall.Interface.UI/UpdatingDataGetter.js
JavaScript
mit
4,578
package bixie.checker.transition_relation; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; import bixie.boogie.controlflow.AbstractControlFlowFactory; import bixie.boogie.controlflow.BasicBlock; import bixie.boogie.controlflow.CfgProcedure; import bixie.boogie.controlflow.expression.CfgExpression; import bixie.boogie.controlflow.statement.CfgStatement; import bixie.boogie.controlflow.util.HasseDiagram; import bixie.boogie.controlflow.util.PartialBlockOrderNode; import bixie.prover.Prover; import bixie.prover.ProverExpr; /** * @author schaef TODO: if we plan to do interprocedural analysis, we have to * change the way globals are handled here. */ public class FaultLocalizationTransitionRelation extends AbstractTransitionRelation { public LinkedList<ProverExpr> obligations = new LinkedList<ProverExpr>(); public HashMap<CfgStatement, BasicBlock> stmtOriginMap = new HashMap<CfgStatement, BasicBlock>(); HasseDiagram hd; public FaultLocalizationTransitionRelation(CfgProcedure cfg, AbstractControlFlowFactory cff, Prover p) { super(cfg, cff, p); makePrelude(); // create the ProverExpr for the precondition ProverExpr[] prec = new ProverExpr[cfg.getRequires().size()]; int i = 0; for (CfgExpression expr : cfg.getRequires()) { prec[i] = this.expression2proverExpression(expr); i++; } this.requires = this.prover.mkAnd(prec); // create the ProverExpr for the precondition ProverExpr[] post = new ProverExpr[cfg.getEnsures().size()]; i = 0; for (CfgExpression expr : cfg.getEnsures()) { post[i] = this.expression2proverExpression(expr); i++; } this.ensures = this.prover.mkAnd(post); this.hd = new HasseDiagram(cfg); computeSliceVC(cfg); this.hd = null; finalizeAxioms(); } private void computeSliceVC(CfgProcedure cfg) { PartialBlockOrderNode pon = hd.findNode(cfg.getRootNode()); LinkedList<BasicBlock> todo = new LinkedList<BasicBlock>(); todo.add(cfg.getRootNode()); HashSet<BasicBlock> mustreach = pon.getElements(); // System.err.println("-------"); // for (BasicBlock b : mustreach) System.err.println(b.getLabel()); // System.err.println("traverse "); while (!todo.isEmpty()) { BasicBlock current = todo.pop(); obligations.addAll(statements2proverExpression(current.getStatements())); for (CfgStatement stmt : current.getStatements()) { this.stmtOriginMap.put(stmt, current); } BasicBlock next = foo(current, mustreach); if (next!=null) { if (mustreach.contains(next)) { todo.add(next); } else { System.err.println("FIXME: don't know what to do with "+next.getLabel()); } } } // System.err.println("traverse done"); } private BasicBlock foo(BasicBlock b, HashSet<BasicBlock> mustpass) { HashSet<BasicBlock> done = new HashSet<BasicBlock>(); LinkedList<BasicBlock> todo = new LinkedList<BasicBlock>(); HashMap<BasicBlock, LinkedList<ProverExpr>> map = new HashMap<BasicBlock, LinkedList<ProverExpr>>(); todo.addAll(b.getSuccessors()); done.add(b); map.put(b, new LinkedList<ProverExpr>()); map.get(b).add(this.prover.mkLiteral(true)); while (!todo.isEmpty()) { BasicBlock current = todo.pop(); boolean allDone = true; LinkedList<LinkedList<ProverExpr>> prefix = new LinkedList<LinkedList<ProverExpr>>(); for (BasicBlock pre : current.getPredecessors()) { if (!done.contains(pre)) { allDone = false; break; } prefix.add(map.get(pre)); } if (!allDone) { todo.add(current); continue; } done.add(current); LinkedList<ProverExpr> conj = new LinkedList<ProverExpr>(); if (prefix.size()>1) { //TODO LinkedList<ProverExpr> shared = prefix.getFirst(); for (LinkedList<ProverExpr> list : prefix) { shared = sharedPrefix(shared, list); } conj.add(this.prover.mkAnd(shared.toArray(new ProverExpr[shared.size()]))); LinkedList<ProverExpr> disj = new LinkedList<ProverExpr>(); for (LinkedList<ProverExpr> list : prefix) { LinkedList<ProverExpr> cutlist = new LinkedList<ProverExpr>(); cutlist.addAll(list); cutlist.removeAll(shared); disj.add(this.prover.mkAnd(cutlist.toArray(new ProverExpr[cutlist.size()]))); } conj.add(this.prover.mkOr(disj.toArray(new ProverExpr[disj.size()]))); } else if (prefix.size()==1) { conj.addAll(prefix.getFirst()); } else { throw new RuntimeException("unexpected"); } if (mustpass.contains(current)) { if (conj.size()==1 && conj.getFirst().equals(this.prover.mkLiteral(true))) { // in that case, the predecessor was already in mustpass so nothing needs to be done. } else { ProverExpr formula = this.prover.mkAnd(conj.toArray(new ProverExpr[conj.size()])); this.obligations.add(formula); } return current; } else { for (CfgStatement stmt : current.getStatements()) { this.stmtOriginMap.put(stmt, current); } conj.addAll(statements2proverExpression(current.getStatements())); map.put(current, conj); for (BasicBlock suc : current.getSuccessors()) { if (!todo.contains(suc) && !done.contains(suc)) { todo.add(suc); } } } } return null; } private LinkedList<ProverExpr> sharedPrefix(LinkedList<ProverExpr> shared, LinkedList<ProverExpr> list) { Iterator<ProverExpr> iterA = shared.iterator(); Iterator<ProverExpr> iterB = list.iterator(); LinkedList<ProverExpr> ret = new LinkedList<ProverExpr>(); while(iterA.hasNext() && iterB.hasNext()) { ProverExpr next = iterA.next(); if (next == iterB.next()) { ret.add(next); } } return ret; } }
SRI-CSL/bixie
src/main/java/bixie/checker/transition_relation/FaultLocalizationTransitionRelation.java
Java
mit
5,883
package ru.ifmo.springaop.namepc; import org.springframework.aop.Advisor; import org.springframework.aop.framework.ProxyFactory; import org.springframework.aop.support.DefaultPointcutAdvisor; import org.springframework.aop.support.NameMatchMethodPointcut; import ru.ifmo.springaop.staticpc.SimpleAdvice; /** * Пример среза, где сревнение имени метода осуществляется просто по его имени. */ public class NamePointcutExample { public static void main(String[] args) { NameBean target = new NameBean(); // create advisor NameMatchMethodPointcut pc = new NameMatchMethodPointcut(); pc.addMethodName("foo"); pc.addMethodName("bar"); Advisor advisor = new DefaultPointcutAdvisor(pc, new SimpleAdvice()); // create the proxy ProxyFactory pf = new ProxyFactory(); pf.setTarget(target); pf.addAdvisor(advisor); NameBean proxy = (NameBean)pf.getProxy(); proxy.foo(); proxy.foo(999); proxy.bar(); proxy.yup(); } }
meefik/java-examples
SpringAOP/src/main/java/ru/ifmo/springaop/namepc/NamePointcutExample.java
Java
mit
1,153
package fastlanestat import ( "net/http" "html/template" // "fmt" // Import appengine urlfetch package, that is needed to make http call to the api "appengine" "appengine/datastore" ) type ViewContext struct { PricePoints []PricePoint } func viewStatsHandler(w http.ResponseWriter, r *http.Request) { c := appengine.NewContext(r) // The Query type and its methods are used to construct a query. q := datastore.NewQuery("PricePoint"). Order("-PointInTime"). Limit(5000) // To retrieve the results, // you must execute the Query using its GetAll or Run methods. var pricePoints []PricePoint //_, err := q.GetAll(c, &pricePoints) // handle error // ... viewContext := ViewContext{ PricePoints: pricePoints } t, _ := template.ParseFiles("templates/simple.htmltemplate") t.Execute(w, viewContext) }
ido-ran/fastlanestats
view.go
GO
mit
881
// The MIT License (MIT) // Copyright © 2015 AppsLandia. All rights reserved. // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. package com.appslandia.common.base; import java.io.IOException; import java.io.Writer; /** * @see java.io.BufferedWriter * * @author <a href="mailto:haducloc13@gmail.com">Loc Ha</a> * */ public class BufferedWriter extends Writer { private Writer out; private char cb[]; private int nChars, nextChar; private static int defaultCharBufferSize = 8192; public BufferedWriter(Writer out) { this(out, defaultCharBufferSize); } public BufferedWriter(Writer out, int sz) { super(out); if (sz <= 0) throw new IllegalArgumentException("sz"); this.out = out; cb = new char[sz]; nChars = sz; nextChar = 0; } private void ensureOpen() throws IOException { if (out == null) throw new IOException("Stream closed"); } void flushBuffer() throws IOException { ensureOpen(); if (nextChar == 0) return; out.write(cb, 0, nextChar); nextChar = 0; } public void write(int c) throws IOException { ensureOpen(); if (nextChar >= nChars) flushBuffer(); cb[nextChar++] = (char) c; } private int min(int a, int b) { if (a < b) return a; return b; } public void write(char cbuf[], int off, int len) throws IOException { ensureOpen(); if ((off < 0) || (off > cbuf.length) || (len < 0) || ((off + len) > cbuf.length) || ((off + len) < 0)) { throw new IndexOutOfBoundsException(); } else if (len == 0) { return; } if (len >= nChars) { /* * If the request length exceeds the size of the output buffer, flush the buffer and then write the data directly. In this way buffered streams will cascade harmlessly. */ flushBuffer(); out.write(cbuf, off, len); return; } int b = off, t = off + len; while (b < t) { int d = min(nChars - nextChar, t - b); System.arraycopy(cbuf, b, cb, nextChar, d); b += d; nextChar += d; if (nextChar >= nChars) flushBuffer(); } } public void write(String s, int off, int len) throws IOException { ensureOpen(); int b = off, t = off + len; while (b < t) { int d = min(nChars - nextChar, t - b); s.getChars(b, b + d, cb, nextChar); b += d; nextChar += d; if (nextChar >= nChars) flushBuffer(); } } public void newLine() throws IOException { write(System.lineSeparator(), 0, System.lineSeparator().length()); } public void flush() throws IOException { flushBuffer(); out.flush(); } public void close() throws IOException { if (out == null) { return; } try (Writer w = out) { flushBuffer(); } finally { out = null; cb = null; } } }
haducloc/appslandia-common
src/main/java/com/appslandia/common/base/BufferedWriter.java
Java
mit
3,684
/** * Copyright (c) 2010 Daniel Murphy * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /** * Created at Aug 20, 2010, 2:58:08 AM */ package com.dmurph.mvc.gui.combo; import java.awt.event.KeyEvent; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.util.ArrayList; import java.util.Collection; import java.util.Comparator; import java.util.Iterator; import java.util.LinkedList; import javax.swing.JComboBox; import com.dmurph.mvc.model.MVCArrayList; /** * This class is for having a combo box that will always reflect the data of * an MVCArrayList. There is a lot of flexibility provided with filtering * and sorting the elements. * * @author Daniel Murphy */ public class MVCJComboBox<E> extends JComboBox { private static final long serialVersionUID = 1L; private MVCJComboBoxModel<E> model; private MVCArrayList<E> data; private IMVCJComboBoxFilter<E> filter; private final Object lock = new Object(); private MVCJComboBoxStyle style; private Comparator<E> comparator = null; private final PropertyChangeListener plistener = new PropertyChangeListener() { @SuppressWarnings("unchecked") public void propertyChange(PropertyChangeEvent argEvt) { String prop = argEvt.getPropertyName(); if (prop.equals(MVCArrayList.ADDED)) { add((E)argEvt.getNewValue()); } else if(prop.equals(MVCArrayList.ADDED_ALL)){ addAll((Collection<E>) argEvt.getNewValue()); } else if (prop.equals(MVCArrayList.CHANGED)) { change((E)argEvt.getOldValue(),(E) argEvt.getNewValue()); } else if (prop.equals(MVCArrayList.REMOVED)) { remove((E)argEvt.getOldValue()); } else if(prop.equals(MVCArrayList.REMOVED_ALL)){ synchronized(lock){ model.removeAllElements(); } } } }; /** * Constructs with no data, no filter, no * {@link Comparator}, and style set to * {@link MVCJComboBoxStyle#ADD_NEW_TO_BEGINNING}. */ public MVCJComboBox() { this(null, new IMVCJComboBoxFilter<E>() { public boolean showItem(E argComponent) { return true; }; }, MVCJComboBoxStyle.SORT, null); } /** * Constructs a combo box with the given style. If you want * the {@link MVCJComboBoxStyle#SORT} style, then you'll want to specify * a comparator as well. * @param argData * @param argStyle */ public MVCJComboBox(MVCJComboBoxStyle argStyle) { this(null, new IMVCJComboBoxFilter<E>() { public boolean showItem(E argComponent) { return true; }; }, argStyle, null); } /** * Constracts a dynamic combo box with the given data and * default style of {@link MVCJComboBoxStyle#SORT}. * @param argData */ public MVCJComboBox(MVCArrayList<E> argData, Comparator<E> argComparator) { this(argData, new IMVCJComboBoxFilter<E>() { public boolean showItem(E argComponent) { return true; }; }, MVCJComboBoxStyle.SORT, argComparator); } /** * Constructs a combo box with the given data and style. If you want * the {@link MVCJComboBoxStyle#SORT} style, then you'll want to specify * a comparator as well. * @param argData * @param argStyle */ public MVCJComboBox(MVCArrayList<E> argData, MVCJComboBoxStyle argStyle) { this(argData, new IMVCJComboBoxFilter<E>() { public boolean showItem(E argComponent) { return true; }; }, argStyle, null); } /** * Constructs a dynamic combo box with the given data, filter, and comparator. * The style will be {@link MVCJComboBoxStyle#SORT} by default. * @param argData * @param argFilter * @param argComparator */ public MVCJComboBox(MVCArrayList<E> argData, IMVCJComboBoxFilter<E> argFilter, Comparator<E> argComparator) { this(argData, argFilter, MVCJComboBoxStyle.SORT, null); } /** * * @param argData * @param argFilter * @param argStyle * @param argComparator */ public MVCJComboBox(MVCArrayList<E> argData, IMVCJComboBoxFilter<E> argFilter, MVCJComboBoxStyle argStyle, Comparator<E> argComparator) { data = argData; style = argStyle; filter = argFilter; comparator = argComparator; model = new MVCJComboBoxModel<E>(); super.setModel(model); if(data != null){ argData.addPropertyChangeListener(plistener); // add the data for (E o : data) { if(filter.showItem(o)){ model.addElement(o); } } // start with allowing the comparator to be null, in case they intend to set it later. and call refreshData() if(style == MVCJComboBoxStyle.SORT && comparator != null){ model.sort(comparator); } } } /** * Gets the rendering style of this combo box. Default style is * {@link MVCJComboBoxStyle#SORT}. * @return */ public MVCJComboBoxStyle getStyle(){ return style; } /** * Gets the data list. This is used to access * data with {@link #refreshData()}, so override * if you want to customize what the data is (sending * null to the contructor for the data * is a good idea in that case) * @return */ public ArrayList<E> getData(){ return data; } /** * Sets the data of this combo box. This causes the box * to refresh it's model * @param argData can be null */ public void setData(MVCArrayList<E> argData){ synchronized (lock) { if(data != null){ data.removePropertyChangeListener(plistener); } data = argData; if(data != null){ data.addPropertyChangeListener(plistener); } } refreshData(); } /** * Sets the comparator used for the {@link MVCJComboBoxStyle#SORT} style. * @param argComparator */ public void setComparator(Comparator<E> argComparator) { this.comparator = argComparator; } /** * Gets the comparator that's used for sorting. * @return */ public Comparator<E> getComparator() { return comparator; } /** * @return the filter */ public IMVCJComboBoxFilter<E> getFilter() { return filter; } /** * @param argFilter the filter to set */ public void setFilter(IMVCJComboBoxFilter<E> argFilter) { filter = argFilter; } /** * @see javax.swing.JComboBox#processKeyEvent(java.awt.event.KeyEvent) */ @Override public void processKeyEvent(KeyEvent argE) { if(argE.getKeyChar() == KeyEvent.VK_BACK_SPACE || argE.getKeyChar() == KeyEvent.VK_DELETE){ setSelectedItem(null); super.hidePopup(); }else{ super.processKeyEvent(argE); } } /** * Sets the style of this combo box * @param argStyle */ public void setStyle(MVCJComboBoxStyle argStyle){ style = argStyle; if(style == MVCJComboBoxStyle.SORT){ if(comparator == null){ throw new NullPointerException("DynamicJComboBox style is set to Alpha Sort, but the comparator is null."); } model.sort(comparator); } } public void refreshData(){ synchronized (lock) { // remove all elements model.removeAllElements(); if(getData() == null){ return; } for(E e: getData()){ if(filter.showItem(e)){ model.addElement(e); } } if(style == MVCJComboBoxStyle.SORT){ if(comparator == null){ throw new NullPointerException("DynamicJComboBox style is set to Alpha Sort, but the comparator is null."); } model.sort(comparator); } } } private void add(E argNewObj) { boolean b = filter.showItem(argNewObj); if (b == false) { return; } synchronized (lock) { switch(style){ case SORT:{ if(comparator == null){ throw new NullPointerException("DynamicJComboBox style is set to Alpha Sort, but the comparator is null."); } boolean inserted = false; for(int i=0; i<model.getSize(); i++){ E e = model.getElementAt(i); if(comparator.compare(e, argNewObj) > 0){ model.insertElementAt(argNewObj, i); inserted = true; break; } } if(!inserted){ model.addElement(argNewObj); } break; } case ADD_NEW_TO_BEGINNING:{ model.insertElementAt(argNewObj, 0); break; } case ADD_NEW_TO_END:{ model.addElement(argNewObj); } } } } private void addAll(Collection<E> argNewObjects) { LinkedList<E> filtered = new LinkedList<E>(); Iterator<E> it = argNewObjects.iterator(); while(it.hasNext()){ E e = it.next(); if(filter.showItem(e)){ filtered.add(e); } } if(filtered.size() == 0){ return; } synchronized (lock) { switch(style){ case SORT:{ if(comparator == null){ throw new NullPointerException("DynamicJComboBox style is set to Alpha Sort, but the comparator is null."); } model.addElements(filtered); model.sort(comparator); break; } case ADD_NEW_TO_BEGINNING:{ model.addElements(0, filtered); break; } case ADD_NEW_TO_END:{ model.addElements(filtered); } } } } private void change(E argOld, E argNew) { boolean so = filter.showItem(argOld); boolean sn = filter.showItem(argNew); if(!sn){ remove(argOld); return; } if(!so){ if(sn){ add(argNew); return; }else{ return; } } synchronized (lock) { int size = model.getSize(); for (int i = 0; i < size; i++) { E e = model.getElementAt(i); if (e == argOld) { model.setElementAt(argNew, i); return; } } if(style == MVCJComboBoxStyle.SORT){ if(comparator == null){ throw new NullPointerException("DynamicJComboBox style is set to Alpha Sort, but the comparator is null."); } model.sort(comparator); } } } private void remove(E argVal) { boolean is = filter.showItem(argVal); if (!is) { return; } synchronized (lock) { for(int i=0; i<model.getSize();i ++){ E e = model.getElementAt(i); if(e == argVal){ model.removeElementAt(i); return; } } } } }
pearlqueen/java-simple-mvc
src/main/java/com/dmurph/mvc/gui/combo/MVCJComboBox.java
Java
mit
10,703
<?php /* Unsafe sample input : use exec to execute the script /tmp/tainted.php and store the output in $tainted sanitize : regular expression accepts everything construction : concatenation with simple quote */ /*Copyright 2015 Bertrand STIVALET Permission is hereby granted, without written agreement or royalty fee, to use, copy, modify, and distribute this software and its documentation for any purpose, provided that the above copyright notice and the following three paragraphs appear in all copies of this software. IN NO EVENT SHALL AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. AUTHORS SPECIFICALLY DISCLAIM ANY WARRANTIES INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THE SOFTWARE IS PROVIDED ON AN "AS-IS" BASIS AND AUTHORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.*/ $script = "/tmp/tainted.php"; exec($script, $result, $return); $tainted = $result[0]; $re = "/^.*$/"; if(preg_match($re, $tainted) == 1){ $tainted = $tainted; } else{ $tainted = ""; } $query = "(&(objectCategory=person)(objectClass=user)(cn='". $tainted . "'))"; //flaw $ds=ldap_connect("localhost"); $r=ldap_bind($ds); $sr=ldap_search($ds,"o=My Company, c=US", $query); ldap_close($ds); ?>
stivalet/PHP-Vulnerability-test-suite
Injection/CWE_90/unsafe/CWE_90__exec__func_preg_match-no_filtering__userByCN-concatenation_simple_quote.php
PHP
mit
1,525
using System; using System.Data.Entity; using System.Data.Entity.Infrastructure; using System.Threading; using System.Web.Mvc; using WebMatrix.WebData; using PersonaMVC4Example.Models; namespace PersonaMVC4Example.Filters { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] public sealed class InitializeSimpleMembershipAttribute : ActionFilterAttribute { private static SimpleMembershipInitializer _initializer; private static object _initializerLock = new object(); private static bool _isInitialized; public override void OnActionExecuting(ActionExecutingContext filterContext) { // Ensure ASP.NET Simple Membership is initialized only once per app start LazyInitializer.EnsureInitialized(ref _initializer, ref _isInitialized, ref _initializerLock); } private class SimpleMembershipInitializer { public SimpleMembershipInitializer() { Database.SetInitializer<UsersContext>(null); try { using (var context = new UsersContext()) { if (!context.Database.Exists()) { // Create the SimpleMembership database without Entity Framework migration schema ((IObjectContextAdapter)context).ObjectContext.CreateDatabase(); } } WebSecurity.InitializeDatabaseConnection("DefaultConnection", "UserProfile", "UserId", "UserName", autoCreateTables: true); } catch (Exception ex) { throw new InvalidOperationException("The ASP.NET Simple Membership database could not be initialized. For more information, please see http://go.microsoft.com/fwlink/?LinkId=256588", ex); } } } } }
shanselman/AspNetPersonaId
MVC4/PersonaMVC4Example/Filters/InitializeSimpleMembershipAttribute.cs
C#
mit
2,018
/* * Copyright (c) 2013 Triforce - in association with the University of Pretoria and Epi-Use <Advance/> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package afk.ge.tokyo.ems.systems; import afk.bot.london.Sonar; import afk.ge.BBox; import afk.ge.ems.Engine; import afk.ge.ems.ISystem; import afk.ge.ems.Utils; import afk.ge.tokyo.ems.components.Camera; import afk.ge.tokyo.ems.components.Display; import afk.ge.tokyo.ems.components.Mouse; import afk.ge.tokyo.ems.components.Selection; import afk.ge.tokyo.ems.nodes.CollisionNode; import afk.ge.tokyo.ems.nodes.SonarNode; import afk.gfx.GfxEntity; import static afk.gfx.GfxEntity.*; import static afk.gfx.GfxUtils.X_AXIS; import static afk.gfx.GfxUtils.Y_AXIS; import static afk.gfx.GfxUtils.Z_AXIS; import afk.gfx.GraphicsEngine; import com.hackoeur.jglm.Mat4; import com.hackoeur.jglm.Matrices; import com.hackoeur.jglm.Vec3; import com.hackoeur.jglm.Vec4; import java.util.List; /** * * @author daniel */ public class DebugRenderSystem implements ISystem { Engine engine; GraphicsEngine gfxEngine; public DebugRenderSystem(GraphicsEngine gfxEngine) { this.gfxEngine = gfxEngine; } @Override public boolean init(Engine engine) { this.engine = engine; return true; } @Override public void update(float t, float dt) { Camera camera = engine.getGlobal(Camera.class); Mouse mouse = engine.getGlobal(Mouse.class); Display display = engine.getGlobal(Display.class); Selection selection = engine.getGlobal(Selection.class); List<CollisionNode> nodes = engine.getNodeList(CollisionNode.class); for (CollisionNode node : nodes) { BBox bbox = new BBox(node.state, node.bbox); GfxEntity gfx = gfxEngine.getDebugEntity(bbox); gfx.position = bbox.getCenterPoint(); gfx.rotation = node.state.rot; gfx.scale = new Vec3(1); gfx.colour = selection.getEntity() == node.entity ? GREEN : MAGENTA; } List<SonarNode> snodes = engine.getNodeList(SonarNode.class); for (SonarNode node : snodes) { final Vec3[] POS_AXIS = { X_AXIS, Y_AXIS, Z_AXIS }; final Vec3[] NEG_AXIS = { X_AXIS.getNegated(), Y_AXIS.getNegated(), Z_AXIS.getNegated() }; Sonar sonar = node.controller.events.sonar; Mat4 m = Utils.getMatrix(node.state); Vec3 pos = node.state.pos.add(m.multiply(node.bbox.offset.toDirection()).getXYZ()); float[] sonarmins = { sonar.distance[3], sonar.distance[4], sonar.distance[5] }; float[] sonarmaxes = { sonar.distance[0], sonar.distance[1], sonar.distance[2] }; for (int i = 0; i < 3; i++) { if (!Float.isNaN(node.sonar.min.get(i))) { drawSonar(node, NEG_AXIS[i], sonarmins[i], node.sonar.min.get(i), pos.subtract(m.multiply(NEG_AXIS[i].scale(node.bbox.extent.get(i)).toDirection()).getXYZ())); } if (!Float.isNaN(node.sonar.max.get(i))) { drawSonar(node, POS_AXIS[i], sonarmaxes[i], node.sonar.max.get(i), pos.add(m.multiply(POS_AXIS[i].scale(node.bbox.extent.get(i)).toDirection()).getXYZ())); } } gfxEngine.getDebugEntity(new Vec3[] { new Vec3(-1000, 0, 0), new Vec3(1000, 0, 0) }).colour = new Vec3(0.7f, 0, 0); gfxEngine.getDebugEntity(new Vec3[] { new Vec3(0, -1000, 0), new Vec3(0, 1000, 0) }).colour = new Vec3(0, 0.7f, 0); gfxEngine.getDebugEntity(new Vec3[] { new Vec3(0, 0, -1000), new Vec3(0, 0, 1000) }).colour = new Vec3(0, 0, 0.7f); final float fov = 60.0f, near = 0.1f, far = 200.0f; Mat4 proj = Matrices.perspective(fov, display.screenWidth/display.screenHeight, near, far); Mat4 view = Matrices.lookAt(camera.eye, camera.at, camera.up); Mat4 cam = proj.multiply(view); Mat4 camInv = cam.getInverse(); Vec4 mouseNear4 = camInv.multiply(new Vec4(mouse.nx,mouse.ny,-1,1)); Vec4 mouseFar4 = camInv.multiply(new Vec4(mouse.nx,mouse.ny,1,1)); Vec3 mouseNear = mouseNear4.getXYZ().scale(1.0f/mouseNear4.getW()); Vec3 mouseFar = mouseFar4.getXYZ().scale(1.0f/mouseFar4.getW()); gfxEngine.getDebugEntity(new Vec3[] { mouseNear, mouseFar }).colour = new Vec3(1,0,0); } } private void drawSonar(SonarNode node, Vec3 axis, float sonar, float value, Vec3 pos) { GfxEntity gfx = gfxEngine.getDebugEntity(new Vec3[] { Vec3.VEC3_ZERO, axis.scale((Float.isInfinite(sonar) ? value : sonar)) }); gfx.position = pos; gfx.rotation = node.state.rot; gfx.scale = new Vec3(1); gfx.colour = MAGENTA; } @Override public void destroy() { } }
jwfwessels/AFK
src/afk/ge/tokyo/ems/systems/DebugRenderSystem.java
Java
mit
6,629
<?php require_once('vendor/autoload.php');
thepsion5/menuizer
tests/bootstrap.php
PHP
mit
45
# -*- encoding: utf-8 -*- module XenAPI module Network def network_name_label(name_label) self.network.get_by_name_label(name_label) end end end
locaweb/xenapi-ruby
lib/xenapi/network.rb
Ruby
mit
163
package view.menuBar.workspace; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import javax.swing.JOptionPane; import view.Constants; import view.ViewController; /** * Class that reads in workspace preference files * * @author Lalita Maraj * @author Susan Zhang * */ public class WorkSpacePreferenceReader { private ViewController myController; public WorkSpacePreferenceReader (ViewController controller) { myController = controller; } public void loadPreferences (File prefFile) throws IOException { BufferedReader br = new BufferedReader(new FileReader(prefFile)); String sCurrentLine = br.readLine(); if (!sCurrentLine.equals("preferences")) { JOptionPane.showMessageDialog(null, Constants.WRONG_PREF_FILE_MESSAGE); } while ((sCurrentLine = br.readLine()) != null) { String[] s = sCurrentLine.split(" "); if (s[0].equals(Constants.BACKGROUND_KEYWORD) && s.length == Constants.COLOR_LINE_LENGTH) { myController.setBGColor(Integer.parseInt(s[1])); setPalette(s[1], s[2], s[3], s[4]); } if (s[0].equals(Constants.PEN_KEYWORD) && s.length == Constants.COLOR_LINE_LENGTH) { myController.setPenColor(Integer.parseInt(s[1])); setPalette(s[1], s[2], s[3], s[4]); } if (s[0].equals(Constants.IMAGE_KEYWORD) && s[1] != null) { myController.changeImage(Integer.parseInt(s[1])); } } br.close(); } private void setPalette(String index, String r, String g, String b){ myController.setPalette(Integer.parseInt(index), Integer.parseInt(r), Integer.parseInt(g), Integer.parseInt(b)); } }
chinnychin19/CS308_Proj3
src/view/menuBar/workspace/WorkSpacePreferenceReader.java
Java
mit
1,836
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package erp.cfd; import java.io.Serializable; /** * * @author Juan Barajas */ public final class SCfdiSignature implements Serializable { private String msUuid; private String msFechaTimbrado; private String msSelloCFD; private String msNoCertificadoSAT; private String msSelloSAT; private String msRfcEmisor; private String msRfcReceptor; private double mdTotalCy; public SCfdiSignature() { msUuid = ""; msFechaTimbrado = ""; msSelloCFD = ""; msNoCertificadoSAT = ""; msSelloSAT = ""; msRfcEmisor = ""; msRfcReceptor = ""; mdTotalCy = 0; } public void setUuid(String s) { msUuid = s; } public void setFechaTimbrado(String s) { msFechaTimbrado = s; } public void setSelloCFD(String s) { msSelloCFD = s; } public void setNoCertificadoSAT(String s) { msNoCertificadoSAT = s; } public void setSelloSAT(String s) { msSelloSAT = s; } public void setRfcEmisor(String s) { msRfcEmisor = s; } public void setRfcReceptor(String s) { msRfcReceptor = s; } public void setTotalCy(double d) { mdTotalCy = d; } public String getUuid() { return msUuid; } public String getFechaTimbrado() { return msFechaTimbrado; } public String getSelloCFD() { return msSelloCFD; } public String getNoCertificadoSAT() { return msNoCertificadoSAT; } public String getSelloSAT() { return msSelloSAT; } public String getRfcEmisor() { return msRfcEmisor; } public String getRfcReceptor() { return msRfcReceptor; } public double getTotalCy() { return mdTotalCy; } }
swaplicado/siie32
src/erp/cfd/SCfdiSignature.java
Java
mit
1,709
import traverse from "../lib"; import assert from "assert"; import { parse } from "babylon"; import * as t from "babel-types"; function getPath(code) { const ast = parse(code, { plugins: ["flow", "asyncGenerators"] }); let path; traverse(ast, { Program: function (_path) { path = _path; _path.stop(); }, }); return path; } describe("inference", function () { describe("baseTypeStrictlyMatches", function () { it("it should work with null", function () { const path = getPath("var x = null; x === null").get("body")[1].get("expression"); const left = path.get("left"); const right = path.get("right"); const strictMatch = left.baseTypeStrictlyMatches(right); assert.ok(strictMatch, "null should be equal to null"); }); it("it should work with numbers", function () { const path = getPath("var x = 1; x === 2").get("body")[1].get("expression"); const left = path.get("left"); const right = path.get("right"); const strictMatch = left.baseTypeStrictlyMatches(right); assert.ok(strictMatch, "number should be equal to number"); }); it("it should bail when type changes", function () { const path = getPath("var x = 1; if (foo) x = null;else x = 3; x === 2") .get("body")[2].get("expression"); const left = path.get("left"); const right = path.get("right"); const strictMatch = left.baseTypeStrictlyMatches(right); assert.ok(!strictMatch, "type might change in if statement"); }); it("it should differentiate between null and undefined", function () { const path = getPath("var x; x === null").get("body")[1].get("expression"); const left = path.get("left"); const right = path.get("right"); const strictMatch = left.baseTypeStrictlyMatches(right); assert.ok(!strictMatch, "null should not match undefined"); }); }); describe("getTypeAnnotation", function () { it("should infer from type cast", function () { const path = getPath("(x: number)").get("body")[0].get("expression"); assert.ok(t.isNumberTypeAnnotation(path.getTypeAnnotation()), "should be number"); }); it("should infer string from template literal", function () { const path = getPath("`hey`").get("body")[0].get("expression"); assert.ok(t.isStringTypeAnnotation(path.getTypeAnnotation()), "should be string"); }); it("should infer number from +x", function () { const path = getPath("+x").get("body")[0].get("expression"); assert.ok(t.isNumberTypeAnnotation(path.getTypeAnnotation()), "should be number"); }); it("should infer T from new T", function () { const path = getPath("new T").get("body")[0].get("expression"); const type = path.getTypeAnnotation(); assert.ok(t.isGenericTypeAnnotation(type) && type.id.name === "T", "should be T"); }); it("should infer number from ++x", function () { const path = getPath("++x").get("body")[0].get("expression"); assert.ok(t.isNumberTypeAnnotation(path.getTypeAnnotation()), "should be number"); }); it("should infer number from --x", function () { const path = getPath("--x").get("body")[0].get("expression"); assert.ok(t.isNumberTypeAnnotation(path.getTypeAnnotation()), "should be number"); }); it("should infer void from void x", function () { const path = getPath("void x").get("body")[0].get("expression"); assert.ok(t.isVoidTypeAnnotation(path.getTypeAnnotation()), "should be void"); }); it("should infer string from typeof x", function () { const path = getPath("typeof x").get("body")[0].get("expression"); assert.ok(t.isStringTypeAnnotation(path.getTypeAnnotation()), "should be string"); }); it("should infer boolean from !x", function () { const path = getPath("!x").get("body")[0].get("expression"); assert.ok(t.isBooleanTypeAnnotation(path.getTypeAnnotation()), "should be boolean"); }); it("should infer type of sequence expression", function () { const path = getPath("a,1").get("body")[0].get("expression"); assert.ok(t.isNumberTypeAnnotation(path.getTypeAnnotation()), "should be number"); }); it("should infer type of logical expression", function () { const path = getPath("'a' && 1").get("body")[0].get("expression"); const type = path.getTypeAnnotation(); assert.ok(t.isUnionTypeAnnotation(type), "should be a union"); assert.ok(t.isStringTypeAnnotation(type.types[0]), "first type in union should be string"); assert.ok(t.isNumberTypeAnnotation(type.types[1]), "second type in union should be number"); }); it("should infer type of conditional expression", function () { const path = getPath("q ? true : 0").get("body")[0].get("expression"); const type = path.getTypeAnnotation(); assert.ok(t.isUnionTypeAnnotation(type), "should be a union"); assert.ok(t.isBooleanTypeAnnotation(type.types[0]), "first type in union should be boolean"); assert.ok(t.isNumberTypeAnnotation(type.types[1]), "second type in union should be number"); }); it("should infer RegExp from RegExp literal", function () { const path = getPath("/.+/").get("body")[0].get("expression"); const type = path.getTypeAnnotation(); assert.ok(t.isGenericTypeAnnotation(type) && type.id.name === "RegExp", "should be RegExp"); }); it("should infer Object from object expression", function () { const path = getPath("({ a: 5 })").get("body")[0].get("expression"); const type = path.getTypeAnnotation(); assert.ok(t.isGenericTypeAnnotation(type) && type.id.name === "Object", "should be Object"); }); it("should infer Array from array expression", function () { const path = getPath("[ 5 ]").get("body")[0].get("expression"); const type = path.getTypeAnnotation(); assert.ok(t.isGenericTypeAnnotation(type) && type.id.name === "Array", "should be Array"); }); it("should infer Function from function", function () { const path = getPath("(function (): string {})").get("body")[0].get("expression"); const type = path.getTypeAnnotation(); assert.ok(t.isGenericTypeAnnotation(type) && type.id.name === "Function", "should be Function"); }); it("should infer call return type using function", function () { const path = getPath("(function (): string {})()").get("body")[0].get("expression"); const type = path.getTypeAnnotation(); assert.ok(t.isStringTypeAnnotation(type), "should be string"); }); it("should infer call return type using async function", function () { const path = getPath("(async function (): string {})()").get("body")[0].get("expression"); const type = path.getTypeAnnotation(); assert.ok(t.isGenericTypeAnnotation(type) && type.id.name === "Promise", "should be Promise"); }); it("should infer call return type using async generator function", function () { const path = getPath("(async function * (): string {})()").get("body")[0].get("expression"); const type = path.getTypeAnnotation(); assert.ok(t.isGenericTypeAnnotation(type) && type.id.name === "AsyncIterator", "should be AsyncIterator"); }); it("should infer number from x/y", function () { const path = getPath("x/y").get("body")[0].get("expression"); const type = path.getTypeAnnotation(); assert.ok(t.isNumberTypeAnnotation(type), "should be number"); }); it("should infer boolean from x instanceof y", function () { const path = getPath("x instanceof y").get("body")[0].get("expression"); const type = path.getTypeAnnotation(); assert.ok(t.isBooleanTypeAnnotation(type), "should be boolean"); }); it("should infer number from 1 + 2", function () { const path = getPath("1 + 2").get("body")[0].get("expression"); const type = path.getTypeAnnotation(); assert.ok(t.isNumberTypeAnnotation(type), "should be number"); }); it("should infer string|number from x + y", function () { const path = getPath("x + y").get("body")[0].get("expression"); const type = path.getTypeAnnotation(); assert.ok(t.isUnionTypeAnnotation(type), "should be a union"); assert.ok(t.isStringTypeAnnotation(type.types[0]), "first type in union should be string"); assert.ok(t.isNumberTypeAnnotation(type.types[1]), "second type in union should be number"); }); it("should infer type of tagged template literal", function () { const path = getPath("(function (): RegExp {}) `hey`").get("body")[0].get("expression"); const type = path.getTypeAnnotation(); assert.ok(t.isGenericTypeAnnotation(type) && type.id.name === "RegExp", "should be RegExp"); }); }); });
STRML/babel
packages/babel-traverse/test/inference.js
JavaScript
mit
8,822
var Chartist = require('chartist'); module.exports = makePluginInstance; makePluginInstance.calculateScaleFactor = calculateScaleFactor; makePluginInstance.scaleValue = scaleValue; function makePluginInstance(userOptions) { var defaultOptions = { dot: { min: 8, max: 10, unit: 'px' }, line: { min: 2, max: 4, unit: 'px' }, svgWidth: { min: 360, max: 1000 } }; var options = Chartist.extend({}, defaultOptions, userOptions); return function scaleLinesAndDotsInstance(chart) { var actualSvgWidth; chart.on('draw', function(data) { if (data.type === 'point') { setStrokeWidth(data, options.dot, options.svgWidth); } else if (data.type === 'line') { setStrokeWidth(data, options.line, options.svgWidth); } }); /** * Set stroke-width of the element of a 'data' object, based on chart width. * * @param {Object} data - Object passed to 'draw' event listener * @param {Object} widthRange - Specifies min/max stroke-width and unit. * @param {Object} thresholds - Specifies chart width to base scaling on. */ function setStrokeWidth(data, widthRange, thresholds) { var scaleFactor = calculateScaleFactor(thresholds.min, thresholds.max, getActualSvgWidth(data)); var strokeWidth = scaleValue(widthRange.min, widthRange.max, scaleFactor); data.element.attr({ style: 'stroke-width: ' + strokeWidth + widthRange.unit }); } /** * @param {Object} data - Object passed to 'draw' event listener */ function getActualSvgWidth(data) { return data.element.root().width(); } }; } function calculateScaleFactor(min, max, value) { if (max <= min) { throw new Error('max must be > min'); } var delta = max - min; var scaleFactor = (value - min) / delta; scaleFactor = Math.min(scaleFactor, 1); scaleFactor = Math.max(scaleFactor, 0); return scaleFactor; } function scaleValue(min, max, scaleFactor) { if (scaleFactor > 1) throw new Error('scaleFactor cannot be > 1'); if (scaleFactor < 0) throw new Error('scaleFactor cannot be < 0'); if (max < min) throw new Error('max cannot be < min'); var delta = max - min; return (delta * scaleFactor) + min; }
psalaets/chartist-plugin-scale-lines-and-dots
index.js
JavaScript
mit
2,292
/* * This file is part of Sponge, licensed under the MIT License (MIT). * * Copyright (c) SpongePowered <https://www.spongepowered.org> * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package org.spongepowered.common.entity.ai.goal; import org.spongepowered.api.entity.ai.goal.Goal; import org.spongepowered.api.entity.ai.goal.GoalType; import org.spongepowered.api.entity.living.Agent; public final class SpongeGoalType implements GoalType { private final Class<? extends Goal<? extends Agent>> goalClass; public SpongeGoalType(final Class<? extends Goal<? extends Agent>> goalClass) { this.goalClass = goalClass; } @Override public Class<? extends Goal<?>> goalClass() { return this.goalClass; } }
SpongePowered/Sponge
src/main/java/org/spongepowered/common/entity/ai/goal/SpongeGoalType.java
Java
mit
1,809
exports.BattleStatuses = { brn: { effectType: 'Status', onStart: function (target, source, sourceEffect) { if (sourceEffect && sourceEffect.id === 'flameorb') { this.add('-status', target, 'brn', '[from] item: Flame Orb'); return; } this.add('-status', target, 'brn'); }, onBasePower: function (basePower, attacker, defender, move) { if (move && move.category === 'Physical' && attacker && attacker.ability !== 'guts' && move.id !== 'facade') { return this.chainModify(0.5); // This should really take place directly in the damage function but it's here for now } }, onResidualOrder: 9, onResidual: function (pokemon) { this.damage(pokemon.maxhp / 8); } }, par: { effectType: 'Status', onStart: function (target) { this.add('-status', target, 'par'); }, onModifySpe: function (speMod, pokemon) { if (pokemon.ability !== 'quickfeet') { return this.chain(speMod, 0.25); } }, onBeforeMovePriority: 2, onBeforeMove: function (pokemon) { if (this.random(4) === 0) { this.add('cant', pokemon, 'par'); return false; } } }, slp: { effectType: 'Status', onStart: function (target) { this.add('-status', target, 'slp'); // 1-3 turns this.effectData.startTime = this.random(2, 5); this.effectData.time = this.effectData.startTime; }, onBeforeMovePriority: 2, onBeforeMove: function (pokemon, target, move) { if (pokemon.getAbility().isHalfSleep) { pokemon.statusData.time--; } pokemon.statusData.time--; if (pokemon.statusData.time <= 0) { pokemon.cureStatus(); return; } this.add('cant', pokemon, 'slp'); if (move.sleepUsable) { return; } return false; } }, frz: { effectType: 'Status', onStart: function (target) { this.add('-status', target, 'frz'); if (target.species === 'Shaymin-Sky' && target.baseTemplate.species === target.species) { var template = this.getTemplate('Shaymin'); target.formeChange(template); target.baseTemplate = template; target.setAbility(template.abilities['0']); target.baseAbility = target.ability; target.details = template.species + (target.level === 100 ? '' : ', L' + target.level) + (target.gender === '' ? '' : ', ' + target.gender) + (target.set.shiny ? ', shiny' : ''); this.add('detailschange', target, target.details); this.add('message', target.species + " has reverted to Land Forme! (placeholder)"); } }, onBeforeMovePriority: 2, onBeforeMove: function (pokemon, target, move) { if (move.thawsUser || this.random(5) === 0) { pokemon.cureStatus(); return; } this.add('cant', pokemon, 'frz'); return false; }, onHit: function (target, source, move) { if (move.type === 'Fire' && move.category !== 'Status') { target.cureStatus(); } } }, psn: { effectType: 'Status', onStart: function (target) { this.add('-status', target, 'psn'); }, onResidualOrder: 9, onResidual: function (pokemon) { this.damage(pokemon.maxhp / 8); } }, tox: { effectType: 'Status', onStart: function (target, source, sourceEffect) { this.effectData.stage = 0; if (sourceEffect && sourceEffect.id === 'toxicorb') { this.add('-status', target, 'tox', '[from] item: Toxic Orb'); return; } this.add('-status', target, 'tox'); }, onSwitchIn: function () { this.effectData.stage = 0; }, onResidualOrder: 9, onResidual: function (pokemon) { if (this.effectData.stage < 15) { this.effectData.stage++; } this.damage(this.clampIntRange(pokemon.maxhp / 16, 1) * this.effectData.stage); } }, confusion: { // this is a volatile status onStart: function (target, source, sourceEffect) { var result = this.runEvent('TryConfusion', target, source, sourceEffect); if (!result) return result; this.add('-start', target, 'confusion'); this.effectData.time = this.random(2, 6); }, onEnd: function (target) { this.add('-end', target, 'confusion'); }, onBeforeMove: function (pokemon) { pokemon.volatiles.confusion.time--; if (!pokemon.volatiles.confusion.time) { pokemon.removeVolatile('confusion'); return; } this.add('-activate', pokemon, 'confusion'); if (this.random(2) === 0) { return; } this.directDamage(this.getDamage(pokemon, pokemon, 40)); return false; } }, flinch: { duration: 1, onBeforeMovePriority: 1, onBeforeMove: function (pokemon) { if (!this.runEvent('Flinch', pokemon)) { return; } this.add('cant', pokemon, 'flinch'); return false; } }, trapped: { noCopy: true, onModifyPokemon: function (pokemon) { if (!this.effectData.source || !this.effectData.source.isActive) { delete pokemon.volatiles['trapped']; return; } pokemon.tryTrap(); }, onStart: function (target) { this.add('-activate', target, 'trapped'); } }, partiallytrapped: { duration: 5, durationCallback: function (target, source) { if (source.item === 'gripclaw') return 8; return this.random(5, 7); }, onStart: function (pokemon, source) { this.add('-activate', pokemon, 'move: ' +this.effectData.sourceEffect, '[of] ' + source); }, onResidualOrder: 11, onResidual: function (pokemon) { if (this.effectData.source && (!this.effectData.source.isActive || this.effectData.source.hp <= 0)) { pokemon.removeVolatile('partiallytrapped'); return; } if (this.effectData.source.item === 'bindingband') { this.damage(pokemon.maxhp / 6); } else { this.damage(pokemon.maxhp / 8); } }, onEnd: function (pokemon) { this.add('-end', pokemon, this.effectData.sourceEffect, '[partiallytrapped]'); }, onModifyPokemon: function (pokemon) { pokemon.tryTrap(); } }, lockedmove: { // Outrage, Thrash, Petal Dance... duration: 2, onResidual: function (target) { if (target.status === 'slp') { // don't lock, and bypass confusion for calming delete target.volatiles['lockedmove']; } this.effectData.trueDuration--; }, onStart: function (target, source, effect) { this.effectData.trueDuration = this.random(2, 4); this.effectData.move = effect.id; }, onRestart: function () { if (this.effectData.trueDuration >= 2) { this.effectData.duration = 2; } }, onEnd: function (target) { if (this.effectData.trueDuration > 1) return; this.add('-end', target, 'rampage'); target.addVolatile('confusion'); }, onLockMove: function (pokemon) { return this.effectData.move; } }, twoturnmove: { // Skull Bash, SolarBeam, Sky Drop... duration: 2, onStart: function (target, source, effect) { this.effectData.move = effect.id; // source and target are reversed since the event target is the // pokemon using the two-turn move this.effectData.targetLoc = this.getTargetLoc(source, target); target.addVolatile(effect.id, source); }, onEnd: function (target) { target.removeVolatile(this.effectData.move); }, onLockMove: function () { return this.effectData.move; }, onLockMoveTarget: function () { return this.effectData.targetLoc; } }, choicelock: { onStart: function (pokemon) { this.effectData.move = this.activeMove.id; if (!this.effectData.move) return false; }, onModifyPokemon: function (pokemon) { if (!pokemon.getItem().isChoice || !pokemon.hasMove(this.effectData.move)) { pokemon.removeVolatile('choicelock'); return; } if (pokemon.ignore['Item']) { return; } var moves = pokemon.moveset; for (var i = 0; i < moves.length; i++) { if (moves[i].id !== this.effectData.move) { moves[i].disabled = true; } } } }, mustrecharge: { duration: 2, onBeforeMove: function (pokemon) { this.add('cant', pokemon, 'recharge'); pokemon.removeVolatile('mustrecharge'); return false; }, onLockMove: 'recharge' }, futuremove: { // this is a side condition onStart: function (side) { this.effectData.positions = []; for (var i = 0; i < side.active.length; i++) { this.effectData.positions[i] = null; } }, onResidualOrder: 3, onResidual: function (side) { var finished = true; for (var i = 0; i < side.active.length; i++) { var posData = this.effectData.positions[i]; if (!posData) continue; posData.duration--; if (posData.duration > 0) { finished = false; continue; } // time's up; time to hit! :D var target = side.foe.active[posData.targetPosition]; var move = this.getMove(posData.move); if (target.fainted) { this.add('-hint', '' + move.name + ' did not hit because the target is fainted.'); this.effectData.positions[i] = null; continue; } this.add('-message', '' + move.name + ' hit! (placeholder)'); target.removeVolatile('Protect'); target.removeVolatile('Endure'); if (typeof posData.moveData.affectedByImmunities === 'undefined') { posData.moveData.affectedByImmunities = true; } this.moveHit(target, posData.source, move, posData.moveData); this.effectData.positions[i] = null; } if (finished) { side.removeSideCondition('futuremove'); } } }, stall: { // Protect, Detect, Endure counter duration: 2, counterMax: 256, onStart: function () { this.effectData.counter = 3; }, onStallMove: function () { // this.effectData.counter should never be undefined here. // However, just in case, use 1 if it is undefined. var counter = this.effectData.counter || 1; this.debug("Success chance: " + Math.round(100 / counter) + "%"); return (this.random(counter) === 0); }, onRestart: function () { if (this.effectData.counter < this.effect.counterMax) { this.effectData.counter *= 3; } this.effectData.duration = 2; } }, gem: { duration: 1, affectsFainted: true, onBasePower: function (basePower, user, target, move) { this.debug('Gem Boost'); return this.chainModify([0x14CD, 0x1000]); } }, // weather // weather is implemented here since it's so important to the game raindance: { effectType: 'Weather', duration: 5, durationCallback: function (source, effect) { if (source && source.item === 'damprock') { return 8; } return 5; }, onBasePower: function (basePower, attacker, defender, move) { if (move.type === 'Water') { this.debug('rain water boost'); return this.chainModify(1.5); } if (move.type === 'Fire') { this.debug('rain fire suppress'); return this.chainModify(0.5); } }, onStart: function (battle, source, effect) { if (effect && effect.effectType === 'Ability' && this.gen <= 5) { this.effectData.duration = 0; this.add('-weather', 'RainDance', '[from] ability: ' + effect, '[of] ' + source); } else { this.add('-weather', 'RainDance'); } }, onResidualOrder: 1, onResidual: function () { this.add('-weather', 'RainDance', '[upkeep]'); this.eachEvent('Weather'); }, onEnd: function () { this.add('-weather', 'none'); } }, sunnyday: { effectType: 'Weather', duration: 5, durationCallback: function (source, effect) { if (source && source.item === 'heatrock') { return 8; } return 5; }, onBasePower: function (basePower, attacker, defender, move) { if (move.type === 'Fire') { this.debug('Sunny Day fire boost'); return this.chainModify(1.5); } if (move.type === 'Water') { this.debug('Sunny Day water suppress'); return this.chainModify(0.5); } }, onStart: function (battle, source, effect) { if (effect && effect.effectType === 'Ability' && this.gen <= 5) { this.effectData.duration = 0; this.add('-weather', 'SunnyDay', '[from] ability: ' + effect, '[of] ' + source); } else { this.add('-weather', 'SunnyDay'); } }, onImmunity: function (type) { if (type === 'frz') return false; }, onResidualOrder: 1, onResidual: function () { this.add('-weather', 'SunnyDay', '[upkeep]'); this.eachEvent('Weather'); }, onEnd: function () { this.add('-weather', 'none'); } }, sandstorm: { effectType: 'Weather', duration: 5, durationCallback: function (source, effect) { if (source && source.item === 'smoothrock') { return 8; } return 5; }, // This should be applied directly to the stat before any of the other modifiers are chained // So we give it increased priority. onModifySpDPriority: 10, onModifySpD: function (spd, pokemon) { if (pokemon.hasType('Rock') && this.isWeather('sandstorm')) { return this.modify(spd, 1.5); } }, onStart: function (battle, source, effect) { if (effect && effect.effectType === 'Ability' && this.gen <= 5) { this.effectData.duration = 0; this.add('-weather', 'Sandstorm', '[from] ability: ' + effect, '[of] ' + source); } else { this.add('-weather', 'Sandstorm'); } }, onResidualOrder: 1, onResidual: function () { this.add('-weather', 'Sandstorm', '[upkeep]'); if (this.isWeather('sandstorm')) this.eachEvent('Weather'); }, onWeather: function (target) { this.damage(target.maxhp / 16); }, onEnd: function () { this.add('-weather', 'none'); } }, hail: { effectType: 'Weather', duration: 5, durationCallback: function (source, effect) { if (source && source.item === 'icyrock') { return 8; } return 5; }, onStart: function (battle, source, effect) { if (effect && effect.effectType === 'Ability' && this.gen <= 5) { this.effectData.duration = 0; this.add('-weather', 'Hail', '[from] ability: ' + effect, '[of] ' + source); } else { this.add('-weather', 'Hail'); } }, onResidualOrder: 1, onResidual: function () { this.add('-weather', 'Hail', '[upkeep]'); if (this.isWeather('hail')) this.eachEvent('Weather'); }, onWeather: function (target) { this.damage(target.maxhp / 16); }, onEnd: function () { this.add('-weather', 'none'); } }, arceus: { // Arceus's actual typing is implemented here // Arceus's true typing for all its formes is Normal, and it's only // Multitype that changes its type, but its formes are specified to // be their corresponding type in the Pokedex, so that needs to be // overridden. This is mainly relevant for Hackmons and Balanced // Hackmons. onSwitchInPriority: 101, onSwitchIn: function (pokemon) { var type = 'Normal'; if (pokemon.ability === 'multitype') { type = this.runEvent('Plate', pokemon); if (!type || type === true) { type = 'Normal'; } } pokemon.setType(type, true); } } };
nehoray181/pokemon
data/statuses.js
JavaScript
mit
14,531
package com.example.profbola.bakingtime.provider; import android.database.sqlite.SQLiteDatabase; import com.example.profbola.bakingtime.provider.RecipeContract.IngredientEntry; import static com.example.profbola.bakingtime.utils.RecipeConstants.IngredientDbHelperConstants.INGREDIENT_RECIPE_ID_IDX; /** * Created by prof.BOLA on 6/23/2017. */ public class IngredientDbHelper { // private static final String DATABASE_NAME = "bakingtime.db"; // private static final int DATABASE_VERSION = 1; // public IngredientDbHelper(Context context) { // super(context, DATABASE_NAME, null, DATABASE_VERSION); // } public static void onCreate(SQLiteDatabase db) { final String SQL_CREATE_INGREDIENTS_TABLE = "CREATE TABLE " + IngredientEntry.TABLE_NAME + " ( " + IngredientEntry._ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + IngredientEntry.COLUMN_INGREDIENT + " STRING NOT NULL, " + IngredientEntry.COLUMN_MEASURE + " STRING NOT NULL, " + IngredientEntry.COLUMN_QUANTITY + " REAL NOT NULL, " + IngredientEntry.COLUMN_RECIPE_ID + " INTEGER, " + " FOREIGN KEY ( " + IngredientEntry.COLUMN_RECIPE_ID + " ) REFERENCES " + RecipeContract.RecipeEntry.TABLE_NAME + " ( " + RecipeContract.RecipeEntry.COLUMN_ID + " ) " + " UNIQUE ( " + IngredientEntry.COLUMN_INGREDIENT + " , " + IngredientEntry.COLUMN_RECIPE_ID + " ) ON CONFLICT REPLACE " + ");"; final String SQL_CREATE_INDEX = "CREATE INDEX " + INGREDIENT_RECIPE_ID_IDX + " ON " + IngredientEntry.TABLE_NAME + " ( " + IngredientEntry.COLUMN_RECIPE_ID + " );"; db.execSQL(SQL_CREATE_INGREDIENTS_TABLE); db.execSQL(SQL_CREATE_INDEX); } public static void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL("DROP TABLE IF EXISTS " + IngredientEntry.TABLE_NAME); onCreate(db); } }
Ehbraheem/Baking-Time
app/src/main/java/com/example/profbola/bakingtime/provider/IngredientDbHelper.java
Java
mit
2,247
version https://git-lfs.github.com/spec/v1 oid sha256:5a4f668a21f7ea9a0b8ab69c0e5fec6461ab0f73f7836acd640fe43ea9919fcf size 89408
yogeshsaroya/new-cdnjs
ajax/libs/bacon.js/0.7.46/Bacon.js
JavaScript
mit
130
<?php namespace Sydes\L10n\Locales; use Sydes\L10n\Locale; use Sydes\L10n\Plural\Rule1; class EuLocale extends Locale { use Rule1; protected $isoCode = 'eu'; protected $englishName = 'Basque'; protected $nativeName = 'euskara'; protected $isRtl = false; }
sydes/framework
src/L10n/Locales/EuLocale.php
PHP
mit
280
( function( factory ) { if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. define( [ "jquery" ], factory ); } else { // Browser globals factory( jQuery ); } } ( function( $ ) { $.ui = $.ui || {}; return $.ui.version = "1.12.1"; } ) ); /*! * jQuery UI Widget 1.12.1 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license */ //>>label: Widget //>>group: Core //>>description: Provides a factory for creating stateful widgets with a common API. //>>docs: http://api.jqueryui.com/jQuery.widget/ //>>demos: http://jqueryui.com/widget/ ( function( factory ) { if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. define( [ "jquery", "./version" ], factory ); } else { // Browser globals factory( jQuery ); } }( function( $ ) { var widgetUuid = 0; var widgetSlice = Array.prototype.slice; $.cleanData = ( function( orig ) { return function( elems ) { var events, elem, i; for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) { try { // Only trigger remove when necessary to save time events = $._data( elem, "events" ); if ( events && events.remove ) { $( elem ).triggerHandler( "remove" ); } // Http://bugs.jquery.com/ticket/8235 } catch ( e ) {} } orig( elems ); }; } )( $.cleanData ); $.widget = function( name, base, prototype ) { var existingConstructor, constructor, basePrototype; // ProxiedPrototype allows the provided prototype to remain unmodified // so that it can be used as a mixin for multiple widgets (#8876) var proxiedPrototype = {}; var namespace = name.split( "." )[ 0 ]; name = name.split( "." )[ 1 ]; var fullName = namespace + "-" + name; if ( !prototype ) { prototype = base; base = $.Widget; } if ( $.isArray( prototype ) ) { prototype = $.extend.apply( null, [ {} ].concat( prototype ) ); } // Create selector for plugin $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { return !!$.data( elem, fullName ); }; $[ namespace ] = $[ namespace ] || {}; existingConstructor = $[ namespace ][ name ]; constructor = $[ namespace ][ name ] = function( options, element ) { // Allow instantiation without "new" keyword if ( !this._createWidget ) { return new constructor( options, element ); } // Allow instantiation without initializing for simple inheritance // must use "new" keyword (the code above always passes args) if ( arguments.length ) { this._createWidget( options, element ); } }; // Extend with the existing constructor to carry over any static properties $.extend( constructor, existingConstructor, { version: prototype.version, // Copy the object used to create the prototype in case we need to // redefine the widget later _proto: $.extend( {}, prototype ), // Track widgets that inherit from this widget in case this widget is // redefined after a widget inherits from it _childConstructors: [] } ); basePrototype = new base(); // We need to make the options hash a property directly on the new instance // otherwise we'll modify the options hash on the prototype that we're // inheriting from basePrototype.options = $.widget.extend( {}, basePrototype.options ); $.each( prototype, function( prop, value ) { if ( !$.isFunction( value ) ) { proxiedPrototype[ prop ] = value; return; } proxiedPrototype[ prop ] = ( function() { function _super() { return base.prototype[ prop ].apply( this, arguments ); } function _superApply( args ) { return base.prototype[ prop ].apply( this, args ); } return function() { var __super = this._super; var __superApply = this._superApply; var returnValue; this._super = _super; this._superApply = _superApply; returnValue = value.apply( this, arguments ); this._super = __super; this._superApply = __superApply; return returnValue; }; } )(); } ); constructor.prototype = $.widget.extend( basePrototype, { // TODO: remove support for widgetEventPrefix // always use the name + a colon as the prefix, e.g., draggable:start // don't prefix for widgets that aren't DOM-based widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name }, proxiedPrototype, { constructor: constructor, namespace: namespace, widgetName: name, widgetFullName: fullName } ); // If this widget is being redefined then we need to find all widgets that // are inheriting from it and redefine all of them so that they inherit from // the new version of this widget. We're essentially trying to replace one // level in the prototype chain. if ( existingConstructor ) { $.each( existingConstructor._childConstructors, function( i, child ) { var childPrototype = child.prototype; // Redefine the child widget using the same prototype that was // originally used, but inherit from the new version of the base $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); } ); // Remove the list of existing child constructors from the old constructor // so the old child constructors can be garbage collected delete existingConstructor._childConstructors; } else { base._childConstructors.push( constructor ); } $.widget.bridge( name, constructor ); return constructor; }; $.widget.extend = function( target ) { var input = widgetSlice.call( arguments, 1 ); var inputIndex = 0; var inputLength = input.length; var key; var value; for ( ; inputIndex < inputLength; inputIndex++ ) { for ( key in input[ inputIndex ] ) { value = input[ inputIndex ][ key ]; if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { // Clone objects if ( $.isPlainObject( value ) ) { target[ key ] = $.isPlainObject( target[ key ] ) ? $.widget.extend( {}, target[ key ], value ) : // Don't extend strings, arrays, etc. with objects $.widget.extend( {}, value ); // Copy everything else by reference } else { target[ key ] = value; } } } } return target; }; $.widget.bridge = function( name, object ) { var fullName = object.prototype.widgetFullName || name; $.fn[ name ] = function( options ) { var isMethodCall = typeof options === "string"; var args = widgetSlice.call( arguments, 1 ); var returnValue = this; if ( isMethodCall ) { // If this is an empty collection, we need to have the instance method // return undefined instead of the jQuery instance if ( !this.length && options === "instance" ) { returnValue = undefined; } else { this.each( function() { var methodValue; var instance = $.data( this, fullName ); if ( options === "instance" ) { returnValue = instance; return false; } if ( !instance ) { return $.error( "cannot call methods on " + name + " prior to initialization; " + "attempted to call method '" + options + "'" ); } if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) { return $.error( "no such method '" + options + "' for " + name + " widget instance" ); } methodValue = instance[ options ].apply( instance, args ); if ( methodValue !== instance && methodValue !== undefined ) { returnValue = methodValue && methodValue.jquery ? returnValue.pushStack( methodValue.get() ) : methodValue; return false; } } ); } } else { // Allow multiple hashes to be passed on init if ( args.length ) { options = $.widget.extend.apply( null, [ options ].concat( args ) ); } this.each( function() { var instance = $.data( this, fullName ); if ( instance ) { instance.option( options || {} ); if ( instance._init ) { instance._init(); } } else { $.data( this, fullName, new object( options, this ) ); } } ); } return returnValue; }; }; $.Widget = function( /* options, element */ ) {}; $.Widget._childConstructors = []; $.Widget.prototype = { widgetName: "widget", widgetEventPrefix: "", defaultElement: "<div>", options: { classes: {}, disabled: false, // Callbacks create: null }, _createWidget: function( options, element ) { element = $( element || this.defaultElement || this )[ 0 ]; this.element = $( element ); this.uuid = widgetUuid++; this.eventNamespace = "." + this.widgetName + this.uuid; this.bindings = $(); this.hoverable = $(); this.focusable = $(); this.classesElementLookup = {}; if ( element !== this ) { $.data( element, this.widgetFullName, this ); this._on( true, this.element, { remove: function( event ) { if ( event.target === element ) { this.destroy(); } } } ); this.document = $( element.style ? // Element within the document element.ownerDocument : // Element is window or document element.document || element ); this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow ); } this.options = $.widget.extend( {}, this.options, this._getCreateOptions(), options ); this._create(); if ( this.options.disabled ) { this._setOptionDisabled( this.options.disabled ); } this._trigger( "create", null, this._getCreateEventData() ); this._init(); }, _getCreateOptions: function() { return {}; }, _getCreateEventData: $.noop, _create: $.noop, _init: $.noop, destroy: function() { var that = this; this._destroy(); $.each( this.classesElementLookup, function( key, value ) { that._removeClass( value, key ); } ); // We can probably remove the unbind calls in 2.0 // all event bindings should go through this._on() this.element .off( this.eventNamespace ) .removeData( this.widgetFullName ); this.widget() .off( this.eventNamespace ) .removeAttr( "aria-disabled" ); // Clean up events and states this.bindings.off( this.eventNamespace ); }, _destroy: $.noop, widget: function() { return this.element; }, option: function( key, value ) { var options = key; var parts; var curOption; var i; if ( arguments.length === 0 ) { // Don't return a reference to the internal hash return $.widget.extend( {}, this.options ); } if ( typeof key === "string" ) { // Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } options = {}; parts = key.split( "." ); key = parts.shift(); if ( parts.length ) { curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); for ( i = 0; i < parts.length - 1; i++ ) { curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; curOption = curOption[ parts[ i ] ]; } key = parts.pop(); if ( arguments.length === 1 ) { return curOption[ key ] === undefined ? null : curOption[ key ]; } curOption[ key ] = value; } else { if ( arguments.length === 1 ) { return this.options[ key ] === undefined ? null : this.options[ key ]; } options[ key ] = value; } } this._setOptions( options ); return this; }, _setOptions: function( options ) { var key; for ( key in options ) { this._setOption( key, options[ key ] ); } return this; }, _setOption: function( key, value ) { if ( key === "classes" ) { this._setOptionClasses( value ); } this.options[ key ] = value; if ( key === "disabled" ) { this._setOptionDisabled( value ); } return this; }, _setOptionClasses: function( value ) { var classKey, elements, currentElements; for ( classKey in value ) { currentElements = this.classesElementLookup[ classKey ]; if ( value[ classKey ] === this.options.classes[ classKey ] || !currentElements || !currentElements.length ) { continue; } // We are doing this to create a new jQuery object because the _removeClass() call // on the next line is going to destroy the reference to the current elements being // tracked. We need to save a copy of this collection so that we can add the new classes // below. elements = $( currentElements.get() ); this._removeClass( currentElements, classKey ); // We don't use _addClass() here, because that uses this.options.classes // for generating the string of classes. We want to use the value passed in from // _setOption(), this is the new value of the classes option which was passed to // _setOption(). We pass this value directly to _classes(). elements.addClass( this._classes( { element: elements, keys: classKey, classes: value, add: true } ) ); } }, _setOptionDisabled: function( value ) { this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value ); // If the widget is becoming disabled, then nothing is interactive if ( value ) { this._removeClass( this.hoverable, null, "ui-state-hover" ); this._removeClass( this.focusable, null, "ui-state-focus" ); } }, enable: function() { return this._setOptions( { disabled: false } ); }, disable: function() { return this._setOptions( { disabled: true } ); }, _classes: function( options ) { var full = []; var that = this; options = $.extend( { element: this.element, classes: this.options.classes || {} }, options ); function processClassString( classes, checkOption ) { var current, i; for ( i = 0; i < classes.length; i++ ) { current = that.classesElementLookup[ classes[ i ] ] || $(); if ( options.add ) { current = $( $.unique( current.get().concat( options.element.get() ) ) ); } else { current = $( current.not( options.element ).get() ); } that.classesElementLookup[ classes[ i ] ] = current; full.push( classes[ i ] ); if ( checkOption && options.classes[ classes[ i ] ] ) { full.push( options.classes[ classes[ i ] ] ); } } } this._on( options.element, { "remove": "_untrackClassesElement" } ); if ( options.keys ) { processClassString( options.keys.match( /\S+/g ) || [], true ); } if ( options.extra ) { processClassString( options.extra.match( /\S+/g ) || [] ); } return full.join( " " ); }, _untrackClassesElement: function( event ) { var that = this; $.each( that.classesElementLookup, function( key, value ) { if ( $.inArray( event.target, value ) !== -1 ) { that.classesElementLookup[ key ] = $( value.not( event.target ).get() ); } } ); }, _removeClass: function( element, keys, extra ) { return this._toggleClass( element, keys, extra, false ); }, _addClass: function( element, keys, extra ) { return this._toggleClass( element, keys, extra, true ); }, _toggleClass: function( element, keys, extra, add ) { add = ( typeof add === "boolean" ) ? add : extra; var shift = ( typeof element === "string" || element === null ), options = { extra: shift ? keys : extra, keys: shift ? element : keys, element: shift ? this.element : element, add: add }; options.element.toggleClass( this._classes( options ), add ); return this; }, _on: function( suppressDisabledCheck, element, handlers ) { var delegateElement; var instance = this; // No suppressDisabledCheck flag, shuffle arguments if ( typeof suppressDisabledCheck !== "boolean" ) { handlers = element; element = suppressDisabledCheck; suppressDisabledCheck = false; } // No element argument, shuffle and use this.element if ( !handlers ) { handlers = element; element = this.element; delegateElement = this.widget(); } else { element = delegateElement = $( element ); this.bindings = this.bindings.add( element ); } $.each( handlers, function( event, handler ) { function handlerProxy() { // Allow widgets to customize the disabled handling // - disabled as an array instead of boolean // - disabled class as method for disabling individual parts if ( !suppressDisabledCheck && ( instance.options.disabled === true || $( this ).hasClass( "ui-state-disabled" ) ) ) { return; } return ( typeof handler === "string" ? instance[ handler ] : handler ) .apply( instance, arguments ); } // Copy the guid so direct unbinding works if ( typeof handler !== "string" ) { handlerProxy.guid = handler.guid = handler.guid || handlerProxy.guid || $.guid++; } var match = event.match( /^([\w:-]*)\s*(.*)$/ ); var eventName = match[ 1 ] + instance.eventNamespace; var selector = match[ 2 ]; if ( selector ) { delegateElement.on( eventName, selector, handlerProxy ); } else { element.on( eventName, handlerProxy ); } } ); }, _off: function( element, eventName ) { eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; element.off( eventName ).off( eventName ); // Clear the stack to avoid memory leaks (#10056) this.bindings = $( this.bindings.not( element ).get() ); this.focusable = $( this.focusable.not( element ).get() ); this.hoverable = $( this.hoverable.not( element ).get() ); }, _delay: function( handler, delay ) { function handlerProxy() { return ( typeof handler === "string" ? instance[ handler ] : handler ) .apply( instance, arguments ); } var instance = this; return setTimeout( handlerProxy, delay || 0 ); }, _hoverable: function( element ) { this.hoverable = this.hoverable.add( element ); this._on( element, { mouseenter: function( event ) { this._addClass( $( event.currentTarget ), null, "ui-state-hover" ); }, mouseleave: function( event ) { this._removeClass( $( event.currentTarget ), null, "ui-state-hover" ); } } ); }, _focusable: function( element ) { this.focusable = this.focusable.add( element ); this._on( element, { focusin: function( event ) { this._addClass( $( event.currentTarget ), null, "ui-state-focus" ); }, focusout: function( event ) { this._removeClass( $( event.currentTarget ), null, "ui-state-focus" ); } } ); }, _trigger: function( type, event, data ) { var prop, orig; var callback = this.options[ type ]; data = data || {}; event = $.Event( event ); event.type = ( type === this.widgetEventPrefix ? type : this.widgetEventPrefix + type ).toLowerCase(); // The original event may come from any element // so we need to reset the target on the new event event.target = this.element[ 0 ]; // Copy original event properties over to the new event orig = event.originalEvent; if ( orig ) { for ( prop in orig ) { if ( !( prop in event ) ) { event[ prop ] = orig[ prop ]; } } } this.element.trigger( event, data ); return !( $.isFunction( callback ) && callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false || event.isDefaultPrevented() ); } }; $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { if ( typeof options === "string" ) { options = { effect: options }; } var hasOptions; var effectName = !options ? method : options === true || typeof options === "number" ? defaultEffect : options.effect || defaultEffect; options = options || {}; if ( typeof options === "number" ) { options = { duration: options }; } hasOptions = !$.isEmptyObject( options ); options.complete = callback; if ( options.delay ) { element.delay( options.delay ); } if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { element[ method ]( options ); } else if ( effectName !== method && element[ effectName ] ) { element[ effectName ]( options.duration, options.easing, callback ); } else { element.queue( function( next ) { $( this )[ method ](); if ( callback ) { callback.call( element[ 0 ] ); } next(); } ); } }; } ); return $.widget; } ) ); /*! * jQuery UI Controlgroup 1.12.1 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license */ //>>label: Controlgroup //>>group: Widgets //>>description: Visually groups form control widgets //>>docs: http://api.jqueryui.com/controlgroup/ //>>demos: http://jqueryui.com/controlgroup/ //>>css.structure: ../../themes/base/core.css //>>css.structure: ../../themes/base/controlgroup.css //>>css.theme: ../../themes/base/theme.css ( function( factory ) { if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. define( [ "jquery", "../widget" ], factory ); } else { // Browser globals factory( jQuery ); } }( function( $ ) { var controlgroupCornerRegex = /ui-corner-([a-z]){2,6}/g; return $.widget( "ui.controlgroup", { version: "1.12.1", defaultElement: "<div>", options: { direction: "horizontal", disabled: null, onlyVisible: true, items: { "button": "input[type=button], input[type=submit], input[type=reset], button, a", "controlgroupLabel": ".ui-controlgroup-label", "checkboxradio": "input[type='checkbox'], input[type='radio']", "selectmenu": "select", "spinner": ".ui-spinner-input" } }, _create: function() { this._enhance(); }, // To support the enhanced option in jQuery Mobile, we isolate DOM manipulation _enhance: function() { this.element.attr( "role", "toolbar" ); this.refresh(); }, _destroy: function() { this._callChildMethod( "destroy" ); this.childWidgets.removeData( "ui-controlgroup-data" ); this.element.removeAttr( "role" ); if ( this.options.items.controlgroupLabel ) { this.element .find( this.options.items.controlgroupLabel ) .find( ".ui-controlgroup-label-contents" ) .contents().unwrap(); } }, _initWidgets: function() { var that = this, childWidgets = []; // First we iterate over each of the items options $.each( this.options.items, function( widget, selector ) { var labels; var options = {}; // Make sure the widget has a selector set if ( !selector ) { return; } if ( widget === "controlgroupLabel" ) { labels = that.element.find( selector ); labels.each( function() { var element = $( this ); if ( element.children( ".ui-controlgroup-label-contents" ).length ) { return; } element.contents() .wrapAll( "<span class='ui-controlgroup-label-contents'></span>" ); } ); that._addClass( labels, null, "ui-widget ui-widget-content ui-state-default" ); childWidgets = childWidgets.concat( labels.get() ); return; } // Make sure the widget actually exists if ( !$.fn[ widget ] ) { return; } // We assume everything is in the middle to start because we can't determine // first / last elements until all enhancments are done. if ( that[ "_" + widget + "Options" ] ) { options = that[ "_" + widget + "Options" ]( "middle" ); } else { options = { classes: {} }; } // Find instances of this widget inside controlgroup and init them that.element .find( selector ) .each( function() { var element = $( this ); var instance = element[ widget ]( "instance" ); // We need to clone the default options for this type of widget to avoid // polluting the variable options which has a wider scope than a single widget. var instanceOptions = $.widget.extend( {}, options ); // If the button is the child of a spinner ignore it // TODO: Find a more generic solution if ( widget === "button" && element.parent( ".ui-spinner" ).length ) { return; } // Create the widget if it doesn't exist if ( !instance ) { instance = element[ widget ]()[ widget ]( "instance" ); } if ( instance ) { instanceOptions.classes = that._resolveClassesValues( instanceOptions.classes, instance ); } element[ widget ]( instanceOptions ); // Store an instance of the controlgroup to be able to reference // from the outermost element for changing options and refresh var widgetElement = element[ widget ]( "widget" ); $.data( widgetElement[ 0 ], "ui-controlgroup-data", instance ? instance : element[ widget ]( "instance" ) ); childWidgets.push( widgetElement[ 0 ] ); } ); } ); this.childWidgets = $( $.unique( childWidgets ) ); this._addClass( this.childWidgets, "ui-controlgroup-item" ); }, _callChildMethod: function( method ) { this.childWidgets.each( function() { var element = $( this ), data = element.data( "ui-controlgroup-data" ); if ( data && data[ method ] ) { data[ method ](); } } ); }, _updateCornerClass: function( element, position ) { var remove = "ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"; var add = this._buildSimpleOptions( position, "label" ).classes.label; this._removeClass( element, null, remove ); this._addClass( element, null, add ); }, _buildSimpleOptions: function( position, key ) { var direction = this.options.direction === "vertical"; var result = { classes: {} }; result.classes[ key ] = { "middle": "", "first": "ui-corner-" + ( direction ? "top" : "left" ), "last": "ui-corner-" + ( direction ? "bottom" : "right" ), "only": "ui-corner-all" }[ position ]; return result; }, _spinnerOptions: function( position ) { var options = this._buildSimpleOptions( position, "ui-spinner" ); options.classes[ "ui-spinner-up" ] = ""; options.classes[ "ui-spinner-down" ] = ""; return options; }, _buttonOptions: function( position ) { return this._buildSimpleOptions( position, "ui-button" ); }, _checkboxradioOptions: function( position ) { return this._buildSimpleOptions( position, "ui-checkboxradio-label" ); }, _selectmenuOptions: function( position ) { var direction = this.options.direction === "vertical"; return { width: direction ? "auto" : false, classes: { middle: { "ui-selectmenu-button-open": "", "ui-selectmenu-button-closed": "" }, first: { "ui-selectmenu-button-open": "ui-corner-" + ( direction ? "top" : "tl" ), "ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "top" : "left" ) }, last: { "ui-selectmenu-button-open": direction ? "" : "ui-corner-tr", "ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "bottom" : "right" ) }, only: { "ui-selectmenu-button-open": "ui-corner-top", "ui-selectmenu-button-closed": "ui-corner-all" } }[ position ] }; }, _resolveClassesValues: function( classes, instance ) { var result = {}; $.each( classes, function( key ) { var current = instance.options.classes[ key ] || ""; current = $.trim( current.replace( controlgroupCornerRegex, "" ) ); result[ key ] = ( current + " " + classes[ key ] ).replace( /\s+/g, " " ); } ); return result; }, _setOption: function( key, value ) { if ( key === "direction" ) { this._removeClass( "ui-controlgroup-" + this.options.direction ); } this._super( key, value ); if ( key === "disabled" ) { this._callChildMethod( value ? "disable" : "enable" ); return; } this.refresh(); }, refresh: function() { var children, that = this; this._addClass( "ui-controlgroup ui-controlgroup-" + this.options.direction ); if ( this.options.direction === "horizontal" ) { this._addClass( null, "ui-helper-clearfix" ); } this._initWidgets(); children = this.childWidgets; // We filter here because we need to track all childWidgets not just the visible ones if ( this.options.onlyVisible ) { children = children.filter( ":visible" ); } if ( children.length ) { // We do this last because we need to make sure all enhancment is done // before determining first and last $.each( [ "first", "last" ], function( index, value ) { var instance = children[ value ]().data( "ui-controlgroup-data" ); if ( instance && that[ "_" + instance.widgetName + "Options" ] ) { var options = that[ "_" + instance.widgetName + "Options" ]( children.length === 1 ? "only" : value ); options.classes = that._resolveClassesValues( options.classes, instance ); instance.element[ instance.widgetName ]( options ); } else { that._updateCornerClass( children[ value ](), value ); } } ); // Finally call the refresh method on each of the child widgets. this._callChildMethod( "refresh" ); } } } ); } ) );
malahinisolutions/verify
public/assets/jquery-ui/widgets/controlgroup-f525e8d53867db2d7a4e30c79b5d800b.js
JavaScript
mit
28,612
<?php /** * TOP API: taobao.xhotel.rate.add request * * @author auto create * @since 1.0, 2013-12-10 16:57:25 */ class XhotelRateAddRequest { /** * 额外服务-是否可以加床,1:不可以,2:可以 **/ private $addBed; /** * 额外服务-加床价格 **/ private $addBedPrice; /** * 币种(仅支持CNY) **/ private $currencyCode; /** * gid酒店商品id **/ private $gid; /** * 价格和库存信息。 A:use_room_inventory:是否使用room级别共享库存,可选值 true false 1、true时:使用room级别共享库存(即使用gid对应的XRoom中的inventory),rate_quota_map 的json 数据中不需要录入库存信息,录入的库存信息会忽略 2、false时:使用rate级别私有库存,此时要求价格和库存必填。 B:date 日期必须为 T---T+90 日内的日期(T为当天),且不能重复 C:price 价格 int类型 取值范围1-99999999 单位为分 D:quota 库存 int 类型 取值范围 0-999(数量库存) 60000(状态库存关) 61000(状态库存开) **/ private $inventoryPrice; /** * 名称 **/ private $name; /** * 酒店RPID **/ private $rpid; /** * 实价有房标签(RP支付类型为全额支付) **/ private $shijiaTag; private $apiParas = array(); public function setAddBed($addBed) { $this->addBed = $addBed; $this->apiParas["add_bed"] = $addBed; } public function getAddBed() { return $this->addBed; } public function setAddBedPrice($addBedPrice) { $this->addBedPrice = $addBedPrice; $this->apiParas["add_bed_price"] = $addBedPrice; } public function getAddBedPrice() { return $this->addBedPrice; } public function setCurrencyCode($currencyCode) { $this->currencyCode = $currencyCode; $this->apiParas["currency_code"] = $currencyCode; } public function getCurrencyCode() { return $this->currencyCode; } public function setGid($gid) { $this->gid = $gid; $this->apiParas["gid"] = $gid; } public function getGid() { return $this->gid; } public function setInventoryPrice($inventoryPrice) { $this->inventoryPrice = $inventoryPrice; $this->apiParas["inventory_price"] = $inventoryPrice; } public function getInventoryPrice() { return $this->inventoryPrice; } public function setName($name) { $this->name = $name; $this->apiParas["name"] = $name; } public function getName() { return $this->name; } public function setRpid($rpid) { $this->rpid = $rpid; $this->apiParas["rpid"] = $rpid; } public function getRpid() { return $this->rpid; } public function setShijiaTag($shijiaTag) { $this->shijiaTag = $shijiaTag; $this->apiParas["shijia_tag"] = $shijiaTag; } public function getShijiaTag() { return $this->shijiaTag; } public function getApiMethodName() { return "taobao.xhotel.rate.add"; } public function getApiParas() { return $this->apiParas; } public function check() { RequestCheckUtil::checkMaxValue($this->addBed,2,"addBed"); RequestCheckUtil::checkMinValue($this->addBed,1,"addBed"); RequestCheckUtil::checkNotNull($this->gid,"gid"); RequestCheckUtil::checkNotNull($this->inventoryPrice,"inventoryPrice"); RequestCheckUtil::checkMaxLength($this->name,60,"name"); RequestCheckUtil::checkNotNull($this->rpid,"rpid"); } public function putOtherTextParam($key, $value) { $this->apiParas[$key] = $value; $this->$key = $value; } }
allengaller/mazi-cms
web/doc/Resources/open/taobao/taobao-sdk-PHP-online_standard-20131210/top/request/XhotelRateAddRequest.php
PHP
mit
3,443
import java.util.Iterator; import java.util.NoSuchElementException; @SuppressWarnings("unchecked") public class RandomizedQueue<Item> implements Iterable<Item> { private Item[] _arr; private int _length = 0; private void resize(int newLength) { if (newLength > _arr.length) newLength = 2 * _arr.length; else if (newLength < _arr.length / 4) newLength = _arr.length / 2; else return; Item[] newArr = (Item[])(new Object[newLength]); for (int i = 0; i < _length; ++i) { newArr[i] = _arr[i]; } _arr = newArr; } public RandomizedQueue() { _arr = (Item[])(new Object[1]); } public boolean isEmpty() { return _length == 0; } public int size() { return _length; } public void enqueue(Item item) { if (item == null) throw new NullPointerException(); resize(_length + 1); _arr[_length] = item; ++_length; } public Item dequeue() { if (_length == 0) throw new NoSuchElementException(); int idx = StdRandom.uniform(_length); Item ret = _arr[idx]; _arr[idx] = _arr[_length - 1]; _arr[_length - 1] = null; --_length; resize(_length); return ret; } public Item sample() { if (_length == 0) throw new NoSuchElementException(); return _arr[StdRandom.uniform(_length)]; } private class RandomizedQueueIterator implements Iterator<Item> { Item[] _state; int _current = 0; public RandomizedQueueIterator() { _state = (Item[])(new Object[_length]); for (int i = 0; i < _length; ++i) { _state[i] = _arr[i]; } StdRandom.shuffle(_state); } public boolean hasNext() { return _current != _state.length; } public Item next() { if (!hasNext()) throw new NoSuchElementException(); return _state[_current++]; } public void remove() { throw new UnsupportedOperationException(); } } public Iterator<Item> iterator() { return new RandomizedQueueIterator(); } public static void main(String[] args) { RandomizedQueue<Integer> queue = new RandomizedQueue<Integer>(); for (int i = 0; i < 10; ++i) { queue.enqueue(i); } for (int e: queue) { StdOut.println(e); } } }
hghwng/mooc-algs1
2/RandomizedQueue.java
Java
mit
2,505
// //#include "Mesure.h" // //Mesure *m; // //void setup() //{ // //} // //void loop() //{ // m = new Mesure(13,20,4,4); // m->addNote(Note_E,4,NOIR); // m->addNote(Note_E,4,NOIR); // m->addNote(Note_E,4,NOIR); // m->addNote(Note_C,4,NOIR); // m->play(); // // m = new Mesure(13,20,4,4); // m->addNote(Note_E,4,NOIR); // m->addNote(Note_G,4,NOIR); // m->addNote(Note_G,3,NOIR); // m->addNote(Note_C,4,NOIR); // m->play(); // // m = new Mesure(13,20,4,4); // m->addNote(Note_G,3,NOIR); // m->addNote(Note_E,3,NOIR); // m->addNote(Note_G,3,NOIR); // m->addNote(Note_A,3,NOIR); // m->play(); // // m = new Mesure(13,20,4,4); // m->addNote(Note_Gd,3,NOIR); // m->addNote(Note_Gd,3,NOIR); // m->addNote(Note_E,4,NOIR); // m->addNote(Note_G,4,NOIR); // m->play(); // // m = new Mesure(13,20,4,4); // m->addNote(Note_A,4,NOIR); // m->addNote(Note_F,4,NOIR); // m->addNote(Note_G,4,NOIR); // m->addNote(Note_E,4,NOIR); // m->play(); // // m = new Mesure(13,20,4,4); // m->addNote(Note_C,4,NOIR); // m->addNote(Note_D,4,NOIR); // m->addNote(Note_B,3,NOIR); // m->addNote(Note_C,4,NOIR); // m->play(); // // m = new Mesure(13,20,4,4); // m->addNote(Note_G,3,NOIR); // m->addNote(Note_E,3,NOIR); // m->addNote(Note_G,3,NOIR); // m->addNote(Note_A,3,NOIR); // m->play(); // // m = new Mesure(13,20,4,4); // m->addNote(Note_Gd,3,NOIR); // m->addNote(Note_Gd,3,NOIR); // m->addNote(Note_E,4,NOIR); // m->addNote(Note_G,4,NOIR); // m->play(); // // delay(5000); //}
alexgus/libAudio
Mesure_test.cpp
C++
mit
1,521
using System; using System.Collections.Generic; using System.Linq; using System.Security.Claims; using System.Threading.Tasks; using Microsoft.AspNet.Identity; using Microsoft.AspNet.Identity.EntityFramework; using Microsoft.AspNet.Identity.Owin; using Microsoft.Owin.Security; using Microsoft.Owin.Security.Cookies; using Microsoft.Owin.Security.OAuth; using SearchCrawlerHelper.Sample.Models; namespace SearchCrawlerHelper.Sample.Providers { public class ApplicationOAuthProvider : OAuthAuthorizationServerProvider { private readonly string _publicClientId; public ApplicationOAuthProvider(string publicClientId) { if (publicClientId == null) { throw new ArgumentNullException("publicClientId"); } _publicClientId = publicClientId; } public override async Task GrantResourceOwnerCredentials(OAuthGrantResourceOwnerCredentialsContext context) { var userManager = context.OwinContext.GetUserManager<ApplicationUserManager>(); ApplicationUser user = await userManager.FindAsync(context.UserName, context.Password); //TODO: move this func into userManager if (user == null) { user = await userManager.FindByEmailAsync(context.UserName); if(user != null) { user = await userManager.FindAsync(user.UserName, context.Password); } } if (user == null) { context.SetError("invalid_grant", "The user name or password is incorrect."); return; } ClaimsIdentity oAuthIdentity = await user.GenerateUserIdentityAsync(userManager, OAuthDefaults.AuthenticationType); ClaimsIdentity cookiesIdentity = await user.GenerateUserIdentityAsync(userManager, CookieAuthenticationDefaults.AuthenticationType); AuthenticationProperties properties = CreateProperties(oAuthIdentity); AuthenticationTicket ticket = new AuthenticationTicket(oAuthIdentity, properties); context.Validated(ticket); context.Request.Context.Authentication.SignIn(cookiesIdentity); } public override Task TokenEndpoint(OAuthTokenEndpointContext context) { foreach (KeyValuePair<string, string> property in context.Properties.Dictionary) { context.AdditionalResponseParameters.Add(property.Key, property.Value); } return Task.FromResult<object>(null); } public override Task ValidateClientAuthentication(OAuthValidateClientAuthenticationContext context) { // Resource owner password credentials does not provide a client ID. if (context.ClientId == null) { context.Validated(); } return Task.FromResult<object>(null); } public override Task ValidateClientRedirectUri(OAuthValidateClientRedirectUriContext context) { if (context.ClientId == _publicClientId) { Uri expectedRootUri = new Uri(context.Request.Uri, "/"); Uri redirectUri = new Uri(context.RedirectUri); if (expectedRootUri.Authority == redirectUri.Authority) { context.Validated(); } } return Task.FromResult<object>(null); } public static AuthenticationProperties CreateProperties(ClaimsIdentity identity) { var roleClaimValues = ((ClaimsIdentity)identity).FindAll(ClaimTypes.Role).Select(c => c.Value); var roles = string.Join(",", roleClaimValues); IDictionary<string, string> data = new Dictionary<string, string> { { "userName", ((ClaimsIdentity) identity).FindFirstValue(ClaimTypes.Name) }, { "userRoles", roles } }; return new AuthenticationProperties(data); } } }
Useful-Software-Solutions-Ltd/PhantomRunnerAndSearchCrawlerHelper
SearchCrawlerHelper.Sample/Providers/ApplicationOAuthProvider.cs
C#
mit
4,146
import * as types from '@/store/mutation-types'; export default { namespaced: true, state: { type: 0, catId: 0 }, getters: { [types.STATE_INFO]: state => { return state.type + 3; } } }
Tiny-Fendy/web-express
public/store/modules/m2/m3/index.js
JavaScript
mit
204
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Microsoft.Dx.Wopi.Models { public class WopiHostCapabilities : IWopiHostCapabilities { public bool SupportsCobalt { get; set; } public bool SupportsContainers { get; set; } public bool SupportsDeleteFile { get; set; } public bool SupportsEcosystem { get; set; } public bool SupportsExtendedLockLength { get; set; } public bool SupportsFolders { get; set; } public bool SupportsGetLock { get; set; } public bool SupportsLocks { get; set; } public bool SupportsRename { get; set; } public bool SupportsUpdate { get; set; } public bool SupportsUserInfo { get; set; } internal WopiHostCapabilities() { } internal WopiHostCapabilities Clone() { return (WopiHostCapabilities)this.MemberwiseClone(); } } }
apulliam/WOPIFramework
Microsoft.Dx.Wopi/Models/WopiHostCapabilities.cs
C#
mit
991
package com.company; import java.util.Scanner; public class TrainingHallEquipment { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); double budget = Double.parseDouble(scanner.nextLine()); int numberOfItems = Integer.parseInt(scanner.nextLine()); double subTotal = 0; for (int i = 1; i <= numberOfItems ; i++) { String itemName = scanner.nextLine(); double itemPrice = Double.parseDouble(scanner.nextLine()); int itemCount = Integer.parseInt(scanner.nextLine()); if (itemCount == 1) { System.out.printf("Adding %d %s to cart.%n", itemCount, itemName); } else { System.out.printf("Adding %d %ss to cart.%n", itemCount, itemName); } subTotal += itemCount * itemPrice; } System.out.printf("Subtotal: $%.2f %n", subTotal); if (subTotal <= budget) { System.out.printf("Money left: $%.2f", (budget - subTotal)); } else { System.out.printf("Not enough. We need $%.2f more.", (subTotal - budget)); } } }
ivelin1936/Studing-SoftUni-
Programming Fundamentals/Basics-MoreExercises/src/com/company/TrainingHallEquipment.java
Java
mit
1,209
document.observe('click', function(e, el) { if (el = e.findElement('form a.add_nested_fields')) { // Setup var assoc = el.readAttribute('data-association'); // Name of child var target = el.readAttribute('data-target'); var blueprint = $(el.readAttribute('data-blueprint-id')); var content = blueprint.readAttribute('data-blueprint'); // Fields template // Make the context correct by replacing <parents> with the generated ID // of each of the parent objects var context = (el.getOffsetParent('.fields').firstDescendant().readAttribute('name') || '').replace(/\[[a-z_]+\]$/, ''); // If the parent has no inputs we need to strip off the last pair var current = content.match(new RegExp('\\[([a-z_]+)\\]\\[new_' + assoc + '\\]')); if (current) { context = context.replace(new RegExp('\\[' + current[1] + '\\]\\[(new_)?\\d+\\]$'), ''); } // context will be something like this for a brand new form: // project[tasks_attributes][1255929127459][assignments_attributes][1255929128105] // or for an edit form: // project[tasks_attributes][0][assignments_attributes][1] if(context) { var parent_names = context.match(/[a-z_]+_attributes(?=\]\[(new_)?\d+\])/g) || []; var parent_ids = context.match(/[0-9]+/g) || []; for(i = 0; i < parent_names.length; i++) { if(parent_ids[i]) { content = content.replace( new RegExp('(_' + parent_names[i] + ')_.+?_', 'g'), '$1_' + parent_ids[i] + '_'); content = content.replace( new RegExp('(\\[' + parent_names[i] + '\\])\\[.+?\\]', 'g'), '$1[' + parent_ids[i] + ']'); } } } // Make a unique ID for the new child var regexp = new RegExp('new_' + assoc, 'g'); var new_id = new Date().getTime(); content = content.replace(regexp, new_id); var field; if (target) { field = $$(target)[0].insert(content); } else { field = el.insert({ before: content }); } field.fire('nested:fieldAdded', {field: field, association: assoc}); field.fire('nested:fieldAdded:' + assoc, {field: field, association: assoc}); return false; } }); document.observe('click', function(e, el) { if (el = e.findElement('form a.remove_nested_fields')) { var hidden_field = el.previous(0), assoc = el.readAttribute('data-association'); // Name of child to be removed if(hidden_field) { hidden_field.value = '1'; } var field = el.up('.fields').hide(); field.fire('nested:fieldRemoved', {field: field, association: assoc}); field.fire('nested:fieldRemoved:' + assoc, {field: field, association: assoc}); return false; } });
Stellenticket/nested_form
vendor/assets/javascripts/prototype_nested_form.js
JavaScript
mit
2,739