repo_name
stringlengths
4
116
path
stringlengths
4
379
size
stringlengths
1
7
content
stringlengths
3
1.05M
license
stringclasses
15 values
kokimoribe/todo-api
alembic/versions/c1b883dbfff4_add_boards_table.py
1672
"""add boards table Revision ID: c1b883dbfff4 Revises: b764aaedf10d Create Date: 2017-10-30 19:37:00.544958 """ # pylint: skip-file from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'c1b883dbfff4' down_revision = 'b764aaedf10d' branch_labels = None depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table('boards', sa.Column('id', sa.Integer(), nullable=False), sa.Column('name', sa.String(), nullable=False), sa.Column('task_number', sa.Integer(), nullable=False), sa.Column( 'created_at', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=False), sa.Column( 'updated_at', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=False), sa.PrimaryKeyConstraint('id', name=op.f('pk_boards'))) op.add_column('tasks', sa.Column('board_id', sa.Integer(), nullable=True)) op.create_foreign_key( op.f('fk_tasks_board_id_boards'), 'tasks', 'boards', ['board_id'], ['id']) # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.drop_constraint( op.f('fk_tasks_board_id_boards'), 'tasks', type_='foreignkey') op.drop_column('tasks', 'board_id') op.drop_table('boards') # ### end Alembic commands ###
mit
tadeucruz/spring-oauth2-jwt
authorizationServer/src/main/java/com/tadeucruz/springoauth2jwt/repository/UserRolesRepository.java
560
package com.tadeucruz.springoauth2jwt.repository; import com.tadeucruz.springoauth2jwt.model.UserRole; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.CrudRepository; import org.springframework.stereotype.Repository; import java.util.List; @Repository public interface UserRolesRepository extends CrudRepository<UserRole, String> { @Query("select userrole.role from UserRole userrole, User user where user.userName=?1 and userrole.userId=user.id") List<String> findRoleByUserName(String username); }
mit
VikkySuresh/bookingInfoApp
protractor.config.js
5440
// FIRST TIME ONLY- run: // ./node_modules/.bin/webdriver-manager update // // Try: `npm run webdriver:update` // // AND THEN EVERYTIME ... // 1. Compile with `tsc` // 2. Make sure the test server (e.g., http-server: localhost:8080) is running. // 3. ./node_modules/.bin/protractor protractor.config.js // // To do all steps, try: `npm run e2e` var fs = require('fs'); var path = require('canonical-path'); var _ = require('lodash'); exports.config = { directConnect: true, // Capabilities to be passed to the webdriver instance. capabilities: { 'browserName': 'chrome' }, // Framework to use. Jasmine is recommended. framework: 'jasmine', // Spec patterns are relative to this config file specs: ['e2e/app.e2e-spec.js' ], // For angular tests useAllAngular2AppRoots: true, // Base URL for application server baseUrl: 'http://localhost:8080', // doesn't seem to work. // resultJsonOutputFile: "foo.json", onPrepare: function() { //// SpecReporter //var SpecReporter = require('jasmine-spec-reporter'); //jasmine.getEnv().addReporter(new SpecReporter({displayStacktrace: 'none'})); //// jasmine.getEnv().addReporter(new SpecReporter({displayStacktrace: 'all'})); // debugging // console.log('browser.params:' + JSON.stringify(browser.params)); jasmine.getEnv().addReporter(new Reporter( browser.params )) ; global.sendKeys = sendKeys; // Allow changing bootstrap mode to NG1 for upgrade tests global.setProtractorToNg1Mode = function() { browser.useAllAngular2AppRoots = false; browser.rootEl = 'body'; }; }, jasmineNodeOpts: { // defaultTimeoutInterval: 60000, defaultTimeoutInterval: 180000, showTiming: true, print: function() {} } }; // Hack - because of bug with protractor send keys function sendKeys(element, str) { return str.split('').reduce(function (promise, char) { return promise.then(function () { return element.sendKeys(char); }); }, element.getAttribute('value')); // better to create a resolved promise here but ... don't know how with protractor; } // Custom reporter function Reporter(options) { var _defaultOutputFile = path.resolve(process.cwd(), './_test-output', 'protractor-results.txt'); options.outputFile = options.outputFile || _defaultOutputFile; initOutputFile(options.outputFile); options.appDir = options.appDir || './'; var _root = { appDir: options.appDir, suites: [] }; log('AppDir: ' + options.appDir, +1); var _currentSuite; this.suiteStarted = function(suite) { _currentSuite = { description: suite.description, status: null, specs: [] }; _root.suites.push(_currentSuite); log('Suite: ' + suite.description, +1); }; this.suiteDone = function(suite) { var statuses = _currentSuite.specs.map(function(spec) { return spec.status; }); statuses = _.uniq(statuses); var status = statuses.indexOf('failed') >= 0 ? 'failed' : statuses.join(', '); _currentSuite.status = status; log('Suite ' + _currentSuite.status + ': ' + suite.description, -1); }; this.specStarted = function(spec) { }; this.specDone = function(spec) { var currentSpec = { description: spec.description, status: spec.status }; if (spec.failedExpectations.length > 0) { currentSpec.failedExpectations = spec.failedExpectations; } _currentSuite.specs.push(currentSpec); log(spec.status + ' - ' + spec.description); }; this.jasmineDone = function() { outputFile = options.outputFile; //// Alternate approach - just stringify the _root - not as pretty //// but might be more useful for automation. // var output = JSON.stringify(_root, null, 2); var output = formatOutput(_root); fs.appendFileSync(outputFile, output); }; function ensureDirectoryExistence(filePath) { var dirname = path.dirname(filePath); if (directoryExists(dirname)) { return true; } ensureDirectoryExistence(dirname); fs.mkdirSync(dirname); } function directoryExists(path) { try { return fs.statSync(path).isDirectory(); } catch (err) { return false; } } function initOutputFile(outputFile) { ensureDirectoryExistence(outputFile); var header = "Protractor results for: " + (new Date()).toLocaleString() + "\n\n"; fs.writeFileSync(outputFile, header); } // for output file output function formatOutput(output) { var indent = ' '; var pad = ' '; var results = []; results.push('AppDir:' + output.appDir); output.suites.forEach(function(suite) { results.push(pad + 'Suite: ' + suite.description + ' -- ' + suite.status); pad+=indent; suite.specs.forEach(function(spec) { results.push(pad + spec.status + ' - ' + spec.description); if (spec.failedExpectations) { pad+=indent; spec.failedExpectations.forEach(function (fe) { results.push(pad + 'message: ' + fe.message); }); pad=pad.substr(2); } }); pad = pad.substr(2); results.push(''); }); results.push(''); return results.join('\n'); } // for console output var _pad; function log(str, indent) { _pad = _pad || ''; if (indent == -1) { _pad = _pad.substr(2); } console.log(_pad + str); if (indent == 1) { _pad = _pad + ' '; } } }
mit
MarijnKoesen/filesytemUtils
setPhotoExifDate.php
3067
<? /** * This program will update the exif 'DateTaken' of the image files. * * The files are sorted by filename, and the first image is given the specified timestring. * All subsequent images are given timestring+i so that the images can be properly ordered on the exif DateTaken field. * * Usage: php setPhotoExifDateFromFilename.php <timestring> <files> [..] * * @author Marijn Koesen */ error_reporting(E_ALL); function sortFileNames($name1, $name2) { // Get data to compare $path1 = basename($name1); $path2 = basename($name2); // Extract image numbers (image1.jpg -> 1, image30_2 -> 30) $imageNumber1 = 0; $imageNumber2 = 0; if (preg_match('|([0-9]+)|', $path1, $match1)) { $imageNumber1 = (int)$match1[1]; } if (preg_match('|([0-9]+)|', $path2, $match2)) { $imageNumber2 = (int)$match2[1]; } echo $path1 . " ($imageNumber1) <> " . $path2 . " ($imageNumber2)\n"; // Compare the numbers if ($imageNumber1 < $imageNumber2) { return -1; } else if ($imageNumber1 == $imageNumber2) { return 0; } else { return 1; } } function usage($message = '') { global $argv; if ($message != '') echo $message; echo "This program will update the exif 'DateTaken' of the image files.\n\n"; echo "The files are sorted by filename, and the first image is given the specified timestring.\n"; echo "All subsequent images are given timestring+i so that the images can be properly ordered on the exif DateTaken field.\n\n"; echo "Usage: php {$argv[0]} <timestring> <files> [..]\n"; exit; } if (count($argv) < 3 || strtotime($argv[1]) < 1) { if (isset($argv[1]) && strtotime($argv[1]) < 1) { usage("Error: timestamp / timestring is invalid. Use valid php's strtotime() format.\n\n"); } else { usage(); } } else { // Extract all jpg images from the arguments $files = array(); // If we got a directory in the params, load the files in that dir foreach($argv as $param) { if (is_dir($param)) { $dirFiles = scandir($param); foreach($dirFiles as $file) { $argv[] = $param . '/' . $file; } } } // Check the collected files (from argv and parsed directoryes) and extract all jpgs foreach($argv as $image) { if (preg_match("|\.jpg$|i", trim($image))) { $files[] = trim($image); } } // Sort the images usort($files, "sortFileNames"); echo "Updating " . count($files) . " files..\n"; // Now update their exif data and last modified time $time = strtotime($argv[1]); foreach($files as $file) { $file = addslashes($file); $dateString = date("Y-m-d H:i:s", $time); echo " - " . $file . " = " . $dateString . "\n"; echo shell_exec("exiv2 -M'add Exif.Photo.DateTimeOriginal Ascii " . $dateString . "' '" . $file . "'"); touch($file, $time); $time += 60; // +1 minute } echo "\nDone.\n"; }
mit
swiftcore-lib/php-jose
examples/index.php
125
<?php phpinfo(); // Sample Example 1 function readme() { echo 'This is README!'; } // Sample Example 2 class A { }
mit
johnttan/spicybattle
server/app.js
712
/** * Main application file */ 'use strict'; // Set default node environment to development process.env.NODE_ENV = process.env.NODE_ENV || 'development'; var express = require('express'); var mongoose = require('mongoose'); var config = require('./config/environment'); // Connect to database mongoose.connect(config.mongo.uri, config.mongo.options); // Setup server var app = express(); var server = require('http').createServer(app); require('./config/express')(app); require('./routes')(app); // Start server server.listen(config.port, config.ip, function () { console.log('Express server listening on %d, in %s mode', config.port, app.get('env')); }); // Expose app exports = module.exports = app;
mit
zhangqiang110/my4j
pms/src/test/java/file/FileCheck.java
2127
package file; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import org.apache.commons.io.FileUtils; import org.apache.commons.io.LineIterator; /** * 8个日志文件,1000个apv单号,需要在日志文件中找到这些单号的记录,打印出所在文件的行数 * * @author John * */ public class FileCheck { private static ExecutorService service = Executors.newFixedThreadPool(8); @SuppressWarnings("unchecked") public static void main(String[] args) { String filepath = "C:/1.txt"; String checkedFilepath = "C:/logs"; try { final List<String> lines = FileUtils.readLines(new File(filepath)); List<File> files = new ArrayList<File>(); listAllFiles(new File(checkedFilepath), files); for (final File file : files) { service.execute(new Runnable() { @Override public void run() { long start = System.currentTimeMillis(); // LineIterator lineIte = null; // try { // // 一行行的读入内存,避免一次性全部读入导致的内存溢出 // lineIte = FileUtils.lineIterator(file); // while (lineIte.hasNext()) { // String log = (String) lineIte.nextLine(); // for (int i = 0; i < lines.size(); i++) { // if (log.contains(lines.get(i))) { // System.err.println(file.getName() + " : " + i); // } // } // } // } catch (IOException e) { // e.printStackTrace(); // } finally { // LineIterator.closeQuietly(lineIte); // } System.out.println(file.getPath() + "检查完成, 耗时:" + (System.currentTimeMillis() - start)); } }); } } catch (IOException e) { e.printStackTrace(); } service.shutdown(); } private static void listAllFiles(File file, List<File> files) { if (file.isDirectory()) { for (File subFile : file.listFiles()) { listAllFiles(subFile, files); } } else { files.add(file); } } }
mit
beefyhalo/particles
particles/physics/twoD/tasks/FollowMouse.js
381
define('particles/physics/twoD/tasks/FollowMouse', ['particles/physics/core/tasks/Task'], function (Task) { function FollowMouse (camera) { this.camera = camera; }; $.extend(FollowMouse.prototype, Task.prototype, { update: function (manager, time) { manager.x = this.camera.mouseX; manager.y = this.camera.mouseY; } }); return FollowMouse; });
mit
cmccullough2/cmv-wab-widgets
cmv/js/gis/dijit/LayerControl/controls/Image.js
529
/* ConfigurableMapViewerCMV * version 2.0.0-beta.1 * Project: http://cmv.io/ */ define(["dojo/_base/declare","dijit/_WidgetBase","dijit/_TemplatedMixin","dijit/_Contained","./_Control","./../plugins/legendUtil"],function(a,b,c,d,e,f){var g=a([b,c,d,e],{_layerType:"overlay",_esriLayerType:"image",_layerTypeInit:function(){f.isLegend(this.controlOptions.noLegend,this.controller.noLegend)?(this._expandClick(),f.layerLegend(this.layer,this.expandNode)):this._expandRemove()}});return g}); //# sourceMappingURL=Image.js.map
mit
Yin-Yang/yin-yang-core
src/reflection.js
4079
/** * Reflection * @module Reflection */ import { each, map } from './iterate'; import { isArray, isValue, isStructure } from './check'; /** * Instantiate class by constructor and arguments * * @param {Function} Constructor * @param {Array} args * @returns {Object} */ export function create(Constructor, args) { Constructor = Function.prototype.bind.apply(Constructor, [null, ...args]); return new Constructor(); } /** * Returns class factory * * @param {Function} Constructor * @returns {Function} */ export function factory(Constructor) { return (...args) => create(Constructor, args); } /** * Define value in object */ export function defineValue(object, property, value) { return Object.defineProperty(object, property, { writable: true, enumerable: false, configurable: false, value }); } /** * Define getter in object */ export function defineGetter(object, property, getter) { return Object.defineProperty(object, property, { enumerable: false, configurable: false, get: getter }); } /** * Define setter in object */ export function defineSetter(object, property, setter) { return Object.defineProperty(object, property, { enumerable: false, configurable: false, set: setter }); } /** * Define getter and setter in object */ export function defineGetterSetter(object, property, getter, setter) { return Object.defineProperty(object, property, { enumerable: false, configurable: false, get: getter, set: setter }); } function _walk(target, parentPath, walker, skipStack) { skipStack.push(target); each(target, (value, key) => { if (!~skipStack.indexOf(value)) { const path = [...parentPath, key]; const isBranch = isStructure(value); if (isBranch) { _walk(value, path, walker, skipStack); } walker(value, key, target, path, isBranch); } }); } /** * Walk by target properties * * @param {Object} target * @param {Function} walker */ export function walk(target, walker) { if (!isStructure(target)) { throw new TypeError('Cannot convert target to object'); } _walk(target, [], walker, []); return target; } function _merge(target, source, skipStack) { skipStack.push(source); each(source, (value, key) => { if (!~skipStack.indexOf(value)) { if (isStructure(target[key]) && isStructure(value)) { _merge(target[key], value, skipStack); } else { target[key] = value; } } }); return target; } /** * Merge a few sources properties to the target * * @param {Object|Array} target * @param {...Object|...Array} [args] * @returns {Object|Array} */ export function merge(target, ...args) { if (!isValue(target)) { throw new TypeError('Cannot convert target to object'); } args.filter(isStructure).forEach(source => _merge(target, source, [])); return target; } /** * Clone target * * @param {Object|Array} source * @returns {Object|Array} */ export function clone(source) { if (isStructure(source)) { return _merge(isArray(source) ? [] : {}, source, []); } return source; } /** * Freeze target * * @param {Object|Array} target * @returns {Object|Array} */ export function freeze(target) { return Object.freeze(walk(target, value => isValue(value) && Object.freeze(value))); } /** * Prevent extension target * * @param {Object|Array} target * @returns {Object|Array} */ export function preventExtensions(target) { return Object.preventExtensions(walk(target, value => isValue(value) && Object.preventExtensions(value))); } function _proxyHandler(handler, path) { return map(handler, callback => callback.bind(handler, path)); } /** * Prevent extension target * * @param {Object|Array} target * @param {Object} handler * @returns {Object|Array} */ export function proxy(target, handler) { walk(target, (value, key, target, path) => { if (isStructure(value)) { target[key] = new Proxy(value, _proxyHandler(handler, path)); } }); return new Proxy(target, _proxyHandler(handler, [])); }
mit
ZLima12/osu
osu.Game/Screens/Ranking/Pages/ScoreResultsPage.cs
15959
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using System.Collections.Generic; using System.Linq; using osu.Framework.Allocation; using osu.Framework.Extensions; using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Colour; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Textures; using osu.Framework.Localisation; using osu.Game.Beatmaps; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osu.Game.Graphics.UserInterface; using osu.Game.Online.Leaderboards; using osu.Game.Rulesets.Scoring; using osu.Game.Scoring; using osu.Game.Screens.Play; using osu.Game.Users; using osuTK; using osuTK.Graphics; namespace osu.Game.Screens.Ranking.Pages { public class ScoreResultsPage : ResultsPage { private Container scoreContainer; private ScoreCounter scoreCounter; private readonly ScoreInfo score; public ScoreResultsPage(ScoreInfo score, WorkingBeatmap beatmap) : base(score, beatmap) { this.score = score; } private FillFlowContainer<DrawableScoreStatistic> statisticsContainer; [BackgroundDependencyLoader] private void load(OsuColour colours) { const float user_header_height = 120; Children = new Drawable[] { new Container { RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { Top = user_header_height }, Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = Color4.White, }, } }, new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Direction = FillDirection.Vertical, Children = new Drawable[] { new UserHeader(Score.User) { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, RelativeSizeAxes = Axes.X, Height = user_header_height, }, new UpdateableRank(Score.Rank) { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Size = new Vector2(150, 60), Margin = new MarginPadding(20), }, scoreContainer = new Container { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, RelativeSizeAxes = Axes.X, Height = 60, Children = new Drawable[] { new SongProgressGraph { RelativeSizeAxes = Axes.Both, Alpha = 0.5f, Objects = Beatmap.Beatmap.HitObjects, }, scoreCounter = new SlowScoreCounter(6) { Anchor = Anchor.Centre, Origin = Anchor.Centre, Colour = colours.PinkDarker, Y = 10, TextSize = 56, }, } }, new OsuSpriteText { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Colour = colours.PinkDarker, Shadow = false, Font = OsuFont.GetFont(weight: FontWeight.Bold), Text = "total score", Margin = new MarginPadding { Bottom = 15 }, }, new BeatmapDetails(Beatmap.BeatmapInfo) { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Margin = new MarginPadding { Bottom = 10 }, }, new DateTimeDisplay(Score.Date.LocalDateTime) { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, }, new Container { RelativeSizeAxes = Axes.X, Size = new Vector2(0.75f, 1), Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Margin = new MarginPadding { Top = 10, Bottom = 10 }, Children = new Drawable[] { new Box { Colour = ColourInfo.GradientHorizontal( colours.GrayC.Opacity(0), colours.GrayC.Opacity(0.9f)), RelativeSizeAxes = Axes.Both, Size = new Vector2(0.5f, 1), }, new Box { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, Colour = ColourInfo.GradientHorizontal( colours.GrayC.Opacity(0.9f), colours.GrayC.Opacity(0)), RelativeSizeAxes = Axes.Both, Size = new Vector2(0.5f, 1), }, } }, statisticsContainer = new FillFlowContainer<DrawableScoreStatistic> { AutoSizeAxes = Axes.Both, Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Direction = FillDirection.Horizontal, LayoutDuration = 200, LayoutEasing = Easing.OutQuint }, }, }, new ReplayDownloadButton(score) { Anchor = Anchor.BottomCentre, Origin = Anchor.BottomCentre, Margin = new MarginPadding { Bottom = 10 }, Size = new Vector2(50, 30), }, }; statisticsContainer.ChildrenEnumerable = Score.Statistics.OrderByDescending(p => p.Key).Select(s => new DrawableScoreStatistic(s)); } protected override void LoadComplete() { base.LoadComplete(); Schedule(() => { scoreCounter.Increment(Score.TotalScore); int delay = 0; foreach (var s in statisticsContainer.Children) { s.FadeOut() .Then(delay += 200) .FadeIn(300 + delay, Easing.Out); } }); } protected override void UpdateAfterChildren() { base.UpdateAfterChildren(); scoreCounter.Scale = new Vector2(Math.Min(1f, (scoreContainer.DrawWidth - 20) / scoreCounter.DrawWidth)); } private class DrawableScoreStatistic : Container { private readonly KeyValuePair<HitResult, int> statistic; public DrawableScoreStatistic(KeyValuePair<HitResult, int> statistic) { this.statistic = statistic; AutoSizeAxes = Axes.Both; Margin = new MarginPadding { Left = 5, Right = 5 }; } [BackgroundDependencyLoader] private void load(OsuColour colours) { Children = new Drawable[] { new OsuSpriteText { Text = statistic.Value.ToString().PadLeft(4, '0'), Colour = colours.Gray7, Font = OsuFont.GetFont(size: 30), Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, }, new OsuSpriteText { Text = statistic.Key.GetDescription(), Colour = colours.Gray7, Font = OsuFont.GetFont(weight: FontWeight.Bold), Y = 26, Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, }, }; } } private class DateTimeDisplay : Container { private readonly DateTime date; public DateTimeDisplay(DateTime date) { this.date = date; AutoSizeAxes = Axes.Y; Width = 140; Masking = true; CornerRadius = 5; } [BackgroundDependencyLoader] private void load(OsuColour colours) { Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = colours.Gray6, }, new OsuSpriteText { Origin = Anchor.CentreLeft, Anchor = Anchor.CentreLeft, Text = date.ToShortDateString(), Padding = new MarginPadding { Horizontal = 10, Vertical = 5 }, Colour = Color4.White, }, new OsuSpriteText { Origin = Anchor.CentreRight, Anchor = Anchor.CentreRight, Text = date.ToShortTimeString(), Padding = new MarginPadding { Horizontal = 10, Vertical = 5 }, Colour = Color4.White, } }; } } private class BeatmapDetails : Container { private readonly BeatmapInfo beatmap; private readonly OsuSpriteText title; private readonly OsuSpriteText artist; private readonly OsuSpriteText versionMapper; public BeatmapDetails(BeatmapInfo beatmap) { this.beatmap = beatmap; AutoSizeAxes = Axes.Both; Children = new Drawable[] { new FillFlowContainer { Direction = FillDirection.Vertical, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] { title = new OsuSpriteText { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Shadow = false, Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 24, italics: true), }, artist = new OsuSpriteText { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Shadow = false, Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 20, italics: true), }, versionMapper = new OsuSpriteText { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Shadow = false, Font = OsuFont.GetFont(weight: FontWeight.Bold), }, } } }; } [BackgroundDependencyLoader] private void load(OsuColour colours) { title.Colour = artist.Colour = colours.BlueDarker; versionMapper.Colour = colours.Gray8; var creator = beatmap.Metadata.Author?.Username; if (!string.IsNullOrEmpty(creator)) { versionMapper.Text = $"mapped by {creator}"; if (!string.IsNullOrEmpty(beatmap.Version)) versionMapper.Text = $"{beatmap.Version} - " + versionMapper.Text; } title.Text = new LocalisedString((beatmap.Metadata.TitleUnicode, beatmap.Metadata.Title)); artist.Text = new LocalisedString((beatmap.Metadata.ArtistUnicode, beatmap.Metadata.Artist)); } } private class UserHeader : Container { private readonly User user; private readonly Sprite cover; public UserHeader(User user) { this.user = user; Children = new Drawable[] { cover = new Sprite { RelativeSizeAxes = Axes.Both, FillMode = FillMode.Fill, Anchor = Anchor.Centre, Origin = Anchor.Centre, }, new OsuSpriteText { Anchor = Anchor.BottomCentre, Origin = Anchor.BottomCentre, Text = user.Username, Font = OsuFont.GetFont(size: 30, weight: FontWeight.Regular, italics: true), Padding = new MarginPadding { Bottom = 10 }, } }; } [BackgroundDependencyLoader] private void load(LargeTextureStore textures) { if (!string.IsNullOrEmpty(user.CoverUrl)) cover.Texture = textures.Get(user.CoverUrl); } } private class SlowScoreCounter : ScoreCounter { protected override double RollingDuration => 3000; protected override Easing RollingEasing => Easing.OutPow10; public SlowScoreCounter(uint leading = 0) : base(leading) { DisplayedCountSpriteText.Shadow = false; DisplayedCountSpriteText.Font = DisplayedCountSpriteText.Font.With(Typeface.Venera, weight: FontWeight.Light); UseCommaSeparator = true; } } } }
mit
JWT-OSS/sfJwtPhpUnitPlugin
lib/test/Case/Unit.class.php
1483
<?php /** * Copyright (c) 2011 J. Walter Thompson dba JWT * * 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. */ /** Adds Symfony-specific features to PHPUnit's unit testing framework. * * @author Phoenix Zerin <[email protected]> * * @package sfJwtPhpUnitPlugin * @subpackage lib.test */ abstract class Test_Case_Unit extends Test_Case { /** Pre-test initialization. * * @return void */ final protected function _init( ) { } }
mit
cwadding/sensit-python
sensit/api/data.py
1147
# Get the value of a specific field within a feed # # topic_id - The key for the parent topic # feed_id - The id of the parent feed # id - The key of the specific field class Data(): def __init__(self, topic_id, feed_id, id, client): self.topic_id = topic_id self.feed_id = feed_id self.id = id self.client = client # Requires authorization of **read_any_data**, or **read_application_data**. # '/api/topics/:topic_id/feeds/:feed_id/data/:id' GET # def find(self, options = {}): body = options['query'] if 'query' in options else {} response = self.client.get('/api/topics/' + self.topic_id + '/feeds/' + self.feed_id + '/data/' + self.id + '', body, options) return response # Update a specific value of a field within a feed with the data passed in. Requires authorization of **read_any_data**, or **read_application_data**. # '/api/topics/:topic_id/feeds/:feed_id/data/:id' PUT # def update(self, options = {}): body = options['body'] if 'body' in options else {} response = self.client.put('/api/topics/' + self.topic_id + '/feeds/' + self.feed_id + '/data/' + self.id + '', body, options) return response
mit
EmilPopov/C-Sharp
C# OOP/OOP Principles - Part 2/Shapes/Shape.cs
356
 namespace Shapes { abstract public class Shape { public Shape(double width,double height) { this.Width = width; this.Height = height; } public double Width { get; private set; } public double Height { get; private set; } public abstract double CalculateSurface(); } }
mit
abramz/champion-select
test/spec/server/data/schema.spec.js
748
import { expect } from 'chai'; import schema from '../../../../src/server/data/schema'; describe('GraphQL Schema', () => { const requiredQueries = [ 'content', 'champion', 'champions', 'item', 'items', 'languages', 'languageStrings', 'maps', 'server', ]; it('should contain all our queries', () => { expect(schema).to.be.an('object'); expect(schema).to.have.property('_queryType'); const { _queryType } = schema; expect(_queryType).to.be.an('object'); expect(_queryType).to.have.property('_fields'); const { _fields } = _queryType; expect(_fields).to.be.an('object'); requiredQueries.forEach((query) => { expect(_fields).to.have.property(query); }); }); });
mit
talentstrong/fireflyEnglish
centralServiceImpl/src/test/java/com/firefly/test/CampApplyDaoTest.java
1218
package com.firefly.test; import com.firefly.model.CampApply; import com.firefly.service.CampApplyService; import com.firefly.service.dao.CampApplyDao; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {"classpath*:config/central-service-dao.xml", "classpath*:config/central-service-test-datasource.xml", "classpath*:config/central-service-test-property.xml"}) public class CampApplyDaoTest { @Autowired CampApplyDao campApplyDao; @Autowired CampApplyService campApplyService; @Test public void createCustomerRewardTest() throws Exception { CampApply campApply = new CampApply(); campApply.setMobile("13829301938"); campApply.setCanSpeakEnglish("会"); campApply.setChildAge("11"); campApply.setWeixinAccount("test"); campApply.setName("姓名"); long id = campApplyService.createCampApply(campApply); System.out.println(id); } }
mit
pravj/orbis
game.py
243
#!/usr/bin/python try: from gi.repository import Gtk, Gdk except ImportError: raise Exception('unable to import required module') from grid import Grid grid = Grid() grid.connect('delete-event', Gtk.main_quit) grid.show_all() Gtk.main()
mit
peterchaula/ClassicF1
app/src/main/java/com/github/peterchaula/classicf1/IGame.java
513
package com.github.peterchaula.classicf1; import com.github.peterchaula.classicf1.entity.Opponent; public interface IGame { public void play(final float pSpeed); public void die(); public void pause(); public boolean isOver(); public int getLevel(); public void updateScore(); public void score(); public void startGame(final boolean pFromScratch); public void autoPlay(final float pSpeed); public void onCollisionDetected(final Opponent pOpponent); public float getSpeed(); public void reset(); }
mit
ysadiq/salesucre-android
src/com/ramez/olit/sale/MoreActivity.java
3981
package com.ramez.olit.sale; import java.util.ArrayList; import java.util.List; import com.ramez.olit.sale.R; import com.parse.FindCallback; import com.parse.ParseException; import com.parse.ParseObject; import com.parse.ParseQuery; import android.app.Activity; import android.content.ActivityNotFoundException; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.LinearLayout; import android.widget.ProgressBar; public class MoreActivity extends Activity { private ArrayList<String> smsNumbers; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.morelayout); ParseQuery query = new ParseQuery("SSComplaintsReceiver"); query.findInBackground(new FindCallback() { public void done(List<ParseObject> results, ParseException e) { if (e != null) { // There was an error } else { smsNumbers=new ArrayList<String>(); for (int n=0;n<results.size();n++){ smsNumbers.add(results.get(n).getString("telephone")); } Button smsB=(Button) findViewById(R.id.smsButton); smsB.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { sendSMS(smsNumbers); } }); ProgressBar PB=(ProgressBar) findViewById(R.id.progressBar1); PB.setVisibility(View.GONE); } } }); Button emailB=(Button) findViewById(R.id.emailButton); emailB.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { sendEmail("[email protected]","Feedback",""); } }); MenuSetter m=new MenuSetter(); m.setMenuItems(MoreActivity.this,R.id.moreLinearLayout); LinearLayout MLL=(LinearLayout) findViewById(R.id.menuLinearLayout); MLL.setBackgroundDrawable(null); LinearLayout LLL=(LinearLayout) findViewById(R.id.locationLinearLayout); LLL.setBackgroundDrawable(null); LinearLayout NLL=(LinearLayout) findViewById(R.id.notificationLinearLayout); NLL.setBackgroundDrawable(null); LinearLayout MoreMenu=(LinearLayout) findViewById(R.id.moreLinearLayout); MoreMenu.setBackgroundResource(R.drawable.tabbaritem); } public void sendSMS(ArrayList<String> smsNums) { String number=""; for (int i=0;i<smsNums.size();i++){ number+=smsNums.get(i) + ";"; } // = "01008000840;01001794906"; // The number on which you want to send SMS startActivity(new Intent(Intent.ACTION_VIEW, Uri.fromParts("sms", number, null))); } private void sendEmail(String recipient, String subject, String message) { try { final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); emailIntent.setType("plain/text"); if (recipient != null) emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{recipient}); if (subject != null) emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject); if (message != null) emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, message); startActivity(Intent.createChooser(emailIntent, "Send mail...")); } catch (ActivityNotFoundException e) { // cannot send email for some reason } } }
mit
redraiment/jactiverecord
src/main/java/me/zzp/ar/ex/IllegalTableNameException.java
290
package me.zzp.ar.ex; /** * 表不存在。 * * @since 1.0 * @author redraiment */ public class IllegalTableNameException extends RuntimeException { public IllegalTableNameException(String tableName, Throwable e) { super(String.format("illegal table %s", tableName), e); } }
mit
information-machine/information-machine-api-csharp
InformationMachineAPI.PCL/Models/GetUOMsWrapper.cs
1924
/* * InformationMachineAPI.PCL * * */ using System; using System.IO; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using InformationMachineAPI.PCL; namespace InformationMachineAPI.PCL.Models { public class GetUOMsWrapper : INotifyPropertyChanged { // These fields hold the values for the public properties. private List<UOMInfo> result; private MetaBase meta; /// <summary> /// TODO: Write general description for this method /// </summary> [JsonProperty("result")] public List<UOMInfo> Result { get { return this.result; } set { this.result = value; onPropertyChanged("Result"); } } /// <summary> /// TODO: Write general description for this method /// </summary> [JsonProperty("meta")] public MetaBase Meta { get { return this.meta; } set { this.meta = value; onPropertyChanged("Meta"); } } /// <summary> /// Property changed event for observer pattern /// </summary> public event PropertyChangedEventHandler PropertyChanged; /// <summary> /// Raises event when a property is changed /// </summary> /// <param name="propertyName">Name of the changed property</param> protected void onPropertyChanged(String propertyName) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } } }
mit
auser/poolparty
examples/chef_cloud/chef_repo/cookbooks/ganglia/metadata.rb
364
maintainer "Nate Murray" maintainer_email "" license "Apache 2.0" description "Installs/Configures ganglia" long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc')) version "0.1" recipe "ganglia::default" recipe "ganglia::gmetad" recipe "ganglia::monitor_sshd" recipe "ganglia::monitor_watson" recipe "ganglia::web"
mit
cdidyk/kwoon
spec/mailers/student_application_mailer_spec.rb
901
RSpec.describe StudentApplicationMailer, type: :mailer do describe ".confirmation" do it "generates a confirmation email to the user" do user = build :user email = StudentApplicationMailer. confirmation(user). deliver_now expect(email.from).to eq(["[email protected]"]) expect(email.to).to eq([user.email]) expect(email.subject).to match(/application received/i) end end describe ".new_application" do it "generates an email to the sifu with the application info" do application = build :application email = StudentApplicationMailer. new_application(application). deliver_now expect(email.from).to eq(["[email protected]"]) expect(email.to).to eq([ENV['SIFU_EMAIL']]) expect(email.subject).to match(/Application/) expect(email.body.to_s).to match(/Wahnam Courses/) end end end
mit
elogent/nandsee
src/main/java/com/github/samestep/nandsee/tile/TileType.java
1182
package com.github.samestep.nandsee.tile; /** The base type of a {@link Tile}. */ public enum TileType { /** A {@link TileType} used to transmit signals. */ WIRE, /** A {@link TileType} used to transmit signals in all four directions. */ WIRE_CONNECT, /** A {@link TileType} used to transmit signals between layers. */ VIA, /** A {@link TileType} that delays a signal. */ BUFFER, /** A {@link TileType} that inverts a signal. */ INVERTER, /** A {@link TileType} that can be manually toggled by the user. */ INPUT, /** A {@link TileType} used to display result signals to the user. */ OUTPUT; /** The number of bits needed to specify a {@link TileType}. */ public static final int BITS = 3; /** The mask needed for the bits of a {@link TileType}. */ public static final int MASK = 0b111; /** The array of {@link TileType} enum values. */ private static final TileType[] values = values(); /** * @param index the index of the desired {@link TileType} enum constant. * * @return the {@link TileType} enum constant at the specified index. */ public static TileType getValue(final int index) { return values[index]; } }
mit
cwhitney/DelqaTools
DelqaTrack/src/OscManager.cpp
1514
#include "..\include\OscManager.h" #include "cinder/Log.h" using namespace ci; using namespace ci::app; using namespace std; OscManager::OscManager() : mOscHost("127.0.0.1"), mOscPortStr("8000"), bConnected(false) { mGui = Pretzel::PretzelGui::create("OSC Settings", 220, 200); mGui->addTextField("Send Host", &mOscHost); mGui->addTextField("Send Port", &mOscPortStr); mGui->addButton("Reconnect Sender", &OscManager::reconnectSender, this ); mGui->setPos(vec2(0, 420)); getWindow()->getSignalResize().connect([&](){ mGui->setPos( vec2(getWindowWidth()-220, 0) ); }); reconnectSender(); } void OscManager::reconnectSender() { int oscPort = fromString<int>( mOscPortStr ); mSender.setup( mOscHost, oscPort ); try{ int oscPort = fromString<int>(mOscPortStr); mSender.setup(mOscHost, oscPort); bConnected = true; CI_LOG_I("Osc connected ok"); } catch (std::exception e){ CI_LOG_EXCEPTION("OscManager :: reconnect sender", e); CI_LOG_E("Error :: OscManager::reconnect sender"); CI_LOG_E(e.what()); bConnected = false; } } void OscManager::sendTouch( vec3 touchPos ) { if (bConnected){ osc::Message msgX; msgX.setAddress("/touch/x"); msgX.addFloatArg(touchPos.x); osc::Message msgY; msgY.setAddress("/touch/y"); msgY.addFloatArg(touchPos.y); osc::Message msgZ; msgZ.setAddress("/touch/z"); msgZ.addFloatArg(touchPos.z); mSender.sendMessage(msgX); mSender.sendMessage(msgY); mSender.sendMessage(msgZ); } } void OscManager::draw() { mGui->draw(); }
mit
pengzhanlee/xeact
src/domApi.js
1423
import ReactDOM from "react-dom"; import {attrFlag, componentNamespace} from "./identifiers"; /** * TODO: 通过解析树获取而非dom关系 * node === self * parent === self ce. * parent.parent === parent root. * parent.parent.parent === parent ce. * 获取父节点 * @param context * @return {*} */ export function getParent(context) { const node = ReactDOM.findDOMNode(context); const targetContainer = node.parentNode.parentNode; const id = targetContainer.parentNode.getAttribute(attrFlag); return { customElement: targetContainer.parentNode, container: targetContainer, id: id, } } /** * 是否存在某种自定义标签的子代元素 * @param context * @param tagName * @return {boolean} */ export function hasChildOfTag(context, tagName) { const node = ReactDOM.findDOMNode(context); const children = node.children; for (const child of children) { if (child.nodeName === `${componentNamespace}-${tagName}`.toUpperCase()) { return true; } } return false; } /** * 父元素是否为某种ce * @param context * @param tagName * @return {boolean} */ export function parentIsTag(context, tagName) { const parent = getParent(context); if (parent.customElement) { console.log(parent.customElement.nodeName, tagName); return parent.customElement.nodeName === `${componentNamespace}-${tagName}`.toUpperCase(); } return false; }
mit
satrun77/silverstripe-configurablepage
code/extensions/editablefields/EditableFieldDate.php
623
<?php /** * @author Mohamed Alsharaf <[email protected]> */ class EditableFieldDateExtension extends DataExtension { /** * Get field value that is suitable for the view template file. * * @return Date */ public function getViewValue() { $value = Object::create('Date'); $value->setValue($this->owner->Value); return $value; } /** * Get string value of a field. * * @return null|string */ public function getValueAsString() { $date = $this->getViewValue(); return $date ? $date->Nice() : ''; } }
mit
chan-lite/chan-lite.github.io
src/decorators/bindScrollBehavior.js
1573
import React, { PureComponent } from "react"; import Rx from "rxjs/Rx"; export function BindScrollBehavior(Decorated, nearBottom) { return class extends PureComponent { customEventName: "nearBottom"; customEventObservable: null; componentDidMount() { window.scroll(0, 0); this.customEventObservable = this.getObservable().subscribe(nearBottom); window.addEventListener("scroll", this.handleScroll); } componentWillUnmount() { this.customEventObservable.unsubscribe(); window.removeEventListener("scroll", this.handleScroll); } getObservable() { return Rx.Observable .fromEvent(window, this.customEventName) .throttleTime(250); } handleScroll = () => { if (!document.body || !document.documentElement) { throw new Error( "Cannot find `body` or `documentElement` on the `document` object." ); } const windowHeight = "innerHeight" in window ? window.innerHeight : document.documentElement.offsetHeight; const docHeight = Math.max( document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight ); const windowBottom = windowHeight + window.pageYOffset; if (windowBottom >= docHeight * 3 / 4) { window.dispatchEvent(new Event(this.customEventName)); } }; render() { return <Decorated {...this.props} />; } }; }
mit
nando0208/pantrychef
pantry-chef-model/src/main/java/com/eam/model/User.java
1165
package com.eam.model; import java.io.Serializable; import java.util.Date; import java.util.UUID; import com.pantrychef.model.Ingredient; public class User implements Serializable { /** * */ private static final long serialVersionUID = -3739177568476220034L; private UUID id; private String username; private String password; private Date birthdate; private Ingredient person; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public UUID getId() { return id; } public void setId(UUID id) { this.id = id; } public Date getBirthdate() { return birthdate; } public void setBirthdate(Date birthdate) { this.birthdate = birthdate; } public Ingredient getPerson() { return person; } public void setPerson(Ingredient person) { this.person = person; } }
mit
ticketevolution/ticketevolution-ruby
lib/ticket_evolution/credential.rb
61
module TicketEvolution class Credential < Model end end
mit
OElabed/vagrant-development-tools
apps/server/src/main/java/com/fix/repository/UserRepository.java
288
package com.fix.repository; import com.fix.model.entities.User; import org.springframework.data.jpa.repository.JpaRepository; /** * Created by oelabed on 2016-10-15. */ public interface UserRepository extends JpaRepository<User, Long> { User findByUsername( String username ); }
mit
simplabs/ember-simple-auth
packages/ember-simple-auth/tests/unit/session-stores/shared/storage-event-handler-behavior.js
2278
import { module, test } from 'qunit'; import { run } from '@ember/runloop'; import sinonjs from 'sinon'; export default function(options) { let sinon; let store; let hooks = options.hooks; hooks.beforeEach(function() { sinon = sinonjs.createSandbox(); store = options.store(); }); hooks.afterEach(function() { sinon.restore(); }); module('storage events', function(hooks) { hooks.beforeEach(function() { sinon.spy(window, 'addEventListener'); sinon.spy(window, 'removeEventListener'); }); hooks.afterEach(function() { window.addEventListener.restore(); window.removeEventListener.restore(); }); test('binds to "storage" events on the window when created', function(assert) { store = options.store(); assert.ok(window.addEventListener.calledOnce); }); test('triggers the "sessionDataUpdated" event when the data in the browser storage has changed', function(assert) { let triggered = false; store.on('sessionDataUpdated', () => { triggered = true; }); window.dispatchEvent(new StorageEvent('storage', { key: store.get('key') })); assert.ok(triggered); }); test('does not trigger the "sessionDataUpdated" event when the data in the browser storage has not changed', function(assert) { let triggered = false; store.on('sessionDataUpdated', () => { triggered = true; }); store.persist({ key: 'value' }); // this data will be read again when the event is handled so that no change will be detected window.dispatchEvent(new StorageEvent('storage', { key: store.get('key') })); assert.notOk(triggered); }); test('does not trigger the "sessionDataUpdated" event when the data in the browser storage has changed for a different key', function(assert) { let triggered = false; store.on('sessionDataUpdated', () => { triggered = true; }); window.dispatchEvent(new StorageEvent('storage', { key: 'another key' })); assert.notOk(triggered); }); test('unbinds from "storage" events on the window when destroyed', function(assert) { run(() => store.destroy()); assert.ok(window.removeEventListener.calledOnce); }); }); }
mit
Flagbit/Magento-FACTFinder
src/lib/FACTFinderCustom/Configuration.php
8116
<?php /** * this class implements the FACTFinder configuration interface and uses the Zend_Config class. so it's like a decorator * for the Zend_Config * * @package FACTFinder\Common */ class FACTFinderCustom_Configuration extends FACTFinder\Core\AbstractConfiguration { const HTTP_AUTH = 'http'; const SIMPLE_AUTH = 'simple'; const ADVANCED_AUTH = 'advanced'; const XML_CONFIG_PATH = 'factfinder/search'; const DEFAULT_SEMAPHORE_TIMEOUT = 7200; // 60 seconds = 2 hours private $config; private $authType; private $secondaryChannels; private $storeId = null; // Should the search adapters retrieve only product ids? (otherwise, full records will be requested) private $idsOnly = true; public function __construct($config = null) { $this->config = new Varien_Object($config); if(is_array($config)){ $this->config->setData($config); } else { $this->config->setData(Mage::getStoreConfig(self::XML_CONFIG_PATH)); } } public function __sleep() { foreach(get_class_methods($this) as $method){ if(substr($method, 0, 3) != 'get' || $method == 'getCustomValue'){ continue; } call_user_func(array(&$this, $method)); } return array('config'); } /** * @return array of strings **/ public function getSecondaryChannels() { if($this->secondaryChannels == null) { // array_filter() is used to remove empty channel names $this->secondaryChannels = array_filter(explode(';', $this->getCustomValue('secondary_channels'))); } return $this->secondaryChannels; } /** * Allows to catch configuration for certain store id. * If given store id differs from internal store id, then configuration is cleared. * * @param int $storeId * @return FACTFinderCustom_Configuration */ public function setStoreId($storeId) { if ($this->storeId != $storeId) { $this->config = new Varien_Object(); } $this->storeId = $storeId; return $this; } /** * @param string name * @return string value */ public function getCustomValue($name) { if(!$this->config->hasData($name)){ try{ $this->config->setData($name, Mage::getStoreConfig(self::XML_CONFIG_PATH.'/'.$name, $this->storeId)); }catch (Exception $e){ $this->config->setData($name, null); } } return $this->config->getData($name); } /** * @return boolean */ public function isDebugEnabled() { return $this->getCustomValue('debug') == 'true'; } /** * @return string */ public function getRequestProtocol() { $protocol = $this->getCustomValue('protocol'); // legacy code because of wrong spelling if (!$protocol) { $protocol = $this->getCustomValue('protokoll'); } return $protocol; } /** * @return string */ public function getServerAddress() { return $this->getCustomValue('address'); } /** * @return int */ public function getServerPort() { return $this->getCustomValue('port'); } /** * @return string */ public function getContext() { return $this->getCustomValue('context'); } /** * @return string */ public function getChannel() { return $this->getCustomValue('channel'); } /** * @return string */ public function getLanguage() { return $this->getCustomValue('language'); } public function getAuthType() { if ($this->authType == null) { $this->authType = $this->getCustomValue('auth_type'); if ( $this->authType != self::HTTP_AUTH && $this->authType != self::SIMPLE_AUTH && $this->authType != self::ADVANCED_AUTH ) { $this->authType = self::HTTP_AUTH; } } return $this->authType; } /** * @return boolean */ public function isHttpAuthenticationType() { return $this->getAuthType() == self::HTTP_AUTH; } /** * @return boolean */ public function isSimpleAuthenticationType() { return $this->getAuthType() == self::SIMPLE_AUTH; } /** * @return boolean */ public function isAdvancedAuthenticationType() { return $this->getAuthType() == self::ADVANCED_AUTH; } public function getUserName() { return $this->getCustomValue('auth_user'); } public function getPassword() { return $this->getCustomValue('auth_password'); } public function getAuthenticationPrefix() { return $this->getCustomValue('auth_advancedPrefix'); } public function getAuthenticationPostfix() { return $this->getCustomValue('auth_advancedPostfix'); } public function getClientMappings() { return array( 'query' => 'q', 'page' => 'p', 'productsPerPage' => 'limit' ); } /** * {@inheritdoc} * * @return array */ public function getServerMappings() { return array( 'q' => 'query', 'p' => 'page', 'limit' => 'productsPerPage' ); } public function getIgnoredClientParameters() { return array( 'channel' => true, 'format' => true, 'log' => true, 'query' => true, 'catalog' => true, 'navigation' => true ); } public function getIgnoredServerParameters() { return array( 'q' => true, 'p' => true, 'limit' => true, 'is_ajax' => true, 'type_search' => true, 'order' => true, 'dir' => true, 'mode' => true ); } public function getRequiredClientParameters() { return array(); } public function getRequiredServerParameters() { return array(); } /** * {@inheritdoc} * * @return string **/ function getDefaultConnectTimeout() { return 2; } /** * {@inheritdoc} * * @return string **/ function getDefaultTimeout() { return 4; } /** * {@inheritdoc} * * @return string **/ function getSuggestConnectTimeout() { return 1; } /** * {@inheritdoc} * * @return string **/ function getSuggestTimeout() { return 2; } public function getTrackingConnectTimeout() { return 2; } public function getTrackingTimeout() { return 2; } /** * {@inheritdoc} * * @return string **/ function getImportConnectTimeout() { return 10; } /** * {@inheritdoc} * * @return string **/ function getImportTimeout() { return 360; } /** * {@inheritdoc} * * @return string */ public function getPageContentEncoding() { return $this->getCustomValue('encoding/pageContent'); } public function getClientUrlEncoding() { return $this->getCustomValue('encoding/pageURI'); } /** * Sets the idsOnly flag, which determines whether product ids or full records should be requested by the search adapters. * Request only products ids if true, full records otherwise * * @param bool value **/ public function setIdsOnly($value) { $this->idsOnly = $value; } /** * Gets the idsOnly flag, which determines whether product ids or full records should be requested by the search adapters * * @return bool **/ public function getIdsOnly() { return $this->idsOnly; } }
mit
touchtechio/starcatcher
StarCatcherUnity/Assets/UniOSC/Scripts/UniOSCUtils.cs
13269
/* * UniOSC * Copyright © 2014-2015 Stefan Schlupek * All rights reserved * [email protected] */ using UnityEngine; using System; using System.Collections; using System.Net; using System.Net.Sockets; using System.Linq; using System.Collections.Generic; using System.IO; using System.Text; using System.Text.RegularExpressions; #if UNITY_EDITOR using UnityEditor; #endif namespace UniOSC{ /// <summary> /// Some global helper methods and the main storage for paths, colors... that uses UniOSC /// </summary> public class UniOSCUtils { public static Texture2D TEX_CONNECTION_BG; public const int MAXPORT= 65535; public const string LOGO16_NAME = "logo64x16"; public const string LOGO32_NAME = "logo128x32"; public const string LOGO64_NAME = "logo256x64"; public const string OSCOUTTEST_NAME = "testMessageBtn"; public const string OSCCONNECTION_OFF_NAME = "connection_pause"; public const string OSCCONNECTION_ON_NAME = "connection_on"; public const string MULTICASTREGEX = @"2(?:2[4-9]|3\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d?|0)){3}"; public static Color CONNECTION_ON_COLOR = new Color(0f,1.0f,0f); public static Color CONNECTION_OFF_COLOR = new Color(1.0f,0f,0f); public static Color CONNECTION_PAUSE_COLOR = new Color(1.0f,1.0f,0f); public static Color CONNECTION_BG = new Color(0.59f,0.59f,0.59f,0.5f); public static Color ITEM_LIST_COLOR_A = new Color(0.99f,0.99f,0.99f); public static Color ITEM_LIST_COLOR_B = new Color(0.75f,0.75f,0.75f); public static Color LEARN_COLOR_ON = new Color(0.05f,0.75f,0.05f); public static Color LEARN_COLOR_OFF = new Color(0.75f,0.75f,0.75f); public const string MENUITEM_EDITOR = "Window/UniOSC/OSCEditor"; public const string MENUITEM_CREATE_MAPPING_FILE = "GameObject/Create Other/UniOSC/OSC Mapping File"; public const string MENUITEM_CREATE_SESSION_FILE = "GameObject/Create Other/UniOSC/OSC Session File"; public const string MENUITEM_CREATE_CONNECTION = "GameObject/Create Other/UniOSC/OSCConnection"; public const string MENUITEM_CREATE_MOVE = "GameObject/Create Other/UniOSC/Move GameObject"; public const string MENUITEM_CREATE_ROTATE = "GameObject/Create Other/UniOSC/Rotate GameObject"; public const string MENUITEM_CREATE_SCALE = "GameObject/Create Other/UniOSC/Scale GameObject"; public const string MENUITEM_CREATE_CHANGECOLOR = "GameObject/Create Other/UniOSC/Change Material Color"; public const string MENUITEM_CREATE_TOGGLE = "GameObject/Create Other/UniOSC/Toggle"; public const string MENUITEM_CREATE_EVENTDISPATCHERBUTTON = "GameObject/Create Other/UniOSC/Send OSC Message Button"; public const string MENUITEM_CREATE_TOGGLE_UGUI = "GameObject/Create Other/UniOSC/uGUI Toggle"; public const string MENUITEM_CREATE_BUTTON_UGUI = "GameObject/Create Other/UniOSC/uGUI Button"; public const string MENUITEM_CREATE_SLIDER_UGUI = "GameObject/Create Other/UniOSC/uGUI Slider"; public const string MENUITEM_CREATE_UNITYEVENT_RELAY = "GameObject/Create Other/UniOSC/UnityEvent Relay"; public const string TOOLTIP_EXPLICITCONNECTION ="If you select an explicit connection you don't have to specify your Port and IP Address as the component get the values from the connection.This is useful if you change the settings of a connection frequently and don't want to readjust the settings on every gameobject that uses the old values."; public const string CONFIGPATH_EDITOR="Resources/UniOSCEditorConfig.asset"; public const string MAPPINGFILE_DEFAULTNAME= "OSCMappingFile"; public const string SESSIONFILE_DEFAULTNAME= "OSCSessionFile"; public const string MAPPINGFILEEXTENSION="asset";//"oscMapData.asset"; // Address,Port,Min,Max,Dispatch,Learn,Delete public static Rect[] MAPPINGLISTLABELRECTS = {new Rect(),new Rect(),new Rect(),new Rect(),new Rect(),new Rect(),new Rect()}; public static float MAPPINGLISTHEADERLABELWIDTH{ get{ float f = 0f; for(int i= 0;i < MAPPINGLISTLABELRECTS.Length ;i++){ f+= MAPPINGLISTLABELRECTS[i].width; } return f+50f; } } //address,Learn,delete,Data[0],Data[1],Data[2],Data[3] public static Rect[] SESSIONLISTLABELRECTS = {new Rect(),new Rect(),new Rect(),new Rect(),new Rect(),new Rect(),new Rect()}; public static float SESSIONLISTHEADERLABELWIDTH{ get{ float f = 0f; for(int i= 0;i < SESSIONLISTLABELRECTS.Length ;i++){ f+= SESSIONLISTLABELRECTS[i].width; } return f+50f; } } /// <summary> /// Validates the IP address. /// </summary> /// <returns><c>true</c>, if IP adress was validated, <c>false</c> otherwise.</returns> /// <param name="strIP">String I.</param> /// <param name="address">Address.</param> public static bool ValidateIPAddress(string strIP, out IPAddress address){ address = null; return !String.IsNullOrEmpty(strIP) && IPAddress.TryParse(strIP, out address); } public static bool RegexMatch(string str,string exp) { Regex regex = new Regex(@exp); Match match = regex.Match(str); return match.Success; } /// <summary> /// Maps a value to an interval. /// </summary> /// <returns>The the new mapped value</returns> /// <param name="val">Value.</param> /// <param name="srcMin">Source minimum.</param> /// <param name="srcMax">Source max.</param> /// <param name="dstMin">Destination minimum.</param> /// <param name="dstMax">Destination max.</param> public static float MapInterval(float val, float srcMin, float srcMax, float dstMin, float dstMax) { if (val>=srcMax) return dstMax; if (val<=srcMin) return dstMin; return dstMin + (val-srcMin) / (srcMax-srcMin) * (dstMax-dstMin); } /// <summary> /// Gets the local IP address. /// </summary> /// <returns>The local IP address.</returns> public static string GetLocalIPAddress(){ try{ return Dns.GetHostEntry(Dns.GetHostName()).AddressList.FirstOrDefault(ip => ip.AddressFamily == AddressFamily.InterNetwork).ToString(); }catch(SocketException e){ Debug.LogWarning("Error retrieving a valid local ipAddress:"+e.Message+"/nUsing 127.0.0.1 as fallback!"); //return null; //Fallback: 127.0.0.1 return "127.0.0.1"; } } /// <summary> /// Log the specified sender, methodName and msg. /// </summary> /// <param name="sender">Sender.</param> /// <param name="methodName">Method name.</param> /// <param name="msg">Message.</param> public static void Log(object sender,string methodName,object msg){ if(msg == null)msg =""; Debug.Log(String.Format("{0}.{1} : {2}",sender.GetType().Name,methodName,msg.ToString() ) ); } /// <summary> /// Draws the texture. /// </summary> /// <param name="tex">Tex.</param> public static void DrawTexture(Texture tex) { if(tex == null) return; Rect rect = GUILayoutUtility.GetRect(tex.width, tex.height); GUI.DrawTexture(rect, tex); } /// <summary> /// Draws a clickable texture. /// The event is triggerd on MouseUp /// </summary> /// <param name="tex">The texture you want to display</param> /// <param name="evt">Event that should be called when the user clicks on the texture</param> public static void DrawClickableTexture(Texture tex,Action evt ) { if(tex == null) return; Rect rect = GUILayoutUtility.GetRect(tex.width, tex.height); GUI.DrawTexture(rect, tex); var e = Event.current; if (e.type == EventType.MouseUp) { if (rect.Contains(e.mousePosition)) { if(evt != null) evt(); } } } /// <summary> /// Draws a clickable texture horizontal. /// </summary> /// <param name="tex">The texture you want to display</param> /// <param name="evt">Event that should be called when the user clicks on the texture</param> public static void DrawClickableTextureHorizontal(Texture2D tex,Action evt){ GUILayout.BeginHorizontal(); DrawClickableTexture (tex,evt); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.Space(2f); } /// <summary> /// Makes a texture specified by the parameters. /// </summary> /// <returns>The texture.</returns> /// <param name="width">Width.</param> /// <param name="height">Height.</param> /// <param name="col">Color.</param> public static Texture2D MakeTexture( int width, int height, Color col ) { Color[] pix = new Color[width * height]; for( int i = 0; i < pix.Length; ++i ) { pix[ i ] = col; } Texture2D result = new Texture2D( width, height ); result.hideFlags = HideFlags.HideAndDontSave;//?? result.SetPixels( pix ); result.Apply(); return result; } public static bool IsMouseUpInArea (Rect area) { Event evt = Event.current; switch(evt.type){ case EventType.MouseUp: if (area.Contains(evt.mousePosition)) { return true; } break; } return false; } #if UNITY_EDITOR public static void SelectObjectInHierachyFromGUID(string GUID){ UnityEngine.Object[] gos = new UnityEngine.Object[1]; string path = AssetDatabase.GUIDToAssetPath(GUID); UnityEngine.Object go = AssetDatabase.LoadAssetAtPath(path,typeof(UnityEngine.Object)) as UnityEngine.Object ; gos[0] = go; Selection.objects = gos; } #region menuItems [MenuItem(UniOSCUtils.MENUITEM_CREATE_MOVE,false,4)] static void CreateUniOSCMoveGameObject(){ GameObject go = new GameObject("UniOSC MoveGameObject"); go.AddComponent<UniOSCMoveGameObject>(); } [MenuItem(UniOSCUtils.MENUITEM_CREATE_ROTATE,false,4)] static void CreateUniOSCRotateGameObject(){ GameObject go = new GameObject("UniOSC RotateGameObject"); go.AddComponent<UniOSCRotateGameObject>(); } [MenuItem(UniOSCUtils.MENUITEM_CREATE_SCALE,false,4)] static void CreateUniOSCScaleGameObject(){ GameObject go = new GameObject("UniOSC ScaleGameObject"); go.AddComponent<UniOSCScaleGameObject>(); } [MenuItem(UniOSCUtils.MENUITEM_CREATE_CHANGECOLOR,false,4)] static void CreateUniOSCChangeColor(){ GameObject go = new GameObject("UniOSC ChangeColor"); go.AddComponent<UniOSCChangeColor>(); } [MenuItem(UniOSCUtils.MENUITEM_CREATE_TOGGLE,false,4)] static void CreateUniOSCToggle(){ GameObject go = new GameObject("UniOSC Toggle"); go.AddComponent<UniOSCToggle>(); } [MenuItem(UniOSCUtils.MENUITEM_CREATE_EVENTDISPATCHERBUTTON,false,4)] static void CreateUniOSCEventDispatcherButton(){ GameObject go = new GameObject("UniOSC Send OSC Message Button"); go.AddComponent<UniOSCEventDispatcherButton>(); } /* [MenuItem(UniOSCUtils.MENUITEM_CREATE_TOGGLE_UGUI, false, 4)] static void CreateUniOSCToggleUGUI() { GameObject go = new GameObject("UniOSC uGUI Toggle"); go.AddComponent<UniOSC_uGUI_Toggle>(); } [MenuItem(UniOSCUtils.MENUITEM_CREATE_SLIDER_UGUI, false, 4)] static void CreateUniOSCSliderUGUI() { GameObject go = new GameObject("UniOSC uGUI Slider"); go.AddComponent<UniOSC_uGUI_Slider>(); } [MenuItem(UniOSCUtils.MENUITEM_CREATE_BUTTON_UGUI, false, 4)] static void CreateUniOSCButtonUGUI() { GameObject go = new GameObject("UniOSC uGUI Button"); go.AddComponent<UniOSC_uGUI_Button>(); } */ [MenuItem(UniOSCUtils.MENUITEM_CREATE_UNITYEVENT_RELAY, false, 4)] static void CreateUniOSCUnityEventRelay() { GameObject go = new GameObject("UniOSC UnityEvent Relay"); go.AddComponent<UniOSCUnityEventRelay>(); } #endregion menuItems /// <summary> /// Used to get assets of a certain type and file extension from entire project /// </summary> /// <returns>An Object array of assets.</returns> /// <param name="fileExtension">The file extention the type uses eg ".prefab" or ".asset".</param> /// <typeparam name="T">The 1st type parameter.</typeparam> public static T[] GetAssetsOfType<T>( string fileExtension) where T:class { List<T> tempObjects = new List<T>(); DirectoryInfo directory = new DirectoryInfo(Application.dataPath); FileInfo[] goFileInfo = directory.GetFiles("*" + fileExtension, SearchOption.AllDirectories); int goFileInfoLength = goFileInfo.Length; FileInfo tempGoFileInfo; string tempFilePath; T tempGO; for (int i = 0; i < goFileInfoLength; i++) { tempGoFileInfo = goFileInfo[i]; if (tempGoFileInfo == null) continue; tempFilePath = tempGoFileInfo.FullName; tempFilePath = tempFilePath.Replace(@"\", "/").Replace(Application.dataPath, "Assets"); tempGO = AssetDatabase.LoadAssetAtPath(tempFilePath, typeof(T)) as T; if (tempGO == null) { continue; } else if (tempGO.GetType() != typeof(T)) { //Debug.LogWarning("Skipping " + tempGO.GetType().ToString()); continue; } tempObjects.Add(tempGO); } return tempObjects.ToArray(); } #endif } }
mit
9Cube-dpustula/andOTP
app/src/main/java/org/shadowice/flocke/andotp/Utilities/ThemeHelper.java
1921
/* * Copyright (C) 2017 Jakob Nixdorf * * 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.shadowice.flocke.andotp.Utilities; import android.content.Context; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.ColorFilter; import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; public class ThemeHelper { public static int getThemeColor(Context context, int colorAttr) { Resources.Theme theme = context.getTheme(); TypedArray arr = theme.obtainStyledAttributes(new int[]{colorAttr}); int colorValue = arr.getColor(0, -1); arr.recycle(); return colorValue; } public static ColorFilter getThemeColorFilter(Context context, int colorAttr) { return new PorterDuffColorFilter(getThemeColor(context, colorAttr), PorterDuff.Mode.SRC_IN); } }
mit
westlane/connect-lint
index.js
3219
/*! * * Lint - Connect Middleware * Copyright(c) 2014 Paper & Equator, LLC * Copyright(c) 2014 West Lane * MIT Licensed */ var winston = require("winston"); var scanCSS = require("./lib/css"); var scanJavascript = require("./lib/javascript"); /** * Lint Middleware */ exports = module.exports = function(options){ options = options || {}; // based on content type, which lint tools will we use? var scan_map = { "application/javascript": scanJavascript, "text/css": scanCSS } return function LintMiddleware(req, res, next) { if ('GET' != req.method) return next(); var write = res.write , end = res.end , scanFn = null, chunks = []; // overload write() so we can scan what we're sending to browser res.write = function(chunk, encoding){ // never alter or delay the planned response write.apply(res, arguments); if (res.getHeader("content-type")) { // run this only once to find applicable scanner if (scanFn === null) { var content_type = res.getHeader("content-type") .match(/[a-z]*\/[a-z]*/)[0]; scanFn = scan_map[content_type]; } } // did we find a scan function to execute? if (scanFn) { chunks.push(chunk); } }; // overload end() to ensure we know when content sending is finished res.end = function(chunk, encoding){ // never alter or delay the planned response if (chunk) { this.write(chunk, encoding); } end.call(res); // now execute the scan function, if available if (scanFn) { var path = req._parsedUrl.pathname; var body = Buffer.concat(chunks).toString("utf8"); // now execute linting and log results _scan(path, body, scanFn); } }; next(); } /* * Scans code for errors and warnings */ function _scan(path, content, fn) { var offset = 0; // you can omit third-party code by surrounding it with an @lib block var matches = content.match(/\/\* @ignore:start(.)*\*\/(\n|.)*\/\* @ignore:end \*\//g); if (matches) { offset = -1; for (var idx in matches) { // don't scan this part var item = matches[idx]; content = content.replace(item, ""); offset += item.split(/\r\n|\r|\n/).length; } } if (content.length) { fn(content, function(err,type) { if (err) { winston.warn("%s: %s at line %s, col %s.", path.substr(1, path.length), err.message, err.line+offset, err.col); } else { // success, no need to report any errors winston.info("%s: Valid %s", path.substr(1, path.length), type); } }); } } };
mit
Mistand/Digishop
src/Digiseller.Client.Core/ViewModels/ProductSearch/Pagination.cs
517
using Digiseller.Client.Core.Interfaces.ProductSearch; using Digiseller.Client.Core.Models.Response.ProductSearch; namespace Digiseller.Client.Core.ViewModels.ProductSearch { public class Pagination : IPagination { public Pagination(Pages pages) { PageNumber = pages.Num; RowsCount = pages.Rows; PageCount = pages.Cnt; } public int PageNumber { get; } public int RowsCount { get; } public int PageCount { get; } } }
mit
dimmir/PaginatorBundle
Exception/ExceptionInterface.php
88
<?php namespace DMR\Bundle\PaginatorBundle\Exception; interface ExceptionInterface { }
mit
hikurangi/feathers-todo
src/services/todos/hooks/restrict-to-sender.js
777
'use strict'; // src/services/message/hooks/restrict-to-sender.js // // Use this hook to manipulate incoming or outgoing data. // For more information on hooks see: http://docs.feathersjs.com/hooks/readme.html const errors = require('feathers-errors'); module.exports = function(options) { return function(hook) { const todoService = hook.app.service('todos'); // First get the message that the user wants to access return todoService.get(hook.id, hook.params).then(todo => { // Throw a not authenticated error if the message and user id don't match if (todo.sentBy._id !== hook.params.user._id) { throw new errors.NotAuthenticated('Access not allowed'); } // Otherwise just return the hook return hook; }); }; };
mit
jackybigz/samplelog
test/controllers/customers_controller_test.rb
1231
require 'test_helper' class CustomersControllerTest < ActionController::TestCase setup do @customer = customers(:one) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:customers) end test "should get new" do get :new assert_response :success end test "should create customer" do assert_difference('Customer.count') do post :create, customer: { address: @customer.address, email: @customer.email, name: @customer.name, number: @customer.number } end assert_redirected_to customer_path(assigns(:customer)) end test "should show customer" do get :show, id: @customer assert_response :success end test "should get edit" do get :edit, id: @customer assert_response :success end test "should update customer" do patch :update, id: @customer, customer: { address: @customer.address, email: @customer.email, name: @customer.name, number: @customer.number } assert_redirected_to customer_path(assigns(:customer)) end test "should destroy customer" do assert_difference('Customer.count', -1) do delete :destroy, id: @customer end assert_redirected_to customers_path end end
mit
brenolf/polyjuice
lib/dictionaries/jscs/disallowMultipleLineBreaks.js
506
/** * @fileoverview Translation for `disallowMultipleLineBreaks` (JSCS) to ESLint * @author Breno Lima de Freitas <https://breno.io> * @copyright 2016 Breno Lima de Freitas. All rights reserved. * See LICENSE file in root directory for full license. */ 'use strict' //------------------------------------------------------------------------------ // Rule Translation Definition //------------------------------------------------------------------------------ module.exports = 'no-multiple-empty-lines';
mit
byrnedo/capitan
helpers/stringhelp.go
1256
package helpers import ( "math/rand" "strconv" "strings" "time" "fmt" "crypto/md5" ) var src = rand.NewSource(time.Now().UnixNano()) const letterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" const ( letterIdxBits = 6 // 6 bits to represent a letter index letterIdxMask = 1<<letterIdxBits - 1 // All 1-bits, as many as letterIdxBits letterIdxMax = 63 / letterIdxBits // # of letter indices fitting in 63 bits ) // stole this from stack overflow. func RandStringBytesMaskImprSrc(n int) string { b := make([]byte, n) // A src.Int63() generates 63 random bits, enough for letterIdxMax characters! for i, cache, remain := n-1, src.Int63(), letterIdxMax; i >= 0; { if remain == 0 { cache, remain = src.Int63(), letterIdxMax } if idx := int(cache & letterIdxMask); idx < len(letterBytes) { b[i] = letterBytes[idx] i-- } cache >>= letterIdxBits remain-- } return string(b) } func GetNumericSuffix(name string, sep string) (int, error) { namePts := strings.Split(name, sep) instNumStr := namePts[len(namePts)-1] return strconv.Atoi(instNumStr) } func HashInterfaceSlice(args []interface{}) string { return fmt.Sprintf("%x", md5.Sum([]byte(fmt.Sprintf("'%s'", args)))) }
mit
cuibuaa/renrenCawler
ghost_renren.py
5292
import re import time import os from ghost import Ghost def saveImage(imgbytes, imgpath): wfile = open(imgpath, "wb") for i in range(0, imgbytes.size()): wfile.write(imgbytes[i]) wfile.close() def getImage(ghost): html = ghost.content reg = r'id="album-box-(\d+?)"' albumidre = re.compile(reg) albumidlist = re.findall(albumidre,html) albumlnklist = [] #first check the img path if not exist just create one imgdir = 'renren_img' if not os.path.exists(imgdir) : os.makedirs(imgdir) #save the albumlnk first to avoid the problem of changing ghost for albumid in albumidlist: # Get the image album link albumlnk = ghost.get_attribute('a[id="album-%s"]' % albumid, 'href') albumlnklist.append(albumlnk) #start to get the image from different albums for albumlnk in albumlnklist: page,resource = ghost.open(albumlnk) ghost.wait_for_selector('a[class="p-b-item"]') html = ghost.content # Find the img link # 'r' means raw string, all the character should be considered as a normal character reg = r';(http://.+?/(p_large_|large_|original_|h_large_).+?\.jpg)&quot;' imglnkre = re.compile(reg) imglnklist = re.findall(imglnkre,html) print('image list in album lnk %s is %s' % (albumlnk,imglnklist)) if len(imglnklist) != 0 : i = 0 for imglnk in imglnklist: #trim some blank character (\u200b) in some awful link imglnk = imglnk[0].replace('\u200b', '') #create the image name #first get the date info reg = r'/(\d{8})/' datereg = re.compile(reg) imgdate = re.search(datereg, imglnk).group(1) imgpath = '%s/%s-%d.jpg' % (imgdir,imgdate,i) #save the image to the disk page, resource = ghost.open(imglnk) ghost.wait_for_page_loaded() saveImage(page.content, imgpath) i = i + 1 print('Created the img %s' % imgpath) print('Get all the image, check the dir %s and just enjoy it' % imgdir) def getUserId(html): reg = r'href="http://www\.renren\.com/(\d{2,}?)/profile"' idre = re.compile(reg) userid = re.search(idre, html) if userid != None : return userid.group(1) else : return None def getBlog(ghost): lastblog = False i = 0; html = ghost.content blogfile = 'renren_blog.html' wfile = open(blogfile, "w", encoding='utf-8') #find the first blog url reg = r'href="(http://blog\.renren\.com/blog/\d{2,}?/.+?\?bfrom=.+?)"' blogre = re.compile(reg) blogurl = re.search(blogre, html).group(1) while True: #open the blog page i = i + 1 print('[%d]Getting the blog:%s' % (i,blogurl)) page, resource = ghost.open(blogurl) ghost.wait_for_page_loaded() #handle the blog information title = ghost.get_text('h2[class="blogDetail-title"]') #print("Title:" + title) wfile.write("<h1>" + title + "</h1>\n") content = ghost.get_text('div[id="blogContent"]') #print("Content:" + content) wfile.write("<p>" + content + "</p>\n") #checking whether it's the last one lastblog = not ghost.exists('div[class="blogDetail-pre"]') if lastblog: #Jump out the loop break else : #goto the pre-blog url blogurl = ghost.get_attribute('div[class="blogDetail-pre"] > a', 'href') print("Blog extracting finished, total %d blog, check the file %s and just enjoy it" % (i, blogfile)) wfile.close() def hasCheckCode(ghost): value, resource = ghost.wait_for_text('您输入的验证码不正确', 3) return value ghost = Ghost(wait_timeout=10, display=True) #here you can set your proxy ip #ghost.set_proxy('http','109.105.1.52',8080) # Opens the web page page, resource = ghost.open('http://www.renren.com') username = input('Please input your username:') password = input('Please input your password:') ghost.wait_for_page_loaded() ghost.set_field_value('input[id="email"]', username) ghost.set_field_value('input[id="password"]', password) ghost.click('input[id="login"]') ghost.wait_for_page_loaded() #here for the checkcode input if hasCheckCode(ghost) : ghost.show() checkcode = input('Please input the checkcode:') ghost.hide() ghost.set_field_value('input[id="icode"]', checkcode) ghost.click('input[id="login"]') #enter my blog web site ghost.wait_for_text('首页') #get the use id from the homepage userid = getUserId(ghost.content) if userid == None : print('[Opps]The id pattern is changed, checking that by the web tools') exit() #first get the private blog page, resource = ghost.open('http://blog.renren.com/blog/%s/myBlogs' % userid) ghost.wait_for_page_loaded() getBlog(ghost) #then get the private image page, resource = ghost.open('http://photo.renren.com/photo/%s/albumlist/v7?showAll=1#' % userid) ghost.wait_for_page_loaded() getImage(ghost)
mit
Deslon/Supernova
workspaces/androidstudio/app/src/main/java/com/deslon/supernova/TextInput.java
3864
package com.deslon.supernova; import android.content.Context; import android.opengl.GLSurfaceView; import android.util.AttributeSet; import android.view.KeyEvent; import android.widget.EditText; import android.os.Handler; import android.os.Message; import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.EditorInfo; import android.widget.TextView; import android.widget.TextView.OnEditorActionListener; import android.text.TextWatcher; import android.text.Editable; public class TextInput extends EditText implements TextWatcher, OnEditorActionListener{ private final static int HANDLER_OPEN_KEYBOARD = 2; private final static int HANDLER_CLOSE_KEYBOARD = 3; private GLSurfaceView view; private static Handler sHandler; public TextInput(final Context context) { super(context); this.initView(); } public TextInput(final Context context, final AttributeSet attrs) { super(context, attrs); this.initView(); } public TextInput(final Context context, final AttributeSet attrs, final int defStyle) { super(context, attrs, defStyle); this.initView(); } protected void initView() { this.setPadding(0, 0, 0, 0); this.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI); sHandler = new Handler() { @Override public void handleMessage(final Message msg) { switch (msg.what) { case HANDLER_OPEN_KEYBOARD: { TextInput edit = (TextInput)msg.obj; if (edit.requestFocus()) { final InputMethodManager imm = (InputMethodManager)view.getContext().getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(edit, 0); } } break; case HANDLER_CLOSE_KEYBOARD: { TextInput edit = (TextInput)msg.obj; final InputMethodManager imm = (InputMethodManager)view.getContext().getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(edit.getWindowToken(), 0); edit.view.requestFocus(); } break; } } }; } public void setView(final GLSurfaceView view) { this.view = view; view.requestFocus(); } private boolean isFullScreenEdit() { final TextInput textField = this; final InputMethodManager imm = (InputMethodManager)textField.getContext().getSystemService(Context.INPUT_METHOD_SERVICE); return imm.isFullscreenMode(); } @Override public boolean onKeyDown(final int keyCode, final KeyEvent keyEvent) { super.onKeyDown(keyCode, keyEvent); //Prevent program from going to background if (keyCode == KeyEvent.KEYCODE_BACK) { this.view.requestFocus(); } return true; } @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { // TODO Auto-generated method stub } @Override public void onTextChanged(final CharSequence s, final int start, final int before, final int count) { if (view != null) { view.queueEvent(new Runnable() { @Override public void run() { if (before < count) { JNIWrapper.system_text_input(String.valueOf(s.charAt(start + before))); } else { JNIWrapper.system_text_input("\b"); } } }); } } @Override public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } @Override public boolean onEditorAction(final TextView v, final int actionId, final KeyEvent event) { if (this == v && this.isFullScreenEdit()) { final String characters = event.getCharacters(); view.queueEvent(new Runnable() { @Override public void run() { JNIWrapper.system_text_input(characters); } }); } return false; } public void showKeyboard() { final Message msg = new Message(); msg.what = HANDLER_OPEN_KEYBOARD; msg.obj = this; sHandler.sendMessage(msg); } public void hideKeyboard() { final Message msg = new Message(); msg.what = HANDLER_CLOSE_KEYBOARD; msg.obj = this; sHandler.sendMessage(msg); } }
mit
portchris/NaturalRemedyCompany
src/app/code/core/Mage/Paypal/Model/Mysql4/Cert.php
1207
<?php /** * Magento * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magento.com for more information. * * @category Mage * @package Mage_Paypal * @copyright Copyright (c) 2006-2019 Magento, Inc. (http://www.magento.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** * PayPal resource model for certificate based authentication * * @category Mage * @package Mage_Paypal * @author Magento Core Team <[email protected]> */ class Mage_Paypal_Model_Mysql4_Cert extends Mage_Paypal_Model_Resource_Cert { }
mit
CodeTanzania/open311-web
app/scripts/controllers/dashboards/standing.js
20264
'use strict'; /** * @ngdoc function * @name ng311.controller:DashboardStandingCtrl * @description * # DashboardStandingCtrl * dashboard daily standing controller of ng311 */ angular .module('ng311') .controller('DashboardStandingCtrl', function ( $rootScope, $scope, $state, $uibModal, Summary, endpoints, party ) { //initialize scope attributes $scope.maxDate = new Date(); //bind states $scope.priorities = endpoints.priorities.priorities; $scope.statuses = endpoints.statuses.statuses; $scope.services = endpoints.services.services; $scope.servicegroups = endpoints.servicegroups.servicegroups; $scope.jurisdictions = endpoints.jurisdictions.jurisdictions; $scope.workspaces = party.settings.party.relation.workspaces; //bind filters var defaultFilters = { startedAt: moment().utc().startOf('date').toDate(), endedAt: moment().utc().endOf('date').toDate(), statuses: [], priorities: [], servicegroups: [], jurisdictions: [], workspaces: [] }; $scope.filters = defaultFilters; //bind exports $scope.maxDate = new Date(); $scope.exports = { filename: 'standing_reports_' + Date.now() + '.csv', headers: [ 'Area', 'Service Group', 'Service', 'Status', 'Priority', 'Count' ] }; //initialize standings $scope.standings = []; /** * Exports current standing data */ $scope.export = function () { var _exports = _.map($scope.standings, function (standing) { return { jurisdiction: standing.jurisdiction.name, servicegroup: standing.group.name, service: standing.service.name, status: standing.status.name, priority: standing.priority.name, count: standing.count }; }); return _exports; }; /** * Open overview reports filter */ $scope.showFilter = function () { //open overview reports filter modal $scope.modal = $uibModal.open({ templateUrl: 'views/dashboards/_partials/standings_filter.html', scope: $scope, size: 'lg', }); //handle modal close and dismissed $scope.modal.result.then(function onClose( /*selectedItem*/ ) {}, function onDismissed() {}); }; /** * Filter overview reports based on on current selected filters * @param {Boolean} [reset] whether to clear and reset filter */ $scope.filter = function (reset) { if (reset) { $scope.filters = defaultFilters; } //prepare query $scope.params = Summary.prepareQuery($scope.filters); //load reports $scope.reload(); //close current modal $scope.modal.close(); }; /** * Filter service based on selected service group */ $scope.filterServices = function () { //check for service group filter activation var filterHasServiceGroups = ($scope.filters.servicegroups && $scope.filters.servicegroups.length > 0); //pick only service of selected group if (filterHasServiceGroups) { //filter services based on service group(s) $scope.services = _.filter(endpoints.services.services, function (service) { var group = _.get(service, 'group._id', _.get(service, 'group')); return _.includes($scope.filters.servicegroups, group); }); } //use all services else { $scope.services = endpoints.services.services; } }; /** * Prepare standing reports for display */ $scope.prepare = function () { //notify no data loaded // if (!$scope.standings || $scope.standings.length <= 0) { // $rootScope.$broadcast('appWarning', { // message: 'No Data Found. Please Update Your Filters.' // }); // } //update export filename $scope.exports.filename = 'standing_reports_' + Date.now() + '.csv'; //build reports $scope.prepareIssuePerJurisdiction(); $scope.prepareIssuePerJurisdictionPerServiceGroup(); $scope.prepareIssuePerJurisdictionPerService(); $scope.prepareIssuePerJurisdictionPerPriority(); $scope.prepareIssuePerJurisdictionPerStatus(); }; /** * prepare per jurisdiction * @return {object} echart bar chart configurations * @version 0.1.0 * @since 0.1.0 * @author lally elias<[email protected]> */ $scope.prepareIssuePerJurisdiction = function () { //prepare unique jurisdictions for bar chart categories var categories = _.chain($scope.standings) .map('jurisdiction') .sortBy('name') .uniqBy('name') .value(); //prepare unique jurisdiction color for bar chart and legends color var colors = _.map(categories, 'color'); //prepare unique jurisdiction name for bar chart legends label var legends = _.map(categories, 'name'); //prepare bar chart series data var data = _.map(categories, function (category) { //obtain all standings of specified jurisdiction(category) var value = _.filter($scope.standings, function (standing) { return standing.jurisdiction.name === category.name; }); value = value ? _.sumBy(value, 'count') : 0; var serie = { name: category.name, value: value, itemStyle: { normal: { color: category.color } } }; return serie; }); //prepare chart config $scope.perJurisdictionConfig = { height: 400, forceClear: true }; //prepare chart options $scope.perJurisdictionOptions = { color: colors, textStyle: { fontFamily: 'Lato' }, tooltip: { trigger: 'item', formatter: '{b} : {c}' }, toolbox: { show: true, feature: { saveAsImage: { name: 'Issue per Area-' + new Date().getTime(), title: 'Save', show: true } } }, calculable: true, xAxis: [{ type: 'category', data: _.map(categories, 'name'), axisTick: { alignWithLabel: true } }], yAxis: [{ type: 'value' }], series: [{ type: 'bar', barWidth: '70%', label: { normal: { show: true } }, markPoint: { // show area with maximum and minimum data: [ { name: 'Maximum', type: 'max' }, { name: 'Minimum', type: 'min' } ] }, markLine: { //add average line precision: 0, data: [ { type: 'average', name: 'Average' } ] }, data: data }] }; }; /** * prepare per jurisdiction per service group bar chart * @return {object} echart bar chart configurations * @version 0.1.0 * @since 0.1.0 * @author lally elias<[email protected]> */ $scope.prepareIssuePerJurisdictionPerServiceGroup = function () { //prepare unique jurisdictions for bar chart categories var categories = _.chain($scope.standings) .map('jurisdiction') .sortBy('name') .map('name') .uniq() .value(); //prepare unique group for bar chart series var groups = _.chain($scope.standings) .map('group') .uniqBy('name') .value(); //prepare unique group color for bar chart and legends color var colors = _.map(groups, 'color'); //prepare unique group name for bar chart legends label var legends = _.map(groups, 'name'); //prepare bar chart series var series = {}; _.forEach(categories, function (category) { _.forEach(groups, function (group) { var serie = series[group.name] || { name: group.name, type: 'bar', label: { normal: { show: true, position: 'top' } }, data: [] }; //obtain all standings of specified jurisdiction(category) //and group var value = _.filter($scope.standings, function (standing) { return (standing.jurisdiction.name === category && standing.group.name === group.name); }); value = value ? _.sumBy(value, 'count') : 0; serie.data.push({ value: value, itemStyle: { normal: { color: group.color } } }); series[group.name] = serie; }); }); series = _.values(series); //prepare chart config $scope.perJurisdictionPerServiceGroupConfig = { height: 400, forceClear: true }; //prepare chart options $scope.perJurisdictionPerServiceGroupOptions = { color: colors, textStyle: { fontFamily: 'Lato' }, tooltip: { trigger: 'item', // formatter: '{b} : {c}' }, legend: { orient: 'horizontal', x: 'center', y: 'top', data: legends }, toolbox: { show: true, feature: { saveAsImage: { name: 'Issue per Area Per Service Group-' + new Date().getTime(), title: 'Save', show: true } } }, calculable: true, xAxis: [{ type: 'category', data: categories }], yAxis: [{ type: 'value' }], series: series }; }; /** * prepare per jurisdiction per service bar chart * @return {object} echart bar chart configurations * @version 0.1.0 * @since 0.1.0 * @author lally elias<[email protected]> */ $scope.prepareIssuePerJurisdictionPerService = function () { //prepare unique jurisdictions for bar chart categories var categories = _.chain($scope.standings) .map('jurisdiction') .sortBy('name') .map('name') .uniq() .value(); //prepare unique service for bar chart series var services = _.chain($scope.standings) .map('service') .uniqBy('name') .value(); //prepare chart config $scope.perJurisdictionPerServiceConfig = { height: 400, forceClear: true }; //prepare chart options $scope.perJurisdictionPerServiceOptions = []; //chunk services for better charting display var chunks = _.chunk(services, 4); var chunksSize = _.size(chunks); _.forEach(chunks, function (_services, index) { //prepare unique service color for bar chart and legends color var colors = _.map(_services, 'color'); //prepare unique service name for bar chart legends label var legends = _.map(_services, 'name'); //prepare bar chart series var series = {}; _.forEach(categories, function (category) { _.forEach(_services, function (service) { var serie = series[service.name] || { name: service.name, type: 'bar', label: { normal: { show: true, position: 'top' } }, data: [] }; //obtain all standings of specified jurisdiction(category) //and service var value = _.filter($scope.standings, function (standing) { return (standing.jurisdiction.name === category && standing.service.name === service.name); }); value = value ? _.sumBy(value, 'count') : 0; serie.data.push({ value: value, itemStyle: { normal: { color: service.color } } }); series[service.name] = serie; }); }); series = _.values(series); //ensure bottom margin for top charts var chart = (index === (chunksSize - 1)) ? {} : { grid: { bottom: '30%' } }; //prepare chart options $scope.perJurisdictionPerServiceOptions.push(_.merge(chart, { color: colors, textStyle: { fontFamily: 'Lato' }, tooltip: { trigger: 'item', // formatter: '{b} : {c}' }, legend: { orient: 'horizontal', x: 'center', y: 'top', data: legends }, toolbox: { show: true, feature: { saveAsImage: { name: 'Issue per Area Per Service-' + new Date().getTime(), title: 'Save', show: true } } }, calculable: true, xAxis: [{ type: 'category', data: categories }], yAxis: [{ type: 'value' }], series: series })); }); }; /** * prepare per jurisdiction per status bar chart * @return {object} echart bar chart configurations * @version 0.1.0 * @since 0.1.0 * @author lally elias<[email protected]> */ $scope.prepareIssuePerJurisdictionPerStatus = function () { //prepare unique jurisdictions for bar chart categories var categories = _.chain($scope.standings) .map('jurisdiction') .sortBy('name') .map('name') .uniq() .value(); //prepare unique status for bar chart series var statuses = _.chain($scope.standings) .map('status') .sortBy('weight') .uniqBy('name') .value(); //prepare unique status color for bar chart and legends color var colors = _.map(statuses, 'color'); //prepare unique status name for bar chart legends label var legends = _.map(statuses, 'name'); //prepare bar chart series var series = {}; _.forEach(categories, function (category) { _.forEach(statuses, function (status) { var serie = series[status.name] || { name: status.name, type: 'bar', label: { normal: { show: true, position: 'top' } }, data: [] }; //obtain all standings of specified jurisdiction(category) //and status var value = _.filter($scope.standings, function (standing) { return (standing.jurisdiction.name === category && standing.status.name === status.name); }); value = value ? _.sumBy(value, 'count') : 0; serie.data.push({ value: value, itemStyle: { normal: { color: status.color } } }); series[status.name] = serie; }); }); series = _.values(series); //prepare chart config $scope.perJurisdictionPerStatusConfig = { height: 400, forceClear: true }; //prepare chart options $scope.perJurisdictionPerStatusOptions = { color: colors, textStyle: { fontFamily: 'Lato' }, tooltip: { trigger: 'item', // formatter: '{b} : {c}' }, legend: { orient: 'horizontal', x: 'center', y: 'top', data: legends }, toolbox: { show: true, feature: { saveAsImage: { name: 'Issue per Area Per Status-' + new Date().getTime(), title: 'Save', show: true } } }, calculable: true, xAxis: [{ type: 'category', data: categories }], yAxis: [{ type: 'value' }], series: series }; }; /** * prepare per jurisdiction per priority bar chart * @return {object} echart bar chart configurations * @version 0.1.0 * @since 0.1.0 * @author lally elias<[email protected]> */ $scope.prepareIssuePerJurisdictionPerPriority = function () { //prepare unique jurisdictions for bar chart categories var categories = _.chain($scope.standings) .map('jurisdiction') .sortBy('name') .map('name') .uniq() .value(); //prepare unique priority for bar chart series var prioroties = _.chain($scope.standings) .map('priority') .sortBy('weight') .uniqBy('name') .value(); //prepare unique priority color for bar chart and legends color var colors = _.map(prioroties, 'color'); //prepare unique priority name for bar chart legends label var legends = _.map(prioroties, 'name'); //prepare bar chart series var series = {}; _.forEach(categories, function (category) { _.forEach(prioroties, function (priority) { var serie = series[priority.name] || { name: priority.name, type: 'bar', label: { normal: { show: true, position: 'top' } }, data: [] }; //obtain all standings of specified jurisdiction(category) //and priority var value = _.filter($scope.standings, function (standing) { return (standing.jurisdiction.name === category && standing.priority.name === priority.name); }); value = value ? _.sumBy(value, 'count') : 0; serie.data.push({ value: value, itemStyle: { normal: { color: priority.color } } }); series[priority.name] = serie; }); }); series = _.values(series); //prepare chart config $scope.perJurisdictionPerPriorityConfig = { height: 400, forceClear: true }; //prepare chart options $scope.perJurisdictionPerPriorityOptions = { color: colors, textStyle: { fontFamily: 'Lato' }, tooltip: { trigger: 'item', // formatter: '{b} : {c}' }, legend: { orient: 'horizontal', x: 'center', y: 'top', data: legends }, toolbox: { show: true, feature: { saveAsImage: { name: 'Issue per Area Per Priority-' + new Date().getTime(), title: 'Save', show: true } } }, calculable: true, xAxis: [{ type: 'category', data: categories }], yAxis: [{ type: 'value' }], series: series }; }; /** * Reload standing reports */ $scope.reload = function () { Summary .standings({ query: $scope.params }) .then(function (standings) { $scope.standings = standings; $scope.prepare(); }); }; //listen for events and reload overview accordingly $rootScope.$on('app:servicerequests:reload', function () { $scope.reload(); }); //pre-load reports //prepare overview details $scope.params = Summary.prepareQuery($scope.filters); $scope.reload(); });
mit
BenjaminLawson/PeerTunes
gulpfile.js
1127
var gulp = require('gulp') var browserify = require('browserify') var ejs = require('gulp-ejs') var source = require('vinyl-source-stream') var buffer = require('vinyl-buffer') var del = require('del') var pump = require('pump') var uglifyify = require('uglifyify') gulp.task('ejs', function() { return gulp.src("./views/index.ejs") .pipe(ejs(null, null, {ext: '.html'})) .pipe(gulp.dest("./dist")) }) gulp.task('browserify', function(cb) { var b = browserify({ entries: './src/main.js', transform: [uglifyify] }) var b2 = browserify('./src/main.js').transform('uglifyify', { global: true, ignore: [ '**/node_modules/jsmediatags/**', '**/node_modules/junk/**'] }) pump([ b2.bundle(), source('app.js'), gulp.dest('./dist/js') ], cb) }) gulp.task('static', function () { return gulp.src('./public/**').pipe(gulp.dest('./dist')) }) gulp.task('clean:dist', function () { return del([ 'dist/*' ]) }) gulp.task('clean:js', function () { return del([ 'public/js/app.js' ]) }) gulp.task('default', ['clean:dist', 'clean:js', 'ejs', 'static', 'browserify'])
mit
skylarsch/Destiny
lib/destiny/player_class.rb
331
module Destiny class PlayerClass attr_reader :hash, :type, :name, :identifier, :vendor_id def initialize(data) @hash = data[:class_hash] @type = data[:class_type] @name = data[:class_name] @identifier = data[:class_identifier] @vendor_id = data[:mentor_vendor_identifier] end end end
mit
scriptkitty/SNC
unikl/disco/calculator/symbolic_math/ThetaOutOfBoundException.java
1640
/* * (c) 2017 Michael A. Beck, Sebastian Henningsen * disco | Distributed Computer Systems Lab * University of Kaiserslautern, Germany * All Rights Reserved. * * This software is work in progress and is released in the hope that it will * be useful to the scientific community. It is provided "as is" without * express or implied warranty, including but not limited to the correctness * of the code or its suitability for any particular purpose. * * This software is provided under the MIT License, however, we would * appreciate it if you contacted the respective authors prior to commercial use. * * If you find our software useful, we would appreciate if you mentioned it * in any publication arising from the use of this software or acknowledge * our work otherwise. We would also like to hear of any fixes or useful */ package unikl.disco.calculator.symbolic_math; /** * Exception, which should be thrown, if the calculation of the * value of some {@link FunctionIF} fails, due to the parameter * theta being too large. For example calling * {@link ExponentialSigma.getValue} with a theta larger lambda * results in a non-existent MGF. Hence a ThetaOutOfBoundException * is thrown. * * @author Michael Beck * @see FunctionIF */ public class ThetaOutOfBoundException extends Exception { /** * */ private static final long serialVersionUID = -3205298027476314370L; /** * */ public ThetaOutOfBoundException(){ } /** * * @param s */ public ThetaOutOfBoundException(String s){ super(s); } }
mit
kiwipiet/AddressFinder
AddressFinder.Tests/SynonymFilter_Tests.cs
22107
using AddressFinder.Tests.Util; using Lucene.Net.Analysis; using Lucene.Net.Analysis.Standard; using Lucene.Net.Analysis.Tokenattributes; using Lucene.Net.Index; using Lucene.Net.QueryParsers; using Lucene.Net.Search; using Lucene.Net.Util; using NUnit.Framework; using System; using System.Linq; namespace AddressFinder.Tests { [TestFixture] public class SynonymFilter_Tests : BaseTokenStreamTestCase { [Test] public void SynonymFilter_Test() { QueryParser qp = new QueryParser(Lucene.Net.Util.Version.LUCENE_30, "", new MultiAnalyzer(this)); Assert.AreEqual("(apartment apt) foo", qp.Parse("Apartment foo").ToString()); Assert.AreEqual("(14th fourteenth) foo", qp.Parse("14th foo").ToString()); } /// <summary> Expands "multi" to "multi" and "multi2", both at the same position, /// and expands "triplemulti" to "triplemulti", "multi3", and "multi2". /// </summary> private class MultiAnalyzer : Analyzer { private void InitBlock(SynonymFilter_Tests enclosingInstance) { this.enclosingInstance = enclosingInstance; } private SynonymFilter_Tests enclosingInstance; public SynonymFilter_Tests Enclosing_Instance { get { return enclosingInstance; } } public MultiAnalyzer(SynonymFilter_Tests enclosingInstance) { InitBlock(enclosingInstance); } public override TokenStream TokenStream(System.String fieldName, System.IO.TextReader reader) { TokenStream result = new StandardTokenizer(Lucene.Net.Util.Version.LUCENE_30, reader); result = new LowerCaseFilter(result); result = new SynonymFilter(result, new SynonymEngine()); return result; } } } /// <summary>Base class for all Lucene unit tests that use TokenStreams.</summary> public abstract class BaseTokenStreamTestCase : LuceneTestCase { public BaseTokenStreamTestCase() { } public BaseTokenStreamTestCase(System.String name) : base(name) { } // some helpers to test Analyzers and TokenStreams: public interface ICheckClearAttributesAttribute : Lucene.Net.Util.IAttribute { bool GetAndResetClearCalled(); } public class CheckClearAttributesAttribute : Lucene.Net.Util.Attribute, ICheckClearAttributesAttribute { private bool clearCalled = false; public bool GetAndResetClearCalled() { try { return clearCalled; } finally { clearCalled = false; } } public override void Clear() { clearCalled = true; } public override bool Equals(Object other) { return ( other is CheckClearAttributesAttribute && ((CheckClearAttributesAttribute)other).clearCalled == this.clearCalled ); } public override int GetHashCode() { //Java: return 76137213 ^ Boolean.valueOf(clearCalled).hashCode(); return 76137213 ^ clearCalled.GetHashCode(); } public override void CopyTo(Lucene.Net.Util.Attribute target) { target.Clear(); } } public static void AssertTokenStreamContents(TokenStream ts, System.String[] output, int[] startOffsets, int[] endOffsets, System.String[] types, int[] posIncrements, int? finalOffset) { Assert.IsNotNull(output); ICheckClearAttributesAttribute checkClearAtt = ts.AddAttribute<ICheckClearAttributesAttribute>(); Assert.IsTrue(ts.HasAttribute<ITermAttribute>(), "has no TermAttribute"); ITermAttribute termAtt = ts.GetAttribute<ITermAttribute>(); IOffsetAttribute offsetAtt = null; if (startOffsets != null || endOffsets != null || finalOffset != null) { Assert.IsTrue(ts.HasAttribute<IOffsetAttribute>(), "has no OffsetAttribute"); offsetAtt = ts.GetAttribute<IOffsetAttribute>(); } ITypeAttribute typeAtt = null; if (types != null) { Assert.IsTrue(ts.HasAttribute<ITypeAttribute>(), "has no TypeAttribute"); typeAtt = ts.GetAttribute<ITypeAttribute>(); } IPositionIncrementAttribute posIncrAtt = null; if (posIncrements != null) { Assert.IsTrue(ts.HasAttribute<IPositionIncrementAttribute>(), "has no PositionIncrementAttribute"); posIncrAtt = ts.GetAttribute<IPositionIncrementAttribute>(); } ts.Reset(); for (int i = 0; i < output.Length; i++) { // extra safety to enforce, that the state is not preserved and also assign bogus values ts.ClearAttributes(); termAtt.SetTermBuffer("bogusTerm"); if (offsetAtt != null) offsetAtt.SetOffset(14584724, 24683243); if (typeAtt != null) typeAtt.Type = "bogusType"; if (posIncrAtt != null) posIncrAtt.PositionIncrement = 45987657; checkClearAtt.GetAndResetClearCalled(); // reset it, because we called clearAttribute() before Assert.IsTrue(ts.IncrementToken(), "token " + i + " does not exist"); Assert.IsTrue(checkClearAtt.GetAndResetClearCalled(), "clearAttributes() was not called correctly in TokenStream chain"); Assert.AreEqual(output[i], termAtt.Term, "term " + i); if (startOffsets != null) Assert.AreEqual(startOffsets[i], offsetAtt.StartOffset, "startOffset " + i); if (endOffsets != null) Assert.AreEqual(endOffsets[i], offsetAtt.EndOffset, "endOffset " + i); if (types != null) Assert.AreEqual(types[i], typeAtt.Type, "type " + i); if (posIncrements != null) Assert.AreEqual(posIncrements[i], posIncrAtt.PositionIncrement, "posIncrement " + i); } Assert.IsFalse(ts.IncrementToken(), "end of stream"); ts.End(); if (finalOffset.HasValue) Assert.AreEqual(finalOffset, offsetAtt.EndOffset, "finalOffset "); ts.Dispose(); } public static void AssertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets, String[] types, int[] posIncrements) { AssertTokenStreamContents(ts, output, startOffsets, endOffsets, types, posIncrements, null); } public static void AssertTokenStreamContents(TokenStream ts, String[] output) { AssertTokenStreamContents(ts, output, null, null, null, null, null); } public static void AssertTokenStreamContents(TokenStream ts, String[] output, String[] types) { AssertTokenStreamContents(ts, output, null, null, types, null, null); } public static void AssertTokenStreamContents(TokenStream ts, String[] output, int[] posIncrements) { AssertTokenStreamContents(ts, output, null, null, null, posIncrements, null); } public static void AssertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets) { AssertTokenStreamContents(ts, output, startOffsets, endOffsets, null, null, null); } public static void AssertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets, int? finalOffset) { AssertTokenStreamContents(ts, output, startOffsets, endOffsets, null, null, finalOffset); } public static void AssertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets, int[] posIncrements) { AssertTokenStreamContents(ts, output, startOffsets, endOffsets, null, posIncrements, null); } public static void AssertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets, int[] posIncrements, int? finalOffset) { AssertTokenStreamContents(ts, output, startOffsets, endOffsets, null, posIncrements, finalOffset); } public static void AssertAnalyzesTo(Analyzer a, String input, String[] output, int[] startOffsets, int[] endOffsets, String[] types, int[] posIncrements) { AssertTokenStreamContents(a.TokenStream("dummy", new System.IO.StringReader(input)), output, startOffsets, endOffsets, types, posIncrements, input.Length); } public static void AssertAnalyzesTo(Analyzer a, String input, String[] output) { AssertAnalyzesTo(a, input, output, null, null, null, null); } public static void AssertAnalyzesTo(Analyzer a, String input, String[] output, String[] types) { AssertAnalyzesTo(a, input, output, null, null, types, null); } public static void AssertAnalyzesTo(Analyzer a, String input, String[] output, int[] posIncrements) { AssertAnalyzesTo(a, input, output, null, null, null, posIncrements); } public static void AssertAnalyzesTo(Analyzer a, String input, String[] output, int[] startOffsets, int[] endOffsets) { AssertAnalyzesTo(a, input, output, startOffsets, endOffsets, null, null); } public static void AssertAnalyzesTo(Analyzer a, String input, String[] output, int[] startOffsets, int[] endOffsets, int[] posIncrements) { AssertAnalyzesTo(a, input, output, startOffsets, endOffsets, null, posIncrements); } public static void AssertAnalyzesToReuse(Analyzer a, String input, String[] output, int[] startOffsets, int[] endOffsets, String[] types, int[] posIncrements) { AssertTokenStreamContents(a.ReusableTokenStream("dummy", new System.IO.StringReader(input)), output, startOffsets, endOffsets, types, posIncrements, input.Length); } public static void AssertAnalyzesToReuse(Analyzer a, String input, String[] output) { AssertAnalyzesToReuse(a, input, output, null, null, null, null); } public static void AssertAnalyzesToReuse(Analyzer a, String input, String[] output, String[] types) { AssertAnalyzesToReuse(a, input, output, null, null, types, null); } public static void AssertAnalyzesToReuse(Analyzer a, String input, String[] output, int[] posIncrements) { AssertAnalyzesToReuse(a, input, output, null, null, null, posIncrements); } public static void AssertAnalyzesToReuse(Analyzer a, String input, String[] output, int[] startOffsets, int[] endOffsets) { AssertAnalyzesToReuse(a, input, output, startOffsets, endOffsets, null, null); } public static void AssertAnalyzesToReuse(Analyzer a, String input, String[] output, int[] startOffsets, int[] endOffsets, int[] posIncrements) { AssertAnalyzesToReuse(a, input, output, startOffsets, endOffsets, null, posIncrements); } // simple utility method for testing stemmers public static void CheckOneTerm(Analyzer a, System.String input, System.String expected) { AssertAnalyzesTo(a, input, new System.String[] { expected }); } public static void CheckOneTermReuse(Analyzer a, System.String input, System.String expected) { AssertAnalyzesToReuse(a, input, new System.String[] { expected }); } } /// <summary> Base class for all Lucene unit tests. /// <p/> /// Currently the /// only added functionality over JUnit's TestCase is /// asserting that no unhandled exceptions occurred in /// threads launched by ConcurrentMergeScheduler and asserting sane /// FieldCache usage athe moment of tearDown. /// <p/> /// If you /// override either <c>setUp()</c> or /// <c>tearDown()</c> in your unit test, make sure you /// call <c>super.setUp()</c> and /// <c>super.tearDown()</c> /// <p/> /// </summary> /// <seealso cref="assertSaneFieldCaches"> /// </seealso> [Serializable] public abstract class LuceneTestCase { public static System.IO.FileInfo TEMP_DIR; static LuceneTestCase() { String directory = Paths.TempDirectory; TEMP_DIR = new System.IO.FileInfo(directory); } bool allowDocsOutOfOrder = true; public LuceneTestCase() : base() { } public LuceneTestCase(System.String name) { } [SetUp] public virtual void SetUp() { ConcurrentMergeScheduler.SetTestMode(); } /// <summary> Forcible purges all cache entries from the FieldCache. /// <p/> /// This method will be called by tearDown to clean up FieldCache.DEFAULT. /// If a (poorly written) test has some expectation that the FieldCache /// will persist across test methods (ie: a static IndexReader) this /// method can be overridden to do nothing. /// <p/> /// </summary> /// <seealso cref="FieldCache.PurgeAllCaches()"> /// </seealso> protected internal virtual void PurgeFieldCache(FieldCache fc) { fc.PurgeAllCaches(); } protected internal virtual System.String GetTestLabel() { return NUnit.Framework.TestContext.CurrentContext.Test.FullName; } [TearDown] public virtual void TearDown() { try { // this isn't as useful as calling directly from the scope where the // index readers are used, because they could be gc'ed just before // tearDown is called. // But it's better then nothing. AssertSaneFieldCaches(GetTestLabel()); if (ConcurrentMergeScheduler.AnyUnhandledExceptions()) { // Clear the failure so that we don't just keep // failing subsequent test cases ConcurrentMergeScheduler.ClearUnhandledExceptions(); Assert.Fail("ConcurrentMergeScheduler hit unhandled exceptions"); } } finally { PurgeFieldCache(Lucene.Net.Search.FieldCache_Fields.DEFAULT); } //base.TearDown(); // {{Aroush-2.9}} this.seed = null; } /// <summary> Asserts that FieldCacheSanityChecker does not detect any /// problems with FieldCache.DEFAULT. /// <p/> /// If any problems are found, they are logged to System.err /// (allong with the msg) when the Assertion is thrown. /// <p/> /// This method is called by tearDown after every test method, /// however IndexReaders scoped inside test methods may be garbage /// collected prior to this method being called, causing errors to /// be overlooked. Tests are encouraged to keep their IndexReaders /// scoped at the class level, or to explicitly call this method /// directly in the same scope as the IndexReader. /// <p/> /// </summary> /// <seealso cref="FieldCacheSanityChecker"> /// </seealso> protected internal virtual void AssertSaneFieldCaches(System.String msg) { CacheEntry[] entries = Lucene.Net.Search.FieldCache_Fields.DEFAULT.GetCacheEntries(); Lucene.Net.Util.FieldCacheSanityChecker.Insanity[] insanity = null; try { try { insanity = FieldCacheSanityChecker.CheckSanity(entries); } catch (System.SystemException e) { System.IO.StreamWriter temp_writer; temp_writer = new System.IO.StreamWriter(System.Console.OpenStandardError(), System.Console.Error.Encoding); temp_writer.AutoFlush = true; DumpArray(msg + ": FieldCache", entries, temp_writer); throw e; } Assert.AreEqual(0, insanity.Length, msg + ": Insane FieldCache usage(s) found"); insanity = null; } finally { // report this in the event of any exception/failure // if no failure, then insanity will be null anyway if (null != insanity) { System.IO.StreamWriter temp_writer2; temp_writer2 = new System.IO.StreamWriter(System.Console.OpenStandardError(), System.Console.Error.Encoding); temp_writer2.AutoFlush = true; DumpArray(msg + ": Insane FieldCache usage(s)", insanity, temp_writer2); } } } /// <summary> Convinience method for logging an iterator.</summary> /// <param name="label">String logged before/after the items in the iterator /// </param> /// <param name="iter">Each next() is toString()ed and logged on it's own line. If iter is null this is logged differnetly then an empty iterator. /// </param> /// <param name="stream">Stream to log messages to. /// </param> public static void DumpIterator(System.String label, System.Collections.IEnumerator iter, System.IO.StreamWriter stream) { stream.WriteLine("*** BEGIN " + label + " ***"); if (null == iter) { stream.WriteLine(" ... NULL ..."); } else { while (iter.MoveNext()) { stream.WriteLine(iter.Current.ToString()); } } stream.WriteLine("*** END " + label + " ***"); } /// <summary> Convinience method for logging an array. Wraps the array in an iterator and delegates</summary> /// <seealso cref="dumpIterator(String,Iterator,PrintStream)"> /// </seealso> public static void DumpArray(System.String label, System.Object[] objs, System.IO.StreamWriter stream) { System.Collections.IEnumerator iter = (null == objs) ? null : new System.Collections.ArrayList(objs).GetEnumerator(); DumpIterator(label, iter, stream); } /// <summary> Returns a {@link Random} instance for generating random numbers during the test. /// The random seed is logged during test execution and printed to System.out on any failure /// for reproducing the test using {@link #NewRandom(long)} with the recorded seed /// . /// </summary> public virtual System.Random NewRandom() { if (this.seed != null) { throw new System.SystemException("please call LuceneTestCase.newRandom only once per test"); } return NewRandom(seedRnd.Next(System.Int32.MinValue, System.Int32.MaxValue)); } /// <summary> Returns a {@link Random} instance for generating random numbers during the test. /// If an error occurs in the test that is not reproducible, you can use this method to /// initialize the number generator with the seed that was printed out during the failing test. /// </summary> public virtual System.Random NewRandom(int seed) { if (this.seed != null) { throw new System.SystemException("please call LuceneTestCase.newRandom only once per test"); } this.seed = seed; return new System.Random(seed); } // recorded seed [NonSerialized] protected internal int? seed = null; //protected internal bool seed_init = false; // static members [NonSerialized] private static readonly System.Random seedRnd = new System.Random(); #region Java porting shortcuts protected static void assertEquals(string msg, object obj1, object obj2) { Assert.AreEqual(obj1, obj2, msg); } protected static void assertEquals(object obj1, object obj2) { Assert.AreEqual(obj1, obj2); } protected static void assertEquals(double d1, double d2, double delta) { Assert.AreEqual(d1, d2, delta); } protected static void assertEquals(string msg, double d1, double d2, double delta) { Assert.AreEqual(d1, d2, delta, msg); } protected static void assertTrue(bool cnd) { Assert.IsTrue(cnd); } protected static void assertTrue(string msg, bool cnd) { Assert.IsTrue(cnd, msg); } protected static void assertNotNull(object o) { Assert.NotNull(o); } protected static void assertNotNull(string msg, object o) { Assert.NotNull(o, msg); } protected static void assertNull(object o) { Assert.Null(o); } protected static void assertNull(string msg, object o) { Assert.Null(o, msg); } #endregion } }
mit
johnny-die-tulpe/illuminati
sauron/metrics/MySQLMetric.py
2139
#! /usr/bin/env python # # Copyright (c) 2011 SEOmoz # # 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. import os import pymysql import datetime from sauron import logger from sauron.metrics import Metric, MetricException class MySQLMetric(Metric): '''parameters: host=<mysqlhost>, user=<mysqluser>, passwd=<password> This Metric does 'show status' on the provided mysqlhost and reports query count and uptime in seconds ''' def __del__(self): try: self.cur.close() self.conn.close() except AttributeError: pass def values(self): try: self.conn = pymysql.connect(host=self.host, user=self.user, passwd=self.passwd) self.cur = self.conn.cursor() self.cur.execute('show status') r = dict(self.cur.fetchall()) return { 'results' : { 'uptime' : (r['Uptime'] , 'Seconds'), 'queries': (r['Queries'], 'Count') } } except pymysql.err.MySQLError: raise MetricException('Failed to connect to mySQL.') except KeyError: raise MetricException('Could not find all keys in mySQL status')
mit
mailup/mailup-ruby
lib/mailup/console/group.rb
4697
module MailUp module Console class Group attr_accessor :api def initialize(id, api) @api = api @id = id end # Import a recipient to the specified group(synchronous import). # # @param [Hash] recipient data, see ConsoleRecipientItems (See http://help.mailup.com/display/mailupapi/Models+v1.1#Modelsv1.1-ConsoleRecipientItem). # @param [Hash] params Optional params or filters: # @option params [Boolean] :ConfirmEmail Confirmed opt-in option. Default false. # # @see http://help.mailup.com/display/mailupapi/Console+methods+v1.1#Consolemethodsv1.1-AsyncImportRecipientsToGroup # def add_recipient(recipient, params = {}) @api.post("#{@api.path}/Group/#{@id}/Recipient", body: recipient, params: params) end # Async Import recipients to the specified group. # # @param [Array] recipients an array ConsoleRecipientItems (See http://help.mailup.com/display/mailupapi/Models+v1.1#Modelsv1.1-ConsoleRecipientItem). # @param [Hash] params Optional params or filters: # @option params [Boolean] :ConfirmEmail Confirmed opt-in option. Default false. # # @see http://help.mailup.com/display/mailupapi/Console+methods+v1.1#Consolemethodsv1.1-AsyncImportRecipientsToGroup # def add_recipients(recipients, params = {}) @api.post("#{@api.path}/Group/#{@id}/Recipients", body: recipients, params: params) end # Retrieve the recipients in the specified group. # # @param [Hash] params Optional params or filters: # @option params [Integer] :pageNumber The page number to return. # @option params [Integer] :pageSize The number of results to per page. # @option params [String] :filterby A filtering expression. # @option params [String] :orderby The sorting condition for the results. # # @return [JSON] Results and data including: # * IsPaginated [Boolean] # * Items [Array<Hash>] # * PageNumber [Integer] # * PageSize [Integer] # * Skipped [Integer] # * TotalElementsCount [Integer] # # @see http://help.mailup.com/display/mailupapi/Console+methods+v1.1#Consolemethodsv1.1-GetRecipientsByGroup # # @example # # recipients = mailup.console.group(5).recipients # recipients['TotalElementsCount'] # => 125 # recipients['Items'].first['Name'] # => "Joe Public" # def recipients(params = {}) @api.get("#{@api.path}/Group/#{@id}/Recipients", params: params) end # Subscribe the recipient with the related id to the specified group. # # @param [Integer] recipient_id The ID of the recipient. # # @return [Boolean] `true` if successful. # # @see http://help.mailup.com/display/mailupapi/Console+methods+v1.1#Consolemethodsv1.1-SubscribeRecipientToGroup # # @example # # susbcribe = mailup.console.group(5).subscribe(126) # => true # def subscribe(recipient_id) @api.post("#{@api.path}/Group/#{@id}/Subscribe/#{recipient_id}") end # Unsubscribe the recipient with the related id from the specified group. # # @param [Integer] recipient_id The ID of the recipient. # # @return [Boolean] `true` if successful. # # @see http://help.mailup.com/display/mailupapi/Console+methods+v1.1#Consolemethodsv1.1-UnsubscribeRecipientFromGroup # # @example # # unsusbcribe = mailup.console.group(5).unsubscribe(126) # => true # def unsubscribe(recipient_id) @api.delete("#{@api.path}/Group/#{@id}/Unsubscribe/#{recipient_id}") end # Send email message to all recipient in group. # # @param [Integer] message_id of the message. # @param [Hash] params Optional params or filters: # @option params [String] :datetime date/time for a deferred sending(should be UTC). # # @return [JSON] A Send object with the following attributes: # * idMessage [Integer] # * Sent [Integer] # * UnprocessedRecipients [Array] # * InvalidRecipients [Array] # # @see http://help.mailup.com/display/mailupapi/Console+methods+v1.1#Consolemethodsv1.1-SendMailMessageToRecipientInGroup # # @example # # send = mailup.console.group(5).send_message(1340) # send['Sent'] # => 1794 # def send_message(message_id, params = {}) @api.post("#{@api.path}/Group/#{@id}/Email/#{message_id}/Send", params: params) end end end end
mit
asaforss/phpmvc1
theme/default.tpl.php
4340
<!doctype html> <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> <!-- Consider adding a manifest.appcache: h5bp.com/d/Offline --> <!--[if gt IE 8]><!--> <html class="no-js" lang="sv"> <!--<![endif]--> <head> <meta charset="utf-8"> <!-- Use the .htaccess and remove these lines to avoid edge case issues. More info: h5bp.com/i/378 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">--> <title><?=$title?></title> <meta name="description" content="<?=$meta_description?>"> <!-- Mobile viewport optimized: h5bp.com/viewport --> <meta name="viewport" content="width=device-width"> <!-- Place favicon.ico and apple-touch-icon.png in the root directory: mathiasbynens.be/notes/touch-icons --> <link rel="stylesheet" href="theme/style.css"> <!-- More ideas for your <head> here: h5bp.com/d/head-Tips --> <!-- All JavaScript at the bottom, except this Modernizr build. Modernizr enables HTML5 elements & feature detects for optimal performance. Create your own custom Modernizr build: www.modernizr.com/download/ --> <script src="js/libs/modernizr-2.5.0.min.js"></script> <style> <?=$style?> </style> <link rel='shortcut icon' href='../img/favicon.ico'> </head> <body> <!-- Prompt IE 6 users to install Chrome Frame. Remove this if you support IE 6. chromium.org/developers/how-tos/chrome-frame-getting-started --> <!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]--> <header id="above"> <?=getHTMLForKmomNavlinks($navkmom, "nav-kmom")?> </header> <header id="header"> <div id="banner"> <a href="index.php"> <img class="site-logo" src="img/blomma.png" alt="logo" width="80" height="80" /> </a> <p class="site-title">phpmvc</p> <p class="site-slogan">Att koda ett PHP-baserat och MVC-inspirerat ramverk</p> </div> <?=getHTMLForNavigation($navbar, "navbar")?> </header> <div id="main" role="main"> <?=$main?> </div> <footer id="footer"> <p>&copy; Åsa Forss</p> <p>Tools: <a href="http://validator.w3.org/check/referer">html5</a> <a href="http://jigsaw.w3.org/css-validator/check/referer?profile=css3">css3</a> <a href="http://jigsaw.w3.org/css-validator/check/referer?profile=css21">css21</a> <a href="http://validator.w3.org/unicorn/check?ucn_uri=referer&amp;ucn_task=conformance">unicorn</a> <a href="http://validator.w3.org/checklink?uri=<?=$currentUrl?>">links</a> <a href="http://validator.w3.org/i18n-checker/check?uri=<?=$currentUrl?>">i18n</a> <!-- <a href="link?">http-header</a> --> <a href="http://csslint.net/">css-lint</a> <a href="http://jslint.com/">js-lint</a> <a href="http://jsperf.com/">js-perf</a> <a href="http://www.workwithcolor.com/hsl-color-schemer-01.htm">colors</a> <a href="http://dbwebb.se/style">style</a> </p> </footer> <!-- JavaScript at the bottom for fast page loading --> <!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline --> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script> <!-- scripts concatenated and minified via build script --> <script src="js/plugins.js"></script> <script src="js/script.js"></script> <!-- end scripts --> <!-- Asynchronous Google Analytics snippet. Change UA-XXXXX-X to be your site's ID. mathiasbynens.be/notes/async-analytics-snippet --> <script> var _gaq=[['_setAccount','UA-22093351-1'],['_trackPageview']]; (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0]; g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js'; s.parentNode.insertBefore(g,s)}(document,'script')); </script> </body> </html>
mit
mariohd/simpleMath
js/simpleMath.js
8806
(function() { var backgroundMusic = new Audio('sound/background.mp3'); backgroundMusic.addEventListener('ended', function() { this.currentTime = 0; this.play(); }, false); function shuffleArray(array) { for (var i = array.length - 1; i > 0; i--) { var j = Math.floor(Math.random() * (i + 1)); var temp = array[i]; array[i] = array[j]; array[j] = temp; } return array; } $('#stack_yuda, #stack_krisna, #stack_wangi, #stack_wira').each((e, e1) => { e1 = $(e1); var childrens = e1.children('li').detach().toArray(); shuffleArray(childrens); e1.append(childrens); }); if (! mobilecheck()) { backgroundMusic.play(); } else { document.body.addEventListener('touchstart', function(e){ backgroundMusic.play(); }, false); } var successEffect = new Audio('sound/success.mp3'); var contador = new ClockCounter(); var contadorVigente = setInterval(() => { contador.startCronometer('contador_tempo'); }, 1000); var support = { animations : Modernizr.cssanimations }, animEndEventNames = { 'WebkitAnimation' : 'webkitAnimationEnd', 'OAnimation' : 'oAnimationEnd', 'msAnimation' : 'MSAnimationEnd', 'animation' : 'animationend' }, animEndEventName = animEndEventNames[ Modernizr.prefixed( 'animation' ) ], onEndAnimation = function( el, callback ) { var onEndCallbackFn = function( ev ) { if( support.animations ) { if(ev.target != this) return; this.removeEventListener( animEndEventName, onEndCallbackFn); } if(callback && typeof callback === 'function') {callback.call();} }; if( support.animations ) { el.addEventListener(animEndEventName, onEndCallbackFn); } else { onEndCallbackFn(); } }; function nextSibling(el) { var nextSibling = el.nextSibling; while(nextSibling && nextSibling.nodeType != 1) { nextSibling = nextSibling.nextSibling } return nextSibling; } respostas = { adicao: [], subtracao: [], multiplicacao: [], divisao: [] } var minimoAcertos = 7; yuda = new Stack(document.getElementById('stack_yuda'), { infinite : false, onEndStack : () => { var acertos = respostas.adicao.reduce((a, b) => {return a + b; }, 0); if ( acertos >= minimoAcertos) { swal({ title: "Parabéns!", text: `Você acertou ${acertos * 10}% das questões de adição!`, imageUrl: "img/medalhas/adicao.png", imageSize: "140x140" }, () => { successEffect.play(); $('#medalhas').append('<img src="img/medalhas/adicao.png">'); $('html,body').animate({scrollTop: $('#subtracao').offset().top}, 500); $('#adicao').animate({ opacity: .3 }); $('#subtracao').animate({ opacity: 1 }); permitirSubtracao(); }); } else { respostas.adicao = []; yuda.restart(); swal("Desculpe!", `Você acertou somente ${acertos * 10}%. \n Necessário acertar mais de 70% para continuar.`, "error"); } } }), krisna = new Stack(document.getElementById('stack_krisna'), { infinite : false, onEndStack : () => { var acertos = respostas.subtracao.reduce((a, b) => {return a + b; }, 0); if (acertos >= minimoAcertos) { swal({ title: "Parabéns!", text: `Você acertou ${acertos * 10}% das questões de subtração!`, imageUrl: "img/medalhas/subtracao.png", imageSize: "140x140" }, () => { successEffect.play(); $('html,body').animate({scrollTop: $('#multiplicacao').offset().top}, 750); $('#medalhas').append('<img src="img/medalhas/subtracao.png">'); $('#subtracao').animate({ opacity: .3 }); $('#multiplicacao').animate({ opacity: 1 }); permitirMultiplicacao(); }); } else { respostas.subtracao = []; krisna.restart(); swal("Desculpe!", `Você acertou somente ${acertos * 10}%. \n Necessário acertar mais de 70% para continuar.`, "error"); } } }), wangi = new Stack(document.getElementById('stack_wangi'), { infinite : false, onEndStack : () => { var acertos = respostas.multiplicacao.reduce((a, b) => {return a + b; }, 0); if (acertos >= minimoAcertos) { swal({ title: "Parabéns!", text: `Você acertou ${acertos * 10}% das questões de multiplicação!`, imageUrl: "img/medalhas/multiplicacao.png", imageSize: "140x140" }, () => { successEffect.play(); $('html,body').animate({scrollTop: $('#divisao').offset().top}, 750); $('#medalhas').append('<img src="img/medalhas/multiplicacao.png">'); $('#multiplicacao').animate({ opacity: .3 }); $('#divisao').animate({ opacity: 1 }); permitirDivisao(); }); } else { respostas.multiplicacao = []; wangi.restart(); swal("Desculpe!", `Você acertou somente ${acertos * 10}%. \n Necessário acertar mais de 70% para continuar.`, "error"); } } }), wira = new Stack(document.getElementById('stack_wira'), { infinite : false, onEndStack : () => { var acertos = respostas.divisao.reduce((a, b) => {return a + b; }, 0); if (acertos >= minimoAcertos) { clearInterval(contadorVigente); swal({ title: "Parabéns!", text: "Você concluiu com êxito todos os desafios. \n" + `Desafios concluídos em ${ contador.min > 0 ? `${contador.min} minutos e ` : '' } ${ contador.seg } segundos`, imageUrl: "img/medalhas/matematica.png", imageSize: "140x140" }, () => { successEffect.play(); $('#divisao').animate({ opacity: .3 }); $('#medalhas').append('<img src="img/medalhas/divisao.png">'); $('#medalhas').append('<img id="matematica" src="img/medalhas/matematica.png">'); $('html,body').animate({scrollTop: $('.container').offset().top}, 750); }); } else { respostas.multiplicacao = []; wira.restart(); swal("Desculpe!", `Você acertou somente ${acertos * 10}%. \n Necessário acertar mais de 70% para continuar.`, "error"); } } }); var allowNext = true; // controls the click ring effect on the button var buttonClickCallback = function(bttn) { var bttn = bttn || this; bttn.setAttribute('data-state', 'unlocked'); console.log("proximo!"); allowNext = true; }; document.querySelector('.button--accept[data-stack = stack_yuda]').addEventListener(clickeventtype, function() { if (allowNext) { respostas.adicao.push(validarResposta('.stack--yuda', 1)); yuda.accept(buttonClickCallback.bind(this)); allowNext = false; } }); document.querySelector('.button--reject[data-stack = stack_yuda]').addEventListener(clickeventtype, function() { if (allowNext) { respostas.adicao.push(validarResposta('.stack--yuda', 0)); yuda.reject(buttonClickCallback.bind(this)); allowNext = false; } }); var permitirSubtracao = () => { document.querySelector('.button--accept[data-stack = stack_krisna]').addEventListener(clickeventtype, function() { if (allowNext) { respostas.subtracao.push(validarResposta('.stack--krisna', 1)); krisna.accept(buttonClickCallback.bind(this)); allowNext = false; } }); document.querySelector('.button--reject[data-stack = stack_krisna]').addEventListener(clickeventtype, function() { if (allowNext) { respostas.subtracao.push(validarResposta('.stack--krisna', 0)); krisna.reject(buttonClickCallback.bind(this)); allowNext = false; } }); }; var permitirMultiplicacao = () => { document.querySelector('.button--accept[data-stack = stack_wangi]').addEventListener(clickeventtype, function() { if (allowNext) { respostas.multiplicacao.push(validarResposta('.stack--wangi', 1)); wangi.accept(buttonClickCallback.bind(this)); allowNext = false; } }); document.querySelector('.button--reject[data-stack = stack_wangi]').addEventListener(clickeventtype, function() { if (allowNext) { respostas.multiplicacao.push(validarResposta('.stack--wangi', 0)); wangi.reject(buttonClickCallback.bind(this)); allowNext = false; } }); }; var permitirDivisao = () => { document.querySelector('.button--accept[data-stack = stack_wira]').addEventListener(clickeventtype, function() { if (allowNext) { respostas.divisao.push(validarResposta('.stack--wira', 1)); wira.accept(buttonClickCallback.bind(this)); allowNext = false; } }); document.querySelector('.button--reject[data-stack = stack_wira]').addEventListener(clickeventtype, function() { if (allowNext) { respostas.divisao.push(validarResposta('.stack--wira', 0)); wira.reject(buttonClickCallback.bind(this)); allowNext = false; } }); }; var validarResposta = (parent, resposta) => { var respostaUsuario = $(parent + ' li.stack__item.stack__item--current').data('correct-answer'); return resposta == respostaUsuario ? 1 : 0 } })();
mit
LearningByExample/reactive-ms-example
src/test/java/org/learning/by/example/reactive/microservices/application/ReactiveMsApplicationTest.java
2695
package org.learning.by.example.reactive.microservices.application; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.learning.by.example.reactive.microservices.model.LocationRequest; import org.learning.by.example.reactive.microservices.model.LocationResponse; import org.learning.by.example.reactive.microservices.test.BasicIntegrationTest; import org.learning.by.example.reactive.microservices.test.tags.SystemTest; import org.springframework.boot.web.server.LocalServerPort; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.*; @SystemTest @DisplayName("ReactiveMsApplication System Tests") class ReactiveMsApplicationTest extends BasicIntegrationTest { private static final String LOCATION_PATH = "/api/location"; private static final String ADDRESS_ARG = "{address}"; private static final String GOOGLE_ADDRESS = "1600 Amphitheatre Parkway, Mountain View, CA"; @LocalServerPort private int port; @BeforeEach void setup() { bindToServerPort(port); } @Test @DisplayName("get location from URL") void getLocationTest() { final LocationResponse response = get( builder -> builder.path(LOCATION_PATH).path("/").path(ADDRESS_ARG).build(GOOGLE_ADDRESS), LocationResponse.class); assertThat(response.getGeographicCoordinates(), not(nullValue())); assertThat(response.getGeographicCoordinates().getLatitude(), not(nullValue())); assertThat(response.getGeographicCoordinates().getLongitude(), not(nullValue())); assertThat(response.getSunriseSunset(), not(nullValue())); assertThat(response.getSunriseSunset().getSunrise(), not(isEmptyOrNullString())); assertThat(response.getSunriseSunset().getSunset(), not(isEmptyOrNullString())); } @Test @DisplayName("post location") void postLocationTest() { final LocationResponse response = post( builder -> builder.path(LOCATION_PATH).build(), new LocationRequest(GOOGLE_ADDRESS), LocationResponse.class); assertThat(response.getGeographicCoordinates(), not(nullValue())); assertThat(response.getGeographicCoordinates().getLatitude(), not(nullValue())); assertThat(response.getGeographicCoordinates().getLongitude(), not(nullValue())); assertThat(response.getSunriseSunset(), not(nullValue())); assertThat(response.getSunriseSunset().getSunrise(), not(isEmptyOrNullString())); assertThat(response.getSunriseSunset().getSunset(), not(isEmptyOrNullString())); } }
mit
silver-bullet/pkmn-server
spec/models/pokemon_evolution_spec.rb
113
require 'spec_helper' describe PokemonEvolution do pending "add some examples to (or delete) #{__FILE__}" end
mit
cqzongjian/angular4
angular4-hello-world/src/app/app.module.ts
598
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; import { HelloWorldComponent } from './hello-world/hello-world.component'; import { UserItemComponent } from './user-item/user-item.component'; import { UserListComponent } from './user-list/user-list.component'; @NgModule({ declarations: [ AppComponent, HelloWorldComponent, UserItemComponent, UserListComponent ], imports: [ BrowserModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule { }
mit
sethjuarez/numl
Src/numl/Math/Functions/ClippedRectifiedLinear.cs
1658
// file: Math\Functions\RectifiedLinear.cs // // summary: Implements the rectified linear class namespace numl.Math.Functions { /// <summary>A clipped rectified linear function.</summary> public class ClippedRectifiedLinear : Function { /// <summary> /// Gets or sets the maximum ouput value (default is 5). /// </summary> public double MaxValue { get; set; } /// <summary> /// Returns the minimum value from the function curve. /// </summary> public override double Minimum { get { return 0; } } /// <summary> /// Returns the maximum value from the function curve. Default is <see cref="MaxValue"/>. /// </summary> public override double Maximum { get { return MaxValue; } } /// <summary> /// Initializes a new Clipped Rectified Linear function with default maximum of 5. /// </summary> public ClippedRectifiedLinear() { MaxValue = 5d; } /// <summary>Computes the given x coordinate.</summary> /// <param name="x">The Vector to process.</param> /// <returns>A Vector.</returns> public override double Compute(double x) { return (x > 0d ? (x > MaxValue ? MaxValue : x) : 0d); } /// <summary>Derivatives the given x coordinate.</summary> /// <param name="x">The Vector to process.</param> /// <returns>A Vector.</returns> public override double Derivative(double x) { return (x > 0d && x < MaxValue ? 1 : 0); } } }
mit
streamj/JX
stream-core/src/main/java/com/example/stream/core/ui/recycler/ComplexViewHolder.java
405
package com.example.stream.core.ui.recycler; import android.view.View; import com.chad.library.adapter.base.BaseViewHolder; /** * Created by StReaM on 8/24/2017. */ public class ComplexViewHolder extends BaseViewHolder { public ComplexViewHolder(View view) { super(view); } public static ComplexViewHolder create(View view) { return new ComplexViewHolder(view); } }
mit
Kelvin-09/SoftwareInstitute
proxy/supervisor.js
823
/** * Created by kelvin on 15-8-2. */ var database = require('../common/database'); var crypto = require('crypto'); exports.validateSupervisor = function (alias, cipher, callback) { if (!alias || !cipher) { return callback(new Error('Parameter: pageSize / pageRequest must be number!')); } var queryString = 'SELECT * FROM supervisor WHERE alias = :alias'; database.query(queryString, { alias: alias }, function (err, result) { if (err) { return callback(err); } else if (!result) { return callback(new Error('No data!')); } var shaHash = crypto.createHash('sha1'); shaHash.update(cipher); shaHash.update(result[0].salt); return callback(null, shaHash.digest('hex') === result[0].cipher); }); };
mit
devicehive/devicehive-.net-mf
src/device/DeviceHiveMF/EquipmentEngine.cs
3662
using Microsoft.SPOT; namespace DeviceHive { /// <summary> /// Implementation of common equipment functionality /// </summary> /// <remarks> /// Implementers should derive from this class when creating their own custom equipment. See <see cref="DeviceHive.CommonEquipment.Switch"> Switch</see> class for more details. /// </remarks> public abstract class EquipmentEngine : Equipment { /// <summary> /// Return device that owns the equipment /// </summary> public DeviceEngine ParentDevice { get; private set; } /// <summary> /// Constricts an equipment for the specififed parent device /// </summary> /// <param name="dev">Device for which the equipment is created</param> public EquipmentEngine(DeviceEngine dev) : base() { ParentDevice = dev; //deviceClass = dev.DeviceData.deviceClass; //equipmentType = new EquipmentType(); } /// <summary> /// Executes an equipment commmand /// </summary> /// <param name="cmd">Command data structure</param> /// <returns>True if the command succeeded; false - otherwise</returns> /// <remarks> /// Implementers should override this function with an equipment-specific command code. /// Common approact is to check the command code and perform actions accordingly /// </remarks> /// <example> /// It would be great to create an example of OnCommand usage. /// </example> public abstract bool OnCommand(DeviceCommand cmd); /// <summary> /// Registers the equipment /// </summary> /// <returns>True if the registration succeeded; false - otherwise</returns> /// <remarks> /// When the device initializes, it initializes all the equipment it has. By overriding this function an equipment can provide custom initialization steps. /// </remarks> public virtual bool Register() { return true; } /// <summary> /// Unregisters the equipment /// </summary> /// <returns>True if unregister succeeded; false - otherwise</returns> /// <remarks> /// When the device is disconnected from the network or enters the fault state, it tries to unregister all its equipment. /// Implementers should override this function to provide custon uninitialization steps (closing files or handles, stopping timers, etc.). /// </remarks> public virtual bool Unregister() { return true; } /// <summary> /// Common functionality for sending equipment notifications /// </summary> /// <param name="DataName">Name of the equipment</param> /// <param name="DataValue">New value of the equipment</param> /// <returns>True if the notificatrion has been successfully sent; false - otherwise</returns> /// <remarks>Implementers can use this functuions in their custom code to notify of equipment value changes.</remarks> public virtual bool SendNotification(string DataName, object DataValue) { if (ParentDevice == null) { Debug.Print("unexpected parent device missing"); return false; } else { Debug.Print("Sending notification"); return ParentDevice.SendNotification(new EquipmentNotification(code, DataName, DataValue)); } } } }
mit
BevanR/location.href-cleaner
location-href-cleaner.js
626
/** * Works around the "`location.href` contains BA credentials" bug in Webkit. * * @see https://crbug.com/61946 */ (function(){ "use strict"; var correct = location.origin + location.pathname + location.search + location.hash; if (location.href !== correct) { if (typeof(history.replaceState) === 'function') { // Replace location.href without a page reload. history.replaceState({}, document.title, correct); } else { // This causes a full page reload, but only for old Webkit versions // and pages with BA credentials in the URL. location.href = correct; } } }());
mit
FormsCommunityToolkit/FormsCommunityToolkit
samples/XCT.Sample/Pages/Converters/VariableMultiValueConverterPage.xaml.cs
273
using System; using System.Collections.Generic; using Xamarin.Forms; namespace Xamarin.CommunityToolkit.Sample.Pages.Converters { public partial class VariableMultiValueConverterPage { public VariableMultiValueConverterPage() { InitializeComponent(); } } }
mit
delapecci/titanium-modules
ios7media/example/app.js
960
// This is a test harness for your module // You should do something interesting in this harness // to test out the module and to provide instructions // to users on how to use it by example. // open a single window var win = Ti.UI.createWindow({ backgroundColor:'white' }); var label = Ti.UI.createLabel(); win.add(label); win.open(); // TODO: write your module tests here var ios7media = require('jptech.ios7media'); Ti.API.info("module is => " + ios7media); label.text = ios7media.example(); Ti.API.info("module exampleProp is => " + ios7media.exampleProp); ios7media.exampleProp = "This is a test value"; if (Ti.Platform.name == "android") { var proxy = ios7media.createExample({ message: "Creating an example Proxy", backgroundColor: "red", width: 100, height: 100, top: 100, left: 150 }); proxy.printMessage("Hello world!"); proxy.message = "Hi world!. It's me again."; proxy.printMessage("Hello world!"); win.add(proxy); }
mit
Technolords/microservice-mock
src/test/java/net/technolords/micro/registry/eureka/EurekaRequestFactoryTest.java
2160
package net.technolords.micro.registry.eureka; import org.apache.http.client.methods.HttpPost; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import net.technolords.micro.model.jaxb.registration.Registration; import net.technolords.micro.model.jaxb.registration.Service; import net.technolords.micro.test.factory.ConfigurationsFactory; public class EurekaRequestFactoryTest { private final Logger LOGGER = LoggerFactory.getLogger(getClass()); private static final String DATASET_FOR_REGISTER = "dataSetForRegister"; @Test public void testCreateRegisterRequest() { Registration registration = this.createRegistration("mock-service", "mock-1", "localhost", 9090); HttpPost httpPost = (HttpPost) EurekaRequestFactory.createRegisterRequest(registration, ConfigurationsFactory.createConfigurations()); Assert.assertNotNull(httpPost); } /** * - service name * - service instance * - host * - port * - expected * * @return */ @DataProvider(name = DATASET_FOR_REGISTER) public Object[][] dataSetMock(){ return new Object[][] { { "mock-service", "mock-1", "localhost", 9090, "http://localhost:9090/eureka/v2/apps/mock-service"}, }; } @Test (dataProvider = DATASET_FOR_REGISTER) public void testGenerateUrlForRegister(String name, String id, String host, int port, String expected) { Registration registration = this.createRegistration(name, id, host, port); String actual = EurekaRequestFactory.generateUrlForRegister(registration); Assert.assertEquals(expected, actual); } protected Registration createRegistration(String name, String id, String host, int port) { Registration registration = new Registration(); registration.setAddress(host); registration.setPort(port); Service service = new Service(); service.setName(name); service.setId(id); registration.setService(service); return registration; } }
mit
AndriyShepitsen/realsiterSitePrototype
deployment/units/urb-example-inscriptio-webapp/components/__generated__/InscriptioScreen_Viewer.graphql.js
3342
/** * @flow */ /* eslint-disable */ 'use strict'; /*:: import type {ConcreteFragment} from 'relay-runtime'; export type InscriptioScreen_Viewer = {| +Inscriptios: ?{| +edges: ?$ReadOnlyArray<?{| +node: ?{| +id: string; +Inscriptio_LocationLat: ?string; +Inscriptio_LocationLon: ?string; |}; |}>; |}; |}; */ const fragment /*: ConcreteFragment*/ = { "argumentDefinitions": [], "kind": "Fragment", "metadata": { "connection": [ { "count": null, "cursor": null, "direction": "forward", "path": [ "Inscriptios" ] } ] }, "name": "InscriptioScreen_Viewer", "selections": [ { "kind": "LinkedField", "alias": "Inscriptios", "args": null, "concreteType": "InscriptiosConnection", "name": "__InscriptioScreen_Inscriptios_connection", "plural": false, "selections": [ { "kind": "LinkedField", "alias": null, "args": null, "concreteType": "InscriptiosEdge", "name": "edges", "plural": true, "selections": [ { "kind": "LinkedField", "alias": null, "args": null, "concreteType": "Inscriptio", "name": "node", "plural": false, "selections": [ { "kind": "ScalarField", "alias": null, "args": null, "name": "id", "storageKey": null }, { "kind": "ScalarField", "alias": null, "args": null, "name": "Inscriptio_LocationLat", "storageKey": null }, { "kind": "ScalarField", "alias": null, "args": null, "name": "Inscriptio_LocationLon", "storageKey": null }, { "kind": "ScalarField", "alias": null, "args": null, "name": "__typename", "storageKey": null } ], "storageKey": null }, { "kind": "ScalarField", "alias": null, "args": null, "name": "cursor", "storageKey": null } ], "storageKey": null }, { "kind": "LinkedField", "alias": null, "args": null, "concreteType": "PageInfo", "name": "pageInfo", "plural": false, "selections": [ { "kind": "ScalarField", "alias": null, "args": null, "name": "endCursor", "storageKey": null }, { "kind": "ScalarField", "alias": null, "args": null, "name": "hasNextPage", "storageKey": null } ], "storageKey": null } ], "storageKey": null } ], "type": "Viewer" }; module.exports = fragment;
mit
cedricleblond35/capvisu-site_supervision
vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitConstructFixer.php
6244
<?php /* * This file is part of PHP CS Fixer. * * (c) Fabien Potencier <[email protected]> * Dariusz Rumiński <[email protected]> * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace PhpCsFixer\Fixer\PhpUnit; use PhpCsFixer\AbstractFixer; use PhpCsFixer\Fixer\ConfigurationDefinitionFixerInterface; use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverRootless; use PhpCsFixer\FixerConfiguration\FixerOptionBuilder; use PhpCsFixer\FixerConfiguration\FixerOptionValidatorGenerator; use PhpCsFixer\FixerDefinition\CodeSample; use PhpCsFixer\FixerDefinition\FixerDefinition; use PhpCsFixer\Tokenizer\Tokens; /** * @author Dariusz Rumiński <[email protected]> */ final class PhpUnitConstructFixer extends AbstractFixer implements ConfigurationDefinitionFixerInterface { private static $assertionFixers = array( 'assertSame' => 'fixAssertPositive', 'assertEquals' => 'fixAssertPositive', 'assertNotEquals' => 'fixAssertNegative', 'assertNotSame' => 'fixAssertNegative', ); /** * {@inheritdoc} */ public function isCandidate(Tokens $tokens) { return $tokens->isTokenKindFound(T_STRING); } /** * {@inheritdoc} */ public function isRisky() { return true; } /** * {@inheritdoc} */ public function getDefinition() { return new FixerDefinition( 'PHPUnit assertion method calls like "->assertSame(true, $foo)" should be written with dedicated method like "->assertTrue($foo)".', array( new CodeSample( '<?php $this->assertEquals(false, $b); $this->assertSame(true, $a); $this->assertNotEquals(null, $c); $this->assertNotSame(null, $d); ' ), new CodeSample( '<?php $this->assertEquals(false, $b); $this->assertSame(true, $a); $this->assertNotEquals(null, $c); $this->assertNotSame(null, $d); ', array('assertions' => array('assertSame', 'assertNotSame')) ), ), null, 'Fixer could be risky if one is overriding PHPUnit\'s native methods.' ); } /** * {@inheritdoc} */ public function getPriority() { // should be run after the PhpUnitStrictFixer and before PhpUnitDedicateAssertFixer. return -10; } /** * {@inheritdoc} */ protected function applyFix(\SplFileInfo $file, Tokens $tokens) { // no assertions to be fixed - fast return if (empty($this->configuration['assertions'])) { return; } foreach ($this->configuration['assertions'] as $assertionMethod) { $assertionFixer = self::$assertionFixers[$assertionMethod]; for ($index = 0, $limit = $tokens->count(); $index < $limit; ++$index) { $index = $this->$assertionFixer($tokens, $index, $assertionMethod); if (null === $index) { break; } } } } /** * {@inheritdoc} */ protected function createConfigurationDefinition() { $generator = new FixerOptionValidatorGenerator(); $assertions = new FixerOptionBuilder('assertions', 'List of assertion methods to fix.'); $assertions = $assertions ->setAllowedTypes(array('array')) ->setAllowedValues(array( $generator->allowedValueIsSubsetOf(array_keys(self::$assertionFixers)), )) ->setDefault(array( 'assertEquals', 'assertSame', 'assertNotEquals', 'assertNotSame', )) ->getOption() ; return new FixerConfigurationResolverRootless('assertions', array($assertions)); } /** * @param Tokens $tokens * @param int $index * @param string $method * * @return int|null */ private function fixAssertNegative(Tokens $tokens, $index, $method) { static $map = array( 'false' => 'assertNotFalse', 'null' => 'assertNotNull', 'true' => 'assertNotTrue', ); return $this->fixAssert($map, $tokens, $index, $method); } /** * @param Tokens $tokens * @param int $index * @param string $method * * @return int|null */ private function fixAssertPositive(Tokens $tokens, $index, $method) { static $map = array( 'false' => 'assertFalse', 'null' => 'assertNull', 'true' => 'assertTrue', ); return $this->fixAssert($map, $tokens, $index, $method); } /** * @param array<string, string> $map * @param Tokens $tokens * @param int $index * @param string $method * * @return int|null */ private function fixAssert(array $map, Tokens $tokens, $index, $method) { $sequence = $tokens->findSequence( array( array(T_VARIABLE, '$this'), array(T_OBJECT_OPERATOR, '->'), array(T_STRING, $method), '(', ), $index ); if (null === $sequence) { return null; } $sequenceIndexes = array_keys($sequence); $sequenceIndexes[4] = $tokens->getNextMeaningfulToken($sequenceIndexes[3]); $firstParameterToken = $tokens[$sequenceIndexes[4]]; if (!$firstParameterToken->isNativeConstant()) { return null; } $sequenceIndexes[5] = $tokens->getNextMeaningfulToken($sequenceIndexes[4]); // return if first method argument is an expression, not value if (!$tokens[$sequenceIndexes[5]]->equals(',')) { return null; } $tokens[$sequenceIndexes[2]]->setContent($map[$firstParameterToken->getContent()]); $tokens->clearRange($sequenceIndexes[4], $tokens->getNextNonWhitespace($sequenceIndexes[5]) - 1); return $sequenceIndexes[5]; } }
mit
woocoins/wooo
src/qt/locale/bitcoin_de.ts
120553
<?xml version="1.0" ?><!DOCTYPE TS><TS language="de" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About WOOLFCOIN</source> <translation>Über WOOLFCOIN</translation> </message> <message> <location line="+39"/> <source>&lt;b&gt;WOOLFCOIN&lt;/b&gt; version</source> <translation>&lt;b&gt;WOOLFCOIN&lt;/b&gt;-Version</translation> </message> <message> <location line="+57"/> <source> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young ([email protected]) and UPnP software written by Thomas Bernard.</source> <translation> Dies ist experimentelle Software. Veröffentlicht unter der MIT/X11-Softwarelizenz, siehe beiligende Datei COPYING oder http://www.opensource.org/licenses/mit-license.php. Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im OpenSSL-Toolkit (http://www.openssl.org/) entwickelt wurde, sowie kryptographische Software geschrieben von Eric Young ([email protected]) und UPnP-Software geschrieben von Thomas Bernard.</translation> </message> <message> <location filename="../aboutdialog.cpp" line="+14"/> <source>Copyright</source> <translation>Copyright</translation> </message> <message> <location line="+0"/> <source>The WOOLFCOIN developers</source> <translation>Die WOOLFCOINentwickler</translation> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation>Adressbuch</translation> </message> <message> <location line="+19"/> <source>Double-click to edit address or label</source> <translation>Doppelklicken, um die Adresse oder die Bezeichnung zu bearbeiten</translation> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation>Eine neue Adresse erstellen</translation> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation>Ausgewählte Adresse in die Zwischenablage kopieren</translation> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation>&amp;Neue Adresse</translation> </message> <message> <location filename="../addressbookpage.cpp" line="+63"/> <source>These are your WOOLFCOIN 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>Dies sind Ihre WOOLFCOIN-Adressen zum Empfangen von Zahlungen. Es steht Ihnen frei, jedem Absender eine Andere mitzuteilen, um einen besseren Überblick über eingehende Zahlungen zu erhalten.</translation> </message> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>&amp;Copy Address</source> <translation>Adresse &amp;kopieren</translation> </message> <message> <location line="+11"/> <source>Show &amp;QR Code</source> <translation>&amp;QR-Code anzeigen</translation> </message> <message> <location line="+11"/> <source>Sign a message to prove you own a WOOLFCOIN address</source> <translation>Eine Nachricht signieren, um den Besitz einer WOOLFCOIN-Adresse zu beweisen</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation>Nachricht &amp;signieren</translation> </message> <message> <location line="+25"/> <source>Delete the currently selected address from the list</source> <translation>Die ausgewählte Adresse aus der Liste entfernen.</translation> </message> <message> <location line="+27"/> <source>Export the data in the current tab to a file</source> <translation>Daten der aktuellen Ansicht in eine Datei exportieren</translation> </message> <message> <location line="+3"/> <source>&amp;Export</source> <translation>E&amp;xportieren</translation> </message> <message> <location line="-44"/> <source>Verify a message to ensure it was signed with a specified WOOLFCOIN address</source> <translation>Eine Nachricht verifizieren, um sicherzustellen, dass diese mit einer angegebenen WOOLFCOIN-Adresse signiert wurde</translation> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation>Nachricht &amp;verifizieren</translation> </message> <message> <location line="+14"/> <source>&amp;Delete</source> <translation>&amp;Löschen</translation> </message> <message> <location filename="../addressbookpage.cpp" line="-5"/> <source>These are your WOOLFCOIN addresses for sending payments. Always check the amount and the receiving address before sending coins.</source> <translation>Dies sind Ihre WOOLFCOIN-Adressen zum Tätigen von Überweisungen. Bitte prüfen Sie den Betrag und die Empfangsadresse, bevor Sie WOOLFCOINs überweisen.</translation> </message> <message> <location line="+13"/> <source>Copy &amp;Label</source> <translation>&amp;Bezeichnung kopieren</translation> </message> <message> <location line="+1"/> <source>&amp;Edit</source> <translation>&amp;Editieren</translation> </message> <message> <location line="+1"/> <source>Send &amp;Coins</source> <translation>WOOLFCOINs &amp;überweisen</translation> </message> <message> <location line="+260"/> <source>Export Address Book Data</source> <translation>Adressbuch exportieren</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Kommagetrennte-Datei (*.csv)</translation> </message> <message> <location line="+13"/> <source>Error exporting</source> <translation>Fehler beim Exportieren</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>Konnte nicht in Datei %1 schreiben.</translation> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+144"/> <source>Label</source> <translation>Bezeichnung</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Adresse</translation> </message> <message> <location line="+36"/> <source>(no label)</source> <translation>(keine Bezeichnung)</translation> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation>Passphrasendialog</translation> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation>Passphrase eingeben</translation> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation>Neue Passphrase</translation> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation>Neue Passphrase wiederholen</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>Geben Sie die neue Passphrase für die Brieftasche ein.&lt;br&gt;Bitte benutzen Sie eine Passphrase bestehend aus &lt;b&gt;10 oder mehr zufälligen Zeichen&lt;/b&gt; oder &lt;b&gt;8 oder mehr Wörtern&lt;/b&gt;.</translation> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation>Brieftasche verschlüsseln</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation>Dieser Vorgang benötigt Ihre Passphrase, um die Brieftasche zu entsperren.</translation> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation>Brieftasche entsperren</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation>Dieser Vorgang benötigt Ihre Passphrase, um die Brieftasche zu entschlüsseln.</translation> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation>Brieftasche entschlüsseln</translation> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation>Passphrase ändern</translation> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation>Geben Sie die alte und neue Passphrase der Brieftasche ein.</translation> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation>Verschlüsselung der Brieftasche bestätigen</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 WOOLFCOINS&lt;/b&gt;!</source> <translation>Warnung: Wenn Sie Ihre Brieftasche verschlüsseln und Ihre Passphrase verlieren, werden Sie &lt;b&gt;alle Ihre WOOLFCOINs verlieren&lt;/b&gt;!</translation> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation>Sind Sie sich sicher, dass Sie Ihre Brieftasche verschlüsseln möchten?</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>WICHTIG: Alle vorherigen Sicherungen Ihrer Brieftasche sollten durch die neu erzeugte, verschlüsselte Brieftasche ersetzt werden. Aus Sicherheitsgründen werden vorherige Sicherungen der unverschlüsselten Brieftasche nutzlos, sobald Sie die neue, verschlüsselte Brieftasche verwenden.</translation> </message> <message> <location line="+100"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation>Warnung: Die Feststelltaste ist aktiviert!</translation> </message> <message> <location line="-130"/> <location line="+58"/> <source>Wallet encrypted</source> <translation>Brieftasche verschlüsselt</translation> </message> <message> <location line="-56"/> <source>WOOLFCOIN will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your woolfcoins from being stolen by malware infecting your computer.</source> <translation>WOOLFCOIN wird jetzt beendet, um den Verschlüsselungsprozess abzuschließen. Bitte beachten Sie, dass die Verschlüsselung Ihrer Brieftasche nicht vollständig vor Diebstahl Ihrer WOOLFCOINs durch Schadsoftware schützt, die Ihren Computer befällt.</translation> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+42"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation>Verschlüsselung der Brieftasche fehlgeschlagen</translation> </message> <message> <location line="-54"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation>Die Verschlüsselung der Brieftasche ist aufgrund eines internen Fehlers fehlgeschlagen. Ihre Brieftasche wurde nicht verschlüsselt.</translation> </message> <message> <location line="+7"/> <location line="+48"/> <source>The supplied passphrases do not match.</source> <translation>Die eingegebenen Passphrasen stimmen nicht überein.</translation> </message> <message> <location line="-37"/> <source>Wallet unlock failed</source> <translation>Entsperrung der Brieftasche fehlgeschlagen</translation> </message> <message> <location line="+1"/> <location line="+11"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation>Die eingegebene Passphrase zum Entschlüsseln der Brieftasche war nicht korrekt.</translation> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation>Entschlüsselung der Brieftasche fehlgeschlagen</translation> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation>Die Passphrase der Brieftasche wurde erfolgreich geändert.</translation> </message> </context> <context> <name>BitcoinGUI</name> <message> <location filename="../bitcoingui.cpp" line="+233"/> <source>Sign &amp;message...</source> <translation>Nachricht s&amp;ignieren...</translation> </message> <message> <location line="+280"/> <source>Synchronizing with network...</source> <translation>Synchronisiere mit Netzwerk...</translation> </message> <message> <location line="-349"/> <source>&amp;Overview</source> <translation>&amp;Übersicht</translation> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation>Allgemeine Übersicht der Brieftasche anzeigen</translation> </message> <message> <location line="+20"/> <source>&amp;Transactions</source> <translation>&amp;Transaktionen</translation> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation>Transaktionsverlauf durchsehen</translation> </message> <message> <location line="+7"/> <source>Edit the list of stored addresses and labels</source> <translation>Liste der gespeicherten Zahlungsadressen und Bezeichnungen bearbeiten</translation> </message> <message> <location line="-14"/> <source>Show the list of addresses for receiving payments</source> <translation>Liste der Empfangsadressen anzeigen</translation> </message> <message> <location line="+31"/> <source>E&amp;xit</source> <translation>&amp;Beenden</translation> </message> <message> <location line="+1"/> <source>Quit application</source> <translation>Anwendung beenden</translation> </message> <message> <location line="+4"/> <source>Show information about WOOLFCOIN</source> <translation>Informationen über WOOLFCOIN anzeigen</translation> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation>Über &amp;Qt</translation> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation>Informationen über Qt anzeigen</translation> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation>&amp;Konfiguration...</translation> </message> <message> <location line="+6"/> <source>&amp;Encrypt Wallet...</source> <translation>Brieftasche &amp;verschlüsseln...</translation> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation>Brieftasche &amp;sichern...</translation> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation>Passphrase &amp;ändern...</translation> </message> <message> <location line="+285"/> <source>Importing blocks from disk...</source> <translation>Importiere Blöcke von Laufwerk...</translation> </message> <message> <location line="+3"/> <source>Reindexing blocks on disk...</source> <translation>Reindiziere Blöcke auf Laufwerk...</translation> </message> <message> <location line="-347"/> <source>Send coins to a WOOLFCOIN address</source> <translation>WOOLFCOINs an eine WOOLFCOIN-Adresse überweisen</translation> </message> <message> <location line="+49"/> <source>Modify configuration options for WOOLFCOIN</source> <translation>Die Konfiguration des Clients bearbeiten</translation> </message> <message> <location line="+9"/> <source>Backup wallet to another location</source> <translation>Eine Sicherungskopie der Brieftasche erstellen und abspeichern</translation> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation>Ändert die Passphrase, die für die Verschlüsselung der Brieftasche benutzt wird</translation> </message> <message> <location line="+6"/> <source>&amp;Debug window</source> <translation>&amp;Debugfenster</translation> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation>Debugging- und Diagnosekonsole öffnen</translation> </message> <message> <location line="-4"/> <source>&amp;Verify message...</source> <translation>Nachricht &amp;verifizieren...</translation> </message> <message> <location line="-165"/> <location line="+530"/> <source>WOOLFCOIN</source> <translation>WOOLFCOIN</translation> </message> <message> <location line="-530"/> <source>Wallet</source> <translation>Brieftasche</translation> </message> <message> <location line="+101"/> <source>&amp;Send</source> <translation>Überweisen</translation> </message> <message> <location line="+7"/> <source>&amp;Receive</source> <translation>&amp;Empfangen</translation> </message> <message> <location line="+14"/> <source>&amp;Addresses</source> <translation>&amp;Adressen</translation> </message> <message> <location line="+22"/> <source>&amp;About WOOLFCOIN</source> <translation>&amp;Über WOOLFCOIN</translation> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation>&amp;Anzeigen / Verstecken</translation> </message> <message> <location line="+1"/> <source>Show or hide the main Window</source> <translation>Das Hauptfenster anzeigen oder verstecken</translation> </message> <message> <location line="+3"/> <source>Encrypt the private keys that belong to your wallet</source> <translation>Verschlüsselt die zu Ihrer Brieftasche gehörenden privaten Schlüssel</translation> </message> <message> <location line="+7"/> <source>Sign messages with your WOOLFCOIN addresses to prove you own them</source> <translation>Nachrichten signieren, um den Besitz Ihrer WOOLFCOIN-Adressen zu beweisen</translation> </message> <message> <location line="+2"/> <source>Verify messages to ensure they were signed with specified WOOLFCOIN addresses</source> <translation>Nachrichten verifizieren, um sicherzustellen, dass diese mit den angegebenen WOOLFCOIN-Adressen signiert wurden</translation> </message> <message> <location line="+28"/> <source>&amp;File</source> <translation>&amp;Datei</translation> </message> <message> <location line="+7"/> <source>&amp;Settings</source> <translation>&amp;Einstellungen</translation> </message> <message> <location line="+6"/> <source>&amp;Help</source> <translation>&amp;Hilfe</translation> </message> <message> <location line="+9"/> <source>Tabs toolbar</source> <translation>Registerkartenleiste</translation> </message> <message> <location line="+17"/> <location line="+10"/> <source>[testnet]</source> <translation>[Testnetz]</translation> </message> <message> <location line="+47"/> <source>WOOLFCOIN client</source> <translation>WOOLFCOIN-Client</translation> </message> <message numerus="yes"> <location line="+141"/> <source>%n active connection(s) to WOOLFCOIN network</source> <translation><numerusform>%n aktive Verbindung zum WOOLFCOIN-Netzwerk</numerusform><numerusform>%n aktive Verbindungen zum WOOLFCOIN-Netzwerk</numerusform></translation> </message> <message> <location line="+22"/> <source>No block source available...</source> <translation>Keine Blockquelle verfügbar...</translation> </message> <message> <location line="+12"/> <source>Processed %1 of %2 (estimated) blocks of transaction history.</source> <translation>%1 von (geschätzten) %2 Blöcken des Transaktionsverlaufs verarbeitet.</translation> </message> <message> <location line="+4"/> <source>Processed %1 blocks of transaction history.</source> <translation>%1 Blöcke des Transaktionsverlaufs verarbeitet.</translation> </message> <message numerus="yes"> <location line="+20"/> <source>%n hour(s)</source> <translation><numerusform>%n Stunde</numerusform><numerusform>%n Stunden</numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation><numerusform>%n Tag</numerusform><numerusform>%n Tage</numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n week(s)</source> <translation><numerusform>%n Woche</numerusform><numerusform>%n Wochen</numerusform></translation> </message> <message> <location line="+4"/> <source>%1 behind</source> <translation>%1 im Rückstand</translation> </message> <message> <location line="+14"/> <source>Last received block was generated %1 ago.</source> <translation>Der letzte empfangene Block ist %1 alt.</translation> </message> <message> <location line="+2"/> <source>Transactions after this will not yet be visible.</source> <translation>Transaktionen hiernach werden noch nicht angezeigt.</translation> </message> <message> <location line="+22"/> <source>Error</source> <translation>Fehler</translation> </message> <message> <location line="+3"/> <source>Warning</source> <translation>Warnung</translation> </message> <message> <location line="+3"/> <source>Information</source> <translation>Hinweis</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>Die Transaktion übersteigt das Größenlimit. Sie können sie trotzdem senden, wenn Sie eine zusätzliche Transaktionsgebühr in Höhe von %1 zahlen. Diese wird an die Knoten verteilt, die Ihre Transaktion bearbeiten und unterstützt damit das WOOLFCOIN-Netzwerk. Möchten Sie die Gebühr bezahlen?</translation> </message> <message> <location line="-140"/> <source>Up to date</source> <translation>Auf aktuellem Stand</translation> </message> <message> <location line="+31"/> <source>Catching up...</source> <translation>Hole auf...</translation> </message> <message> <location line="+113"/> <source>Confirm transaction fee</source> <translation>Transaktionsgebühr bestätigen</translation> </message> <message> <location line="+8"/> <source>Sent transaction</source> <translation>Gesendete Transaktion</translation> </message> <message> <location line="+0"/> <source>Incoming transaction</source> <translation>Eingehende Transaktion</translation> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation>Datum: %1 Betrag: %2 Typ: %3 Adresse: %4</translation> </message> <message> <location line="+33"/> <location line="+23"/> <source>URI handling</source> <translation>URI Verarbeitung</translation> </message> <message> <location line="-23"/> <location line="+23"/> <source>URI can not be parsed! This can be caused by an invalid WOOLFCOIN address or malformed URI parameters.</source> <translation>URI kann nicht analysiert werden! Dies kann durch eine ungültige WOOLFCOIN-Adresse oder fehlerhafte URI-Parameter verursacht werden.</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>Brieftasche ist &lt;b&gt;verschlüsselt&lt;/b&gt; und aktuell &lt;b&gt;entsperrt&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>Brieftasche ist &lt;b&gt;verschlüsselt&lt;/b&gt; und aktuell &lt;b&gt;gesperrt&lt;/b&gt;</translation> </message> <message> <location filename="../bitcoin.cpp" line="+111"/> <source>A fatal error occurred. WOOLFCOIN can no longer continue safely and will quit.</source> <translation>Ein schwerer Fehler ist aufgetreten. WOOLFCOIN kann nicht stabil weiter ausgeführt werden und wird beendet.</translation> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+104"/> <source>Network Alert</source> <translation>Netzwerkalarm</translation> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation>Adresse bearbeiten</translation> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation>&amp;Bezeichnung</translation> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation>Die Bezeichnung dieses Adressbuchseintrags</translation> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation>&amp;Adresse</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>Die Adresse des Adressbucheintrags. Diese kann nur für Zahlungsadressen bearbeitet werden.</translation> </message> <message> <location filename="../editaddressdialog.cpp" line="+21"/> <source>New receiving address</source> <translation>Neue Empfangsadresse</translation> </message> <message> <location line="+4"/> <source>New sending address</source> <translation>Neue Zahlungsadresse</translation> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation>Empfangsadresse bearbeiten</translation> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation>Zahlungsadresse bearbeiten</translation> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation>Die eingegebene Adresse &quot;%1&quot; befindet sich bereits im Adressbuch.</translation> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid WOOLFCOIN address.</source> <translation>Die eingegebene Adresse &quot;%1&quot; ist keine gültige WOOLFCOIN-Adresse.</translation> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation>Die Brieftasche konnte nicht entsperrt werden.</translation> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation>Generierung eines neuen Schlüssels fehlgeschlagen.</translation> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+424"/> <location line="+12"/> <source>WOOLFCOIN-Qt</source> <translation>WOOLFCOIN-Qt</translation> </message> <message> <location line="-12"/> <source>version</source> <translation>Version</translation> </message> <message> <location line="+2"/> <source>Usage:</source> <translation>Benutzung:</translation> </message> <message> <location line="+1"/> <source>command-line options</source> <translation>Kommandozeilenoptionen</translation> </message> <message> <location line="+4"/> <source>UI options</source> <translation>UI-Optionen</translation> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation>Sprache festlegen, z.B. &quot;de_DE&quot; (Standard: System Locale)</translation> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation>Minimiert starten</translation> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation>Startbildschirm beim Starten anzeigen (Standard: 1)</translation> </message> </context> <context> <name>OptionsDialog</name> <message> <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation>Erweiterte Einstellungen</translation> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation>&amp;Allgemein</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>Optionale Transaktionsgebühr pro KB, die sicherstellt, dass Ihre Transaktionen schnell bearbeitet werden. Die meisten Transaktionen sind 1 kB groß.</translation> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation>Transaktions&amp;gebühr bezahlen</translation> </message> <message> <location line="+31"/> <source>Automatically start WOOLFCOIN after logging in to the system.</source> <translation>WOOLFCOIN nach der Anmeldung am System automatisch ausführen.</translation> </message> <message> <location line="+3"/> <source>&amp;Start WOOLFCOIN on system login</source> <translation>&amp;Starte WOOLFCOIN nach Systemanmeldung</translation> </message> <message> <location line="+35"/> <source>Reset all client options to default.</source> <translation>Setzt die Clientkonfiguration auf Standardwerte zurück.</translation> </message> <message> <location line="+3"/> <source>&amp;Reset Options</source> <translation>Konfiguration &amp;zurücksetzen</translation> </message> <message> <location line="+13"/> <source>&amp;Network</source> <translation>&amp;Netzwerk</translation> </message> <message> <location line="+6"/> <source>Automatically open the WOOLFCOIN client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation>Automatisch den WOOLFCOIN-Clientport auf dem Router öffnen. Dies funktioniert nur, wenn Ihr Router UPnP unterstützt und dies aktiviert ist.</translation> </message> <message> <location line="+3"/> <source>Map port using &amp;UPnP</source> <translation>Portweiterleitung via &amp;UPnP</translation> </message> <message> <location line="+7"/> <source>Connect to the WOOLFCOIN network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation>Über einen SOCKS-Proxy mit dem WOOLFCOIN-Netzwerk verbinden (z.B. beim Verbinden über Tor).</translation> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy:</source> <translation>Über einen SOCKS-Proxy &amp;verbinden:</translation> </message> <message> <location line="+9"/> <source>Proxy &amp;IP:</source> <translation>Proxy-&amp;IP:</translation> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation>IP-Adresse des Proxies (z.B. 127.0.0.1)</translation> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation>&amp;Port:</translation> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation>Port des Proxies (z.B. 9050)</translation> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation>SOCKS-&amp;Version:</translation> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation>SOCKS-Version des Proxies (z.B. 5)</translation> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation>&amp;Programmfenster</translation> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation>Nur ein Symbol im Infobereich anzeigen, nachdem das Programmfenster minimiert wurde.</translation> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation>In den Infobereich anstatt in die Taskleiste &amp;minimieren</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>Minimiert die Anwendung anstatt sie zu beenden wenn das Fenster geschlossen wird. Wenn dies aktiviert ist, müssen Sie das Programm über &quot;Beenden&quot; im Menü schließen.</translation> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation>Beim Schließen m&amp;inimieren</translation> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation>&amp;Anzeige</translation> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation>&amp;Sprache der Benutzeroberfläche:</translation> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting WOOLFCOIN.</source> <translation>Legt die Sprache der Benutzeroberfläche fest. Diese Einstellung wird erst nach einem Neustart von WOOLFCOIN aktiv.</translation> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation>&amp;Einheit der Beträge:</translation> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation>Wählen Sie die Standarduntereinheit, die in der Benutzeroberfläche und beim Überweisen von WOOLFCOINs angezeigt werden soll.</translation> </message> <message> <location line="+9"/> <source>Whether to show WOOLFCOIN addresses in the transaction list or not.</source> <translation>Legt fest, ob WOOLFCOIN-Adressen in der Transaktionsliste angezeigt werden.</translation> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation>Adressen in der Transaktionsliste &amp;anzeigen</translation> </message> <message> <location line="+71"/> <source>&amp;OK</source> <translation>&amp;OK</translation> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation>&amp;Abbrechen</translation> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation>&amp;Übernehmen</translation> </message> <message> <location filename="../optionsdialog.cpp" line="+53"/> <source>default</source> <translation>Standard</translation> </message> <message> <location line="+130"/> <source>Confirm options reset</source> <translation>Zurücksetzen der Konfiguration bestätigen</translation> </message> <message> <location line="+1"/> <source>Some settings may require a client restart to take effect.</source> <translation>Einige Einstellungen benötigen möglicherweise einen Clientneustart, um aktiv zu werden.</translation> </message> <message> <location line="+0"/> <source>Do you want to proceed?</source> <translation>Wollen Sie fortfahren?</translation> </message> <message> <location line="+42"/> <location line="+9"/> <source>Warning</source> <translation>Warnung</translation> </message> <message> <location line="-9"/> <location line="+9"/> <source>This setting will take effect after restarting WOOLFCOIN.</source> <translation>Diese Einstellung wird erst nach einem Neustart von WOOLFCOIN aktiv.</translation> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation>Die eingegebene Proxyadresse ist ungültig.</translation> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation>Formular</translation> </message> <message> <location line="+50"/> <location line="+166"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the WOOLFCOIN network after a connection is established, but this process has not completed yet.</source> <translation>Die angezeigten Informationen sind möglicherweise nicht mehr aktuell. Ihre Brieftasche wird automatisch synchronisiert, nachdem eine Verbindung zum WOOLFCOIN-Netzwerk hergestellt wurde. Dieser Prozess ist jedoch derzeit noch nicht abgeschlossen.</translation> </message> <message> <location line="-124"/> <source>Balance:</source> <translation>Kontostand:</translation> </message> <message> <location line="+29"/> <source>Unconfirmed:</source> <translation>Unbestätigt:</translation> </message> <message> <location line="-78"/> <source>Wallet</source> <translation>Brieftasche</translation> </message> <message> <location line="+107"/> <source>Immature:</source> <translation>Unreif:</translation> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation>Erarbeiteter Betrag der noch nicht gereift ist</translation> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation>&lt;b&gt;Letzte Transaktionen&lt;/b&gt;</translation> </message> <message> <location line="-101"/> <source>Your current balance</source> <translation>Ihr aktueller Kontostand</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>Betrag aus unbestätigten Transaktionen, der noch nicht im aktuellen Kontostand enthalten ist</translation> </message> <message> <location filename="../overviewpage.cpp" line="+116"/> <location line="+1"/> <source>out of sync</source> <translation>nicht synchron</translation> </message> </context> <context> <name>PaymentServer</name> <message> <location filename="../paymentserver.cpp" line="+107"/> <source>Cannot start woolfcoin: click-to-pay handler</source> <translation>&quot;woolfcoin: Klicken-zum-Bezahlen&quot;-Handler konnte nicht gestartet werden</translation> </message> </context> <context> <name>QRCodeDialog</name> <message> <location filename="../forms/qrcodedialog.ui" line="+14"/> <source>QR Code Dialog</source> <translation>QR-Code-Dialog</translation> </message> <message> <location line="+59"/> <source>Request Payment</source> <translation>Zahlung anfordern</translation> </message> <message> <location line="+56"/> <source>Amount:</source> <translation>Betrag:</translation> </message> <message> <location line="-44"/> <source>Label:</source> <translation>Bezeichnung:</translation> </message> <message> <location line="+19"/> <source>Message:</source> <translation>Nachricht:</translation> </message> <message> <location line="+71"/> <source>&amp;Save As...</source> <translation>&amp;Speichern unter...</translation> </message> <message> <location filename="../qrcodedialog.cpp" line="+62"/> <source>Error encoding URI into QR Code.</source> <translation>Fehler beim Kodieren der URI in den QR-Code.</translation> </message> <message> <location line="+40"/> <source>The entered amount is invalid, please check.</source> <translation>Der eingegebene Betrag ist ungültig, bitte überprüfen.</translation> </message> <message> <location line="+23"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation>Resultierende URI zu lang, bitte den Text für Bezeichnung / Nachricht kürzen.</translation> </message> <message> <location line="+25"/> <source>Save QR Code</source> <translation>QR-Code abspeichern</translation> </message> <message> <location line="+0"/> <source>PNG Images (*.png)</source> <translation>PNG-Bild (*.png)</translation> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation>Clientname</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.v.</translation> </message> <message> <location line="-217"/> <source>Client version</source> <translation>Clientversion</translation> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation>&amp;Information</translation> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation>Verwendete OpenSSL-Version</translation> </message> <message> <location line="+49"/> <source>Startup time</source> <translation>Startzeit</translation> </message> <message> <location line="+29"/> <source>Network</source> <translation>Netzwerk</translation> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation>Anzahl Verbindungen</translation> </message> <message> <location line="+23"/> <source>On testnet</source> <translation>Im Testnetz</translation> </message> <message> <location line="+23"/> <source>Block chain</source> <translation>Blockkette</translation> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation>Aktuelle Anzahl Blöcke</translation> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation>Geschätzte Gesamtzahl Blöcke</translation> </message> <message> <location line="+23"/> <source>Last block time</source> <translation>Letzte Blockzeit</translation> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation>&amp;Öffnen</translation> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation>Kommandozeilenoptionen</translation> </message> <message> <location line="+7"/> <source>Show the WOOLFCOIN-Qt help message to get a list with possible WOOLFCOIN command-line options.</source> <translation>Zeige die WOOLFCOIN-Qt-Hilfsnachricht, um eine Liste mit möglichen Kommandozeilenoptionen zu erhalten.</translation> </message> <message> <location line="+3"/> <source>&amp;Show</source> <translation>&amp;Anzeigen</translation> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation>&amp;Konsole</translation> </message> <message> <location line="-260"/> <source>Build date</source> <translation>Erstellungsdatum</translation> </message> <message> <location line="-104"/> <source>WOOLFCOIN - Debug window</source> <translation>WOOLFCOIN - Debugfenster</translation> </message> <message> <location line="+25"/> <source>WOOLFCOIN Core</source> <translation>WOOLFCOIN-Kern</translation> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation>Debugprotokolldatei</translation> </message> <message> <location line="+7"/> <source>Open the WOOLFCOIN debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation>Öffnet die WOOLFCOIN-Debugprotokolldatei aus dem aktuellen Datenverzeichnis. Dies kann bei großen Protokolldateien einige Sekunden dauern.</translation> </message> <message> <location line="+102"/> <source>Clear console</source> <translation>Konsole zurücksetzen</translation> </message> <message> <location filename="../rpcconsole.cpp" line="-30"/> <source>Welcome to the WOOLFCOIN RPC console.</source> <translation>Willkommen in der WOOLFCOIN-RPC-Konsole.</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>Pfeiltaste hoch und runter, um die Historie durchzublättern und &lt;b&gt;Strg-L&lt;/b&gt;, um die Konsole zurückzusetzen.</translation> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation>Bitte &lt;b&gt;help&lt;/b&gt; eingeben, um eine Übersicht verfügbarer Befehle zu erhalten.</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>WOOLFCOINs überweisen</translation> </message> <message> <location line="+50"/> <source>Send to multiple recipients at once</source> <translation>In einer Transaktion an mehrere Empfänger auf einmal überweisen</translation> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation>Empfänger &amp;hinzufügen</translation> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation>Alle Überweisungsfelder zurücksetzen</translation> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation>&amp;Zurücksetzen</translation> </message> <message> <location line="+22"/> <source>Balance:</source> <translation>Kontostand:</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>Überweisung bestätigen</translation> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation>&amp;Überweisen</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; an %2 (%3)</translation> </message> <message> <location line="+5"/> <source>Confirm send coins</source> <translation>Überweisung bestätigen</translation> </message> <message> <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation>Sind Sie sich sicher, dass Sie die folgende Überweisung ausführen möchten?&lt;br&gt;%1</translation> </message> <message> <location line="+0"/> <source> and </source> <translation> und </translation> </message> <message> <location line="+23"/> <source>The recipient address is not valid, please recheck.</source> <translation>Die Zahlungsadresse ist ungültig, bitte nochmals überprüfen.</translation> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation>Der zu zahlende Betrag muss größer als 0 sein.</translation> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation>Der angegebene Betrag übersteigt Ihren Kontostand.</translation> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation>Der angegebene Betrag übersteigt aufgrund der Transaktionsgebühr in Höhe von %1 Ihren Kontostand.</translation> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation>Doppelte Adresse gefunden, pro Überweisung kann an jede Adresse nur einmalig etwas überwiesen werden.</translation> </message> <message> <location line="+5"/> <source>Error: Transaction creation failed!</source> <translation>Fehler: Transaktionserstellung fehlgeschlagen!</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>Fehler: Die Transaktion wurde abgelehnt. Dies kann passieren, wenn einige WOOLFCOINs aus Ihrer Brieftasche bereits ausgegeben wurden. Beispielsweise weil Sie eine Kopie Ihrer wallet.dat genutzt, die WOOLFCOINs dort ausgegeben haben und dies daher in der derzeit aktiven Brieftasche nicht vermerkt ist.</translation> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation>Formular</translation> </message> <message> <location line="+15"/> <source>A&amp;mount:</source> <translation>&amp;Betrag:</translation> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation>&amp;Empfänger:</translation> </message> <message> <location line="+34"/> <source>The address to send the payment to (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>Die Zahlungsadresse der Überweisung (z.B. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</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>Adressbezeichnung eingeben (diese wird zusammen mit der Adresse dem Adressbuch hinzugefügt)</translation> </message> <message> <location line="-78"/> <source>&amp;Label:</source> <translation>&amp;Bezeichnung:</translation> </message> <message> <location line="+28"/> <source>Choose address from address book</source> <translation>Adresse aus Adressbuch wählen</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>Adresse aus der Zwischenablage einfügen</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>Diesen Empfänger entfernen</translation> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a WOOLFCOIN address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>WOOLFCOIN-Adresse eingeben (z.B. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> </context> <context> <name>SignVerifyMessageDialog</name> <message> <location filename="../forms/signverifymessagedialog.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation>Signaturen - eine Nachricht signieren / verifizieren</translation> </message> <message> <location line="+13"/> <source>&amp;Sign Message</source> <translation>Nachricht &amp;signieren</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>Sie können Nachrichten mit Ihren Adressen signieren, um den Besitz dieser Adressen zu beweisen. Bitte nutzen Sie diese Funktion mit Vorsicht und nehmen Sie sich vor Phishingangriffen in Acht. Signieren Sie nur Nachrichten, mit denen Sie vollständig einverstanden sind.</translation> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>Die Adresse mit der die Nachricht signiert wird (z.B. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> <message> <location line="+10"/> <location line="+213"/> <source>Choose an address from the address book</source> <translation>Eine Adresse aus dem Adressbuch wählen</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>Adresse aus der Zwischenablage einfügen</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>Zu signierende Nachricht hier eingeben</translation> </message> <message> <location line="+7"/> <source>Signature</source> <translation>Signatur</translation> </message> <message> <location line="+27"/> <source>Copy the current signature to the system clipboard</source> <translation>Aktuelle Signatur in die Zwischenablage kopieren</translation> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this WOOLFCOIN address</source> <translation>Die Nachricht signieren, um den Besitz dieser WOOLFCOIN-Adresse zu beweisen</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation>&amp;Nachricht signieren</translation> </message> <message> <location line="+14"/> <source>Reset all sign message fields</source> <translation>Alle &quot;Nachricht signieren&quot;-Felder zurücksetzen</translation> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation>&amp;Zurücksetzen</translation> </message> <message> <location line="-87"/> <source>&amp;Verify Message</source> <translation>Nachricht &amp;verifizieren</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>Geben Sie die signierende Adresse, Nachricht (achten Sie darauf Zeilenumbrüche, Leerzeichen, Tabulatoren usw. exakt zu kopieren) und Signatur unten ein, um die Nachricht zu verifizieren. Vorsicht, interpretieren Sie nicht mehr in die Signatur, als in der signierten Nachricht selber enthalten ist, um nicht von einerm Man-in-the-middle-Angriff hinters Licht geführt zu werden.</translation> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>Die Adresse mit der die Nachricht signiert wurde (z.B. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified WOOLFCOIN address</source> <translation>Die Nachricht verifizieren, um sicherzustellen, dass diese mit der angegebenen WOOLFCOIN-Adresse signiert wurde</translation> </message> <message> <location line="+3"/> <source>Verify &amp;Message</source> <translation>&amp;Nachricht verifizieren</translation> </message> <message> <location line="+14"/> <source>Reset all verify message fields</source> <translation>Alle &quot;Nachricht verifizieren&quot;-Felder zurücksetzen</translation> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a WOOLFCOIN address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>WOOLFCOIN-Adresse eingeben (z.B. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation>Auf &quot;Nachricht signieren&quot; klicken, um die Signatur zu erzeugen</translation> </message> <message> <location line="+3"/> <source>Enter WOOLFCOIN signature</source> <translation>WOOLFCOIN-Signatur eingeben</translation> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation>Die eingegebene Adresse ist ungültig.</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>Bitte überprüfen Sie die Adresse und versuchen Sie es erneut.</translation> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation>Die eingegebene Adresse verweist nicht auf einen Schlüssel.</translation> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation>Entsperrung der Brieftasche wurde abgebrochen.</translation> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation>Privater Schlüssel zur eingegebenen Adresse ist nicht verfügbar.</translation> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation>Signierung der Nachricht fehlgeschlagen.</translation> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation>Nachricht signiert.</translation> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation>Die Signatur konnte nicht dekodiert werden.</translation> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation>Bitte überprüfen Sie die Signatur und versuchen Sie es erneut.</translation> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation>Die Signatur entspricht nicht dem Message Digest.</translation> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation>Verifikation der Nachricht fehlgeschlagen.</translation> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation>Nachricht verifiziert.</translation> </message> </context> <context> <name>SplashScreen</name> <message> <location filename="../splashscreen.cpp" line="+22"/> <source>The WOOLFCOIN developers</source> <translation>Die WOOLFCOINentwickler</translation> </message> <message> <location line="+1"/> <source>[testnet]</source> <translation>[Testnetz]</translation> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+20"/> <source>Open until %1</source> <translation>Offen bis %1</translation> </message> <message> <location line="+6"/> <source>%1/offline</source> <translation>%1/offline</translation> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation>%1/unbestätigt</translation> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation>%1 Bestätigungen</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>, über %n Knoten übertragen</numerusform><numerusform>, über %n Knoten übertragen</numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation>Datum</translation> </message> <message> <location line="+7"/> <source>Source</source> <translation>Quelle</translation> </message> <message> <location line="+0"/> <source>Generated</source> <translation>Generiert</translation> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation>Von</translation> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation>An</translation> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation>eigene Adresse</translation> </message> <message> <location line="-2"/> <source>label</source> <translation>Bezeichnung</translation> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation>Gutschrift</translation> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation><numerusform>reift noch %n weiteren Block</numerusform><numerusform>reift noch %n weitere Blöcke</numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation>nicht angenommen</translation> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation>Belastung</translation> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation>Transaktionsgebühr</translation> </message> <message> <location line="+16"/> <source>Net amount</source> <translation>Nettobetrag</translation> </message> <message> <location line="+6"/> <source>Message</source> <translation>Nachricht signieren</translation> </message> <message> <location line="+2"/> <source>Comment</source> <translation>Kommentar</translation> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation>Transaktions-ID</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>Generierte WOOLFCOINs müssen 120 Blöcke lang reifen, bevor sie ausgegeben werden können. Als Sie diesen Block generierten, wurde er an das Netzwerk übertragen, um ihn der Blockkette hinzuzufügen. Falls dies fehlschlägt wird der Status in &quot;nicht angenommen&quot; geändert und der Betrag wird nicht verfügbar werden. Das kann gelegentlich passieren, wenn ein anderer Knoten einen Block fast zeitgleich generiert.</translation> </message> <message> <location line="+7"/> <source>Debug information</source> <translation>Debuginformationen</translation> </message> <message> <location line="+8"/> <source>Transaction</source> <translation>Transaktion</translation> </message> <message> <location line="+3"/> <source>Inputs</source> <translation>Eingaben</translation> </message> <message> <location line="+23"/> <source>Amount</source> <translation>Betrag</translation> </message> <message> <location line="+1"/> <source>true</source> <translation>wahr</translation> </message> <message> <location line="+0"/> <source>false</source> <translation>falsch</translation> </message> <message> <location line="-209"/> <source>, has not been successfully broadcast yet</source> <translation>, wurde noch nicht erfolgreich übertragen</translation> </message> <message numerus="yes"> <location line="-35"/> <source>Open for %n more block(s)</source> <translation><numerusform>Offen für %n weiteren Block</numerusform><numerusform>Offen für %n weitere Blöcke</numerusform></translation> </message> <message> <location line="+70"/> <source>unknown</source> <translation>unbekannt</translation> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation>Transaktionsdetails</translation> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation>Dieser Bereich zeigt eine detaillierte Beschreibung der Transaktion an</translation> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+225"/> <source>Date</source> <translation>Datum</translation> </message> <message> <location line="+0"/> <source>Type</source> <translation>Typ</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Adresse</translation> </message> <message> <location line="+0"/> <source>Amount</source> <translation>Betrag</translation> </message> <message numerus="yes"> <location line="+57"/> <source>Open for %n more block(s)</source> <translation><numerusform>Offen für %n weiteren Block</numerusform><numerusform>Offen für %n weitere Blöcke</numerusform></translation> </message> <message> <location line="+3"/> <source>Open until %1</source> <translation>Offen bis %1</translation> </message> <message> <location line="+3"/> <source>Offline (%1 confirmations)</source> <translation>Offline (%1 Bestätigungen)</translation> </message> <message> <location line="+3"/> <source>Unconfirmed (%1 of %2 confirmations)</source> <translation>Unbestätigt (%1 von %2 Bestätigungen)</translation> </message> <message> <location line="+3"/> <source>Confirmed (%1 confirmations)</source> <translation>Bestätigt (%1 Bestätigungen)</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>Erarbeiteter Betrag wird verfügbar sein, nachdem er noch %n weiteren Block reift</numerusform><numerusform>Erarbeiteter Betrag wird verfügbar sein, nachdem er noch %n weitere Blöcke reift</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>Dieser Block wurde von keinem anderen Knoten empfangen und wird wahrscheinlich nicht angenommen werden!</translation> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation>Generiert, jedoch nicht angenommen</translation> </message> <message> <location line="+43"/> <source>Received with</source> <translation>Empfangen über</translation> </message> <message> <location line="+2"/> <source>Received from</source> <translation>Empfangen von</translation> </message> <message> <location line="+3"/> <source>Sent to</source> <translation>Überwiesen an</translation> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation>Eigenüberweisung</translation> </message> <message> <location line="+2"/> <source>Mined</source> <translation>Erarbeitet</translation> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation>(k.A.)</translation> </message> <message> <location line="+199"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation>Transaktionsstatus. Fahren Sie mit der Maus über dieses Feld, um die Anzahl der Bestätigungen zu sehen.</translation> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation>Datum und Uhrzeit als die Transaktion empfangen wurde.</translation> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation>Art der Transaktion</translation> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation>Zieladresse der Transaktion</translation> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation>Der Betrag, der dem Kontostand abgezogen oder hinzugefügt wurde.</translation> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+52"/> <location line="+16"/> <source>All</source> <translation>Alle</translation> </message> <message> <location line="-15"/> <source>Today</source> <translation>Heute</translation> </message> <message> <location line="+1"/> <source>This week</source> <translation>Diese Woche</translation> </message> <message> <location line="+1"/> <source>This month</source> <translation>Diesen Monat</translation> </message> <message> <location line="+1"/> <source>Last month</source> <translation>Letzten Monat</translation> </message> <message> <location line="+1"/> <source>This year</source> <translation>Dieses Jahr</translation> </message> <message> <location line="+1"/> <source>Range...</source> <translation>Zeitraum...</translation> </message> <message> <location line="+11"/> <source>Received with</source> <translation>Empfangen über</translation> </message> <message> <location line="+2"/> <source>Sent to</source> <translation>Überwiesen an</translation> </message> <message> <location line="+2"/> <source>To yourself</source> <translation>Eigenüberweisung</translation> </message> <message> <location line="+1"/> <source>Mined</source> <translation>Erarbeitet</translation> </message> <message> <location line="+1"/> <source>Other</source> <translation>Andere</translation> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation>Zu suchende Adresse oder Bezeichnung eingeben</translation> </message> <message> <location line="+7"/> <source>Min amount</source> <translation>Minimaler Betrag</translation> </message> <message> <location line="+34"/> <source>Copy address</source> <translation>Adresse kopieren</translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>Bezeichnung kopieren</translation> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation>Betrag kopieren</translation> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation>Transaktions-ID kopieren</translation> </message> <message> <location line="+1"/> <source>Edit label</source> <translation>Bezeichnung bearbeiten</translation> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation>Transaktionsdetails anzeigen</translation> </message> <message> <location line="+139"/> <source>Export Transaction Data</source> <translation>Transaktionen exportieren</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Kommagetrennte-Datei (*.csv)</translation> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation>Bestätigt</translation> </message> <message> <location line="+1"/> <source>Date</source> <translation>Datum</translation> </message> <message> <location line="+1"/> <source>Type</source> <translation>Typ</translation> </message> <message> <location line="+1"/> <source>Label</source> <translation>Bezeichnung</translation> </message> <message> <location line="+1"/> <source>Address</source> <translation>Adresse</translation> </message> <message> <location line="+1"/> <source>Amount</source> <translation>Betrag</translation> </message> <message> <location line="+1"/> <source>ID</source> <translation>ID</translation> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation>Fehler beim Exportieren</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>Konnte nicht in Datei %1 schreiben.</translation> </message> <message> <location line="+100"/> <source>Range:</source> <translation>Zeitraum:</translation> </message> <message> <location line="+8"/> <source>to</source> <translation>bis</translation> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+193"/> <source>Send Coins</source> <translation>WOOLFCOINs überweisen</translation> </message> </context> <context> <name>WalletView</name> <message> <location filename="../walletview.cpp" line="+42"/> <source>&amp;Export</source> <translation>E&amp;xportieren</translation> </message> <message> <location line="+1"/> <source>Export the data in the current tab to a file</source> <translation>Daten der aktuellen Ansicht in eine Datei exportieren</translation> </message> <message> <location line="+193"/> <source>Backup Wallet</source> <translation>Brieftasche sichern</translation> </message> <message> <location line="+0"/> <source>Wallet Data (*.dat)</source> <translation>Brieftaschendaten (*.dat)</translation> </message> <message> <location line="+3"/> <source>Backup Failed</source> <translation>Sicherung fehlgeschlagen</translation> </message> <message> <location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation>Beim Speichern der Brieftaschendaten an die neue Position ist ein Fehler aufgetreten.</translation> </message> <message> <location line="+4"/> <source>Backup Successful</source> <translation>Sicherung erfolgreich</translation> </message> <message> <location line="+0"/> <source>The wallet data was successfully saved to the new location.</source> <translation>Speichern der Brieftaschendaten an die neue Position war erfolgreich.</translation> </message> </context> <context> <name>bitcoin-core</name> <message> <location filename="../bitcoinstrings.cpp" line="+94"/> <source>WOOLFCOIN version</source> <translation>WOOLFCOIN-Version</translation> </message> <message> <location line="+102"/> <source>Usage:</source> <translation>Benutzung:</translation> </message> <message> <location line="-29"/> <source>Send command to -server or woolfcoind</source> <translation>Befehl an -server oder woolfcoind senden</translation> </message> <message> <location line="-23"/> <source>List commands</source> <translation>Befehle auflisten</translation> </message> <message> <location line="-12"/> <source>Get help for a command</source> <translation>Hilfe zu einem Befehl erhalten</translation> </message> <message> <location line="+24"/> <source>Options:</source> <translation>Optionen:</translation> </message> <message> <location line="+24"/> <source>Specify configuration file (default: woolfcoin.conf)</source> <translation>Konfigurationsdatei festlegen (Standard: woolfcoin.conf)</translation> </message> <message> <location line="+3"/> <source>Specify pid file (default: woolfcoind.pid)</source> <translation>PID-Datei festlegen (Standard: woolfcoind.pid)</translation> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation>Datenverzeichnis festlegen</translation> </message> <message> <location line="-9"/> <source>Set database cache size in megabytes (default: 25)</source> <translation>Größe des Datenbankcaches in MB festlegen (Standard: 25)</translation> </message> <message> <location line="-28"/> <source>Listen for connections on &lt;port&gt; (default: 4267 or testnet: 14267)</source> <translation>&lt;port&gt; nach Verbindungen abhören (Standard: 4267 oder Testnetz: 14267)</translation> </message> <message> <location line="+5"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation>Maximal &lt;n&gt; Verbindungen zu Gegenstellen aufrechterhalten (Standard: 125)</translation> </message> <message> <location line="-48"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation>Mit dem Knoten verbinden um Adressen von Gegenstellen abzufragen, danach trennen</translation> </message> <message> <location line="+82"/> <source>Specify your own public address</source> <translation>Die eigene öffentliche Adresse angeben</translation> </message> <message> <location line="+3"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation>Schwellenwert, um Verbindungen zu sich nicht konform verhaltenden Gegenstellen zu beenden (Standard: 100)</translation> </message> <message> <location line="-134"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation>Anzahl Sekunden, während denen sich nicht konform verhaltenden Gegenstellen die Wiederverbindung verweigert wird (Standard: 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>Beim Einrichten des abzuhörenden RPC-Ports %u für IPv4 ist ein Fehler aufgetreten: %s</translation> </message> <message> <location line="+27"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 4268 or testnet: 14268)</source> <translation>&lt;port&gt; nach JSON-RPC-Verbindungen abhören (Standard: 4268 oder Testnetz: 14268)</translation> </message> <message> <location line="+37"/> <source>Accept command line and JSON-RPC commands</source> <translation>Kommandozeilenbefehle und JSON-RPC-Befehle annehmen</translation> </message> <message> <location line="+76"/> <source>Run in the background as a daemon and accept commands</source> <translation>Als Hintergrunddienst starten und Befehle annehmen</translation> </message> <message> <location line="+37"/> <source>Use the test network</source> <translation>Das Testnetz verwenden</translation> </message> <message> <location line="-112"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation>Eingehende Verbindungen annehmen (Standard: 1, wenn nicht -proxy oder -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=woolfcoinrpc 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;WOOLFCOIN Alert&quot; [email protected] </source> <translation>%s, Sie müssen den Wert rpcpasswort in dieser Konfigurationsdatei angeben: %s Es wird empfohlen das folgende Zufallspasswort zu verwenden: rpcuser=woolfcoinrpc rpcpassword=%s (Sie müssen sich dieses Passwort nicht merken!) Der Benutzername und das Passwort dürfen NICHT identisch sein. Falls die Konfigurationsdatei nicht existiert, erzeugen Sie diese bitte mit Leserechten nur für den Dateibesitzer. Es wird ebenfalls empfohlen alertnotify anzugeben, um im Problemfall benachrichtig zu werden; zum Beispiel: alertnotify=echo %%s | mail -s \&quot;WOOLFCOIN Alert\&quot; [email protected] </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>Beim Einrichten des abzuhörenden RPC-Ports %u für IPv6 ist ein Fehler aufgetreten, es wird auf IPv4 zurückgegriffen: %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>An die angegebene Adresse binden und immer abhören. Für IPv6 [Host]:Port-Schreibweise verwenden</translation> </message> <message> <location line="+3"/> <source>Cannot obtain a lock on data directory %s. WOOLFCOIN is probably already running.</source> <translation>Datenverzeichnis %s kann nicht gesperrt werden. Evtl. wurde WOOLFCOIN bereits gestartet.</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>Fehler: Die Transaktion wurde abgelehnt! Dies kann passieren, wenn einige WOOLFCOINs aus Ihrer Brieftasche bereits ausgegeben wurden. Beispielsweise weil Sie eine Kopie Ihrer wallet.dat genutzt, die WOOLFCOINs dort ausgegeben haben und dies daher in der derzeit aktiven Brieftasche nicht vermerkt ist.</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>Fehler: Diese Transaktion benötigt aufgrund ihres Betrags, ihrer Komplexität oder der Nutzung kürzlich erhaltener Zahlungen eine Transaktionsgebühr in Höhe von mindestens %s!</translation> </message> <message> <location line="+3"/> <source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source> <translation>Kommando ausführen wenn ein relevanter Alarm empfangen wird (%s im Kommando wird durch die Nachricht ersetzt)</translation> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation>Kommando ausführen wenn sich eine Transaktion der Briefrasche verändert (%s im Kommando wird durch die TxID ersetzt)</translation> </message> <message> <location line="+11"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation>Maximale Größe von &quot;high-priority/low-fee&quot;-Transaktionen in Byte festlegen (Standard: 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>Dies ist eine Vorab-Testversion - Verwendung auf eigene Gefahr - nicht für Mining- oder Handelsanwendungen nutzen!</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>Warnung: -paytxfee ist auf einen sehr hohen Wert festgelegt! Dies ist die Gebühr die beim Senden einer Transaktion fällig wird.</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>Warnung: Angezeigte Transaktionen sind evtl. nicht korrekt! Sie oder die anderen Knoten müssen unter Umständen (den Client) aktualisieren.</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 WOOLFCOIN will not work properly.</source> <translation>Warnung: Bitte korrigieren Sie die Datums- und Uhrzeiteinstellungen Ihres Computers, da WOOLFCOIN ansonsten nicht ordnungsgemäß funktionieren wird!</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>Warnung: Lesen von wallet.dat fehlgeschlagen! Alle Schlüssel wurden korrekt gelesen, Transaktionsdaten bzw. Adressbucheinträge fehlen aber möglicherweise oder sind inkorrekt.</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>Warnung: wallet.dat beschädigt, Rettung erfolgreich! Original wallet.dat wurde als wallet.{Zeitstempel}.dat in %s gespeichert. Falls Ihr Kontostand oder Transaktionen nicht korrekt sind, sollten Sie von einer Datensicherung wiederherstellen.</translation> </message> <message> <location line="+14"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation>Versucht private Schlüssel aus einer beschädigten wallet.dat wiederherzustellen</translation> </message> <message> <location line="+2"/> <source>Block creation options:</source> <translation>Blockerzeugungsoptionen:</translation> </message> <message> <location line="+5"/> <source>Connect only to the specified node(s)</source> <translation>Nur mit dem/den angegebenen Knoten verbinden</translation> </message> <message> <location line="+3"/> <source>Corrupted block database detected</source> <translation>Beschädigte Blockdatenbank erkannt</translation> </message> <message> <location line="+1"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation>Eigene IP-Adresse erkennen (Standard: 1, wenn abgehört wird und nicht -externalip)</translation> </message> <message> <location line="+1"/> <source>Do you want to rebuild the block database now?</source> <translation>Möchten Sie die Blockdatenbank nun neu aufbauen?</translation> </message> <message> <location line="+2"/> <source>Error initializing block database</source> <translation>Fehler beim Initialisieren der Blockdatenbank</translation> </message> <message> <location line="+1"/> <source>Error initializing wallet database environment %s!</source> <translation>Fehler beim Initialisieren der Brieftaschen-Datenbankumgebung %s!</translation> </message> <message> <location line="+1"/> <source>Error loading block database</source> <translation>Fehler beim Laden der Blockdatenbank</translation> </message> <message> <location line="+4"/> <source>Error opening block database</source> <translation>Fehler beim Öffnen der Blockdatenbank</translation> </message> <message> <location line="+2"/> <source>Error: Disk space is low!</source> <translation>Fehler: Zu wenig freier Laufwerksspeicherplatz!</translation> </message> <message> <location line="+1"/> <source>Error: Wallet locked, unable to create transaction!</source> <translation>Fehler: Brieftasche gesperrt, Transaktion kann nicht erstellt werden!</translation> </message> <message> <location line="+1"/> <source>Error: system error: </source> <translation>Fehler: Systemfehler: </translation> </message> <message> <location line="+1"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation>Fehler, es konnte kein Port abgehört werden. Wenn dies so gewünscht wird -listen=0 verwenden.</translation> </message> <message> <location line="+1"/> <source>Failed to read block info</source> <translation>Lesen der Blockinformationen fehlgeschlagen</translation> </message> <message> <location line="+1"/> <source>Failed to read block</source> <translation>Lesen des Blocks fehlgeschlagen</translation> </message> <message> <location line="+1"/> <source>Failed to sync block index</source> <translation>Synchronisation des Blockindex fehlgeschlagen</translation> </message> <message> <location line="+1"/> <source>Failed to write block index</source> <translation>Schreiben des Blockindex fehlgeschlagen</translation> </message> <message> <location line="+1"/> <source>Failed to write block info</source> <translation>Schreiben der Blockinformationen fehlgeschlagen</translation> </message> <message> <location line="+1"/> <source>Failed to write block</source> <translation>Schreiben des Blocks fehlgeschlagen</translation> </message> <message> <location line="+1"/> <source>Failed to write file info</source> <translation>Schreiben der Dateiinformationen fehlgeschlagen</translation> </message> <message> <location line="+1"/> <source>Failed to write to coin database</source> <translation>Schreiben in die Münzendatenbank fehlgeschlagen</translation> </message> <message> <location line="+1"/> <source>Failed to write transaction index</source> <translation>Schreiben des Transaktionsindex fehlgeschlagen</translation> </message> <message> <location line="+1"/> <source>Failed to write undo data</source> <translation>Schreiben der Rücksetzdaten fehlgeschlagen</translation> </message> <message> <location line="+2"/> <source>Find peers using DNS lookup (default: 1 unless -connect)</source> <translation>Gegenstellen via DNS-Namensauflösung finden (Standard: 1, außer bei -connect)</translation> </message> <message> <location line="+1"/> <source>Generate coins (default: 0)</source> <translation>WOOLFCOINs generieren (Standard: 0)</translation> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 288, 0 = all)</source> <translation>Wieviele Blöcke sollen beim Starten geprüft werden (Standard: 288, 0 = alle)</translation> </message> <message> <location line="+1"/> <source>How thorough the block verification is (0-4, default: 3)</source> <translation>Wie gründlich soll die Blockprüfung sein (0-4, Standard: 3)</translation> </message> <message> <location line="+19"/> <source>Not enough file descriptors available.</source> <translation>Nicht genügend File-Deskriptoren verfügbar.</translation> </message> <message> <location line="+8"/> <source>Rebuild block chain index from current blk000??.dat files</source> <translation>Blockkettenindex aus aktuellen Dateien blk000??.dat wiederaufbauen</translation> </message> <message> <location line="+16"/> <source>Set the number of threads to service RPC calls (default: 4)</source> <translation>Maximale Anzahl an Threads zur Verarbeitung von RPC-Anfragen festlegen (Standard: 4)</translation> </message> <message> <location line="+26"/> <source>Verifying blocks...</source> <translation>Verifiziere Blöcke...</translation> </message> <message> <location line="+1"/> <source>Verifying wallet...</source> <translation>Verifiziere Brieftasche...</translation> </message> <message> <location line="-69"/> <source>Imports blocks from external blk000??.dat file</source> <translation>Blöcke aus externer Datei blk000??.dat importieren</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>Maximale Anzahl an Skript-Verifizierungs-Threads festlegen (bis zu 16, 0 = automatisch, &lt;0 = soviele Kerne frei lassen, Standard: 0)</translation> </message> <message> <location line="+77"/> <source>Information</source> <translation>Hinweis</translation> </message> <message> <location line="+3"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation>Ungültige Adresse in -tor: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>Ungültiger Betrag für -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>Ungültiger Betrag für -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation> </message> <message> <location line="+8"/> <source>Maintain a full transaction index (default: 0)</source> <translation>Einen vollständigen Transaktionsindex pflegen (Standard: 0)</translation> </message> <message> <location line="+2"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation>Maximale Größe, &lt;n&gt; * 1000 Byte, des Empfangspuffers pro Verbindung (Standard: 5000)</translation> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation>Maximale Größe, &lt;n&gt; * 1000 Byte, des Sendepuffers pro Verbindung (Standard: 1000)</translation> </message> <message> <location line="+2"/> <source>Only accept block chain matching built-in checkpoints (default: 1)</source> <translation>Blockkette nur akzeptieren, wenn sie mit den integrierten Prüfpunkten übereinstimmt (Standard: 1)</translation> </message> <message> <location line="+1"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation>Verbinde nur zu Knoten des Netztyps &lt;net&gt; (IPv4, IPv6 oder Tor)</translation> </message> <message> <location line="+2"/> <source>Output extra debugging information. Implies all other -debug* options</source> <translation>Ausgabe zusätzlicher Debugginginformationen. Beinhaltet alle anderen &quot;-debug*&quot;-Parameter</translation> </message> <message> <location line="+1"/> <source>Output extra network debugging information</source> <translation>Ausgabe zusätzlicher Netzwerk-Debugginginformationen</translation> </message> <message> <location line="+2"/> <source>Prepend debug output with timestamp</source> <translation>Der Debugausgabe einen Zeitstempel voranstellen</translation> </message> <message> <location line="+5"/> <source>SSL options: (see the WOOLFCOIN Wiki for SSL setup instructions)</source> <translation>SSL-Optionen: (siehe WOOLFCOIN-Wiki für SSL-Installationsanweisungen)</translation> </message> <message> <location line="+1"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation>SOCKS-Version des Proxies festlegen (4-5, Standard: 5)</translation> </message> <message> <location line="+3"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation>Rückverfolgungs- und Debuginformationen an die Konsole senden anstatt sie in die Datei debug.log zu schreiben</translation> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation>Rückverfolgungs- und Debuginformationen an den Debugger senden</translation> </message> <message> <location line="+5"/> <source>Set maximum block size in bytes (default: 250000)</source> <translation>Maximale Blockgröße in Byte festlegen (Standard: 250000)</translation> </message> <message> <location line="+1"/> <source>Set minimum block size in bytes (default: 0)</source> <translation>Minimale Blockgröße in Byte festlegen (Standard: 0)</translation> </message> <message> <location line="+2"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation>Verkleinere Datei debug.log beim Start des Clients (Standard: 1, wenn kein -debug)</translation> </message> <message> <location line="+1"/> <source>Signing transaction failed</source> <translation>Signierung der Transaktion fehlgeschlagen</translation> </message> <message> <location line="+2"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation>Verbindungstimeout in Millisekunden festlegen (Standard: 5000)</translation> </message> <message> <location line="+4"/> <source>System error: </source> <translation>Systemfehler: </translation> </message> <message> <location line="+4"/> <source>Transaction amount too small</source> <translation>Transaktionsbetrag zu gering</translation> </message> <message> <location line="+1"/> <source>Transaction amounts must be positive</source> <translation>Transaktionsbeträge müssen positiv sein</translation> </message> <message> <location line="+1"/> <source>Transaction too large</source> <translation>Transaktion zu groß</translation> </message> <message> <location line="+7"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation>UPnP verwenden, um die Portweiterleitung einzurichten (Standard: 0)</translation> </message> <message> <location line="+1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation>UPnP verwenden, um die Portweiterleitung einzurichten (Standard: 1, wenn abgehört wird)</translation> </message> <message> <location line="+1"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation>Proxy verwenden, um versteckte Tor-Dienste zu erreichen (Standard: identisch mit -proxy)</translation> </message> <message> <location line="+2"/> <source>Username for JSON-RPC connections</source> <translation>Benutzername für JSON-RPC-Verbindungen</translation> </message> <message> <location line="+4"/> <source>Warning</source> <translation>Warnung</translation> </message> <message> <location line="+1"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation>Warnung: Diese Version is veraltet, Aktualisierung erforderlich!</translation> </message> <message> <location line="+1"/> <source>You need to rebuild the databases using -reindex to change -txindex</source> <translation>Sie müssen die Datenbank mit Hilfe von -reindex neu aufbauen, um -txindex zu verändern.</translation> </message> <message> <location line="+1"/> <source>wallet.dat corrupt, salvage failed</source> <translation>wallet.dat beschädigt, Rettung fehlgeschlagen</translation> </message> <message> <location line="-50"/> <source>Password for JSON-RPC connections</source> <translation>Passwort für JSON-RPC-Verbindungen</translation> </message> <message> <location line="-67"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation>JSON-RPC-Verbindungen von der angegebenen IP-Adresse erlauben</translation> </message> <message> <location line="+76"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation>Sende Befehle an Knoten &lt;ip&gt; (Standard: 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>Kommando ausführen wenn der beste Block wechselt (%s im Kommando wird durch den Hash des Blocks ersetzt)</translation> </message> <message> <location line="+147"/> <source>Upgrade wallet to latest format</source> <translation>Brieftasche auf das neueste Format aktualisieren</translation> </message> <message> <location line="-21"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation>Größe des Schlüsselpools festlegen auf &lt;n&gt; (Standard: 100)</translation> </message> <message> <location line="-12"/> <source>Rescan the block chain for missing wallet transactions</source> <translation>Blockkette erneut nach fehlenden Transaktionen der Brieftasche durchsuchen</translation> </message> <message> <location line="+35"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation>OpenSSL (https) für JSON-RPC-Verbindungen verwenden</translation> </message> <message> <location line="-26"/> <source>Server certificate file (default: server.cert)</source> <translation>Serverzertifikat (Standard: server.cert)</translation> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation>Privater Serverschlüssel (Standard: server.pem)</translation> </message> <message> <location line="-151"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation>Akzeptierte Chiffren (Standard: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</translation> </message> <message> <location line="+165"/> <source>This help message</source> <translation>Dieser Hilfetext</translation> </message> <message> <location line="+6"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation>Kann auf diesem Computer nicht an %s binden (von bind zurückgegebener Fehler %d, %s)</translation> </message> <message> <location line="-91"/> <source>Connect through socks proxy</source> <translation>Verbindung über SOCKS-Proxy herstellen</translation> </message> <message> <location line="-10"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation>Erlaube DNS-Namensauflösung für -addnode, -seednode und -connect</translation> </message> <message> <location line="+55"/> <source>Loading addresses...</source> <translation>Lade Adressen...</translation> </message> <message> <location line="-35"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation>Fehler beim Laden von wallet.dat: Brieftasche beschädigt</translation> </message> <message> <location line="+1"/> <source>Error loading wallet.dat: Wallet requires newer version of WOOLFCOIN</source> <translation>Fehler beim Laden von wallet.dat: Brieftasche benötigt neuere Version von WOOLFCOIN</translation> </message> <message> <location line="+93"/> <source>Wallet needed to be rewritten: restart WOOLFCOIN to complete</source> <translation>Brieftasche musste neu geschrieben werden: Starten Sie WOOLFCOIN zur Fertigstellung neu</translation> </message> <message> <location line="-95"/> <source>Error loading wallet.dat</source> <translation>Fehler beim Laden von wallet.dat (Brieftasche)</translation> </message> <message> <location line="+28"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation>Ungültige Adresse in -proxy: &apos;%s&apos;</translation> </message> <message> <location line="+56"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation>Unbekannter Netztyp in -onlynet angegeben: &apos;%s&apos;</translation> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation>Unbekannte Proxyversion in -socks angefordert: %i</translation> </message> <message> <location line="-96"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation>Kann Adresse in -bind nicht auflösen: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation>Kann Adresse in -externalip nicht auflösen: &apos;%s&apos;</translation> </message> <message> <location line="+44"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>Ungültiger Betrag für -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Invalid amount</source> <translation>Ungültiger Betrag</translation> </message> <message> <location line="-6"/> <source>Insufficient funds</source> <translation>Unzureichender Kontostand</translation> </message> <message> <location line="+10"/> <source>Loading block index...</source> <translation>Lade Blockindex...</translation> </message> <message> <location line="-57"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation>Mit dem Knoten verbinden und versuchen die Verbindung aufrecht zu halten</translation> </message> <message> <location line="-25"/> <source>Unable to bind to %s on this computer. WOOLFCOIN is probably already running.</source> <translation>Kann auf diesem Computer nicht an %s binden. Evtl. wurde WOOLFCOIN bereits gestartet.</translation> </message> <message> <location line="+64"/> <source>Fee per KB to add to transactions you send</source> <translation>Gebühr pro KB, die gesendeten Transaktionen hinzugefügt wird</translation> </message> <message> <location line="+19"/> <source>Loading wallet...</source> <translation>Lade Brieftasche...</translation> </message> <message> <location line="-52"/> <source>Cannot downgrade wallet</source> <translation>Brieftasche kann nicht auf eine ältere Version herabgestuft werden</translation> </message> <message> <location line="+3"/> <source>Cannot write default address</source> <translation>Standardadresse kann nicht geschrieben werden</translation> </message> <message> <location line="+64"/> <source>Rescanning...</source> <translation>Durchsuche erneut...</translation> </message> <message> <location line="-57"/> <source>Done loading</source> <translation>Laden abgeschlossen</translation> </message> <message> <location line="+82"/> <source>To use the %s option</source> <translation>Zur Nutzung der %s Option</translation> </message> <message> <location line="-74"/> <source>Error</source> <translation>Fehler</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>Sie müssen den Wert rpcpassword=&lt;passwort&gt; in der Konfigurationsdatei angeben: %s Falls die Konfigurationsdatei nicht existiert, erzeugen Sie diese bitte mit Leserechten nur für den Dateibesitzer.</translation> </message> </context> </TS>
mit
dafengge0913/lua_playground
traverse_list.lua
330
local function getnext(list, node) if not node then return list else return node.next end end function traverse(list) return getnext, list, nil end list = nil for line in io.lines() do if string.len(line) == 0 then break end list = {val = line, next = list} end for node in traverse(list) do print(node.val) end
mit
thogg4/sidelifter
lib/sidelifter.rb
138
require 'sidelifter/version' require 'sidelifter/output' require 'sidelifter/error' require 'sidelifter/providers' module Sidelifter end
mit
abhishekbhalani/jquery-mobile
js/widgets/forms/reset.js
583
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); //>>description: Make a widget react to a form's reset. //>>label: formReset //>>group: Forms define( [ "jquery", "../../jquery.mobile.core" ], function( $ ) { //>>excludeEnd("jqmBuildExclude"); (function( $, undefined ) { $.mobile.behaviors.formReset = { _handleFormReset: function() { this._on( this.element.closest( "form" ), { reset: function() { this._delay( "_reset" ); } }); } }; })( jQuery ); //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); }); //>>excludeEnd("jqmBuildExclude");
mit
SCPTeam/Safe-Component-Provider
Sat4jCore/src/org/sat4j/tools/SearchEnumeratorListener.java
2916
/******************************************************************************* * SAT4J: a SATisfiability library for Java Copyright (C) 2004, 2012 Artois University and CNRS * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Alternatively, the contents of this file may be used under the terms of * either the GNU Lesser General Public License Version 2.1 or later (the * "LGPL"), in which case the provisions of the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of the LGPL, and not to allow others to use your version of * this file under the terms of the EPL, indicate your decision by deleting * the provisions above and replace them with the notice and other provisions * required by the LGPL. If you do not delete the provisions above, a recipient * may use your version of this file under the terms of the EPL or the LGPL. * * Based on the original MiniSat specification from: * * An extensible SAT solver. Niklas Een and Niklas Sorensson. Proceedings of the * Sixth International Conference on Theory and Applications of Satisfiability * Testing, LNCS 2919, pp 502-518, 2003. * * See www.minisat.se for the original solver in C++. * * Contributors: * CRIL - initial API and implementation *******************************************************************************/ package org.sat4j.tools; import org.sat4j.specs.ISolverService; import org.sat4j.specs.RandomAccessModel; import org.sat4j.specs.Lbool; /** * That class allows to iterate over the models from the inside: conflicts are * created to ask the solver to backtrack. * * @author leberre * */ public class SearchEnumeratorListener extends SearchListenerAdapter<ISolverService> { /** * */ private static final long serialVersionUID = 1L; private ISolverService solverService; private int nbsolutions = 0; private final SolutionFoundListener sfl; public SearchEnumeratorListener(SolutionFoundListener sfl) { this.sfl = sfl; } @Override public void init(ISolverService solverService) { this.solverService = solverService; } @Override public void solutionFound(int[] model, RandomAccessModel lazyModel) { int[] clause = new int[model.length]; for (int i = 0; i < model.length; i++) { clause[i] = -model[i]; } this.solverService.addClauseOnTheFly(clause); this.nbsolutions++; sfl.onSolutionFound(model); } @Override public void end(Lbool result) { assert result != Lbool.TRUE; } public int getNumberOfSolutionFound() { return this.nbsolutions; } }
mit
kristianmandrup/slush-markoa
taglib/index.js
1760
/*jslint node: true */ 'use strict'; var _ = require('underscore.string'), inquirer = require('inquirer'), path = require('path'), chalk = require('chalk-log'); module.exports = function() { return function (done) { var prompts = [{ name: 'taglibName', message: 'What is the name of your taglib or taglibs (, separated) ?', }, { name: 'appName', message: 'For which app (empty: global) ?' }, { type: 'confirm', name: 'moveon', message: 'Continue?' }]; //Ask inquirer.prompt(prompts, function (answers) { if (!answers.moveon) { return done(); } if (_.isBlank(answers.taglibName)) { chalk.error('Taglib name can NOT be empty'); done(); } answers.taglibName = _.clean(answers.taglibName); var appPath = path.join('./apps', answers.appName); var targetDir = _.isBlank(answers.appName) ? './apps/_global' : appPath; var createTagLib = require('./create-taglib'); if (answers.taglibName.match(/,/)) { var taglibs = answers.taglibName.split(',').map(function(taglib) { return _.clean(taglib); }); for (let taglib of taglibs) { answers = {taglibName: taglib, appName: answers.appName}; createTagLib(answers, targetDir); } } else { createTagLib(answers, targetDir); } } ); }; };
mit
eribeiro9/link-box
ui/src/register/register.module.ts
728
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { MaterialModule } from '@angular/material'; import { FormsModule } from '@angular/forms'; import { CookieService } from 'angular2-cookie/services/cookies.service'; import { RegisterComponent } from './register.component'; import { RegisterService } from './register.service'; import { RegisterRoutingModule } from './register-routing.module'; @NgModule({ imports: [ CommonModule, FormsModule, MaterialModule.forRoot(), RegisterRoutingModule ], declarations: [RegisterComponent], providers: [ RegisterService, CookieService ], exports: [RegisterComponent] }) export class RegisterModule { }
mit
phillip-hopper/dokuwiki-plugin-door43ta
lang/en/lang.php
754
<?php /** * Name: lang.php * Description: The English language localization file for door43ta plugin. * * Author: Phil Hopper * Date: 2018-09-08 */ // menu entry for admin plugins // $lang['menu'] = 'Your menu entry'; // custom language strings for the plugin $lang['createButtonText'] = 'Create tA Now'; $lang['checkboxVol1'] = 'Include Vol 1'; $lang['checkboxVol2'] = 'Include Vol 2'; $lang['checkboxWorkbench'] = 'Include Workbench'; // localized strings for JavaScript // js example: var text = LANG.plugins['door43ta']['stringName']; $lang['js']['sourceRequired'] = 'You must select a source language.'; $lang['js']['destinationRequired'] = 'You must select a target language.'; $lang['js']['finished'] = 'Finished with all requests.';
mit
RuthAngus/LSST-max
code/barnes.py
506
import numpy as np def tau(P, P0, t): x = P/P0 return .5*(.65*t + ((.65*t)**2 - 23.4*(x**2-1) * np.log(x))**.5)/np.log(x), \ .5*(.65*t - ((.65*t)**2 - 23.4*(x**2-1)*np.log(x))**.5)/np.log(x),\ def period(age, bv): """ From Barnes 2007. This is just a place holder - need to update this model. age in Gyr. Returns period in days. """ return 0.7725*(bv - .4)**.601 * (age*1e3)**.5189 if __name__ == "__main__": print(period(10, .65))
mit
studio666/Speedcoin
src/qt/locale/bitcoin_ca.ts
96727
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS language="ca" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Speedcoin</source> <translation>A prop de Speedcoin</translation> </message> <message> <location line="+39"/> <source>&lt;b&gt;Speedcoin&lt;/b&gt; version</source> <translation type="unfinished"/> </message> <message> <location line="+57"/> <source> Speedcoin Official Website: http://www.speedcoin.co This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young ([email protected]) and UPnP software written by Thomas Bernard.</source> <translation type="unfinished"/> </message> <message> <location filename="../aboutdialog.cpp" line="+14"/> <source>Copyright</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The Speedcoin developers</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation>Llibreta d&apos;adreçes</translation> </message> <message> <location line="+19"/> <source>Double-click to edit address or label</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation>Copia la selecció actual al porta-retalls del sistema</translation> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation type="unfinished"/> </message> <message> <location filename="../addressbookpage.cpp" line="+63"/> <source>These are your Speedcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source> <translation type="unfinished"/> </message> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>&amp;Copy Address</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Show &amp;QR Code</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Sign a message to prove you own a Speedcoin address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Delete the currently selected address from the list</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>Verify a message to ensure it was signed with a specified Speedcoin address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>&amp;Delete</source> <translation type="unfinished"/> </message> <message> <location filename="../addressbookpage.cpp" line="-5"/> <source>These are your Speedcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Copy &amp;Label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>&amp;Edit</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Send &amp;Coins</source> <translation type="unfinished"/> </message> <message> <location line="+260"/> <source>Export Address Book Data</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Error exporting</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+144"/> <source>Label</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Address</source> <translation type="unfinished"/> </message> <message> <location line="+36"/> <source>(no label)</source> <translation type="unfinished"/> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation type="unfinished"/> </message> <message> <location 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 type="unfinished"/> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR LITECOINS&lt;/b&gt;!</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+100"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation type="unfinished"/> </message> <message> <location line="-130"/> <location line="+58"/> <source>Wallet encrypted</source> <translation type="unfinished"/> </message> <message> <location line="-56"/> <source>Speedcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your litecoins from being stolen by malware infecting your computer.</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+42"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation type="unfinished"/> </message> <message> <location line="-54"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <location line="+48"/> <source>The supplied passphrases do not match.</source> <translation type="unfinished"/> </message> <message> <location line="-37"/> <source>Wallet unlock failed</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+11"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation type="unfinished"/> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation type="unfinished"/> </message> </context> <context> <name>BitcoinGUI</name> <message> <location filename="../bitcoingui.cpp" line="+233"/> <source>Sign &amp;message...</source> <translation type="unfinished"/> </message> <message> <location line="+280"/> <source>Synchronizing with network...</source> <translation type="unfinished"/> </message> <message> <location line="-349"/> <source>&amp;Overview</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation type="unfinished"/> </message> <message> <location line="+20"/> <source>&amp;Transactions</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Edit the list of stored addresses and labels</source> <translation type="unfinished"/> </message> <message> <location line="-14"/> <source>Show the list of addresses for receiving payments</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>E&amp;xit</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Quit application</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Show information about Speedcoin</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>&amp;Encrypt Wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation type="unfinished"/> </message> <message> <location line="+285"/> <source>Importing blocks from disk...</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Reindexing blocks on disk...</source> <translation type="unfinished"/> </message> <message> <location line="-347"/> <source>Send coins to a Speedcoin address</source> <translation type="unfinished"/> </message> <message> <location line="+49"/> <source>Modify configuration options for Speedcoin</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Backup wallet to another location</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>&amp;Debug window</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation type="unfinished"/> </message> <message> <location line="-4"/> <source>&amp;Verify message...</source> <translation type="unfinished"/> </message> <message> <location line="-165"/> <location line="+530"/> <source>Speedcoin</source> <translation type="unfinished"/> </message> <message> <location line="-530"/> <source>Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+101"/> <source>&amp;Send</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Receive</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>&amp;Addresses</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>&amp;About Speedcoin</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show or hide the main Window</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Encrypt the private keys that belong to your wallet</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Sign messages with your Speedcoin addresses to prove you own them</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Verify messages to ensure they were signed with specified Speedcoin addresses</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>&amp;File</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Settings</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>&amp;Help</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Tabs toolbar</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <location line="+10"/> <source>[testnet]</source> <translation type="unfinished"/> </message> <message> <location line="+47"/> <source>Speedcoin client</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+141"/> <source>%n active connection(s) to Speedcoin network</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+22"/> <source>No block source available...</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Processed %1 of %2 (estimated) blocks of transaction history.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Processed %1 blocks of transaction history.</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+20"/> <source>%n hour(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n week(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>%1 behind</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Last received block was generated %1 ago.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Transactions after this will not yet be visible.</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>Error</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="+70"/> <source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source> <translation type="unfinished"/> </message> <message> <location line="-140"/> <source>Up to date</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Catching up...</source> <translation type="unfinished"/> </message> <message> <location line="+113"/> <source>Confirm transaction fee</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Sent transaction</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Incoming transaction</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation type="unfinished"/> </message> <message> <location line="+33"/> <location line="+23"/> <source>URI handling</source> <translation type="unfinished"/> </message> <message> <location line="-23"/> <location line="+23"/> <source>URI can not be parsed! This can be caused by an invalid Speedcoin address or malformed URI parameters.</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location filename="../bitcoin.cpp" line="+111"/> <source>A fatal error occurred. Speedcoin can no longer continue safely and will quit.</source> <translation type="unfinished"/> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+104"/> <source>Network Alert</source> <translation type="unfinished"/> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>The address associated with this address book entry. This can only be modified for sending addresses.</source> <translation type="unfinished"/> </message> <message> <location filename="../editaddressdialog.cpp" line="+21"/> <source>New receiving address</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>New sending address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation type="unfinished"/> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation type="unfinished"/> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid Speedcoin address.</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation type="unfinished"/> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+424"/> <location line="+12"/> <source>Speedcoin-Qt</source> <translation type="unfinished"/> </message> <message> <location line="-12"/> <source>version</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Usage:</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>command-line options</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>UI options</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation type="unfinished"/> </message> </context> <context> <name>OptionsDialog</name> <message> <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Automatically start Speedcoin after logging in to the system.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Start Speedcoin on system login</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Reset all client options to default.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Reset Options</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>&amp;Network</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Automatically open the Speedcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Map port using &amp;UPnP</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Connect to the Speedcoin network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy:</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Proxy &amp;IP:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation type="unfinished"/> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting Speedcoin.</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Whether to show Speedcoin addresses in the transaction list or not.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>&amp;OK</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation type="unfinished"/> </message> <message> <location filename="../optionsdialog.cpp" line="+53"/> <source>default</source> <translation type="unfinished"/> </message> <message> <location line="+130"/> <source>Confirm options reset</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Some settings may require a client restart to take effect.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Do you want to proceed?</source> <translation type="unfinished"/> </message> <message> <location line="+42"/> <location line="+9"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="-9"/> <location line="+9"/> <source>This setting will take effect after restarting Speedcoin.</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation type="unfinished"/> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation type="unfinished"/> </message> <message> <location line="+50"/> <location line="+166"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Speedcoin network after a connection is established, but this process has not completed yet.</source> <translation type="unfinished"/> </message> <message> <location line="-124"/> <source>Balance:</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>Unconfirmed:</source> <translation type="unfinished"/> </message> <message> <location line="-78"/> <source>Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+107"/> <source>Immature:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation type="unfinished"/> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation type="unfinished"/> </message> <message> <location line="-101"/> <source>Your current balance</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location filename="../overviewpage.cpp" line="+116"/> <location line="+1"/> <source>out of sync</source> <translation type="unfinished"/> </message> </context> <context> <name>PaymentServer</name> <message> <location filename="../paymentserver.cpp" line="+107"/> <source>Cannot start litecoin: click-to-pay handler</source> <translation type="unfinished"/> </message> </context> <context> <name>QRCodeDialog</name> <message> <location filename="../forms/qrcodedialog.ui" line="+14"/> <source>QR Code Dialog</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <source>Request Payment</source> <translation type="unfinished"/> </message> <message> <location line="+56"/> <source>Amount:</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>Label:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Message:</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>&amp;Save As...</source> <translation type="unfinished"/> </message> <message> <location filename="../qrcodedialog.cpp" line="+62"/> <source>Error encoding URI into QR Code.</source> <translation type="unfinished"/> </message> <message> <location line="+40"/> <source>The entered amount is invalid, please check.</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Save QR Code</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>PNG Images (*.png)</source> <translation type="unfinished"/> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <location line="+23"/> <location line="+26"/> <location line="+23"/> <location line="+23"/> <location line="+36"/> <location line="+53"/> <location line="+23"/> <location line="+23"/> <location filename="../rpcconsole.cpp" line="+339"/> <source>N/A</source> <translation type="unfinished"/> </message> <message> <location line="-217"/> <source>Client version</source> <translation type="unfinished"/> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation type="unfinished"/> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation type="unfinished"/> </message> <message> <location line="+49"/> <source>Startup time</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>Network</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>On testnet</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Block chain</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Last block time</source> <translation type="unfinished"/> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Show the Speedcoin-Qt help message to get a list with possible Speedcoin command-line options.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Show</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation type="unfinished"/> </message> <message> <location line="-260"/> <source>Build date</source> <translation type="unfinished"/> </message> <message> <location line="-104"/> <source>Speedcoin - Debug window</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Speedcoin Core</source> <translation type="unfinished"/> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Open the Speedcoin debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation type="unfinished"/> </message> <message> <location line="+102"/> <source>Clear console</source> <translation type="unfinished"/> </message> <message> <location filename="../rpcconsole.cpp" line="-30"/> <source>Welcome to the Speedcoin RPC console.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation type="unfinished"/> </message> </context> <context> <name>SendCoinsDialog</name> <message> <location filename="../forms/sendcoinsdialog.ui" line="+14"/> <location filename="../sendcoinsdialog.cpp" line="+124"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+6"/> <location line="+5"/> <location line="+5"/> <source>Send Coins</source> <translation type="unfinished"/> </message> <message> <location line="+50"/> <source>Send to multiple recipients at once</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation type="unfinished"/> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>Balance:</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>123.456 BTC</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Confirm the send action</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation type="unfinished"/> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-59"/> <source>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Confirm send coins</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source> and </source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>The recipient address is not valid, please recheck.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Error: Transaction creation failed!</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>A&amp;mount:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation type="unfinished"/> </message> <message> <location line="+34"/> <source>The address to send the payment to (e.g. SbJtSLn5C6NsuBqfYPTfZ3rGD7idcfRXM4)</source> <translation type="unfinished"/> </message> <message> <location line="+60"/> <location filename="../sendcoinsentry.cpp" line="+26"/> <source>Enter a label for this address to add it to your address book</source> <translation type="unfinished"/> </message> <message> <location line="-78"/> <source>&amp;Label:</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>Choose address from address book</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Alt+A</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Paste address from clipboard</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Remove this recipient</source> <translation type="unfinished"/> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a Speedcoin address (e.g. SbJtSLn5C6NsuBqfYPTfZ3rGD7idcfRXM4)</source> <translation type="unfinished"/> </message> </context> <context> <name>SignVerifyMessageDialog</name> <message> <location filename="../forms/signverifymessagedialog.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>&amp;Sign Message</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. SbJtSLn5C6NsuBqfYPTfZ3rGD7idcfRXM4)</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <location line="+213"/> <source>Choose an address from the address book</source> <translation type="unfinished"/> </message> <message> <location line="-203"/> <location line="+213"/> <source>Alt+A</source> <translation type="unfinished"/> </message> <message> <location line="-203"/> <source>Paste address from clipboard</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Enter the message you want to sign here</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Signature</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Copy the current signature to the system clipboard</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this Speedcoin address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Reset all sign message fields</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation type="unfinished"/> </message> <message> <location line="-87"/> <source>&amp;Verify Message</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. SbJtSLn5C6NsuBqfYPTfZ3rGD7idcfRXM4)</source> <translation type="unfinished"/> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified Speedcoin address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Verify &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Reset all verify message fields</source> <translation type="unfinished"/> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a Speedcoin address (e.g. SbJtSLn5C6NsuBqfYPTfZ3rGD7idcfRXM4)</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Enter Speedcoin signature</source> <translation type="unfinished"/> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation type="unfinished"/> </message> <message> <location line="-81"/> <location line="+8"/> <location line="+73"/> <location line="+8"/> <source>Please check the address and try again.</source> <translation type="unfinished"/> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation type="unfinished"/> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation type="unfinished"/> </message> </context> <context> <name>SplashScreen</name> <message> <location filename="../splashscreen.cpp" line="+22"/> <source>The Speedcoin developers</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>[testnet]</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+20"/> <source>Open until %1</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>%1/offline</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>Status</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Source</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Generated</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation type="unfinished"/> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>label</source> <translation type="unfinished"/> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation type="unfinished"/> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation type="unfinished"/> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Net amount</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Message</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Comment</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Debug information</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Transaction</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Inputs</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>true</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>false</source> <translation type="unfinished"/> </message> <message> <location line="-209"/> <source>, has not been successfully broadcast yet</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-35"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+70"/> <source>unknown</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+225"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Type</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Address</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Amount</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+57"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+3"/> <source>Open until %1</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Offline (%1 confirmations)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Unconfirmed (%1 of %2 confirmations)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Confirmed (%1 confirmations)</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+8"/> <source>Mined balance will be available when it matures in %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+5"/> <source>This block was not received by any other nodes and will probably not be accepted!</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation type="unfinished"/> </message> <message> <location line="+43"/> <source>Received with</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Received from</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Sent to</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Mined</source> <translation type="unfinished"/> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation type="unfinished"/> </message> <message> <location line="+199"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+52"/> <location line="+16"/> <source>All</source> <translation type="unfinished"/> </message> <message> <location line="-15"/> <source>Today</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This week</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This month</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Last month</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This year</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Range...</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Received with</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Sent to</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>To yourself</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Mined</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Other</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Min amount</source> <translation type="unfinished"/> </message> <message> <location line="+34"/> <source>Copy address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Edit label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation type="unfinished"/> </message> <message> <location line="+139"/> <source>Export Transaction Data</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Type</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>ID</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation type="unfinished"/> </message> <message> <location line="+100"/> <source>Range:</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>to</source> <translation type="unfinished"/> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+193"/> <source>Send Coins</source> <translation type="unfinished"/> </message> </context> <context> <name>WalletView</name> <message> <location filename="../walletview.cpp" line="+42"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"/> </message> <message> <location line="+193"/> <source>Backup Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Wallet Data (*.dat)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Backup Failed</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Backup Successful</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The wallet data was successfully saved to the new location.</source> <translation type="unfinished"/> </message> </context> <context> <name>bitcoin-core</name> <message> <location filename="../bitcoinstrings.cpp" line="+94"/> <source>Speedcoin version</source> <translation type="unfinished"/> </message> <message> <location line="+102"/> <source>Usage:</source> <translation type="unfinished"/> </message> <message> <location line="-29"/> <source>Send command to -server or litecoind</source> <translation type="unfinished"/> </message> <message> <location line="-23"/> <source>List commands</source> <translation type="unfinished"/> </message> <message> <location line="-12"/> <source>Get help for a command</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>Options:</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>Specify configuration file (default: litecoin.conf)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Specify pid file (default: litecoind.pid)</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation type="unfinished"/> </message> <message> <location line="-9"/> <source>Set database cache size in megabytes (default: 25)</source> <translation type="unfinished"/> </message> <message> <location line="-28"/> <source>Listen for connections on &lt;port&gt; (default: 24777 or testnet: 34777)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation type="unfinished"/> </message> <message> <location line="-48"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation type="unfinished"/> </message> <message> <location line="+82"/> <source>Specify your own public address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="-134"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation type="unfinished"/> </message> <message> <location line="-29"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 24776 or testnet: 34776)</source> <translation type="unfinished"/> </message> <message> <location line="+37"/> <source>Accept command line and JSON-RPC commands</source> <translation type="unfinished"/> </message> <message> <location line="+76"/> <source>Run in the background as a daemon and accept commands</source> <translation type="unfinished"/> </message> <message> <location line="+37"/> <source>Use the test network</source> <translation type="unfinished"/> </message> <message> <location line="-112"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation type="unfinished"/> </message> <message> <location line="-80"/> <source>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: rpcuser=litecoinrpc 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;Speedcoin Alert&quot; [email protected] </source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Cannot obtain a lock on data directory %s. Speedcoin is probably running already. You need to look at the Speedcoin icon on your taskbar/system tray.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Speedcoin will not work properly.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Block creation options:</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Connect only to the specified node(s)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Corrupted block database detected</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Do you want to rebuild the block database now?</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error initializing block database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error initializing wallet database environment %s!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading block database</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error opening block database</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error: Disk space is low!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error: Wallet locked, unable to create transaction!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error: system error: </source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to read block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to read block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to sync block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write file info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write to coin database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write transaction index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write undo data</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Find peers using DNS lookup (default: 1 unless -connect)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Generate coins (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 288, 0 = all)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>How thorough the block verification is (0-4, default: 3)</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Not enough file descriptors available.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Rebuild block chain index from current blk000??.dat files</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Set the number of threads to service RPC calls (default: 4)</source> <translation type="unfinished"/> </message> <message> <location line="+26"/> <source>Verifying blocks...</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Verifying wallet...</source> <translation type="unfinished"/> </message> <message> <location line="-69"/> <source>Imports blocks from external blk000??.dat file</source> <translation type="unfinished"/> </message> <message> <location line="-76"/> <source>Set the number of script verification threads (up to 16, 0 = auto, &lt;0 = leave that many cores free, default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+77"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Maintain a full transaction index (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Only accept block chain matching built-in checkpoints (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Output extra debugging information. Implies all other -debug* options</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Output extra network debugging information</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Prepend debug output with timestamp</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>SSL options: (see the Speedcoin Wiki for SSL setup instructions)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Set maximum block size in bytes (default: 250000)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set minimum block size in bytes (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Signing transaction failed</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>System error: </source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Transaction amount too small</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction amounts must be positive</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction too large</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Username for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>You need to rebuild the databases using -reindex to change -txindex</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>wallet.dat corrupt, salvage failed</source> <translation type="unfinished"/> </message> <message> <location line="-50"/> <source>Password for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="-67"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation type="unfinished"/> </message> <message> <location line="+76"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation type="unfinished"/> </message> <message> <location line="-120"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation type="unfinished"/> </message> <message> <location line="+147"/> <source>Upgrade wallet to latest format</source> <translation type="unfinished"/> </message> <message> <location line="-21"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="-12"/> <source>Rescan the block chain for missing wallet transactions</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="-26"/> <source>Server certificate file (default: server.cert)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation type="unfinished"/> </message> <message> <location line="-151"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation type="unfinished"/> </message> <message> <location line="+165"/> <source>This help message</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation type="unfinished"/> </message> <message> <location line="-91"/> <source>Connect through socks proxy</source> <translation type="unfinished"/> </message> <message> <location line="-10"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation type="unfinished"/> </message> <message> <location line="+55"/> <source>Loading addresses...</source> <translation type="unfinished"/> </message> <message> <location line="-35"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading wallet.dat: Wallet requires newer version of Speedcoin</source> <translation type="unfinished"/> </message> <message> <location line="+93"/> <source>Wallet needed to be rewritten: restart Speedcoin to complete</source> <translation type="unfinished"/> </message> <message> <location line="-95"/> <source>Error loading wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+56"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation type="unfinished"/> </message> <message> <location line="-96"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+44"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Invalid amount</source> <translation type="unfinished"/> </message> <message> <location line="-6"/> <source>Insufficient funds</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Loading block index...</source> <translation type="unfinished"/> </message> <message> <location line="-57"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation type="unfinished"/> </message> <message> <location line="-25"/> <source>Unable to bind to %s on this computer. Speedcoin is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="+64"/> <source>Fee per KB to add to transactions you send</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Loading wallet...</source> <translation type="unfinished"/> </message> <message> <location line="-52"/> <source>Cannot downgrade wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Cannot write default address</source> <translation type="unfinished"/> </message> <message> <location line="+64"/> <source>Rescanning...</source> <translation type="unfinished"/> </message> <message> <location line="-57"/> <source>Done loading</source> <translation type="unfinished"/> </message> <message> <location line="+82"/> <source>To use the %s option</source> <translation type="unfinished"/> </message> <message> <location line="-74"/> <source>Error</source> <translation type="unfinished"/> </message> <message> <location line="-31"/> <source>You must set rpcpassword=&lt;password&gt; in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions.</source> <translation type="unfinished"/> </message> </context> </TS>
mit
Technius/scalajs-mithril
tests/src/test/scala/ScalatagsExtTest.scala
2535
import co.technius.scalajs.mithril._ import co.technius.scalajs.mithril.VNodeScalatags.{ attrs => *, tags => t } import co.technius.scalajs.mithril.VNodeScalatags.implicits._ import org.scalatest._ import org.scalajs.dom import scala.scalajs.js class ScalatagsExtTest extends FlatSpec with Matchers with TestUtils{ "The bundle" should "render" in { val comp = Component.viewOnly[js.Object] { vnode => t.div( t.a(*.href := "/example"), t.p("foo"), t.p("bar"), t.div( t.p("baz") ) ).render } mountApp(comp) } it should "handle classes properly" in { val comp = Component.viewOnly[js.Object] { vnode => t.div( t.span(*.cls := "foo"), t.span(*.cls := "bar baz") ).render } val node = mountApp(comp) val children = node.firstElementChild.children val span1 = children(0).asInstanceOf[dom.html.Span] val span2 = children(1).asInstanceOf[dom.html.Span] def hasClass(cls: String, elem: dom.html.Element) = withClue(s"Should have class $cls:") { elem.classList.contains(cls) should be (true) } hasClass("foo", span1) hasClass("bar", span2) hasClass("baz", span2) } it should "handle style properly" in { val comp = Component.viewOnly[js.Object] { vnode => t.div( t.span(*.style := "color: red; font-family: serif")("Red text"), t.span(*.css("font-size") := 2.em, *.css("font-style") := "italic")("2em text") ).render } val node = mountApp(comp) val children = node.firstElementChild.children val span1 = children(0).asInstanceOf[dom.html.Span] val span2 = children(1).asInstanceOf[dom.html.Span] span1.style.color should be ("red") span1.style.fontFamily should be ("serif") span2.style.fontSize should be ("2em") span2.style.fontStyle should be ("italic") } it should "allow embedding of components in tags" in { val embedded = Component.viewOnly[js.Object] { vnode => t.p("Embedded").render } val comp = Component.viewOnly[js.Object] { vnode => t.div( "Test", embedded ).render } mountApp(comp) } it should "support lifecycle methods" in { var triggered = false val comp = Component.viewOnly[js.Object] { vnode => val initFn = () => { triggered = true } t.div(*.oninit := initFn).render } val node = mountApp(comp) withClue("oninit not fired:") { triggered should be (true) } } }
mit
sgpotts/slush-template
templates/gulp-tasks/uncss.js
280
module.exports = function (gulp, plugins) { return function () { return gulp.src('.tmp/css/*.css') .pipe(plugins.uncss({ html: ['.tmp/templates/main-body.html', ".tmp/templates/partials/*.html"] })) .pipe(gulp.dest('css')); }; };
mit
ojhaujjwal/OjColorboxModule
src/OjColorboxModule/Exception/ExceptionInterface.php
77
<?php namespace OjColorboxModule\Exception; interface ExceptionInterface {}
mit
DuckDeck/blog
server/sqlhelp/tableSql.js
18983
const sqls = { createDB:[`CREATE DATABASE IF NOT EXISTS blog`,`use blog`,`ALTER DATABASE blog DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci`], createArticleTb:`CREATE TABLE IF NOT EXISTS article ( article_id smallint(5) NOT NULL AUTO_INCREMENT COMMENT '日志自增ID号', article_name varchar(128) NOT NULL COMMENT '文章名称', article_create_time BIGINT(15) NOT NULL COMMENT '创建时间', article_release_time BIGINT(15) NOT NULL COMMENT '发布时间', article_ip varchar(50) NOT NULL COMMENT '发布IP', article_click int(10) NOT NULL COMMENT '查看人数', article_sort_id mediumint(8) NOT NULL COMMENT '所属分类', user_id mediumint(8) NOT NULL COMMENT '所属用户ID', article_type_id tinyint(3) NOT NULL DEFAULT 1 COMMENT '栏目ID', article_type int(2) NOT NULL DEFAULT 1 COMMENT '文章的模式:0为私有,1为公开,2为仅好友查看', article_content text NOT NULL COMMENT '文章内容', article_brief varchar(2000) NOT NULL DEFAULT '' COMMENT '文章简要', article_main_img varchar(1000) NOT NULL DEFAULT '' COMMENT '文章主要图片', article_up tinyint(3) NOT NULL DEFAULT 0 COMMENT '是否置顶:0为否,1为是', article_recommend tinyint(3) NOT NULL DEFAULT 0 COMMENT '是否博主推荐:0为否,1为是', article_status tinyint(3) NOT NULL DEFAULT 0 COMMENT '文章状态,0为没有发布,也就是草稿,1 为发布', delete_flag int(1) NOT NULL DEFAULT 0 COMMENT '删除标志', PRIMARY KEY (article_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;`, createUserTb:` CREATE TABLE IF NOT EXISTS user ( user_id mediumint(8) NOT NULL AUTO_INCREMENT COMMENT '用户ID', user_group_id mediumint(8) NOT NULL COMMENT '用户组ID 10为管理员', user_name varchar(32) NOT NULL COMMENT '用户名', user_password varchar(32) NOT NULL COMMENT '用户密码', user_token varchar(50) NOT NULL COMMENT 'token', user_isSendEmail int(2) NOT NULL DEFAULT 0 COMMENT '用户有没有发送验证邮件', user_isValidate int(2) NOT NULL DEFAULT 0 COMMENT '用户有没有验证', user_register_time BIGINT(15) NOT NULL DEFAULT 0 COMMENT '用户注册时间', user_register_ip varchar(50) NOT NULL DEFAULT '' COMMENT '用户注册时IP地址', user_login_times int(5) NOT NULL DEFAULT 0 COMMENT '用户登录次数', user_last_login_ip varchar(50) NOT NULL DEFAULT '' COMMENT '用户上一次登录IP地址', user_lock tinyint(3) NOT NULL DEFAULT 0 COMMENT '是否锁定,0为不锁定,1为锁定', user_freeze tinyint(3) NOT NULL DEFAULT 0 COMMENT '是否冻结,0为不冻结,1为冻结', user_auth varchar(255) NOT NULL DEFAULT '' COMMENT '拥有权限', delete_flag int(1) NOT NULL DEFAULT 0 COMMENT '删除标志', PRIMARY KEY (user_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ; `, createUserInfoTb:` CREATE TABLE IF NOT EXISTS user_info ( user_id mediumint(8) NOT NULL COMMENT '用户ID 对于用户信息表,主键要和user表一要,所以不要让自己增', user_real_name varchar(32) NOT NULL COMMENT '用户真名', user_phone varchar(20) NOT NULL DEFAULT '' COMMENT '用户手机号码', user_gender int(2) NOT NULL DEFAULT 0 COMMENT '用户性别 --0未知 1:男 2:女,3: 人妖,4: 保密', user_qq varchar(20) NOT NULL DEFAULT '' COMMENT '用户QQ号码', user_email varchar(64) NOT NULL DEFAULT '' COMMENT '用户EMAIL地址', user_address varchar(255) NOT NULL DEFAULT '' COMMENT '用户地址', user_editor_type INT(2) NOT NULL DEFAULT 0 COMMENT '用户常用编辑器 0是富文本,1是markdown', user_mark mediumint(9) NOT NULL DEFAULT 0 COMMENT '用户积分', user_rank_id tinyint(3) NOT NULL DEFAULT 0 COMMENT '用户等级', user_birthday BIGINT(15) NOT NULL DEFAULT 0 COMMENT '用户生日', user_description varchar(255) NOT NULL DEFAULT '' COMMENT '自我描述', user_image_url varchar(255) NOT NULL DEFAULT '' COMMENT '用户头像', user_last_update_time BIGINT(15) NOT NULL DEFAULT 0 COMMENT '用户上次更新博客时间', user_says varchar(255) NOT NULL DEFAULT '' COMMENT '用户语录', PRIMARY KEY (user_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;`, createUserGroupTb:`CREATE TABLE IF NOT EXISTS user_group ( g_id tinyint(3) NOT NULL AUTO_INCREMENT COMMENT '自增ID号', group_id tinyint(3) NOT NULL COMMENT '用户组ID', group_name varchar(20) NOT NULL COMMENT '用户组名', group_power varchar(20) NOT NULL COMMENT '用户权限', PRIMARY KEY (g_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;`, createFeatureAuthTb:`CREATE TABLE IF NOT EXISTS feature_auth ( f_id int(10) NOT NULL AUTO_INCREMENT COMMENT '自增ID', feature_id int(10) NOT NULL COMMENT '权限ID', feature_name varchar(36) NOT NULL COMMENT '权限描述', PRIMARY KEY (p_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;`, createFriendListTb:`CREATE TABLE IF NOT EXISTS friend ( f_id smallint(5) NOT NULL AUTO_INCREMENT COMMENT '自增ID', user_id mediumint(8) NOT NULL COMMENT '用户ID', friend_id mediumint(8) NOT NULL COMMENT '好友ID', PRIMARY KEY (f_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;`, createUserConcernListTb:`CREATE TABLE IF NOT EXISTS user_attention ( a_id smallint(5) NOT NULL AUTO_INCREMENT COMMENT '自增ID', user_id mediumint(8) NOT NULL COMMENT '用户ID', attention_id mediumint(8) NOT NULL COMMENT '关注ID', PRIMARY KEY (a_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ; `, createUserPrivateLetterTb:`CREATE TABLE IF NOT EXISTS secret_message ( secret_id mediumint(8) NOT NULL AUTO_INCREMENT COMMENT '自增私信ID', send_id mediumint(8) NOT NULL COMMENT '发信者ID', receive_id mediumint(8) NOT NULL COMMENT '收信者ID', message_topic varchar(64) NOT NULL COMMENT '私信标题', message_content varchar(255) NOT NULL COMMENT '私信内容', delete_flag int(1) NOT NULL DEFAULT 0 COMMENT '删除标志', PRIMARY KEY (secret_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ; `, createFriendLinkTb:`CREATE TABLE IF NOT EXISTS friendly_link ( link_id smallint(5) NOT NULL AUTO_INCREMENT COMMENT '友情链接自增ID', link_user_id smallint(8) NOT NULL DEFAULT 0 COMMENT '友情链接的所属用户', link_type smallint(8) NOT NULL DEFAULT 0 COMMENT '友情链接的类型 0表示系统,1 表示自定义', link_name varchar(60) NOT NULL COMMENT '友情链接名称', link_url varchar(255) NOT NULL COMMENT '链接地址', link_logo varchar(255) NOT NULL COMMENT 'LOGO图片', show_order tinyint(3) NOT NULL DEFAULT 0 COMMENT '在页面显示的顺序', PRIMARY KEY (link_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;`, createAdTb:`CREATE TABLE IF NOT EXISTS ad ( ad_id smallint(5) NOT NULL AUTO_INCREMENT COMMENT '自增ID', position_id smallint(5) NOT NULL COMMENT '0,站外广告;从1开始代表的是该广告所处的广告位,同表ad_postition中的字段position_id的值', media_type tinyint(3) NOT NULL DEFAULT 0 COMMENT '广告类型,0图片;1flash;2代码3文字', ad_name varchar(60) NOT NULL COMMENT '该条广告记录的广告名称', ad_link varchar(255) NOT NULL COMMENT '广告链接地址', ad_code text NOT NULL COMMENT '广告链接的表现,文字广告就是文字或图片和flash就是它们的地址', start_time BIGINT(15) NOT NULL DEFAULT 0 COMMENT '广告开始时间', end_time BIGINT(15) NOT NULL DEFAULT 0 COMMENT '广告结束时间', link_man varchar(60) NOT NULL COMMENT '广告联系人', link_email varchar(60) NOT NULL COMMENT '广告联系人的邮箱', link_phone varchar(60) NOT NULL COMMENT '广告联系人得电话', click_count mediumint(8) NOT NULL DEFAULT 0 COMMENT '广告点击次数', enabled tinyint(3) NOT NULL DEFAULT 1 COMMENT '该广告是否关闭;1开启; 0关闭; 关闭后广告将不再有效', PRIMARY KEY (ad_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;`, createUserLeaveWordTb:`CREATE TABLE IF NOT EXISTS stay_message ( stay_id smallint(5) NOT NULL AUTO_INCREMENT COMMENT '留言表自增ID', user_id mediumint(8) NOT NULL COMMENT '用户ID', stay_user_id mediumint(8) NOT NULL COMMENT '留言者ID', message_content varchar(255) NOT NULL COMMENT '留言内容', stay_user_ip varchar(50) NOT NULL COMMENT '留言用户的IP地址', message_stay_time BIGINT(15) NOT NULL COMMENT '留言时间', place varchar(64) NOT NULL COMMENT '地区', delete_flag int(1) NOT NULL DEFAULT 0 COMMENT '删除标志', PRIMARY KEY (stay_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;`, createBlogInfoTb:`CREATE TABLE IF NOT EXISTS about_blog ( blog_id mediumint(8) NOT NULL COMMENT '用户ID', blog_keyword varchar(255) NOT NULL COMMENT '博客关键字', blog_description varchar(255) NOT NULL COMMENT '博客描述', blog_name varchar(36) NOT NULL COMMENT '博客名称', blog_title varchar(128) NOT NULL COMMENT '博客标题', PRIMARY KEY (blog_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;`, createLastVisitorTb:`CREATE TABLE IF NOT EXISTS visitor ( v_id mediumint(8) NOT NULL AUTO_INCREMENT COMMENT '访客记录ID', visitor_id mediumint(8) NOT NULL COMMENT '访客ID', visitor_time BIGINT(15) NOT NULL COMMENT '来访时间', user_id mediumint(8) NOT NULL COMMENT '被访用户ID', visitor_ip varchar(50) NOT NULL COMMENT '访客IP地址', type_id int(3) NOT NULL COMMENT '访问板块ID', where_id mediumint(8) NOT NULL COMMENT '查看某板块的某个子项目,如查看相册板块的第3个相册,该ID对应该相册的ID号', PRIMARY KEY (v_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;`, createUserShuoShuoTb:`CREATE TABLE IF NOT EXISTS shuoshuo ( shuo_id mediumint(8) NOT NULL AUTO_INCREMENT COMMENT '说说记录ID', user_id mediumint(8) NOT NULL COMMENT '用户ID', shuo_time BIGINT(15) NOT NULL DEFAULT 0 COMMENT '发布时间', shuo_ip varchar(50) NOT NULL COMMENT '说说发布时的IP地址', shuoshuo varchar(255) NOT NULL COMMENT '说说内容', type_id tinyint(3) NOT NULL DEFAULT 3 COMMENT '栏目ID,默认为3', delete_flag int(1) NOT NULL DEFAULT 0 COMMENT '删除标志', PRIMARY KEY (shuo_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;`, createPhotoSortTb:`CREATE TABLE IF NOT EXISTS photo_sort ( sort_img_id mediumint(8) NOT NULL AUTO_INCREMENT COMMENT '相册ID', sort_img_name varchar(20) NOT NULL COMMENT '相册名', sort_img_type varchar(20) NOT NULL COMMENT '展示方式 0->仅主人可见,1->输入密码即可查看,2->仅好友能查看,3->回答问题即可查看', img_password varchar(32) NOT NULL COMMENT '查看密码', user_id mediumint(8) NOT NULL COMMENT '所属用户ID', img_sort_question varchar(255) NOT NULL COMMENT '访问问题', img_sort_answer varchar(128) NOT NULL COMMENT '访问问题的答案', type_id int(3) NOT NULL DEFAULT 1 COMMENT '默认1表示相册板块', top_pic_src mediumint(8) NOT NULL COMMENT '封面图片的路径', PRIMARY KEY (sort_img_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;`, createPhotoTb:`CREATE TABLE IF NOT EXISTS photos ( photo_id mediumint(8) NOT NULL AUTO_INCREMENT COMMENT '相片ID', photo_name varchar(255) NOT NULL COMMENT '相片名称', photo_src varchar(255) NOT NULL COMMENT '图片路径', photo_description varchar(255) NOT NULL COMMENT '图片描述', user_id mediumint(8) NOT NULL COMMENT '所属用户ID', sort_id mediumint(8) NOT NULL COMMENT '所属相册ID', upload_time BIGINT(15) NOT NULL COMMENT '图片上传时间', upload_ip varchar(50) NOT NULL COMMENT '图片操作上传IP地址', delete_flag int(1) NOT NULL DEFAULT 0 COMMENT '删除标志', PRIMARY KEY (photo_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;`, createArticleSortTb:`CREATE TABLE IF NOT EXISTS article_sort ( sort_article_id mediumint(8) NOT NULL AUTO_INCREMENT COMMENT '文章自增ID', user_id mediumint(8) NOT NULL COMMENT '该分类所属用户', sort_article_name varchar(60) NOT NULL COMMENT '分类名称', PRIMARY KEY (sort_article_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;`, createArticleTagTb:`CREATE TABLE IF NOT EXISTS article_tag ( tag_id mediumint(8) NOT NULL AUTO_INCREMENT COMMENT '标签ID', user_id mediumint(8) NOT NULL COMMENT '用户ID', tag_name varchar(60) NOT NULL COMMENT '标签名', PRIMARY KEY (tag_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;`, createArticleTagMapTb:`CREATE TABLE IF NOT EXISTS article_tag_map ( tag_article_id mediumint(8) NOT NULL AUTO_INCREMENT COMMENT '标签自增ID', tag_id mediumint(8) NOT NULL COMMENT '标签ID', article_id mediumint(8) NOT NULL COMMENT '标文章ID', PRIMARY KEY (tag_article_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ; `, createUserCommentTb:`CREATE TABLE IF NOT EXISTS user_comment ( comment_id mediumint(8) NOT NULL AUTO_INCREMENT COMMENT '评论自增ID号', comment_target_user_id mediumint(8) NOT NULL COMMENT '收到评论的用户ID', comment_type_id tinyint(3) DEFAULT 0 NOT NULL COMMENT '评论栏目ID', comment_target_id mediumint(8) NOT NULL COMMENT '评论内容的ID', comment_content varchar(255) NOT NULL COMMENT '评论内容', commenter_user_id mediumint(8) NOT NULL COMMENT '评论者ID', comment_time BIGINT(15) NOT NULL COMMENT '评论时间', commenter_ip varchar(50) NOT NULL COMMENT '评论时的IP地址', delete_flag int(1) NOT NULL DEFAULT 0 COMMENT '删除标志', PRIMARY KEY (comment_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;`, createUserSubCommentTb:` CREATE TABLE IF NOT EXISTS user_sub_comment ( comment_id mediumint(8) NOT NULL AUTO_INCREMENT COMMENT '评论自增ID号', comment_target_user_id mediumint(8) NOT NULL COMMENT '回复评论的用户ID,目前好像没什么用', comment_target_id mediumint(8) NOT NULL COMMENT '评论内容的ID', comment_content varchar(255) NOT NULL COMMENT '评论内容', commenter_user_id mediumint(8) NOT NULL COMMENT '评论者ID', comment_time BIGINT(15) NOT NULL COMMENT '评论时间', commenter_ip varchar(50) NOT NULL COMMENT '评论时的IP地址', comment_type tinyint(3) DEFAULT 0 NOT NULL COMMENT '评论类型,如果是0 ,就是对parent评论,如果是1 ,就是评论子评论', comment_scope mediumint(8) DEFAULT 0 NOT NULL COMMENT '评论的scope,就是是共同的父评论', delete_flag int(1) NOT NULL DEFAULT 0 COMMENT '删除标志', PRIMARY KEY (comment_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;`, createSMSTb:`CREATE TABLE IF NOT EXISTS phone_message ( phone_id mediumint(8) NOT NULL AUTO_INCREMENT COMMENT '自增ID号', phone_num varchar(12) NOT NULL COMMENT '用户手机号码', contents varchar(255) NOT NULL COMMENT '发送内容', send_time BIGINT(15) NOT NULL COMMENT '发送时间', user_id mediumint(8) NOT NULL COMMENT '用户ID', PRIMARY KEY (phone_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;`, createSiteManagerTb:`CREATE TABLE IF NOT EXISTS blog_manager ( m_id mediumint(8) NOT NULL AUTO_INCREMENT COMMENT '自增ID号', m_username varchar(100) NOT NULL COMMENT '账号', m_password varchar(255) NOT NULL COMMENT '密码', m_token varchar(255) NOT NULL COMMENT '登录token', m_group tinyint(3) NOT NULL COMMENT '管理员组', m_last_login_time BIGINT(15) NOT NULL COMMENT '上次登录时间', m_login_times int(6) DEFAULT 0 COMMENT '登录次数', m_head varchar(100) NOT NULL COMMENT '头像', delete_flag int(1) NOT NULL DEFAULT 0 COMMENT '删除标志', PRIMARY KEY (m_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;`, createUserDynamicTb:` CREATE TABLE IF NOT EXISTS user_dynamic ( dynamic_id mediumint(8) NOT NULL AUTO_INCREMENT COMMENT '自增ID号', dynamic_user_id mediumint(8) NOT NULL COMMENT '用户ID', dynamic_target_id mediumint(8) NOT NULL COMMENT '目标ID', dynamic_target_belong_id mediumint(8) NOT NULL COMMENT '目标ID的所属ID', dynamic_type_id mediumint(8) NOT NULL COMMENT '类型Id', dynamic_type_name varchar(255) NOT NULL COMMENT '类型名称', dynamic_oper_type mediumint(8) NOT NULL COMMENT '操作类型ID', dynamic_oper_name varchar(255) NOT NULL COMMENT '操作类型名称', dynamic_oper_time BIGINT(15) NOT NULL COMMENT '操作时间', PRIMARY KEY (dynamic_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;`, createUserDynamicTb:` CREATE TABLE IF NOT EXISTS blog_error ( error_id mediumint(8) NOT NULL AUTO_INCREMENT COMMENT '自增ID号', error_num mediumint(8) NOT NULL DEFAULT 0 COMMENT '错误号', error_name varchar(255) NOT NULL COMMENT '错误名', error_message varchar(2000) NOT NULL COMMENT '错信息', error_desc varchar(2000) NOT NULL COMMENT '目标描述', error_stack varchar(2000) NOT NULL COMMENT '目标Stack', error_time BIGINT(15) NOT NULL COMMENT '出错时间', PRIMARY KEY (error_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;`, createMapArticleTagView:`create view article_tag_map_view as select tag.* , map.article_id from article_tag as tag left join article_tag_map as map on tag.tag_id = map.tag_id`, createArticleRelatedView:` CREATE VIEW article_related_info AS SELECT article.*, (SELECT COUNT(user_comment.comment_id) FROM user_comment WHERE (article.article_id = user_comment.comment_target_id)) AS comment_count, (SELECT COUNT(like_article.like_id) FROM like_article WHERE (like_article.article_id = article.article_id)) AS like_count, (SELECT article_sort.sort_article_name FROM article_sort WHERE (article_sort.sort_article_id = article.article_sort_id)) AS article_sort_name, user_info.user_real_name AS user_real_name, user_info.user_image_url AS user_image_url FROM (article JOIN user_info ON ((article.user_id = user_info.user_id))) WHERE (article.article_status = 1) `, createTagMapView:`create view article_tag_map_view as select tag.* , map.article_id from article_tag as tag left join article_tag_map as map on tag.tag_id = map.tag_id`, createUserDetailView:`CREATE VIEW user_detail AS select a.user_group_id , a.user_name , a.user_password , a.user_token , a.user_isSendEmail , a.user_isValidate , a.user_register_time , a.user_register_ip , a.user_login_times , a.user_last_login_ip , a.user_lock , a.user_freeze , a.user_auth ,b.* from user a join user_info b on a.user_id = b.user_id`, createUserCommentsView:` create view user_comments as SELECT comment_id,comment_target_user_id,comment_target_id, comment_content,commenter_user_id,comment_time, 0 as 'comment_type', 0 as 'comment_scope',delete_flag FROM user_comment union SELECT comment_id,comment_target_user_id,comment_target_id, comment_content,commenter_user_id,comment_time,comment_type,comment_scope,delete_flag FROM user_sub_comment `, } module.exports = sqls
mit
tonyhhyip/ysitd-cloud-portal
app/Models/IssueComment.php
231
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class IssueComment extends Model { public $incrementing = false; public function comment() { return $this->belongsTo(Issue::class); } }
mit
reviewboard/rb-gateway
repositories/hg_test.go
8906
package repositories_test import ( "fmt" "os" "path/filepath" "testing" "github.com/go-ini/ini" "github.com/stretchr/testify/assert" "github.com/reviewboard/rb-gateway/helpers" "github.com/reviewboard/rb-gateway/repositories/events" ) func TestHgGetName(t *testing.T) { repo, client := helpers.CreateHgRepo(t, "hg-repo") defer helpers.CleanupHgRepo(t, client) assert.Equal(t, "hg-repo", repo.GetName()) } func TestHgGetPath(t *testing.T) { repo, client := helpers.CreateHgRepo(t, "hg-repo") defer helpers.CleanupHgRepo(t, client) assert.Equal(t, repo.GetPath(), client.RepoRoot()) } func TestHgGetFile(t *testing.T) { assert := assert.New(t) repo, client := helpers.CreateHgRepo(t, "hg-repo") defer helpers.CleanupHgRepo(t, client) helpers.SeedHgRepo(t, repo, client) fileContent := helpers.GetRepoFiles()["README"] result, err := repo.GetFile("README") assert.Nil(err) assert.Equal(fileContent, result[:], "Expected file contents to match.") } func TestHgGetFileByCommit(t *testing.T) { assert := assert.New(t) repo, client := helpers.CreateHgRepo(t, "hg-repo") defer helpers.CleanupHgRepo(t, client) commitID := helpers.SeedHgRepo(t, repo, client) result, err := repo.GetFileByCommit(commitID, "README") assert.Nil(err) fileContent := helpers.GetRepoFiles()["README"] assert.Equal(fileContent, result[:], "Expected file contents to match.") } func TestHgFileExists(t *testing.T) { assert := assert.New(t) repo, client := helpers.CreateHgRepo(t, "hg-repo") defer helpers.CleanupHgRepo(t, client) helpers.SeedHgRepo(t, repo, client) fileExists, err := repo.FileExists("AUTHORS") assert.Nil(err) assert.False(fileExists, "File 'AUTHORS' should not exist.") fileExists, err = repo.FileExists("README") assert.Nil(err) assert.True(fileExists, "File 'README' should exist.") } func TestHgFileExistsByCommit(t *testing.T) { assert := assert.New(t) repo, client := helpers.CreateHgRepo(t, "hg-repo") defer helpers.CleanupHgRepo(t, client) commitID := helpers.SeedHgRepo(t, repo, client) bookmarkCommitID := helpers.SeedHgBookmark(t, repo, client) fileExists, err := repo.FileExistsByCommit(commitID, "AUTHORS") assert.Nil(err) assert.False(fileExists, "File 'AUTHORS' should not exist at first commit.") fileExists, err = repo.FileExistsByCommit(bookmarkCommitID, "AUTHORS") assert.Nil(err) assert.True(fileExists, "File 'AUTHORS' should exist at bookmark.") } func TestHgGetBranches(t *testing.T) { assert := assert.New(t) repo, client := helpers.CreateHgRepo(t, "hg-repo") defer helpers.CleanupHgRepo(t, client) helpers.SeedHgRepo(t, repo, client) helpers.SeedHgBookmark(t, repo, client) branches, err := repo.GetBranches() assert.Nil(err) assert.Equal(2, len(branches)) assert.Equal("default", branches[0].Name) assert.Equal("test-bookmark", branches[1].Name) for i := 0; i < len(branches); i++ { output, err := client.ExecCmd([]string{"log", "-r", branches[i].Name, "--template", "{node}"}) assert.Nil(err) assert.Equal(string(output), branches[i].Id) } } func TestHgGetBranchesNoBookmarks(t *testing.T) { assert := assert.New(t) repo, client := helpers.CreateHgRepo(t, "hg-repo") defer helpers.CleanupHgRepo(t, client) helpers.SeedHgRepo(t, repo, client) branches, err := repo.GetBranches() assert.Nil(err) assert.Equal(1, len(branches)) assert.Equal("default", branches[0].Name) for i := 0; i < len(branches); i++ { output, err := client.ExecCmd([]string{"log", "-r", branches[i].Name, "--template", "{node}"}) assert.Nil(err) assert.Equal(string(output), branches[i].Id) } } func TestHgGetCommits(t *testing.T) { assert := assert.New(t) repo, client := helpers.CreateHgRepo(t, "hg-repo") defer helpers.CleanupHgRepo(t, client) commitID := helpers.SeedHgRepo(t, repo, client) bookmarkCommitID := helpers.SeedHgBookmark(t, repo, client) commits, err := repo.GetCommits("test-bookmark", "") assert.Nil(err) assert.Equal(2, len(commits)) assert.Equal(bookmarkCommitID, commits[0].Id) assert.Equal(commitID, commits[1].Id) // 0x1e is the ASCII record separator. 0x1f is the field separator. revisions := make([]string, 0, len(commits)) for _, commit := range commits { revisions = append(revisions, commit.Id) } records, err := repo.Log(client, []string{ "{author}", "{node}", "{date|rfc3339date}", "{desc}", "{parents}", }, revisions, ) assert.Equal(len(commits), len(records)) for i, record := range records { commit := commits[i] assert.Equal(commit.Author, record[0]) assert.Equal(commit.Id, record[1]) assert.Equal(commit.Date, record[2]) } } func TestHgGetCommit(t *testing.T) { assert := assert.New(t) repo, client := helpers.CreateHgRepo(t, "hg-repo") defer helpers.CleanupHgRepo(t, client) helpers.SeedHgRepo(t, repo, client) helpers.SeedHgBookmark(t, repo, client) commit, err := repo.GetCommit("1") assert.Nil(err) output, err := client.ExecCmd([]string{ "diff", "--git", "-r", fmt.Sprintf("%s^:%s", commit.Id, commit.Id), }) assert.Nil(err) assert.Equal(commit.Diff, string(output)) } func TestParsePushEvent(t *testing.T) { assert := assert.New(t) repo, client := helpers.CreateHgRepo(t, "hg-repo") defer helpers.CleanupHgRepo(t, client) fmt.Println("====== CWD: ", repo.Path) files := []map[string][]byte{ {"foo": []byte("foo")}, {"bar": []byte("bar")}, {"baz": []byte("baz")}, {"qux": []byte("qux")}, } nodes := make([]string, 0, 5) for i, filesToAdd := range files[:3] { helpers.CreateAndAddFilesHg(t, repo.Path, client, filesToAdd) commitId := helpers.CommitHg(t, client, fmt.Sprintf("Commit %d", i), helpers.DefaultAuthor) nodes = append(nodes, commitId) } tagId := helpers.CreateHgTag(t, client, nodes[2], "commit-2", "Tag commit-2", helpers.DefaultAuthor) nodes = append(nodes, tagId) for i, filesToAdd := range files[3:] { helpers.CreateAndAddFilesHg(t, repo.Path, client, filesToAdd) commitId := helpers.CommitHg(t, client, fmt.Sprintf("Commit %d", 3+i), helpers.DefaultAuthor) nodes = append(nodes, commitId) } helpers.CreateHgBookmark(t, client, nodes[4], "bookmark-1") env := map[string]string{ "HG_NODE": nodes[1], "HG_NODE_LAST": nodes[4], } var payload events.Payload var err error helpers.WithEnv(t, env, func() { payload, err = repo.ParseEventPayload(events.PushEvent, nil) }) assert.Nil(err) expected := events.PushPayload{ Repository: repo.Name, Commits: []events.PushPayloadCommit{ { Id: nodes[1], Message: "Commit 1", Target: events.PushPayloadCommitTarget{ Branch: "default", }, }, { Id: nodes[2], Message: "Commit 2", Target: events.PushPayloadCommitTarget{ Branch: "default", Tags: []string{"commit-2"}, }, }, { Id: nodes[3], Message: "Tag commit-2", Target: events.PushPayloadCommitTarget{ Branch: "default", }, }, { Id: nodes[4], Message: "Commit 3", Target: events.PushPayloadCommitTarget{ Branch: "default", Bookmarks: []string{"bookmark-1"}, Tags: []string{"tip"}, }, }, }, } assert.Equal(expected, payload) } func TestInstallHgHooks(t *testing.T) { assert := assert.New(t) repo, client := helpers.CreateHgRepo(t, "hg-repo") defer helpers.CleanupHgRepo(t, client) repo.InstallHooks("/tmp/config.json", false) hgrc, err := ini.Load(filepath.Join(repo.Path, ".hg", "hgrc")) assert.Nil(err) exePath, err := filepath.Abs(os.Args[0]) assert.Nil(err) assert.Equal( fmt.Sprintf("%s --config /tmp/config.json trigger-webhooks hg-repo push", exePath), hgrc.Section("hooks").Key("changegroup.rbgateway").String(), ) } func TestInstallHgHooksQuoted(t *testing.T) { assert := assert.New(t) repo, client := helpers.CreateHgRepo(t, "hg-repo with a space") defer helpers.CleanupHgRepo(t, client) repo.InstallHooks("/tmp/config with a space.json", false) hgrc, err := ini.Load(filepath.Join(repo.Path, ".hg", "hgrc")) assert.Nil(err) exePath, err := filepath.Abs(os.Args[0]) assert.Nil(err) assert.Equal( fmt.Sprintf("%s --config '/tmp/config with a space.json' trigger-webhooks 'hg-repo with a space' push", exePath), hgrc.Section("hooks").Key("changegroup.rbgateway").String(), ) } func TestInstallHgHooksForce(t *testing.T) { assert := assert.New(t) repo, client := helpers.CreateHgRepo(t, "repo") defer helpers.CleanupHgRepo(t, client) assert.Nil(repo.InstallHooks("/tmp/config1", false)) assert.Nil(repo.InstallHooks("/tmp/config2", true)) assert.Nil(repo.InstallHooks("/tmp/config3", false)) hgrc, err := ini.Load(filepath.Join(repo.Path, ".hg", "hgrc")) assert.Nil(err) exePath, err := filepath.Abs(os.Args[0]) assert.Nil(err) assert.Equal( fmt.Sprintf("%s --config /tmp/config2 trigger-webhooks repo push", exePath), hgrc.Section("hooks").Key("changegroup.rbgateway").String(), ) }
mit
XsErG/novaposhta_warehouses
lib/novaposhta_warehouses/version.rb
52
module NovaposhtaWarehouses VERSION = "0.0.1" end
mit
Shipow/angular-strap
src/directives/button.js
3812
angular.module('$strap.directives') .directive('bsButton', ['$parse', '$timeout', function($parse, $timeout) { 'use strict'; return { restrict: 'A', require: '?ngModel', link: function postLink(scope, element, attrs, controller) { // If we have a controller (i.e. ngModelController) then wire it up if(controller) { // Set as single toggler if not part of a btn-group if(!element.parent('[data-toggle="buttons-checkbox"], [data-toggle="buttons-radio"]').length) { element.attr('data-toggle', 'button'); } // Handle default state if(!!scope.$eval(attrs.ngModel)) { element.addClass('active'); } // Watch model for changes scope.$watch(attrs.ngModel, function(newValue, oldValue) { var bNew = !!newValue, bOld = !!oldValue; if(bNew !== bOld) { $.fn.button.Constructor.prototype.toggle.call(button); } }); } // Support buttons without .btn class if(!element.hasClass('btn')) { element.on('click.button.data-api', function (e) { element.button('toggle'); }); } // Initialize button element.button(); // Bootstrap override to handle toggling var button = element.data('button'); button.toggle = function() { if(!controller) { return $.fn.button.Constructor.prototype.toggle.call(this); } var $parent = element.parent('[data-toggle="buttons-radio"]'); if($parent.length) { element.siblings('[ng-model]').each(function(k, v) { $parse($(v).attr('ng-model')).assign(scope, false); }); scope.$digest(); if(!controller.$modelValue) { controller.$setViewValue(!controller.$modelValue); scope.$digest(); } } else { scope.$apply(function () { controller.$setViewValue(!controller.$modelValue); }); } }; /*Provide scope display functions scope._button = function(event) { element.button(event); }; scope.loading = function() { element.tooltip('loading'); }; scope.reset = function() { element.tooltip('reset'); }; if(attrs.loadingText) element.click(function () { //var btn = $(this) element.button('loading') setTimeout(function () { element.button('reset') }, 1000) });*/ } }; }]) .directive('bsButtonsCheckbox', ['$parse', function($parse) { 'use strict'; return { restrict: 'A', require: '?ngModel', compile: function compile(tElement, tAttrs, transclude) { tElement.attr('data-toggle', 'buttons-checkbox').find('a, button').each(function(k, v) { $(v).attr('bs-button', ''); }); } }; }]) .directive('bsButtonsRadio', ['$parse', function($parse) { 'use strict'; return { restrict: 'A', require: '?ngModel', compile: function compile(tElement, tAttrs, transclude) { tElement.attr('data-toggle', 'buttons-radio'); // Delegate to children ngModel if(!tAttrs.ngModel) { tElement.find('a, button').each(function(k, v) { $(v).attr('bs-button', ''); }); } return function postLink(scope, iElement, iAttrs, controller) { // If we have a controller (i.e. ngModelController) then wire it up if(controller) { iElement .find('[value]').button() .filter('[value="' + scope.$eval(iAttrs.ngModel) + '"]') .addClass('active'); iElement.on('click.button.data-api', function (ev) { scope.$apply(function () { controller.$setViewValue($(ev.target).closest('button').attr('value')); }); }); // Watch model for changes scope.$watch(iAttrs.ngModel, function(newValue, oldValue) { if(newValue !== oldValue) { var $btn = iElement.find('[value="' + scope.$eval(iAttrs.ngModel) + '"]'); $.fn.button.Constructor.prototype.toggle.call($btn.data('button')); } }); } }; } }; }]);
mit
Sufflavus/Colibri
tests/spec/array-spec.js
27733
describe("Array 'last'", function() { it("is a function of 'Array' prototype", function() { var actual = Array.prototype.last instanceof Function; expect(actual).toBeTruthy(); }); it("is a function of '[]'", function() { var actual = [].last instanceof Function; expect(actual).toBeTruthy(); }); it("returns the last element from array with more than one element", function() { var lastElement = 3; var array = [1, 2, lastElement]; var actual = array.last(); expect(actual).toEqual(lastElement); }); it("returns the last element from array with only one element", function() { var lastElement = 3; var array = [lastElement]; var actual = array.last(); expect(actual).toEqual(lastElement); }); it("returns undefined from empty array", function() { var array = []; var actual = array.last(); expect(actual).toBeUndefined(); }); }); describe("Array 'first'", function() { it("is a function of 'Array' prototype", function() { var actual = Array.prototype.first instanceof Function; expect(actual).toBeTruthy(); }); it("is a function of '[]'", function() { var actual = [].first instanceof Function; expect(actual).toBeTruthy(); }); it("returns the first element from array with more than one element", function() { var firstElement = '12'; var array = [firstElement, 2, 3]; var actual = array.first(); expect(actual).toEqual(firstElement); }); it("returns the first element from array with only one element", function() { var firstElement = 3; var array = [firstElement]; var actual = array.first(); expect(actual).toEqual(firstElement); }); it("returns undefined from empty array", function() { var array = []; var actual = array.first(); expect(actual).toBeUndefined(); }); }); describe("Array 'isEmpty'", function() { it("is a function of 'Array' prototype", function() { var actual = Array.prototype.isEmpty instanceof Function; expect(actual).toBeTruthy(); }); it("is a function of '[]'", function() { var actual = [].isEmpty instanceof Function; expect(actual).toBeTruthy(); }); it("returns false for array with more than one element", function() { var array = ['er', 2, 3]; var actual = array.isEmpty(); expect(actual).toBeFalsy(); }); it("returns false for array with only one element", function() { var array = ['f']; var actual = array.isEmpty(); expect(actual).toBeFalsy(); }); it("returns true for empty array", function() { var array = []; var actual = array.isEmpty(); expect(actual).toBeTruthy(); }); it("returns false for array with empty elements", function() { var array = [, , ]; var actual = array.isEmpty(); expect(actual).toBeFalsy(); }); it("returns false for array with 0", function() { var array = [0]; var actual = array.isEmpty(); expect(actual).toBeFalsy(); }); it("returns false for array with empty string", function() { var array = [""]; var actual = array.isEmpty(); expect(actual).toBeFalsy(); }); it("returns false for array with empty object", function() { var array = [{}]; var actual = array.isEmpty(); expect(actual).toBeFalsy(); }); it("returns false for array with empty array", function() { var array = [[]]; var actual = array.isEmpty(); expect(actual).toBeFalsy(); }); }); describe("Array 'isNotEmpty'", function() { it("is a function of 'Array' prototype", function() { var actual = Array.prototype.isNotEmpty instanceof Function; expect(actual).toBeTruthy(); }); it("is a function of '[]'", function() { var actual = [].isNotEmpty instanceof Function; expect(actual).toBeTruthy(); }); it("returns true for array with more than one element", function() { var array = ['er', 2, 3]; var actual = array.isNotEmpty(); expect(actual).toBeTruthy(); }); it("returns true for array with only one element", function() { var array = ['f']; var actual = array.isNotEmpty(); expect(actual).toBeTruthy(); }); it("returns false for empty array", function() { var array = []; var actual = array.isNotEmpty(); expect(actual).toBeFalsy(); }); it("returns true for array with empty elements", function() { var array = [, , ]; var actual = array.isNotEmpty(); expect(actual).toBeTruthy(); }); it("returns true for array with 0", function() { var array = [0]; var actual = array.isNotEmpty(); expect(actual).toBeTruthy(); }); it("returns true for array with empty string", function() { var array = [""]; var actual = array.isNotEmpty(); expect(actual).toBeTruthy(); }); it("returns true for array with empty object", function() { var array = [{}]; var actual = array.isNotEmpty(); expect(actual).toBeTruthy(); }); it("returns true for array with empty array", function() { var array = [[]]; var actual = array.isNotEmpty(); expect(actual).toBeTruthy(); }); }); describe("Array 'removeEmpty'", function() { it("is a function of 'Array' prototype", function() { var actual = Array.prototype.removeEmpty instanceof Function; expect(actual).toBeTruthy(); }); it("is a function of '[]'", function() { var actual = [].removeEmpty instanceof Function; expect(actual).toBeTruthy(); }); it("removes empty sting elements", function() { var arrayElement1 = 2; var arrayElement2 = "5"; var array = [arrayElement1, arrayElement2, '']; var countOfNotEmptyElements = 2; var actual = array.removeEmpty(); expect(actual.length).toEqual(countOfNotEmptyElements); expect(actual[0]).toEqual(arrayElement1); expect(actual[1]).toEqual(arrayElement2); }); it("removes null elements", function() { var arrayElement1 = 2; var arrayElement2 = "5"; var array = [arrayElement1, arrayElement2, null]; var countOfNotEmptyElements = 2; var actual = array.removeEmpty(); expect(actual.length).toEqual(countOfNotEmptyElements); expect(actual[0]).toEqual(arrayElement1); expect(actual[1]).toEqual(arrayElement2); }); it("removes undefined elements", function() { var arrayElement1 = 2; var arrayElement2 = "5"; var array = [arrayElement1, arrayElement2, undefined]; var countOfNotEmptyElements = 2; var actual = array.removeEmpty(); expect(actual.length).toEqual(countOfNotEmptyElements); expect(actual[0]).toEqual(arrayElement1); expect(actual[1]).toEqual(arrayElement2); }); it("removes missed elements", function() { var arrayElement1 = 2; var arrayElement2 = "5"; var array = [arrayElement1, arrayElement2, , ,]; var countOfNotEmptyElements = 2; var actual = array.removeEmpty(); expect(actual.length).toEqual(countOfNotEmptyElements); expect(actual[0]).toEqual(arrayElement1); expect(actual[1]).toEqual(arrayElement2); }); it("removes empty elements from different positions", function() { var arrayElement1 = 2; var arrayElement2 = "5"; var arrayElement3 = {a:1}; var array = [null, arrayElement1, ,arrayElement2, undefined, ,arrayElement3 ,]; var countOfNotEmptyElements = 3; var actual = array.removeEmpty(); expect(actual.length).toEqual(countOfNotEmptyElements); expect(actual[0]).toEqual(arrayElement1); expect(actual[1]).toEqual(arrayElement2); expect(actual[2]).toEqual(arrayElement3); }); it("does not remove empty object element", function() { var arrayElement1 = {}; var array = [arrayElement1]; var countOfNotEmptyElements = 1; var actual = array.removeEmpty(); expect(actual.length).toEqual(countOfNotEmptyElements); expect(actual[0]).toEqual(arrayElement1); }); it("does not remove 0", function() { var arrayElement1 = 0; var array = [arrayElement1]; var countOfNotEmptyElements = 1; var actual = array.removeEmpty(); expect(actual.length).toEqual(countOfNotEmptyElements); expect(actual[0]).toEqual(arrayElement1); }); it("does not remove empty array", function() { var arrayElement1 = []; var array = [arrayElement1]; var countOfNotEmptyElements = 1; var actual = array.removeEmpty(); expect(actual.length).toEqual(countOfNotEmptyElements); expect(actual[0]).toEqual(arrayElement1); }); it("works correct on empty arrays", function() { var array = []; var countOfNotEmptyElements = 0; var actual = array.removeEmpty(); expect(actual.length).toEqual(countOfNotEmptyElements); }); }); describe("Array 'contains'", function() { it("is a function of 'Array' prototype", function() { var actual = Array.prototype.contains instanceof Function; expect(actual).toBeTruthy(); }); it("is a function of '[]'", function() { var actual = [].contains instanceof Function; expect(actual).toBeTruthy(); }); it("returns true for existing int element", function() { var array = [2, 0, '']; var actual = array.contains(2); expect(actual).toBeTruthy(); }); it("returns true for existing empty string element", function() { var array = [2, 0, '']; var actual = array.contains(''); expect(actual).toBeTruthy(); }); it("returns true for existing zero element", function() { var array = [2, 0, '']; var actual = array.contains(0); expect(actual).toBeTruthy(); }); it("returns false for nonexistent element", function() { var array = [2, 0, '']; var actual = array.contains(1); expect(actual).toBeFalsy(); }); it("returns false for empty array", function() { var array = []; var actual = array.contains(1); expect(actual).toBeFalsy(); }); it("returns false for nonexistent null element", function() { var array = [2, 0]; var actual = array.contains(null); expect(actual).toBeFalsy(); }); it("returns true for existing null element", function() { var array = [2, 0, null]; var actual = array.contains(null); expect(actual).toBeTruthy(); }); it("returns false for nonexistent undefined element", function() { var array = [2, 0]; var actual = array.contains(undefined); expect(actual).toBeFalsy(); }); it("returns true for existing undefined element", function() { var array = [2, 0, undefined]; var actual = array.contains(undefined); expect(actual).toBeTruthy(); }); }); describe("Array 'indexOfInsensitive'", function() { it("is a function of 'Array' prototype", function() { var actual = Array.prototype.indexOfInsensitive instanceof Function; expect(actual).toBeTruthy(); }); it("is a function of '[]'", function() { var actual = [].indexOfInsensitive instanceof Function; expect(actual).toBeTruthy(); }); it("returns correct index for existing string element", function() { var element = "LoReM"; var searchElement = "lorem"; var array = [1, 2, element, "ert"]; var indexOfElement = 2; var actual = array.indexOfInsensitive(searchElement); expect(actual).toEqual(indexOfElement); }); it("returns -1 for nonexistent element", function() { var element = "impus"; var searchElement = "lorem"; var array = [1, 2, element, "ert"]; var actual = array.indexOfInsensitive(searchElement); expect(actual).toEqual(-1); }); it("returns -1 for empty array", function() { var searchElement = "lorem"; var array = []; var actual = array.indexOfInsensitive(searchElement); expect(actual).toEqual(-1); }); it("returns -1 for nonexistent string element", function() { var searchElement = "lorem"; var array = [1, "impus", 2, ]; var actual = array.indexOfInsensitive(searchElement); expect(actual).toEqual(-1); }); it("returns correct index for existing non-string element", function() { var element = 3; var searchElement = 3; var array = [1, 2, element, "ert"]; var indexOfElement = 2; var actual = array.indexOfInsensitive(searchElement); expect(actual).toEqual(indexOfElement); }); it("returns -1 for nonexistent non-string element", function() { var searchElement = 5; var array = [1, 2]; var actual = array.indexOfInsensitive(searchElement); expect(actual).toEqual(-1); }); it("throws an exception if fromIndex is not integer", function() { var searchElement = 5; var array = [1, 2]; var fromIndex = "a"; expect(function() { var actual = array.indexOfInsensitive(searchElement, fromIndex); }).toThrowError("Parameter fromIndex should be numbers."); }); it("returns correct index for correct fromIndex", function() { var element = 3; var array = [1, 2, element, "ert"]; var searchElement = 3; var indexOfElement = 2; var fromIndex = 2; var actual = array.indexOfInsensitive(searchElement, fromIndex); expect(actual).toEqual(indexOfElement); }); }); describe("Array 'max'", function() { it("is a function of 'Array' prototype", function() { var actual = Array.prototype.max instanceof Function; expect(actual).toBeTruthy(); }); it("is a function of '[]'", function() { var actual = [].max instanceof Function; expect(actual).toBeTruthy(); }); it("returns correct result for array of numbers", function() { var maxElement = 1000.23; var array = [1, 2, maxElement, 23.56]; var actual = array.max(); expect(actual).toEqual(maxElement); }); it("returns undefined for empty array", function() { var array = []; var actual = array.max(); expect(actual).toBeUndefined(); }); it("throws an exception for array with non-number elements", function() { var array = [1, 2, "ert"]; expect(function() { var actual = array.max(); }).toThrowError("All items in array should be numbers."); }); }); describe("Array 'min'", function() { it("is a function of 'Array' prototype", function() { var actual = Array.prototype.min instanceof Function; expect(actual).toBeTruthy(); }); it("is a function of '[]'", function() { var actual = [].min instanceof Function; expect(actual).toBeTruthy(); }); it("returns correct result for array of numbers", function() { var minElement = -10; var array = [1, 2, minElement, 23.56]; var actual = array.min(); expect(actual).toEqual(minElement); }); it("returns undefined for empty array", function() { var array = []; var actual = array.min(); expect(actual).toBeUndefined(); }); it("throws an exception for array with non-number elements", function() { var array = [1, -2, "3"]; expect(function() { var actual = array.min(); }).toThrowError("All items in array should be numbers."); }); }); describe("Array 'pushAll'", function() { it("is a function of 'Array' prototype", function() { var actual = Array.prototype.pushAll instanceof Function; expect(actual).toBeTruthy(); }); it("is a function of '[]'", function() { var actual = [].pushAll instanceof Function; expect(actual).toBeTruthy(); }); it("push all elements from empty array to empty array", function() { var array = []; array.pushAll([]); expect(array.length).toBe(0); }); it("push all elements from empty array to not empty array", function() { var array = [2, 1]; var initialCount = array.length; array.pushAll([]); expect(array.length).toBe(initialCount); }); it("push all elements from not empty array to not empty array", function() { var arrayA = [2, 1]; var arrayB = [2, 1, 3]; var initialCount = arrayA.length; arrayA.pushAll(arrayB); var expectedCount = initialCount + arrayB.length; expect(arrayA.length).toBe(expectedCount); }); it("returns summ arrays length", function() { var arrayA = [2, 1]; var arrayB = [2, 1, 3]; var initialCount = arrayA.length; var actual = arrayA.pushAll(arrayB); var expectedCount = initialCount + arrayB.length; expect(actual).toBe(expectedCount); }); it("throws an exception if argument is number", function() { var arrayA = [2, 1]; var arrayB = 1.2; expect(function() { arrayA.pushAll(arrayB); }).toThrowError("The argument should be an array."); }); it("throws an exception if argument is string", function() { var arrayA = [2, 1]; var arrayB = "1"; expect(function() { arrayA.pushAll(arrayB); }).toThrowError("The argument should be an array."); }); it("throws an exception if argument is object", function() { var arrayA = [2, 1]; var arrayB = 1.2; expect(function() { arrayA.pushAll(arrayB); }).toThrowError("The argument should be an array."); }); it("throws an exception if argument is Date", function() { var arrayA = [2, 1]; var arrayB = new Date(); expect(function() { arrayA.pushAll(arrayB); }).toThrowError("The argument should be an array."); }); it("throws an exception if argument is null", function() { var arrayA = [2, 1]; var arrayB = null; expect(function() { arrayA.pushAll(arrayB); }).toThrowError("The argument should be an array."); }); it("throws an exception if argument is undefined", function() { var arrayA = [2, 1]; var arrayB = undefined; expect(function() { arrayA.pushAll(arrayB); }).toThrowError("The argument should be an array."); }); it("throws an exception if argument is bool", function() { var arrayA = [2, 1]; var arrayB = true; expect(function() { arrayA.pushAll(arrayB); }).toThrowError("The argument should be an array."); }); }); describe("Array 'any'", function() { it("is a function of 'Array' prototype", function() { var actual = Array.prototype.any instanceof Function; expect(actual).toBeTruthy(); }); it("is a function of '[]'", function() { var actual = [].any instanceof Function; expect(actual).toBeTruthy(); }); it("returns false for empty array and undefined predicate", function() { var array = []; var actual = array.any(); expect(actual).toBeFalsy(); }); it("returns false for empty array and existing predicate", function() { var array = []; var predicate = function(item) { return item > 0; }; var actual = array.any(predicate); expect(actual).toBeFalsy(); }); it("returns true for not empty array and undefined predicate", function() { var array = [2, 1]; var actual = array.any(); expect(actual).toBeTruthy(); }); it("returns true for not empty array and null predicate", function() { var array = [2, 1]; var actual = array.any(null); expect(actual).toBeTruthy(); }); it("returns true for not empty array and existing predicate", function() { var array = [-1, 1]; var predicate = function(item) { return item > 0; }; var actual = array.any(predicate); expect(actual).toBeTruthy(); }); it("throws an exception if argument is number", function() { var array = [2, 1]; var predicate = 1; expect(function() { array.any(predicate); }).toThrowError("If predicate exists, it should be a function."); }); it("throws an exception if argument is string", function() { var array = [2, 1]; var predicate = "rr"; expect(function() { array.any(predicate); }).toThrowError("If predicate exists, it should be a function."); }); it("throws an exception if argument is object", function() { var array = [2, 1]; var predicate = {}; expect(function() { array.any(predicate); }).toThrowError("If predicate exists, it should be a function."); }); it("throws an exception if argument is Date", function() { var array = [2, 1]; var predicate = new Date(); expect(function() { array.any(predicate); }).toThrowError("If predicate exists, it should be a function."); }); it("throws an exception if argument is array", function() { var array = [2, 1]; var predicate = []; expect(function() { array.any(predicate); }).toThrowError("If predicate exists, it should be a function."); }); it("throws an exception if argument is bool", function() { var array = [2, 1]; var predicate = true; expect(function() { array.any(predicate); }).toThrowError("If predicate exists, it should be a function."); }); }); describe("Array 'distinct'", function() { it("is a function of 'Array' prototype", function() { var actual = Array.prototype.distinct instanceof Function; expect(actual).toBeTruthy(); }); it("is a function of '[]'", function() { var actual = [].distinct instanceof Function; expect(actual).toBeTruthy(); }); it("returns correct result for empty array", function() { var array = []; var actual = array.distinct(); expect(actual.length).toEqual(0); }); it("returns correct result for not empty array", function() { var array = [1, 2, 1, 2, 5, 1, 3, "one"]; var actual = array.distinct(); expect(actual).toEqual([1, 2, 5, 3, "one"]); }); }); describe("Array 'flatten'", function() { it("is a function of 'Array' prototype", function() { var actual = Array.prototype.flatten instanceof Function; expect(actual).toBeTruthy(); }); it("is a function of '[]'", function() { var actual = [].flatten instanceof Function; expect(actual).toBeTruthy(); }); it("returns correct result for empty array", function() { var array = []; var actual = array.flatten(); expect(actual.length).toEqual(0); }); it("returns correct result for one-dimensional array", function() { var array = [1, 2, 3, 4, 5, "six", "seven", 8]; var actual = array.flatten(); expect(actual).toEqual([1, 2, 3, 4, 5, "six", "seven", 8]); }); it("returns correct result for array of arrays", function() { var array = [[1, 2, 3], 4, 5, ["six", "seven", 8], []]; var actual = array.flatten(); expect(actual).toEqual([1, 2, 3, 4, 5, "six", "seven", 8]); }); it("returns correct result for multidimensional array", function() { var array = [[1, 2, [3, 4], 5], ["six", "seven", [8, 9, 10, [11, 12, 13]]]]; var actual = array.flatten(); expect(actual).toEqual([1, 2, [3, 4], 5, 'six', 'seven', [8, 9, 10, [11, 12, 13]]]); }); });
mit
KeithMcLoughlin/Book-Reservation-Website
reserved.php
4458
<html> <head> <title>My Reserved Books</title> <link rel="stylesheet" type="text/css" href="library.css" /> </head> <body> <?php //connect to database $db = mysql_connect('localhost', 'root', '') or die(mysql_error()); if($db == FALSE) die('Fail message'); ?> <!--Title at the top of page--> <div class = "head">My Reserved Books</div> <!--Navigation Bar--> <ul><li><a class="nav" href="search.php">Search For Book</a></li> <li><a class="nav" href="reserved.php">My Reserved Books</a></li> </ul> <?php mysql_select_db("librarydb") or die(mysql_error()); session_start(); //get the user $username = $_SESSION['user']; //column titles echo '<table>'."\n"; echo "<tr><th>"; echo("ISBN"); echo("</th><th>"); echo("Title"); echo("</th><th>"); echo("Author"); echo("</th><th>"); echo("Edition"); echo("</th><th>"); echo("Year"); echo("</th><th>"); echo("Category"); echo("</tr>\n"); //select the books reserved by this user $result = mysql_query("SELECT books.isbn, books.bookTitle, books.author, books.edition, books.year, books.category FROM books INNER JOIN reserved ON books.isbn=reserved.isbn WHERE reserved.username = '$username';"); $numOfRows = mysql_num_rows($result); //if the user has not reserved any books if($numOfRows == 0) { echo "You have no books reserved"; } else { //get the books the user reserved $query = mysql_query("SELECT books.isbn, books.bookTitle, books.author, books.edition, books.year, books.category FROM books INNER JOIN reserved ON books.isbn=reserved.isbn WHERE reserved.username = '$username';"); $numOfRows = mysql_num_rows($query); $perpage = 5; if($numOfRows == 5) { $last_amount = 5; } else { $last_amount = $numOfRows % $perpage; } //get page number or start at 1 $page = isset($_GET['page']) ? $_GET['page'] : 1; $pages_count = ceil($numOfRows / $perpage); $is_first = $page == 1; $is_last = $page == $pages_count; $prev = max(1, $page - 1); $next = min($pages_count , $page + 1); if($pages_count > 0) { if(!$is_first) { //previous page link echo '<a href="reserved.php?page='.$prev.'">Previous</a>&nbsp&nbsp'; } if(!$is_last) { //next page link echo '<a href="reserved.php?page='.$next.'">Next</a>'; } if($page == $pages_count) { $perpage = $last_amount; } //limit the number of results to the number of results perpage $query = "SELECT books.isbn, books.bookTitle, books.author, books.edition, books.year, books.category FROM books INNER JOIN reserved ON books.isbn=reserved.isbn WHERE reserved.username = '$username' LIMIT ".(int)(5 * ($page - 1)).", ".(int)$perpage; $result = mysql_query($query); $i = 1; //display the books columns while ( $row = mysql_fetch_row($result) ) { echo("<form method = 'post'>"); echo "<tr><td>"; echo($row[0]); $_SESSION['isbn'.$i] = $row[0]; echo("</td><td>"); echo($row[1]); echo("</td><td>"); echo($row[2]); echo("</td><td>"); echo($row[3]); echo("</td><td>"); echo($row[4]); echo("</td><td>"); echo($row[5]); echo("</td><td>"); echo("<input type = 'submit' value = 'Cancel' name = 'cancel".$i."'>"); //cancel reservation button echo("</tr>\n"); echo("</form>"); $i = $i + 1; } } } ?> <?php $isbn = 0; //check which cancellation button was pressed and store the isbn of that book if(isset($_POST['cancel1'])) { $isbn = $_SESSION['isbn1']; } if(isset($_POST['cancel2'])) { $isbn = $_SESSION['isbn2']; } if(isset($_POST['cancel3'])) { $isbn = $_SESSION['isbn3']; } if(isset($_POST['cancel4'])) { $isbn = $_SESSION['isbn4']; } if(isset($_POST['cancel5'])) { $isbn = $_SESSION['isbn5']; } if($isbn != 0) { //update the books table so the book with that isbn is no longer reserved $update = "UPDATE books SET reserved = 'N' WHERE isbn = '$isbn';"; mysql_query($update); //delete that reservation from the reserved table $rm = "DELETE FROM reserved WHERE isbn = '$isbn'"; mysql_query($rm); //return back to the reserved books page header("location: reserved.php"); } ?> </body> </html>
mit
greghoover/gluon
hase/hase.ClientUI.XFApp/hase.ClientUI.XFApp/TypedClient/CalculatorPage.xaml.cs
1779
using hase.AppServices.Calculator.Client; using hase.AppServices.Calculator.Contract; using hase.DevLib.Framework.Relay.Proxy; using hase.Relays.Signalr.Client; using System; using Xamarin.Forms; using Xamarin.Forms.Xaml; namespace hase.ClientUI.XFApp { [XamlCompilation(XamlCompilationOptions.Compile)] public partial class CalculatorPage : ContentPage { public CalculatorPage () { InitializeComponent (); this.ResetButton_Clicked(null, null); } private void ResetButton_Clicked(object sender, EventArgs e) { this.ServiceLocationPicker.SelectedIndex = 0; this.FirstNumber.Text = "0"; this.SecondNumber.Text = "0"; this.ResultLabel.Text = string.Empty; } private void SubmitButton_Clicked(object sender, EventArgs e) { try { var client = default(Calculator); switch (this.ServiceLocationPicker.SelectedItem.ToString().ToLower()) { case "local": client = new Calculator(); break; case "remote": var hostCfg = new RelayProxyConfig().GetConfigSection(); var proxyCfg = hostCfg.GetConfigRoot().GetSection(hostCfg.ProxyConfigSection); client = new Calculator(typeof(SignalrRelayProxy<CalculatorRequest, CalculatorResponse>), proxyCfg); break; default: throw new ApplicationException("Service location must be either Local or Remote."); } var number1 = int.Parse(this.FirstNumber.Text); var number2 = int.Parse(this.SecondNumber.Text); var result = client.Add(number1, number2); this.ResultLabel.Text = $"[{number1}] + [{number2}] = [{result}]."; } catch (Exception ex) { var txt = ex.Message; if (ex.InnerException != null) txt += Environment.NewLine + ex.InnerException.Message; this.ResultLabel.Text = txt; } } } }
mit
jomjose/js-algorithms
queues/queues (11).js
339
var nums = []; for (var i = 0; i < 10; ++i) { nums[i] = Math.floor(Math.random() * 11); } dispArr(nums); print(); putstr("Enter a value to search for: "); var val = parseInt(readline()); if (seqSearch(nums, val)) { print("Found element: "); print(); dispArr(nums); } else { print(val + " is not in array."); }
mit
robledop/Blog
Blog.DataAccess/Repositories/CommentRepository.cs
293
using Blog.DataAccess.Interfaces; using Blog.Model.DomainModels; namespace Blog.DataAccess.Repositories { public class CommentRepository : RepositoryBase<Comment>, ICommentRepository { public CommentRepository(ApplicationDbContext db) : base(db) { } } }
mit
svil4ok/validation
src/Rules/Same.php
1052
<?php namespace SGP\Validation\Rules; use SGP\Validation\Contracts\Rule; use SGP\Validation\Helpers\Arr; class Same implements Rule { use RuleTrait; /** * @var string */ protected $message = "The :attribute value must be the same as the :other-attribute value"; /** * @var string */ protected $slug = 'same'; /** * @return string */ public function getSlug() : string { return $this->slug; } /** * @return string */ public function getMessage() : string { $params = $this->getParams(); return str_replace(':other-attribute', $params[0], $this->message); } /** * @param mixed $value * * @return bool */ public function passes($value) : bool { $params = $this->getParams(); $this->requireParameterCount(1, $params, $this->getSlug()); $otherField = $params[0]; $otherValue = Arr::get($this->getData(), $otherField); return $value === $otherValue; } }
mit
ceolter/angular-grid
community-modules/core/dist/cjs/context/beanStub.js
6426
/** * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v25.0.1 * @link http://www.ag-grid.com/ * @license MIT */ "use strict"; 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; }; Object.defineProperty(exports, "__esModule", { value: true }); var eventService_1 = require("../eventService"); var context_1 = require("./context"); var array_1 = require("../utils/array"); var event_1 = require("../utils/event"); var BeanStub = /** @class */ (function () { function BeanStub() { var _this = this; this.destroyFunctions = []; this.destroyed = false; // for vue 3 - prevents Vue from trying to make this (and obviously any sub classes) from being reactive // prevents vue from creating proxies for created objects and prevents identity related issues this.__v_skip = true; this.getContext = function () { return _this.context; }; this.isAlive = function () { return !_this.destroyed; }; } // this was a test constructor niall built, when active, it prints after 5 seconds all beans/components that are // not destroyed. to use, create a new grid, then api.destroy() before 5 seconds. then anything that gets printed // points to a bean or component that was not properly disposed of. // constructor() { // setTimeout(()=> { // if (this.isAlive()) { // let prototype: any = Object.getPrototypeOf(this); // const constructor: any = prototype.constructor; // const constructorString = constructor.toString(); // const beanName = constructorString.substring(9, constructorString.indexOf("(")); // console.log('is alive ' + beanName); // } // }, 5000); // } // CellComp and GridComp and override this because they get the FrameworkOverrides from the Beans bean BeanStub.prototype.getFrameworkOverrides = function () { return this.frameworkOverrides; }; BeanStub.prototype.destroy = function () { // let prototype: any = Object.getPrototypeOf(this); // const constructor: any = prototype.constructor; // const constructorString = constructor.toString(); // const beanName = constructorString.substring(9, constructorString.indexOf("(")); this.destroyFunctions.forEach(function (func) { return func(); }); this.destroyFunctions.length = 0; this.destroyed = true; this.dispatchEvent({ type: BeanStub.EVENT_DESTROYED }); }; BeanStub.prototype.addEventListener = function (eventType, listener) { if (!this.localEventService) { this.localEventService = new eventService_1.EventService(); } this.localEventService.addEventListener(eventType, listener); }; BeanStub.prototype.removeEventListener = function (eventType, listener) { if (this.localEventService) { this.localEventService.removeEventListener(eventType, listener); } }; BeanStub.prototype.dispatchEventAsync = function (event) { var _this = this; window.setTimeout(function () { return _this.dispatchEvent(event); }, 0); }; BeanStub.prototype.dispatchEvent = function (event) { if (this.localEventService) { this.localEventService.dispatchEvent(event); } }; BeanStub.prototype.addManagedListener = function (object, event, listener) { var _this = this; if (this.destroyed) { return; } if (object instanceof HTMLElement) { event_1.addSafePassiveEventListener(this.getFrameworkOverrides(), object, event, listener); } else { object.addEventListener(event, listener); } var destroyFunc = function () { object.removeEventListener(event, listener); _this.destroyFunctions = _this.destroyFunctions.filter(function (fn) { return fn !== destroyFunc; }); return null; }; this.destroyFunctions.push(destroyFunc); return destroyFunc; }; BeanStub.prototype.addDestroyFunc = function (func) { // if we are already destroyed, we execute the func now if (this.isAlive()) { this.destroyFunctions.push(func); } else { func(); } }; BeanStub.prototype.createManagedBean = function (bean, context) { var res = this.createBean(bean, context); this.addDestroyFunc(this.destroyBean.bind(this, bean, context)); return res; }; BeanStub.prototype.createBean = function (bean, context, afterPreCreateCallback) { return (context || this.getContext()).createBean(bean, afterPreCreateCallback); }; BeanStub.prototype.destroyBean = function (bean, context) { return (context || this.getContext()).destroyBean(bean); }; BeanStub.prototype.destroyBeans = function (beans, context) { var _this = this; if (beans) { array_1.forEach(beans, function (bean) { return _this.destroyBean(bean, context); }); } return []; }; BeanStub.EVENT_DESTROYED = 'destroyed'; __decorate([ context_1.Autowired('frameworkOverrides') ], BeanStub.prototype, "frameworkOverrides", void 0); __decorate([ context_1.Autowired('context') ], BeanStub.prototype, "context", void 0); __decorate([ context_1.Autowired('eventService') ], BeanStub.prototype, "eventService", void 0); __decorate([ context_1.Autowired('gridOptionsWrapper') ], BeanStub.prototype, "gridOptionsWrapper", void 0); __decorate([ context_1.PreDestroy ], BeanStub.prototype, "destroy", null); return BeanStub; }()); exports.BeanStub = BeanStub; //# sourceMappingURL=beanStub.js.map
mit
TryGhost/Ghost-CLI
packages/ghost-cli/test/unit/commands/install-spec.js
23471
const {expect} = require('chai'); const sinon = require('sinon'); const proxyquire = require('proxyquire').noCallThru(); const Promise = require('bluebird'); const path = require('path'); const fs = require('fs-extra'); const modulePath = '../../../lib/commands/install'; const errors = require('../../../lib/errors'); describe('Unit: Commands > Install', function () { it('configureOptions adds setup & doctor options', function () { const superStub = sinon.stub().returnsArg(1); const setupStub = sinon.stub().returnsArg(1); // Needed for extension class Command {} Command.configureOptions = superStub; const InstallCommand = proxyquire(modulePath, { './setup': {configureOptions: setupStub}, '../command': Command }); const result = InstallCommand.configureOptions('install', {yargs: true}, [{extensiona: true}]); expect(result).to.deep.equal({yargs: true}); expect(superStub.calledOnce).to.be.true; expect(superStub.calledWithExactly('install', {yargs: true}, [{extensiona: true}])).to.be.true; expect(setupStub.calledOnce).to.be.true; expect(setupStub.calledWithExactly('setup', {yargs: true}, [{extensiona: true}], true)).to.be.true; }); describe('run', function () { afterEach(() => { sinon.restore(); }); beforeEach(() => { sinon.stub(fs, 'removeSync'); }); it('rejects if directory is not empty', function () { const dirEmptyStub = sinon.stub().returns(false); const InstallCommand = proxyquire(modulePath, { '../utils/dir-is-empty': dirEmptyStub }); const testInstance = new InstallCommand({}, {}); return testInstance.run({version: '1.0.0', 'check-empty': true}).then(() => { expect(false, 'error should have been thrown').to.be.true; }).catch((error) => { expect(error).to.be.an.instanceof(errors.SystemError); expect(error.message).to.match(/Current directory is not empty/); expect(dirEmptyStub.calledOnce).to.be.true; }); }); it('calls install checks first', function () { const dirEmptyStub = sinon.stub().returns(true); const listrStub = sinon.stub().rejects(); const InstallCommand = proxyquire(modulePath, { '../utils/dir-is-empty': dirEmptyStub, './doctor': {doctorCommand: true} }); const testInstance = new InstallCommand({listr: listrStub}, {}); const runCommandStub = sinon.stub(testInstance, 'runCommand').resolves(); return testInstance.run({argv: true}).then(() => { expect(false, 'run should have rejected').to.be.true; }).catch(() => { expect(dirEmptyStub.calledOnce).to.be.true; expect(runCommandStub.calledOnce).to.be.true; expect(runCommandStub.calledWithExactly( {doctorCommand: true}, {categories: ['install'], skipInstanceCheck: true, quiet: true, argv: true, local: false} )).to.be.true; expect(listrStub.calledOnce).to.be.true; }); }); it('runs local install when command is `ghost install local`', function () { const dirEmptyStub = sinon.stub().returns(true); const listrStub = sinon.stub(); listrStub.onFirstCall().resolves(); listrStub.onSecondCall().rejects(); const setEnvironmentStub = sinon.stub(); const InstallCommand = proxyquire(modulePath, { '../utils/dir-is-empty': dirEmptyStub }); const testInstance = new InstallCommand({listr: listrStub}, {cliVersion: '1.0.0', setEnvironment: setEnvironmentStub}); const runCommandStub = sinon.stub(testInstance, 'runCommand').resolves(); return testInstance.run({version: 'local', zip: '', v1: true, 'check-empty': true}).then(() => { expect(false, 'run should have rejected').to.be.true; }).catch(() => { expect(dirEmptyStub.calledOnce).to.be.true; expect(runCommandStub.calledOnce).to.be.true; expect(listrStub.calledOnce).to.be.true; expect(listrStub.args[0][1]).to.deep.equal({ argv: {version: null, zip: '', v1: true, 'check-empty': true}, cliVersion: '1.0.0' }); expect(setEnvironmentStub.calledOnce).to.be.true; expect(setEnvironmentStub.calledWithExactly('development', true)).to.be.true; }); }); it('runs local install when command is `ghost install <version> --local`', function () { const dirEmptyStub = sinon.stub().returns(true); const listrStub = sinon.stub(); listrStub.onFirstCall().resolves(); listrStub.onSecondCall().rejects(); const setEnvironmentStub = sinon.stub(); const InstallCommand = proxyquire(modulePath, { '../utils/dir-is-empty': dirEmptyStub }); const testInstance = new InstallCommand({listr: listrStub}, {cliVersion: '1.0.0', setEnvironment: setEnvironmentStub}); const runCommandStub = sinon.stub(testInstance, 'runCommand').resolves(); return testInstance.run({version: '1.5.0', local: true, zip: '', v1: false, 'check-empty': true}).then(() => { expect(false, 'run should have rejected').to.be.true; }).catch(() => { expect(dirEmptyStub.calledOnce).to.be.true; expect(runCommandStub.calledOnce).to.be.true; expect(listrStub.calledOnce).to.be.true; expect(listrStub.args[0][1]).to.deep.equal({ argv: {version: '1.5.0', zip: '', v1: false, local: true, 'check-empty': true}, cliVersion: '1.0.0' }); expect(setEnvironmentStub.calledOnce).to.be.true; expect(setEnvironmentStub.calledWithExactly('development', true)).to.be.true; }); }); it('runs local install when command is `ghost install <version> local`', function () { const dirEmptyStub = sinon.stub().returns(true); const listrStub = sinon.stub(); listrStub.onFirstCall().resolves(); listrStub.onSecondCall().rejects(); const setEnvironmentStub = sinon.stub(); const InstallCommand = proxyquire(modulePath, { '../utils/dir-is-empty': dirEmptyStub }); const testInstance = new InstallCommand({listr: listrStub}, {cliVersion: '1.0.0', setEnvironment: setEnvironmentStub}); const runCommandStub = sinon.stub(testInstance, 'runCommand').resolves(); return testInstance.run({version: '1.5.0', zip: '', v1: false, _: ['install', 'local'], 'check-empty': true}).then(() => { expect(false, 'run should have rejected').to.be.true; }).catch(() => { expect(dirEmptyStub.calledOnce).to.be.true; expect(runCommandStub.calledOnce).to.be.true; expect(listrStub.calledOnce).to.be.true; expect(listrStub.args[0][1]).to.deep.equal({ argv: {version: '1.5.0', zip: '', v1: false, _: ['install', 'local'], 'check-empty': true}, cliVersion: '1.0.0' }); expect(setEnvironmentStub.calledOnce).to.be.true; expect(setEnvironmentStub.calledWithExactly('development', true)).to.be.true; }); }); it('normalizes version to a string', function () { const dirEmptyStub = sinon.stub().returns(true); const listrStub = sinon.stub(); listrStub.onFirstCall().resolves(); listrStub.onSecondCall().rejects(); const setEnvironmentStub = sinon.stub(); const InstallCommand = proxyquire(modulePath, { '../utils/dir-is-empty': dirEmptyStub }); const testInstance = new InstallCommand({listr: listrStub}, {cliVersion: '1.0.0', setEnvironment: setEnvironmentStub}); const runCommandStub = sinon.stub(testInstance, 'runCommand').resolves(); return testInstance.run({version: 2, zip: '', v1: false, _: ['install', 'local'], 'check-empty': true}).then(() => { expect(false, 'run should have rejected').to.be.true; }).catch(() => { expect(dirEmptyStub.calledOnce).to.be.true; expect(runCommandStub.calledOnce).to.be.true; expect(listrStub.calledOnce).to.be.true; expect(listrStub.args[0][1]).to.deep.equal({ argv: {version: '2', zip: '', v1: false, _: ['install', 'local'], 'check-empty': true}, cliVersion: '1.0.0' }); expect(setEnvironmentStub.calledOnce).to.be.true; expect(setEnvironmentStub.calledWithExactly('development', true)).to.be.true; }); }); it('calls all tasks and returns after tasks run if --no-setup is passed', function () { const dirEmptyStub = sinon.stub().returns(true); const yarnInstallStub = sinon.stub().resolves(); const ensureStructureStub = sinon.stub().resolves(); const listrStub = sinon.stub().callsFake((tasks, ctx) => Promise.each(tasks, task => task.task(ctx, {}))); const InstallCommand = proxyquire(modulePath, { '../tasks/yarn-install': yarnInstallStub, '../tasks/ensure-structure': ensureStructureStub, '../utils/dir-is-empty': dirEmptyStub }); const testInstance = new InstallCommand({listr: listrStub}, {cliVersion: '1.0.0'}); const runCommandStub = sinon.stub(testInstance, 'runCommand').resolves(); const versionStub = sinon.stub(testInstance, 'version').resolves(); const linkStub = sinon.stub(testInstance, 'link').resolves(); const casperStub = sinon.stub(testInstance, 'casper').resolves(); return testInstance.run({version: '1.0.0', setup: false, 'check-empty': true}).then(() => { expect(dirEmptyStub.calledOnce).to.be.true; expect(listrStub.calledTwice).to.be.true; expect(yarnInstallStub.calledOnce).to.be.true; expect(ensureStructureStub.calledOnce).to.be.true; expect(versionStub.calledOnce).to.be.true; expect(linkStub.calledOnce).to.be.true; expect(casperStub.calledOnce).to.be.true; expect(runCommandStub.calledOnce).to.be.true; }); }); it('sets local and runs setup command if setup is true', function () { const dirEmptyStub = sinon.stub().returns(true); const listrStub = sinon.stub().resolves(); const setEnvironmentStub = sinon.stub(); const InstallCommand = proxyquire(modulePath, { '../utils/dir-is-empty': dirEmptyStub, './setup': {SetupCommand: true} }); const testInstance = new InstallCommand({listr: listrStub}, {cliVersion: '1.0.0', setEnvironment: setEnvironmentStub}); const runCommandStub = sinon.stub(testInstance, 'runCommand').resolves(); return testInstance.run({version: 'local', setup: true, zip: '', 'check-empty': true}).then(() => { expect(dirEmptyStub.calledOnce).to.be.true; expect(listrStub.calledOnce).to.be.true; expect(setEnvironmentStub.calledOnce).to.be.true; expect(setEnvironmentStub.calledWithExactly(true, true)); expect(runCommandStub.calledTwice).to.be.true; expect(runCommandStub.calledWithExactly( {SetupCommand: true}, {version: 'local', local: true, zip: '', 'check-empty': true} )); }); }); it('allows running in non-empty directory if --no-check-empty is passed', function () { const dirEmptyStub = sinon.stub().returns(false); const listrStub = sinon.stub().resolves(); const setEnvironmentStub = sinon.stub(); const InstallCommand = proxyquire(modulePath, { '../utils/dir-is-empty': dirEmptyStub, './setup': {SetupCommand: true} }); const testInstance = new InstallCommand({listr: listrStub}, {cliVersion: '1.0.0', setEnvironment: setEnvironmentStub}); const runCommandStub = sinon.stub(testInstance, 'runCommand').resolves(); return testInstance.run({version: 'local', setup: true, zip: '', 'check-empty': false}).then(() => { expect(dirEmptyStub.calledOnce).to.be.true; expect(listrStub.calledOnce).to.be.true; expect(setEnvironmentStub.calledOnce).to.be.true; expect(setEnvironmentStub.calledWithExactly(true, true)); expect(runCommandStub.calledTwice).to.be.true; expect(runCommandStub.calledWithExactly( {SetupCommand: true}, {version: 'local', local: true, zip: '', 'check-empty': false} )); }); }); }); describe('tasks > version', function () { it('calls resolveVersion, sets version and install path', async function () { const resolveVersion = sinon.stub().resolves('1.5.0'); const InstallCommand = proxyquire(modulePath, { '../utils/version': {resolveVersion} }); const testInstance = new InstallCommand({}, {}); const context = {argv: {version: '1.0.0', v1: false, force: false, channel: 'stable'}}; await testInstance.version(context); expect(resolveVersion.calledOnce).to.be.true; expect(resolveVersion.calledWithExactly('1.0.0', null, {v1: false, force: false, channel: 'stable'})).to.be.true; expect(context.version).to.equal('1.5.0'); expect(context.installPath).to.equal(path.join(process.cwd(), 'versions/1.5.0')); }); it('calls resolveVersion, sets version and install path (prereleases)', async function () { const resolveVersion = sinon.stub().resolves('1.5.0'); const InstallCommand = proxyquire(modulePath, { '../utils/version': {resolveVersion} }); const testInstance = new InstallCommand({}, {}); const context = {argv: {version: '1.0.0', v1: false, force: false, channel: 'next'}}; await testInstance.version(context); expect(resolveVersion.calledOnce).to.be.true; expect(resolveVersion.calledWithExactly('1.0.0', null, {v1: false, force: false, channel: 'next'})).to.be.true; expect(context.version).to.equal('1.5.0'); expect(context.installPath).to.equal(path.join(process.cwd(), 'versions/1.5.0')); }); it('calls versionFromZip if zip file is passed in context', async function () { const resolveVersion = sinon.stub().resolves('1.5.0'); const versionFromZip = sinon.stub().resolves('1.5.2'); const InstallCommand = proxyquire(modulePath, { '../utils/version': {resolveVersion, versionFromZip} }); const log = sinon.stub(); const testInstance = new InstallCommand({}, {}); const context = {argv: {zip: '/some/zip/file.zip'}, ui: {log}}; await testInstance.version(context); expect(resolveVersion.called).to.be.false; expect(versionFromZip.calledOnce).to.be.true; expect(versionFromZip.calledWith('/some/zip/file.zip')).to.be.true; expect(context.version).to.equal('1.5.2'); expect(context.installPath).to.equal(path.join(process.cwd(), 'versions/1.5.2')); expect(log.called).to.be.false; }); it('logs if both version and zip are passed', async function () { const resolveVersion = sinon.stub().resolves('1.5.0'); const versionFromZip = sinon.stub().resolves('1.5.2'); const InstallCommand = proxyquire(modulePath, { '../utils/version': {resolveVersion, versionFromZip} }); const log = sinon.stub(); const testInstance = new InstallCommand({}, {}); const context = {argv: {version: '1.0.0', zip: '/some/zip/file.zip'}, ui: {log}}; await testInstance.version(context); expect(resolveVersion.called).to.be.false; expect(versionFromZip.calledOnce).to.be.true; expect(versionFromZip.calledWith('/some/zip/file.zip')).to.be.true; expect(context.version).to.equal('1.5.2'); expect(context.installPath).to.equal(path.join(process.cwd(), 'versions/1.5.2')); expect(log.calledOnce).to.be.true; }); it('handles v0.x export case', async function () { const resolveVersion = sinon.stub().resolves('1.5.0'); const parseExport = sinon.stub().returns({version: '0.11.14'}); const InstallCommand = proxyquire(modulePath, { '../utils/version': {resolveVersion}, '../tasks/import': {parseExport} }); const log = sinon.stub(); const testInstance = new InstallCommand({}, {}); const context = {argv: {version: '2.0.0', fromExport: 'test-export.json'}, ui: {log}}; await testInstance.version(context); expect(resolveVersion.calledOnceWithExactly('v1', null, {v1: undefined, force: undefined, channel: undefined})).to.be.true; expect(parseExport.calledOnceWithExactly('test-export.json')).to.be.true; expect(context.version).to.equal('1.5.0'); expect(context.installPath).to.equal(path.join(process.cwd(), 'versions/1.5.0')); expect(log.calledOnce).to.be.true; }); it('uses export version if none defined', async function () { const resolveVersion = sinon.stub().resolves('2.0.0'); const parseExport = sinon.stub().returns({version: '2.0.0'}); const InstallCommand = proxyquire(modulePath, { '../utils/version': {resolveVersion}, '../tasks/import': {parseExport} }); const log = sinon.stub(); const testInstance = new InstallCommand({}, {}); const context = {argv: {fromExport: 'test-export.json'}, ui: {log}}; await testInstance.version(context); expect(resolveVersion.calledOnceWithExactly('2.0.0', null, {v1: undefined, force: undefined, channel: undefined})).to.be.true; expect(parseExport.calledOnceWithExactly('test-export.json')).to.be.true; expect(context.version).to.equal('2.0.0'); expect(context.installPath).to.equal(path.join(process.cwd(), 'versions/2.0.0')); expect(log.called).to.be.false; }); it('errors if custom version is less than export version', async function () { const resolveVersion = sinon.stub().resolves('2.0.0'); const parseExport = sinon.stub().returns({version: '3.0.0'}); const InstallCommand = proxyquire(modulePath, { '../utils/version': {resolveVersion}, '../tasks/import': {parseExport} }); const log = sinon.stub(); const testInstance = new InstallCommand({}, {}); const context = {argv: {version: 'v2', fromExport: 'test-export.json'}, ui: {log}}; try { await testInstance.version(context); } catch (error) { expect(error).to.be.an.instanceof(errors.SystemError); expect(error.message).to.include('v3.0.0 into v2.0.0'); expect(resolveVersion.calledOnceWithExactly('v2', null, {v1: undefined, force: undefined, channel: undefined})).to.be.true; expect(parseExport.calledOnceWithExactly('test-export.json')).to.be.true; expect(log.called).to.be.false; return; } expect.fail('version should have errored'); }); }); describe('tasks > casper', function () { it('links casper version correctly', function () { const symlinkSyncStub = sinon.stub(); const InstallCommand = proxyquire(modulePath, { 'symlink-or-copy': {sync: symlinkSyncStub} }); const testInstance = new InstallCommand({}, {}); testInstance.casper(); expect(symlinkSyncStub.calledOnce).to.be.true; expect(symlinkSyncStub.calledWithExactly( path.join(process.cwd(), 'current/content/themes/casper'), path.join(process.cwd(), 'content/themes/casper') )); }); }); describe('tasks > link', function () { it('creates current link and updates versions', function () { const symlinkSyncStub = sinon.stub(); const config = {}; const getInstanceStub = sinon.stub().returns(config); const InstallCommand = proxyquire(modulePath, { 'symlink-or-copy': {sync: symlinkSyncStub} }); const testInstance = new InstallCommand({}, {getInstance: getInstanceStub, cliVersion: '1.0.0'}); testInstance.link({version: '1.5.0', installPath: '/some/dir/1.5.0', argv: {}}); expect(symlinkSyncStub.calledOnce).to.be.true; expect(symlinkSyncStub.calledWithExactly('/some/dir/1.5.0', path.join(process.cwd(), 'current'))); expect(getInstanceStub.calledOnce).to.be.true; expect(config).to.deep.equal({ version: '1.5.0', cliVersion: '1.0.0', channel: 'stable' }); }); it('creates current link and updates versions (using channel = next)', function () { const symlinkSyncStub = sinon.stub(); const config = {}; const getInstanceStub = sinon.stub().returns(config); const InstallCommand = proxyquire(modulePath, { 'symlink-or-copy': {sync: symlinkSyncStub} }); const testInstance = new InstallCommand({}, {getInstance: getInstanceStub, cliVersion: '1.0.0'}); testInstance.link({version: '1.5.0', installPath: '/some/dir/1.5.0', argv: {channel: 'next'}}); expect(symlinkSyncStub.calledOnce).to.be.true; expect(symlinkSyncStub.calledWithExactly('/some/dir/1.5.0', path.join(process.cwd(), 'current'))); expect(getInstanceStub.calledOnce).to.be.true; expect(config).to.deep.equal({ version: '1.5.0', cliVersion: '1.0.0', channel: 'next' }); }); }); });
mit
wangluojisuan/DataStructuresAndAlgorithms
数据结构与算法经典问题解析/ch04/040603ListStack/src/com/jw/stack/ListStack.java
1540
package com.jw.stack; import javax.swing.text.StyledEditorKit; public class ListStack implements IStack { private SingalList list = new SingalList(); public int pop() throws Exception { if(this.isEmpty()){ throw new Exception("栈已为空,不能再次弹出栈顶元素"); } ListNode tempNode = this.list.delete(); assert tempNode != null:"数据产生问题,isEmpty没有规避所有问题"; if(tempNode == null){ throw new Exception("保存栈的数据空间产生错误,请检查"); } return tempNode.getData(); } public void push(int data){ ListNode node = new ListNode(data); list.insert(node); } public int size(){ return this.list.getLength(); } public int top() throws Exception { if(this.isEmpty()){ throw new Exception("栈已为空,不能再次获取栈顶元素"); } return this.list.getHead().getNext().getData(); } public Boolean isEmpty(){ return ((this.list.getHead().getNext()==null)||(this.list.getHead().getData()==0)); } public Boolean isFull(){ // 满不满只与内存有关,基本不会产生满的问题。 if(Runtime.getRuntime().freeMemory()>32) { // 获取剩余的内存,32个字节以上,应该可以再分配内存 return false; }else { return true; } } public void clear(){ this.list.clear(); } }
mit
EscherLabs/Graphene
public/assets/js/vendor/vs/editor/editor.main.nls.zh-tw.js
32191
/*!----------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.12.0(160c7612faa359c4f196a0f3292a0f2752a1daf5) * Released under the MIT license * https://github.com/Microsoft/vscode/blob/master/LICENSE.txt *-----------------------------------------------------------*/ define("vs/editor/editor.main.nls.zh-tw", { "vs/base/browser/ui/actionbar/actionbar": [ "{0} ({1})", ], "vs/base/browser/ui/aria/aria": [ "{0} (再次出現)", ], "vs/base/browser/ui/findinput/findInput": [ "輸入", ], "vs/base/browser/ui/findinput/findInputCheckboxes": [ "大小寫須相符", "全字拼寫須相符", "使用規則運算式", ], "vs/base/browser/ui/inputbox/inputBox": [ "錯誤: {0}", "警告: {0}", "資訊: {0}", ], "vs/base/browser/ui/selectBox/selectBoxCustom": [ "{0}", ], "vs/base/common/keybindingLabels": [ "Ctrl", "Shift", "Alt", "Windows", "Control", "Shift", "Alt", "Command", "Control", "Shift", "Alt", "Windows", ], "vs/base/common/severity": [ "錯誤", "警告", "資訊", ], "vs/base/parts/quickopen/browser/quickOpenModel": [ "{0},選擇器", "選擇器", ], "vs/base/parts/quickopen/browser/quickOpenWidget": [ "快速選擇器。輸入以縮小結果範圍。", "快速選擇器", ], "vs/base/parts/tree/browser/treeDefaults": [ "摺疊", ], "vs/editor/browser/services/bulkEdit": [ "未進行任何編輯", "在 {1} 個檔案中進行了 {0} 項文字編輯", "在一個檔案中進行了 {0} 項文字編輯", "這些檔案已同時變更: {0}", ], "vs/editor/browser/widget/diffEditorWidget": [ "因其中一個檔案過大而無法比較。", ], "vs/editor/browser/widget/diffReview": [ "關閉", "差異 {0} / {1}: 原始 {2},{3} 行,修改後 {4},{5} 行", "空白", "原始 {0},修改後{1}: {2", "+ 修改後 {0}: {1}", "- 原始 {0}: {1}", "移至下一個差異", "移至上一個差異", ], "vs/editor/common/config/commonEditorConfig": [ "編輯器", "控制字型家族。", "控制字型寬度。", "控制字型大小 (以像素為單位)。", "控制行高。使用 0 會從 fontSize 計算 lineHeight。", "控制字元間距 (以像素為單位)", "不顯示行號。", "行號以絕對值顯示。", "行號以目前游標的相對值顯示。", "每 10 行顯示行號。", "控制行號的顯示方式。允許的設定值為 \'on\'、 \'off\'、\'relative\' 及 \'interval\'", "在特定的等寬字元數之後轉譯垂直尺規。有多個尺規就使用多個值。若陣列為空,則不繪製任何尺規。", "執行文字相關導覽或作業時將作為文字分隔符號的字元", "與 Tab 相等的空格數量。當 `editor.detectIndentation` 已開啟時,會根據檔案內容覆寫此設定。", "必須是 \'number\'。請注意,值 \"auto\" 已由 `editor.detectIndentation` 設定取代。", "與 Tab 相等的空格數量。當 `editor.detectIndentation` 已開啟時,會根據檔案內容覆寫此設定。", "必須是 \'boolean\'。請注意,值 \"auto\" 已由 `editor.detect Indentation` 設定取代。", "開啟檔案時,會依據檔案內容來偵測 `editor.tabSize` 及 `editor.insertSpaces`。", "控制選取範圍是否有圓角", "控制編輯器是否會捲動到最後一行之後", "控制編輯器是否會使用動畫捲動", "控制是否會顯示迷你地圖", "控制要轉譯迷你地圖的方向。可能的值為 \'right\' 與 \'left\'", "控制是否會自動隱藏迷你地圖滑桿。可能的值為 \'always\' 與 \'mouseover\'", "呈現行內的實際字元 (而不是彩色區塊)", "限制迷你地圖的寬度,以呈現最多的資料行", "控制編譯器選取範圍是否預設為尋找工具的搜尋字串", "控制編譯器內選取多字元或多行內文是否開啟選取範圍尋找功能", "控制尋找小工具是否在 macOS 上讀取或修改共用尋找剪貼簿  ", "一律不換行。", "依檢視區寬度換行。", "於 \'editor.wordWrapColumn\' 換行。", "當檢視區縮至最小並設定 \'editor.wordWrapColumn\' 時換行。", "控制是否自動換行。可以是:\n - \'off\' (停用換行),\n - \'on\' (檢視區換行),\n - \'wordWrapColumn\' (於 \'editor.wordWrapColumn\' 換行`) 或\n - \'bounded\' (當檢視區縮至最小並設定 \'editor.wordWrapColumn\' 時換行).", "當 `editor.wordWrap` 為 [wordWrapColumn] 或 [bounded] 時,控制編輯器中的資料行換行。", "控制換行的縮排。可以是 [無]、[相同] 或 [縮排]。", "滑鼠滾輪捲動事件的 \'deltaX\' 與 \'deltaY\' 所使用的乘數", "對應 Windows 和 Linux 的 `Control` 與對應 macOS 的 `Command`", "對應 Windows 和 Linux 的 `Alt` 與對應 macOS 的 `Option`", "用於新增多個滑鼠游標的修改。 `ctrlCmd` 會對應到 Windows 和 Linux 上的 `Control` 以及 macOS 上的 `Command`。 [移至定義] 及 [開啟連結] 滑鼠手勢將會適應以避免和 multicursor 修改衝突。", "允許在字串內顯示即時建議。", "允許在註解中顯示即時建議。", "允許在字串與註解以外之處顯示即時建議。", "控制是否應在輸入時自動顯示建議", "控制延遲顯示快速建議的毫秒數", "當您輸入時啟用彈出視窗,顯示參數文件與類型資訊", "控制編輯器是否應在左括號後自動插入右括號", "控制編輯器是否應在輸入一行後自動格式化", "控制編輯器是否應自動設定貼上的內容格式。格式器必須可供使用,而且格式器應該能夠設定文件中一個範圍的格式。", "控制當使用者輸入, 貼上或移行時,編輯器應自動調整縮排。語言的縮排規則必須可用", "控制輸入觸發字元時,是否應自動顯示建議", "控制除了 \'Tab\' 外,是否也藉由按下 \'Enter\' 接受建議。如此可避免混淆要插入新行或接受建議。設定值\'smart\'表示在文字變更同時,只透過Enter接受建議。", "控制認可字元是否應接受建議。例如在 JavaScript 中,分號 (\';\') 可以是接受建議並鍵入該字元的認可字元。", "將程式碼片段建議顯示於其他建議的頂端。", "將程式碼片段建議顯示於其他建議的下方。", "將程式碼片段建議與其他建議一同顯示。", "不顯示程式碼片段建議。", "控制程式碼片段是否隨其他建議顯示,以及其排序方式。", "控制複製時不選取任何項目是否會複製目前程式行。", "控制是否應根據文件中的單字計算自動完成。", "一律選取第一個建議。", "除非進一步的鍵入選取一個建議,否則選取最近的建議。例如,因為 `log` 最近完成,所以 `console.| -> console.log`。", "根據先前已完成這些建議的首碼選取建議。例如,`co -> console` 與 `con -> const`。", "控制在顯示建議清單時如何預先選取建議。", "建議小工具的字型大小", "建議小工具的行高", "控制編輯器是否應反白顯示與選取範圍相似的符合項", "控制編輯器是否應反白顯示出現的語意符號", "控制可在概觀尺規中相同位置顯示的裝飾項目數", "控制是否應在概觀尺規周圍繪製邊框。", "控制游標動畫樣式,可能的值為 \'blink\'、\'smooth\'、\'phase\'、\'expand\' 和 \'solid\'", "使用滑鼠滾輪並按住 Ctrl 時,縮放編輯器的字型", "控制游標樣式。接受的值為 \'block\'、\'block-outline\'、\'line\'、\'line-thin\'、\'underline\' 及 \'underline-thin\'", "控制游標寬度,當 editor.cursorStyle 設定為 \'line\' 時。", "啟用連字字型", "控制游標是否應隱藏在概觀尺規中。", "控制編輯器轉譯空白字元的方式,可能為 \'none\'、\'boundary\' 及 \'all\'。\'boundary\' 選項不會轉譯字組間的單一空格。", "控制編輯器是否應顯示控制字元", "控制編輯器是否應顯示縮排輔助線", "控制編輯器應如何轉譯目前反白的行,可能的值有 \'none\'、\'gutter\'、\'line\' 和 \'all\'。", "控制編輯器是否顯示程式碼濾鏡", "控制編輯器是否已啟用程式碼摺疊功能", "If available, use a langauge specific folding strategy, otherwise falls back to the indentation based strategy.", "Always use the indentation based folding strategy", "Controls the way folding ranges are computed. \'auto\' picks uses a language specific folding strategy, if available. \'indentation\' forces that the indentation based folding strategy is used.", "自動隱藏摺疊控制向", "當選取某側的括號時,強調顯示另一側的配對括號。", "控制編輯器是否應轉譯垂直字符邊界。字符邊界最常用來進行偵錯。", "插入和刪除接在定位停駐點後的空白字元", "移除尾端自動插入的空白字元", "讓預覽編輯器在使用者按兩下其內容或點擊 Escape 時保持開啟。", "控制編輯器是否允許透過拖放動作移動選取範圍。", "編輯器將使用平台 API 以偵測螢幕助讀程式附加。", "編輯器將會為螢幕助讀程式的使用方式永久地最佳化。", "編輯器不會為螢幕助讀程式的使用方式進行最佳化。", "控制編輯器是否應於已為螢幕助讀程式最佳化的模式中執行。", "控制編輯器是否應偵測連結且讓它可點擊", "控制編輯器是否應轉譯內嵌色彩裝飾項目與色彩選擇器。", "啟用程式動作燈泡提示", "控制是否應支援 Linux 主要剪貼簿。", "控制 Diff 編輯器要並排或內嵌顯示差異", "控制 Diff 編輯器是否將開頭或尾端空白字元的變更顯示為差異", "控制 Diff 編輯器是否要為新增的/移除的變更顯示 +/- 標記", ], "vs/editor/common/config/editorOptions": [ "編輯器現在無法存取。按Alt+F1尋求選項", "編輯器內容", ], "vs/editor/common/controller/cursor": [ "執行命令時發生未預期的例外狀況。", ], "vs/editor/common/modes/modesRegistry": [ "純文字", ], "vs/editor/common/services/modelServiceImpl": [ "[{0}]\n{1}", "[{0}] {1}", ], "vs/editor/common/view/editorColorRegistry": [ "目前游標位置行的反白顯示背景色彩。", "目前游標位置行之周圍框線的背景色彩。", "突顯顯示範圍的背景顏色,例如快速開啟和尋找功能。不能使用非透明的顏色來隱藏底層的樣式。", "反白顯示範圍周圍邊框的背景顏色。", "編輯器游標的色彩。", "編輯器游標的背景色彩。允許自訂區塊游標重疊的字元色彩。", "編輯器中空白字元的色彩。", "編輯器縮排輔助線的色彩。", "編輯器行號的色彩。", "編輯器使用中行號的色彩 ", "Id is deprecated. Use \'editorLineNumber.activeForeground\' instead.", "編輯器使用中行號的色彩 ", "編輯器尺規的色彩", "編輯器程式碼濾鏡的前景色彩", "成對括號背景色彩", "成對括號邊框色彩", "預覽檢視編輯器尺規的邊框色彩.", "編輯器邊框的背景顏色,包含行號與字形圖示的邊框.", "編輯器內錯誤提示線的前景色彩.", "編輯器內錯誤提示線的邊框色彩.", "編輯器內警告提示線的前景色彩.", "編輯器內警告提示線的邊框色彩.", "編輯器內資訊提示線的前景色彩", "編輯器內資訊提示線的邊框色彩", "編輯器內提示訊息的提示線前景色彩", "編輯器內提示訊息的提示線邊框色彩", "概述反白範圍的尺規標記顏色。不能使用非透明的顏色來隱藏底層的樣式。", "錯誤的概觀尺規標記色彩。", "警示的概觀尺規標記色彩。", "資訊的概觀尺規標記色彩。", ], "vs/editor/contrib/bracketMatching/bracketMatching": [ "成對括弧的概觀尺規標記色彩。", "移至方括弧", "選取至括弧", ], "vs/editor/contrib/caretOperations/caretOperations": [ "將插入點左移", "將插入點右移", ], "vs/editor/contrib/caretOperations/transpose": [ "調換字母", ], "vs/editor/contrib/clipboard/clipboard": [ "剪下", "複製", "貼上", "隨語法醒目提示複製", ], "vs/editor/contrib/comment/comment": [ "切換行註解", "加入行註解", "移除行註解", "切換區塊註解", ], "vs/editor/contrib/contextmenu/contextmenu": [ "顯示編輯器內容功能表", ], "vs/editor/contrib/find/findController": [ "尋找", "尋找", "尋找下一個", "尋找上一個", "尋找下一個選取項目", "尋找上一個選取項目", "取代", "顯示下一個尋找字詞", "顯示上一個尋找字詞", ], "vs/editor/contrib/find/findWidget": [ "尋找", "尋找", "上一個符合項", "下一個相符項", "在選取範圍中尋找", "關閉", "取代", "取代", "取代", "全部取代", "切換取代模式", "僅反白顯示前 {0} 筆結果,但所有尋找作業會在完整文字上執行。", "{0} / {1}", "沒有結果", ], "vs/editor/contrib/folding/folding": [ "展開", "以遞迴方式展開", "摺疊", "以遞迴方式摺疊", "摺疊全部區塊註解", "折疊所有區域", "展開所有區域", "全部摺疊", "全部展開", "摺疊層級 {0}", ], "vs/editor/contrib/format/formatActions": [ "在行 {0} 編輯了 1 項格式", "在行 {1} 編輯了 {0} 項格式", "在行 {0} 與行 {1} 之間編輯了 1 項格式", "在行 {1} 與行 {2} 之間編輯了 {0} 項格式", "尚無安裝適用於 \'{0}\' 檔案的格式器", "將文件格式化", "將選取項目格式化", ], "vs/editor/contrib/goToDeclaration/goToDeclarationCommands": [ "找不到 \'{0}\' 的定義", "找不到任何定義", " - {0} 個定義", "移至定義", "在一側開啟定義", "預覽定義", "找不到 \'{0}\' 的任何實作", "找不到任何實作", " – {0} 個實作", "前往實作", "預覽實作", "找不到 \'{0}\' 的任何類型定義", "找不到任何類型定義", " – {0} 個定義", "移至類型定義", "預覽類型定義", ], "vs/editor/contrib/goToDeclaration/goToDeclarationMouse": [ "按一下以顯示 {0} 項定義。", ], "vs/editor/contrib/gotoError/gotoError": [ "移至下一個問題 (錯誤, 警告, 資訊)", "移至上一個問題 (錯誤, 警告, 資訊)", ], "vs/editor/contrib/gotoError/gotoErrorWidget": [ "({0}/{1})", "編輯器標記導覽小工具錯誤的色彩。", "編輯器標記導覽小工具警告的色彩。", "編輯器標記導覽小工具資訊的色彩", "編輯器標記導覽小工具的背景。", ], "vs/editor/contrib/hover/hover": [ "動態顯示", ], "vs/editor/contrib/hover/modesContentHover": [ "正在載入...", ], "vs/editor/contrib/inPlaceReplace/inPlaceReplace": [ "以上一個值取代", "以下一個值取代", ], "vs/editor/contrib/linesOperations/linesOperations": [ "將行向上複製", "將行向下複製", "上移一行", "下移一行", "遞增排序行", "遞減排序行", "修剪尾端空白", "刪除行", "縮排行", "凸排行", "在上方插入行", "在下方插入行", "左邊全部刪除", "刪除所有右方項目", "連接線", "轉置游標周圍的字元數", "轉換到大寫", "轉換到小寫", ], "vs/editor/contrib/links/links": [ "按住 Cmd 並按一下滑鼠按鈕可連入連結", "按住 Ctrl 並按一下滑鼠按鈕可連入連結", "按住 Cmd 並按一下滑鼠以執行命令", "按住 Ctrl 並按一下滑鼠以執行命令", "Option + click to follow link", "按住Alt並點擊以追蹤連結", "Option + click to execute command", "按住 Alt 並按一下滑鼠以執行命令", "因為此連結的格式不正確,所以無法開啟: {0}", "因為此連結目標遺失,所以無法開啟。", "開啟連結", ], "vs/editor/contrib/multicursor/multicursor": [ "在上方加入游標", "在下方加入游標", "在行尾新增游標", "將選取項目加入下一個找到的相符項", "將選取項目加入前一個找到的相符項中", "將最後一個選擇項目移至下一個找到的相符項", "將最後一個選擇項目移至前一個找到的相符項", "選取所有找到的相符項目", "變更所有發生次數", ], "vs/editor/contrib/parameterHints/parameterHints": [ "觸發參數提示", ], "vs/editor/contrib/parameterHints/parameterHintsWidget": [ "{0},提示", ], "vs/editor/contrib/quickFix/quickFixCommands": [ "顯示修正 ({0})", "顯示修正", "Quick Fix", "重構", ], "vs/editor/contrib/referenceSearch/peekViewWidget": [ "關閉", ], "vs/editor/contrib/referenceSearch/referenceSearch": [ " - {0} 個參考", "尋找所有參考", ], "vs/editor/contrib/referenceSearch/referencesController": [ "正在載入...", ], "vs/editor/contrib/referenceSearch/referencesModel": [ "個符號位於 {0} 中的第 {1} 行第 {2} 欄", "1 個符號位於 {0}, 完整路徑 {1}", "{0} 個符號位於 {1}, 完整路徑 {2}", "找不到結果", "在 {0} 中找到 1 個符號", "在 {1} 中找到 {0} 個符號", "在 {1} 個檔案中找到 {0} 個符號", ], "vs/editor/contrib/referenceSearch/referencesWidget": [ "無法解析檔案。", "{0} 個參考", "{0} 個參考", "無法預覽", "參考", "沒有結果", "參考", "預覽檢視標題區域的背景色彩。", "預覽檢視標題的色彩。", "預覽檢視標題資訊的色彩。", "預覽檢視之框線與箭頭的色彩。", "預覽檢視中結果清單的背景色彩。", "預覽檢視結果列表中行節點的前景色彩", "預覽檢視結果列表中檔案節點的前景色彩", "在預覽檢視之結果清單中選取項目時的背景色彩。", "在預覽檢視之結果清單中選取項目時的前景色彩。", "預覽檢視編輯器的背景色彩。", "預覽檢視編輯器邊框(含行號或字形圖示)的背景色彩。", "在預覽檢視編輯器中比對時的反白顯示色彩。", "預覽檢視編輯器中比對時的反白顯示色彩。", ], "vs/editor/contrib/rename/rename": [ "沒有結果。", "已成功將 \'{0}\' 重新命名為 \'{1}\'。摘要: {2}", "重新命名無法執行。", "重新命名符號", ], "vs/editor/contrib/rename/renameInputField": [ "為輸入重新命名。請鍵入新名稱,然後按 Enter 以認可。", ], "vs/editor/contrib/smartSelect/smartSelect": [ "展開選取", "縮小選取", ], "vs/editor/contrib/snippet/snippetVariables": [ "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "週日", "週一", "週二", "週三", "週四", "週五", "週六", "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月", "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月", ], "vs/editor/contrib/suggest/suggestController": [ "接受 \'{0}\' 時接受了插入下列文字: {1}", "觸發建議", ], "vs/editor/contrib/suggest/suggestWidget": [ "建議小工具的背景色彩。", "建議小工具的邊界色彩。", "建議小工具的前景色彩。", "建議小工具中所選項目的背景色彩。", "建議小工具中相符醒目提示的色彩。", "進一步了解...{0}", "{0},建議,有詳細資料", "{0},建議", "簡易說明...{0}", "正在載入...", "無建議。", "{0},接受", "{0},建議,有詳細資料", "{0},建議", ], "vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode": [ "切換 TAB 鍵移動焦點", ], "vs/editor/contrib/wordHighlighter/wordHighlighter": [ "讀取存取符號時的背景顏色,如讀取變數。不能使用非透明的顏色來隱藏底層的樣式。", "寫入存取符號時的背景顏色,如寫入變數。不能使用非透明的顏色來隱藏底層的樣式。", "讀取存取期間 (例如讀取變數時) 符號的邊框顏色。", "寫入存取期間 (例如寫入變數時) 符號的邊框顏色。 ", "概述反白符號的尺規標記顏色。不能使用非透明的顏色來隱藏底層的樣式。", "概述反白寫入權限符號的尺規標記顏色。不能使用非透明的顏色來隱藏底層的樣式。", "移至下一個反白符號", "移至上一個反白符號", ], "vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp": [ "No selection", "Line {0}, Column {1} ({2} selected)", "Line {0}, Column {1}", "{0} selections ({1} characters selected)", "{0} selections", "Now changing the setting `accessibilitySupport` to \'on\'.", "Now opening the Editor Accessibility documentation page.", " in a read-only pane of a diff editor.", " in a pane of a diff editor.", " in a read-only code editor", " in a code editor", "To configure the editor to be optimized for usage with a Screen Reader press Command+E now.", "To configure the editor to be optimized for usage with a Screen Reader press Control+E now.", "The editor is configured to be optimized for usage with a Screen Reader.", "The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time.", "Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}.", "Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding.", "Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}.", "Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding.", "Press Command+H now to open a browser window with more information related to editor accessibility.", "Press Control+H now to open a browser window with more information related to editor accessibility.", "You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape.", "Show Accessibility Help", ], "vs/editor/standalone/browser/inspectTokens/inspectTokens": [ "Developer: Inspect Tokens", ], "vs/editor/standalone/browser/quickOpen/gotoLine": [ "Go to line {0} and character {1}", "Go to line {0}", "Type a line number between 1 and {0} to navigate to", "Type a character between 1 and {0} to navigate to", "Go to line {0}", "Type a line number, followed by an optional colon and a character number to navigate to", "Go to Line...", ], "vs/editor/standalone/browser/quickOpen/quickCommand": [ "{0}, commands", "Type the name of an action you want to execute", "Command Palette", ], "vs/editor/standalone/browser/quickOpen/quickOutline": [ "{0}, symbols", "Type the name of an identifier you wish to navigate to", "Go to Symbol...", "symbols ({0})", "modules ({0})", "classes ({0})", "interfaces ({0})", "methods ({0})", "functions ({0})", "properties ({0})", "variables ({0})", "variables ({0})", "constructors ({0})", "calls ({0})", ], "vs/editor/standalone/browser/standaloneCodeEditor": [ "Editor content", "Press Ctrl+F1 for Accessibility Options.", "Press Alt+F1 for Accessibility Options.", ], "vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast": [ "Toggle High Contrast Theme", ], "vs/platform/configuration/common/configurationRegistry": [ "預設組態覆寫", "設定要針對 {0} 語言覆寫的編輯器設定。", "設定要針對語言覆寫的編輯器設定。", "無法註冊 \'{0}\'。這符合用於描述語言專用編輯器設定的屬性模式 \'\\\\[.*\\\\]$\'。請使用 \'configurationDefaults\' 貢獻。", "無法註冊 \'{0}\'。此屬性已經註冊。", ], "vs/platform/dialogs/common/dialogs": [ "...另外 1 個檔案未顯示", "...另外 {0} 個檔案未顯示", ], "vs/platform/keybinding/common/abstractKeybindingService": [ "已按下 ({0})。請等待第二個套索鍵...", "按鍵組合 ({0}, {1}) 不是命令。", ], "vs/platform/list/browser/listService": [ "工作台", "對應Windows和Linux的\'Control\'與對應 macOS 的\'Command\'。", "對應Windows和Linux的\'Alt\'與對應macOS的\'Option\'。", "透過滑鼠多選,用於在樹狀目錄與清單中新增項目的輔助按鍵 (例如在總管中開啟 [編輯器] 及 [SCM] 檢視)。在 Windows 及 Linux 上,`ctrlCmd` 對應 `Control`,在 macOS 上則對應 `Command`。[在側邊開啟] 滑鼠手勢 (若支援) 將會適應以避免和多選輔助按鍵衝突。", "以滑鼠按一下開啟項目。", "以滑鼠按兩下開啟項目。", "控制如何使用滑鼠在樹狀目錄與清單中開啟項目 (若有支援)。設為 `singleClick` 可以滑鼠按一下開啟物件,設為 `doubleClick` 則只能透過按兩下滑鼠開啟物件。對於樹狀目錄中具子系的父系而言,此設定會控制應以滑鼠按一下或按兩下展開父系。注意,某些樹狀目錄或清單若不適用此設定則會予以忽略。", "控制是否支援工作台中的水平滾動。", ], "vs/platform/markers/common/markers": [ "錯誤", "警告", "資訊", ], "vs/platform/theme/common/colorRegistry": [ "工作台中使用的色彩。", "整體的前景色彩。僅當未被任何元件覆疊時,才會使用此色彩。", "整體錯誤訊息的前景色彩。僅當未被任何元件覆蓋時,才會使用此色彩。", "提供附加訊息的前景顏色,例如標籤", "焦點項目的整體框線色彩。只在沒有任何元件覆寫此色彩時,才會加以使用。", "項目周圍的額外框線,可將項目從其他項目中區隔出來以提高對比。", "使用中項目周圍的額外邊界,可將項目從其他項目中區隔出來以提高對比。", "作業區域選取的背景顏色(例如輸入或文字區域)。請注意,這不適用於編輯器中的選取。", "文字分隔符號的顏色。", "內文連結的前景色彩", "內文使用連結的前景色彩", "提示及建議文字的前景色彩。", "文內引用區塊背景色彩。", "引用文字的框線顏色。", "文字區塊的背景顏色。", "小工具的陰影色彩,例如編輯器中的尋找/取代。", "輸入方塊的背景。", "輸入方塊的前景。", "輸入方塊的框線。", "輸入欄位中可使用之項目的框線色彩。", "文字輸入替代字符的前景顏色。", "資訊嚴重性的輸入驗證背景色彩。", "資訊嚴重性的輸入驗證邊界色彩。", "資訊警告的輸入驗證背景色彩。", "警告嚴重性的輸入驗證邊界色彩。", "錯誤嚴重性的輸入驗證背景色彩。", "錯誤嚴重性的輸入驗證邊界色彩。", "下拉式清單的背景。", "下拉式清單的背景。", "下拉式清單的前景。", "下拉式清單的框線。", "當清單/樹狀為使用中狀態時,焦點項目的清單/樹狀背景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", "當清單/樹狀為使用中狀態時,焦點項目的清單/樹狀前景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", "當清單/樹狀為使用中狀態時,所選項目的清單/樹狀背景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", "當清單/樹狀為使用中狀態時,所選項目的清單/樹狀前景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", "當清單/樹狀為非使用中狀態時,所選項目的清單/樹狀背景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", "當清單/樹狀為使用中狀態時,所選項目的清單/樹狀前景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中則沒有。", "當清單/樹狀為非使用中狀態時,所選項目的清單/樹狀背景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", "使用滑鼠暫留在項目時的清單/樹狀背景。", "滑鼠暫留在項目時的清單/樹狀前景。", "使用滑鼠四處移動項目時的清單/樹狀拖放背景。", "在清單/樹狀內搜尋時,相符醒目提示的清單/樹狀前景色彩。", "列表/樹狀 無效項目的前景色彩,例如在瀏覽視窗無法解析的根目錄", "分組標籤的快速選擇器色彩。", "分組邊界的快速選擇器色彩。", "按鈕前景色彩。", "按鈕背景色彩。", "暫留時的按鈕背景色彩。", "標記的背景顏色。標記為小型的訊息標籤,例如搜尋結果的數量。", "標記的前景顏色。標記為小型的訊息標籤,例如搜尋結果的數量。", "指出在捲動該檢視的捲軸陰影。", "捲軸滑桿的背景顏色。", "動態顯示時捲軸滑桿的背景顏色。", "使用中狀態下捲軸滑桿的背景顏色。", "長時間運行進度條的背景色彩.", "編輯器的背景色彩。", "編輯器的預設前景色彩。", "編輯器小工具的背景色彩,例如尋找/取代。", "編輯器小工具的邊界色彩。小工具選擇擁有邊界或色彩未被小工具覆寫時,才會使用色彩。", "編輯器選取範圍的色彩。", "為選取的文字顏色高對比化", "在非使用中的編輯器的選取項目顏色。不能使用非透明的顏色來隱藏底層的樣式。", "與選取項目相同的區域顏色。不能使用非透明的顏色來隱藏底層的樣式。", "選取時,內容相同之區域的框線色彩。", "符合目前搜尋的色彩。", "符合搜尋條件的其他項目的顏色。不能使用非透明的顏色來隱藏底層的樣式。", "為限制搜索的範圍著色。不能使用非透明的顏色來隱藏底層的樣式。", "符合目前搜尋的框線色彩。", "符合其他搜尋的框線色彩。", "限制搜尋範圍的邊框顏色。不能使用非透明的顏色來隱藏底層的樣式。", "突顯懸停顯示的文字。不能使用非透明的顏色來隱藏底層的樣式。", "編輯器動態顯示的背景色彩。", "編輯器動態顯示的框線色彩。", "使用中之連結的色彩。", "插入文字的背景顏色。不能使用非透明的顏色來隱藏底層的樣式。 ", "移除文字的背景顏色。不能使用非透明的顏色來隱藏底層的樣式。 ", "插入的文字外框色彩。", "移除的文字外框色彩。", "目前內嵌合併衝突中的深色標題背景。不能使用非透明的顏色來隱藏底層的樣式。", "目前內嵌合併衝突中的內容背景。不能使用非透明的顏色來隱藏底層的樣式。", "傳入內嵌合併衝突中的深色標題背景。不能使用非透明的顏色來隱藏底層的樣式。", "傳入內嵌合併衝突中的內容背景。不能使用非透明的顏色來隱藏底層的樣式。", "內嵌合併衝突中的共同始祖標題背景。不能使用非透明的顏色來隱藏底層的樣式。", "內嵌合併衝突中的共同始祖內容背景。不能使用非透明的顏色來隱藏底層的樣式。", "內嵌合併衝突中標頭及分隔器的邊界色彩。", "目前內嵌合併衝突的概觀尺規前景。", "傳入內嵌合併衝突的概觀尺規前景。", "內嵌合併衝突中的共同上階概觀尺規前景。", "概述符合尋找條件的尺規標記顏色。不能使用非透明的顏色來隱藏底層的樣式。", "概述反白選擇的尺規標記顏色。不能使用非透明的顏色來隱藏底層的樣式。", ], "vs/platform/workspaces/common/workspaces": [ "Code 工作區", "未命名 (工作區)", "{0} (工作區)", "{0} (工作區)", ] });
mit
codeflood/revolver
Revolver.Test/SetField.cs
8137
using NUnit.Framework; using Revolver.Core; using Sitecore; using Sitecore.Data.Items; using Cmd = Revolver.Core.Commands; namespace Revolver.Test { [TestFixture] [Category("SetField")] public class SetField : BaseCommandTest { [TestFixtureSetUp] public void Init() { Sitecore.Context.IsUnitTesting = true; Sitecore.Context.SkipSecurityInUnitTests = true; InitContent(); } [Test] public void MissingField() { var cmd = new Cmd.SetField(); InitCommand(cmd); _context.CurrentItem = _testRoot; cmd.Value = "lorem"; var result = cmd.Run(); Assert.That(result.Status, Is.EqualTo(CommandStatus.Failure)); } [Test] public void MissingValue() { var cmd = new Cmd.SetField(); InitCommand(cmd); _context.CurrentItem = _testRoot; cmd.Field = "title"; cmd.Value = null; var result = cmd.Run(); Assert.That(result.Status, Is.EqualTo(CommandStatus.Failure)); } [Test] public void ClearField() { var item = _testRoot.Add("itemTOClearField" + DateUtil.IsoNow, _context.CurrentDatabase.Templates[Constants.IDs.DocTemplateId]); using (new EditContext(item)) { item["title"] = "lorem"; } var cmd = new Cmd.SetField(); InitCommand(cmd); _context.CurrentItem = item; cmd.Field = "title"; cmd.Reset = true; cmd.NoVersion = true; var result = cmd.Run(); item.Reload(); Assert.That(result.Status, Is.EqualTo(CommandStatus.Success)); Assert.That(item["title"], Is.EqualTo("$name")); // This is the standard value fir the title field on the template } [Test] public void InvalidField() { var item = _testRoot.Add("itemInvalidField" + DateUtil.IsoNow, _context.CurrentDatabase.Templates[Constants.IDs.DocTemplateId]); var cmd = new Cmd.SetField(); InitCommand(cmd); _context.CurrentItem = item; cmd.Field = "bler"; cmd.Value = "lorem"; var result = cmd.Run(); Assert.That(result.Status, Is.EqualTo(CommandStatus.Failure)); } [Test] public void Ideal() { var item = _testRoot.Add("itemIdeal" + DateUtil.IsoNow, _context.CurrentDatabase.Templates[Constants.IDs.DocTemplateId]); using (new EditContext(item)) { item["title"] = "lorem"; } var cmd = new Cmd.SetField(); InitCommand(cmd); _context.CurrentItem = item; cmd.Field = "title"; cmd.Value = "ipsum"; var result = cmd.Run(); item = item.Versions.GetLatestVersion(); Assert.That(result.Status, Is.EqualTo(CommandStatus.Success)); Assert.That(item["title"], Is.EqualTo("ipsum")); Assert.That(item.Version.Number, Is.EqualTo(2)); Assert.That(result.Message, Is.StringContaining("title")); Assert.That(result.Message, Is.StringContaining("ipsum")); } [Test] public void IdealWithPathRelative() { var item = _testRoot.Add("itemIdealWithPathRelative" + DateUtil.IsoNow, _context.CurrentDatabase.Templates[Constants.IDs.DocTemplateId]); using (new EditContext(item)) { item["title"] = "lorem"; } var cmd = new Cmd.SetField(); InitCommand(cmd); _context.CurrentItem = _testRoot.Parent; cmd.Field = "title"; cmd.Value = "dolor"; cmd.Path = _testRoot.Name + "/" + item.Name; var result = cmd.Run(); item = item.Versions.GetLatestVersion(); Assert.That(result.Status, Is.EqualTo(CommandStatus.Success)); Assert.That(item["title"], Is.EqualTo("dolor")); Assert.That(item.Version.Number, Is.EqualTo(2)); Assert.That(result.Message, Is.StringContaining("title")); Assert.That(result.Message, Is.StringContaining("dolor")); } [Test] public void IdealWithToken() { var item = _testRoot.Add("itemIdealWithToken" + DateUtil.IsoNow, _context.CurrentDatabase.Templates[Constants.IDs.DocTemplateId]); using (new EditContext(item)) { item["title"] = "lorem"; } var cmd = new Cmd.SetField(); InitCommand(cmd); _context.CurrentItem = item; cmd.Field = "title"; cmd.Value = "update $prev"; var result = cmd.Run(); item = item.Versions.GetLatestVersion(); Assert.That(result.Status, Is.EqualTo(CommandStatus.Success)); Assert.That(item["title"], Is.EqualTo("update lorem")); Assert.That(item.Version.Number, Is.EqualTo(2)); Assert.That(result.Message, Is.StringContaining("title")); Assert.That(result.Message, Is.StringContaining("update lorem")); } [Test] public void IdealNoVersion() { var item = _testRoot.Add("itemIdealNoVersion" + DateUtil.IsoNow, _context.CurrentDatabase.Templates[Constants.IDs.DocTemplateId]); using (new EditContext(item)) { item["title"] = "lorem"; } var cmd = new Cmd.SetField(); InitCommand(cmd); _context.CurrentItem = item; cmd.Field = "title"; cmd.Value = "amed"; cmd.NoVersion = true; var result = cmd.Run(); item = item.Versions.GetLatestVersion(); Assert.That(result.Status, Is.EqualTo(CommandStatus.Success)); Assert.That(item["title"], Is.EqualTo("amed")); Assert.That(item.Version.Number, Is.EqualTo(1)); Assert.That(result.Message, Is.StringContaining("title")); Assert.That(result.Message, Is.StringContaining("amed")); } [Test] public void ResetField() { var template = _context.CurrentDatabase.Templates[Constants.IDs.DocTemplateId]; var item = _testRoot.Add("itemResetField" + DateUtil.IsoNow, template); using (new EditContext(item)) { item["title"] = "lorem"; } var cmd = new Cmd.SetField(); InitCommand(cmd); _context.CurrentItem = item; cmd.Field = "title"; cmd.Reset = true; var result = cmd.Run(); item = item.Versions.GetLatestVersion(); Assert.That(result.Status, Is.EqualTo(CommandStatus.Success)); Assert.That(item["title"], Is.EqualTo(template.StandardValues["title"])); Assert.That(item.Version.Number, Is.EqualTo(2)); } [Test] public void IdealNoStats() { var item = _testRoot.Add("itemIdealNoStats" + DateUtil.IsoNow, _context.CurrentDatabase.Templates[Constants.IDs.DocTemplateId]); using (new EditContext(item)) { item["title"] = "lorem"; } var cmd = new Cmd.SetField(); InitCommand(cmd); _context.CurrentItem = item; cmd.Field = "title"; cmd.Value = "ipsum"; cmd.NoStats = true; cmd.NoVersion = true; // A new version would get a different updated date var updatedDate = item.Statistics.Updated; var result = cmd.Run(); item.Reload(); Assert.That(result.Status, Is.EqualTo(CommandStatus.Success)); Assert.That(item["title"], Is.EqualTo("ipsum")); Assert.That(item.Version.Number, Is.EqualTo(1)); Assert.That(item.Statistics.Updated, Is.EqualTo(updatedDate)); Assert.That(result.Message, Is.StringContaining("title")); Assert.That(result.Message, Is.StringContaining("ipsum")); } [Test] public void IdealWithPathID() { var item = _testRoot.Add("itemIdealWithPathID" + DateUtil.IsoNow, _context.CurrentDatabase.Templates[Constants.IDs.DocTemplateId]); using (new EditContext(item)) { item["text"] = "lorem"; } var cmd = new Cmd.SetField(); InitCommand(cmd); _context.CurrentItem = _testRoot.Parent; cmd.Field = "text"; cmd.Value = "dolor"; cmd.Path = item.ID.ToString(); var result = cmd.Run(); item = item.Versions.GetLatestVersion(); Assert.That(result.Status, Is.EqualTo(CommandStatus.Success)); Assert.That(item["text"], Is.EqualTo("dolor")); Assert.That(item.Version.Number, Is.EqualTo(2)); Assert.That(result.Message, Is.StringContaining("text")); Assert.That(result.Message, Is.StringContaining("dolor")); } } }
mit
snackzone/puffs
SamplePuffsApp/db/seeds.rb
2476
class Seed def self.populate User.destroy_all! Post.destroy_all! Comment.destroy_all! zach = User.new(name: "Zach").save tina = User.new(name: "Tina").save breakfast = User.new(name: "Breakfast").save z1 = Post.new(body: "Pufffffffffffssss!!!", author_id: zach.id).save z2 = Post.new(body: "Puffs ain't crispy.", author_id: zach.id).save z3 = Post.new(body: "Cheesy Puffs!", author_id: zach.id).save t1 = Post.new(body: "I heart Puffs!", author_id: tina.id).save t2 = Post.new(body: "Puffs is tasty!", author_id: tina.id).save t3 = Post.new(body: "Puffs, wow!", author_id: tina.id).save b1 = Post.new(body: "I'm Breakfast!", author_id: breakfast.id).save b2 = Post.new(body: "I'm a cat!", author_id: breakfast.id).save b3 = Post.new(body: "Puffs?", author_id: breakfast.id).save Comment.new(body: "I'm a cat!", commenter_id: breakfast.id, post_id: t1.id).save Comment.new(body: "I'm a cat!", commenter_id: breakfast.id, post_id: t2.id).save Comment.new(body: "I'm a cat!", commenter_id: breakfast.id, post_id: t3.id).save Comment.new(body: "I'm hungry!", commenter_id: zach.id, post_id: b1.id).save Comment.new(body: "PUFFS IS AWESOME", commenter_id: zach.id, post_id: b2.id).save Comment.new(body: "Such puffs!", commenter_id: zach.id, post_id: b3.id).save Comment.new(body: "Amaze!", commenter_id: tina.id, post_id: z1.id).save Comment.new(body: "Love puffs!", commenter_id: tina.id, post_id: z2.id).save Comment.new(body: "Puffs is easy!", commenter_id: tina.id, post_id: z3.id).save #Create seeds in this method. Here's an example: # Cat.destroy_all! # Human.destroy_all! # House.destroy_all! # # h1 = House.new(address: '26th and Guerrero').save # h2 = House.new(address: 'Dolores and Market').save # h3 = House.new(address: '123 4th Street').save # # devon = Human.new(fname: 'Devon', lname: 'Watts', house_id: h1.id).save # matt = Human.new(fname: 'Matt', lname: 'Rubens', house_id: h1.id).save # ned = Human.new(fname: 'Ned', lname: 'Ruggeri', house_id: h2.id).save # catless = Human.new(fname: 'Catless', lname: 'Human', house_id: h3.id).save # # Cat.new(name: 'Breakfast', owner_id: devon.id).save # Cat.new(name:'Earl', owner_id: matt.id).save # Cat.new(name: 'Haskell', owner_id: ned.id).save # Cat.new(name: 'Markov', owner_id: ned.id).save # Cat.new(name: 'Stray Cat') end end
mit
wwestrop/MercuryApi
test/MercuryApi.UnitTests/Entities/Customer.cs
370
using System.Collections.Generic; namespace MercuryApi.UnitTests.Entities { public class Customer { public int Id { get; set; } public Address Address { get; set; } public string Name { get; set; } public IEnumerable<Order> Orders { get; set; } public IEnumerable<Review> Reviews { get; set; } public override string ToString() => this.Name; } }
mit
mcortesi/react-remote-render
.storybook/msg-logger/register.tsx
1773
import * as React from 'react'; import addons from '@storybook/addons'; import { CHANNEL_ID, PANEL_ID } from './constants'; const styles: {[k:string]: React.CSSProperties} = { notesPanel: { margin: 10, fontFamily: 'Arial', fontSize: 14, color: '#444', width: '100%', overflow: 'auto', }, msgItem: { fontSize: 10 } }; interface MessagesProps { channel: any; api: any; } class Messages extends React.Component<MessagesProps, { messages: any[] }> { state: { messages: any[] } = { messages: [] }; private stopListeningOnStory?: Function onNewMessage = (msg) => { this.setState(({ messages }) => ({ messages: messages.concat(msg) })); } clearPanel = () => this.setState({ messages: [] }); componentDidMount() { const { channel, api } = this.props; channel.on(CHANNEL_ID, this.onNewMessage); this.stopListeningOnStory = api.onStory(this.clearPanel); } // This is some cleanup tasks when the Notes panel is unmounting. componentWillUnmount() { if (this.stopListeningOnStory) { this.stopListeningOnStory(); } const { channel, api } = this.props; channel.removeListener(CHANNEL_ID, this.onNewMessage); } render() { const { messages } = this.state; return ( <div style={styles.notesPanel}> {messages.map((msg, idx) => ( <pre style={styles.msgItem} key={idx}>{JSON.stringify(msg, null, 2)}</pre> ))} </div> ); } } // Register the addon with a unique name. addons.register('storybook/msg-logger', (api) => { // Also need to set a unique name to the panel. addons.addPanel(PANEL_ID, { title: 'Transport Logger', render: () => ( <Messages channel={addons.getChannel()} api={api} /> ), }) })
mit
151706061/Nancy
src/Nancy.Tests/Unit/Bootstrapper/Base/BootstrapperBaseFixtureBase.cs
5598
#if !__MonoCS__ namespace Nancy.Tests.Unit.Bootstrapper.Base { using System; using Nancy.Bootstrapper; using Nancy.Routing; using Xunit; /// <summary> /// Base class for testing the basic behaviour of a bootstrapper that /// implements either of the two bootstrapper base classes. /// These tests only test basic external behaviour, they are not exhaustive; /// it is expected that additional tests specific to the bootstrapper implementation /// are also created. /// </summary> public abstract class BootstrapperBaseFixtureBase<TContainer> where TContainer : class { private readonly NancyInternalConfiguration configuration; protected abstract NancyBootstrapperBase<TContainer> Bootstrapper { get; } protected NancyInternalConfiguration Configuration { get { return this.configuration; } } protected BootstrapperBaseFixtureBase() { this.configuration = NancyInternalConfiguration.WithOverrides( builder => { builder.NancyEngine = typeof(FakeEngine); }); } [Fact] public virtual void Should_throw_if_get_engine_called_without_being_initialised() { var result = Record.Exception(() => this.Bootstrapper.GetEngine()); result.ShouldNotBeNull(); } [Fact] public virtual void Should_resolve_engine_when_initialised() { this.Bootstrapper.Initialise(); var result = this.Bootstrapper.GetEngine(); result.ShouldNotBeNull(); result.ShouldBeOfType(typeof(INancyEngine)); } [Fact] public virtual void Should_use_types_from_config() { this.Bootstrapper.Initialise(); var result = this.Bootstrapper.GetEngine(); result.ShouldBeOfType(typeof(FakeEngine)); } [Fact] public virtual void Should_register_config_types_as_singletons() { this.Bootstrapper.Initialise(); var result1 = this.Bootstrapper.GetEngine(); var result2 = this.Bootstrapper.GetEngine(); result1.ShouldBeSameAs(result2); } public class FakeEngine : INancyEngine { private readonly IRouteResolver resolver; private readonly IRouteCache routeCache; private readonly INancyContextFactory contextFactory; public INancyContextFactory ContextFactory { get { return this.contextFactory; } } public IRouteCache RouteCache { get { return this.routeCache; } } public IRouteResolver Resolver { get { return this.resolver; } } public Func<NancyContext, Response> PreRequestHook { get; set; } public Action<NancyContext> PostRequestHook { get; set; } public Func<NancyContext, Exception, Response> OnErrorHook { get; set; } public Func<NancyContext, IPipelines> RequestPipelinesFactory { get; set; } public FakeEngine(IRouteResolver resolver, IRouteCache routeCache, INancyContextFactory contextFactory) { if (resolver == null) { throw new ArgumentNullException("resolver", "The resolver parameter cannot be null."); } if (routeCache == null) { throw new ArgumentNullException("routeCache", "The routeCache parameter cannot be null."); } if (contextFactory == null) { throw new ArgumentNullException("contextFactory"); } this.resolver = resolver; this.routeCache = routeCache; this.contextFactory = contextFactory; } /// <summary> /// Handles an incoming <see cref="Request"/>. /// </summary> /// <param name="request">An <see cref="Request"/> instance, containing the information about the current request.</param> /// <returns>A <see cref="NancyContext"/> instance containing the request/response context.</returns> public NancyContext HandleRequest(Request request) { throw new NotImplementedException(); } /// <summary> /// Handles an incoming <see cref="Request"/> async. /// </summary> /// <param name="request">An <see cref="Request"/> instance, containing the information about the current request.</param> /// <param name="onComplete">Delegate to call when the request is complete</param> /// <param name="onError">Deletate to call when any errors occur</param> public void HandleRequest(Request request, Action<NancyContext> onComplete, Action<Exception> onError) { throw new NotImplementedException(); } public void HandleRequest(Request request, Func<NancyContext, NancyContext> preRequest, Action<NancyContext> onComplete, Action<Exception> onError) { throw new NotImplementedException(); } } } } #endif
mit