code stringlengths 3 1.01M | repo_name stringlengths 5 116 | path stringlengths 3 311 | language stringclasses 30 values | license stringclasses 15 values | size int64 3 1.01M |
|---|---|---|---|---|---|
<?php
/**
*
* Copyright 2012-2015 David Rodal
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation;
* either version 2 of the License, or (at your option) any later version
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
?>
<span class="big">1 Zones of Control</span>
<p>
The six hexes surrounding a unit constitute it's Zone of Control or <abbr
title="Zone Of Control">ZOC</abbr>.
<abbr title="Zone Of Control">ZOC</abbr>'s affect the movement of enemy units. The affect is
dependant upon
many factors.
</p>
<ol>
<li><span class="big">Effects on Movement</span>
<p>When a unit enters a hostile <abbr title="Zone Of Control">ZOC</abbr> it must either stop
and
move no further, OR, expend a
certain amounts of <abbr title="Zone Of Control">MP's</abbr>to enter the hex, depending
upon
the
unit. If a units starts the
turn in a <abbr title="Zone Of Control">ZOC</abbr>, it may require movement points to
leave
the
hex, depending upon the unit type.</p>
<li><span class="big">Mechanized units</span>
<p>A mechanized unit (units with a second movement phase) require 2
additional movement points to enter a zoc. They also
require 1 additional MP to leave a zoc.</p>
<p>Mechanized units may move directly from one <abbr title="Zone Of Control">ZOC</abbr>
to
another
at the price of 3 additional <abbr title="Zone Of Control">MP</abbr>'s</p></li>
<li><span class="big">Infantry units</span>
<p>Infantry units must stop upon entering a <abbr title="Zone Of Control">ZOC</abbr>.
Infantry units that start
their movement phase in a <abbr title="Zone Of Control">ZOC</abbr> may exit without
penalty, and re-enter a <abbr title="Zone Of Control">ZOC</abbr>
even if they move directly from one <abbr title="Zone Of Control">ZOC</abbr>
to another.
</p>
<p>
Regardless of movement points required, a unit may always move at least one hex per turn,
even if they are moving directly from one zoc to another.
</p>
</li>
</ol>
| daverodal/wargaming | Wargame/TMCW/Amph/zoc-rules.blade.php | PHP | mit | 2,764 |
{% load i18n ovp_admin_template_tags %}
<fieldset class="module aligned {{ fieldset.classes }}">
{% if fieldset.name %}<h2>{{ fieldset.name }}</h2>{% endif %}
{% if fieldset.description %}
<div class="description">{{ fieldset.description|safe }}</div>
{% endif %}
{% for line in fieldset %}
{% if not line.fields|length_is:'1' %}
<div class="field-boxes row">
{% for field in line %}
{% include "admin/includes/field.html" with line=line css_field_box=line|class_for_field_boxes %}
{% endfor %}
</div>
{% else %}
{% for field in line %}
{% include "admin/includes/field.html" with line=line %}
{% endfor %}
{% endif %}
{% endfor %}
</fieldset>
| atados/api | django-ovp-admin/templates/admin/includes/fieldset.html | HTML | mit | 729 |
/*
* for文による繰り返し処理
*/
using System;
namespace iteration2{
class Program{
public static void Main(string[] args){
// for: 条件判定がfalseになるまで繰り返す
for(int x = 1; x < 10; x++){
for(int y = 1; y < 10; y++){
Console.Write("{0} ", (x*y));
}
Console.WriteLine();
}
}
}
}
| mryyomutga/CS_Exercise | Beginners/p3/Iteration3.cs | C# | mit | 360 |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CSharpSharp.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("CSharpSharp.Tests")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("e3ef6c47-f203-43a9-9448-8eea33e15efe")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.1.0")]
[assembly: AssemblyFileVersion("1.0.1.0")]
| mbillard/csharpsharp | CSharpSharp.Tests/Properties/AssemblyInfo.cs | C# | mit | 1,464 |
export interface ICrudAction {
CANCEL: string;
FAIL: string;
FINISH: string;
REQUEST: string;
value: string;
}
| FoodMeUp/redux-crud-observable | src/constantFactory/interfaces/ICrudAction.ts | TypeScript | mit | 121 |
/*!
* inferno-component v1.2.2
* (c) 2017 Dominic Gannaway
* Released under the MIT License.
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('inferno')) :
typeof define === 'function' && define.amd ? define(['inferno'], factory) :
(global.Inferno = global.Inferno || {}, global.Inferno.Component = factory(global.Inferno));
}(this, (function (inferno) { 'use strict';
var ERROR_MSG = 'a runtime error occured! Use Inferno in development environment to find the error.';
var isBrowser = typeof window !== 'undefined' && window.document;
// this is MUCH faster than .constructor === Array and instanceof Array
// in Node 7 and the later versions of V8, slower in older versions though
var isArray = Array.isArray;
function isStringOrNumber(obj) {
var type = typeof obj;
return type === 'string' || type === 'number';
}
function isNullOrUndef(obj) {
return isUndefined(obj) || isNull(obj);
}
function isInvalid(obj) {
return isNull(obj) || obj === false || isTrue(obj) || isUndefined(obj);
}
function isFunction(obj) {
return typeof obj === 'function';
}
function isNull(obj) {
return obj === null;
}
function isTrue(obj) {
return obj === true;
}
function isUndefined(obj) {
return obj === undefined;
}
function throwError(message) {
if (!message) {
message = ERROR_MSG;
}
throw new Error(("Inferno Error: " + message));
}
var Lifecycle = function Lifecycle() {
this.listeners = [];
this.fastUnmount = true;
};
Lifecycle.prototype.addListener = function addListener (callback) {
this.listeners.push(callback);
};
Lifecycle.prototype.trigger = function trigger () {
var this$1 = this;
for (var i = 0; i < this.listeners.length; i++) {
this$1.listeners[i]();
}
};
var noOp = ERROR_MSG;
if (process.env.NODE_ENV !== 'production') {
noOp = 'Inferno Error: Can only update a mounted or mounting component. This usually means you called setState() or forceUpdate() on an unmounted component. This is a no-op.';
}
var componentCallbackQueue = new Map();
// when a components root VNode is also a component, we can run into issues
// this will recursively look for vNode.parentNode if the VNode is a component
function updateParentComponentVNodes(vNode, dom) {
if (vNode.flags & 28 /* Component */) {
var parentVNode = vNode.parentVNode;
if (parentVNode) {
parentVNode.dom = dom;
updateParentComponentVNodes(parentVNode, dom);
}
}
}
// this is in shapes too, but we don't want to import from shapes as it will pull in a duplicate of createVNode
function createVoidVNode() {
return inferno.createVNode(4096 /* Void */);
}
function createTextVNode(text) {
return inferno.createVNode(1 /* Text */, null, null, text);
}
function addToQueue(component, force, callback) {
// TODO this function needs to be revised and improved on
var queue = componentCallbackQueue.get(component);
if (!queue) {
queue = [];
componentCallbackQueue.set(component, queue);
Promise.resolve().then(function () {
componentCallbackQueue.delete(component);
applyState(component, force, function () {
for (var i = 0; i < queue.length; i++) {
queue[i]();
}
});
});
}
if (callback) {
queue.push(callback);
}
}
function queueStateChanges(component, newState, callback, sync) {
if (isFunction(newState)) {
newState = newState(component.state, component.props, component.context);
}
for (var stateKey in newState) {
component._pendingState[stateKey] = newState[stateKey];
}
if (!component._pendingSetState && isBrowser) {
if (sync || component._blockRender) {
component._pendingSetState = true;
applyState(component, false, callback);
}
else {
addToQueue(component, false, callback);
}
}
else {
component.state = Object.assign({}, component.state, component._pendingState);
component._pendingState = {};
}
}
function applyState(component, force, callback) {
if ((!component._deferSetState || force) && !component._blockRender && !component._unmounted) {
component._pendingSetState = false;
var pendingState = component._pendingState;
var prevState = component.state;
var nextState = Object.assign({}, prevState, pendingState);
var props = component.props;
var context = component.context;
component._pendingState = {};
var nextInput = component._updateComponent(prevState, nextState, props, props, context, force, true);
var didUpdate = true;
if (isInvalid(nextInput)) {
nextInput = createVoidVNode();
}
else if (nextInput === inferno.NO_OP) {
nextInput = component._lastInput;
didUpdate = false;
}
else if (isStringOrNumber(nextInput)) {
nextInput = createTextVNode(nextInput);
}
else if (isArray(nextInput)) {
if (process.env.NODE_ENV !== 'production') {
throwError('a valid Inferno VNode (or null) must be returned from a component render. You may have returned an array or an invalid object.');
}
throwError();
}
var lastInput = component._lastInput;
var vNode = component._vNode;
var parentDom = (lastInput.dom && lastInput.dom.parentNode) || (lastInput.dom = vNode.dom);
component._lastInput = nextInput;
if (didUpdate) {
var subLifecycle = component._lifecycle;
if (!subLifecycle) {
subLifecycle = new Lifecycle();
}
else {
subLifecycle.listeners = [];
}
component._lifecycle = subLifecycle;
var childContext = component.getChildContext();
if (!isNullOrUndef(childContext)) {
childContext = Object.assign({}, context, component._childContext, childContext);
}
else {
childContext = Object.assign({}, context, component._childContext);
}
component._patch(lastInput, nextInput, parentDom, subLifecycle, childContext, component._isSVG, false);
subLifecycle.trigger();
component.componentDidUpdate(props, prevState);
inferno.options.afterUpdate && inferno.options.afterUpdate(vNode);
}
var dom = vNode.dom = nextInput.dom;
var componentToDOMNodeMap = component._componentToDOMNodeMap;
componentToDOMNodeMap && componentToDOMNodeMap.set(component, nextInput.dom);
updateParentComponentVNodes(vNode, dom);
if (!isNullOrUndef(callback)) {
callback();
}
}
else if (!isNullOrUndef(callback)) {
callback();
}
}
var Component$1 = function Component(props, context) {
this.state = {};
this.refs = {};
this._blockRender = false;
this._ignoreSetState = false;
this._blockSetState = false;
this._deferSetState = false;
this._pendingSetState = false;
this._pendingState = {};
this._lastInput = null;
this._vNode = null;
this._unmounted = true;
this._lifecycle = null;
this._childContext = null;
this._patch = null;
this._isSVG = false;
this._componentToDOMNodeMap = null;
/** @type {object} */
this.props = props || inferno.EMPTY_OBJ;
/** @type {object} */
this.context = context || {};
};
Component$1.prototype.render = function render (nextProps, nextState, nextContext) {
};
Component$1.prototype.forceUpdate = function forceUpdate (callback) {
if (this._unmounted) {
return;
}
isBrowser && applyState(this, true, callback);
};
Component$1.prototype.setState = function setState (newState, callback) {
if (this._unmounted) {
return;
}
if (!this._blockSetState) {
if (!this._ignoreSetState) {
queueStateChanges(this, newState, callback, false);
}
}
else {
if (process.env.NODE_ENV !== 'production') {
throwError('cannot update state via setState() in componentWillUpdate().');
}
throwError();
}
};
Component$1.prototype.setStateSync = function setStateSync (newState) {
if (this._unmounted) {
return;
}
if (!this._blockSetState) {
if (!this._ignoreSetState) {
queueStateChanges(this, newState, null, true);
}
}
else {
if (process.env.NODE_ENV !== 'production') {
throwError('cannot update state via setState() in componentWillUpdate().');
}
throwError();
}
};
Component$1.prototype.componentWillMount = function componentWillMount () {
};
Component$1.prototype.componentDidUpdate = function componentDidUpdate (prevProps, prevState, prevContext) {
};
Component$1.prototype.shouldComponentUpdate = function shouldComponentUpdate (nextProps, nextState, context) {
return true;
};
Component$1.prototype.componentWillReceiveProps = function componentWillReceiveProps (nextProps, context) {
};
Component$1.prototype.componentWillUpdate = function componentWillUpdate (nextProps, nextState, nextContext) {
};
Component$1.prototype.getChildContext = function getChildContext () {
};
Component$1.prototype._updateComponent = function _updateComponent (prevState, nextState, prevProps, nextProps, context, force, fromSetState) {
if (this._unmounted === true) {
if (process.env.NODE_ENV !== 'production') {
throwError(noOp);
}
throwError();
}
if ((prevProps !== nextProps || nextProps === inferno.EMPTY_OBJ) || prevState !== nextState || force) {
if (prevProps !== nextProps || nextProps === inferno.EMPTY_OBJ) {
if (!fromSetState) {
this._blockRender = true;
this.componentWillReceiveProps(nextProps, context);
this._blockRender = false;
}
if (this._pendingSetState) {
nextState = Object.assign({}, nextState, this._pendingState);
this._pendingSetState = false;
this._pendingState = {};
}
}
var shouldUpdate = this.shouldComponentUpdate(nextProps, nextState, context);
if (shouldUpdate !== false || force) {
this._blockSetState = true;
this.componentWillUpdate(nextProps, nextState, context);
this._blockSetState = false;
this.props = nextProps;
var state = this.state = nextState;
this.context = context;
inferno.options.beforeRender && inferno.options.beforeRender(this);
var render = this.render(nextProps, state, context);
inferno.options.afterRender && inferno.options.afterRender(this);
return render;
}
}
return inferno.NO_OP;
};
return Component$1;
})));
| ChadoNihi/fcc-voting-app | node_modules/inferno/dist/inferno-component.node.js | JavaScript | mit | 11,107 |
CREATE TABLE work_track_map(
track_id int8,
work_movement_id int8
);
CREATE TABLE tempo(
id int4,
tempo_name varchar(64)
);
CREATE TABLE work_movement (
id int8,
work_id int8,
movement_id int4,
tempo_id int4,
);
CREATE TABLE works (
id int8,
work_name varchar(1024),
composer_id int4,
tonality_id int4,
note_id,
opus_name varchar(4)
);
-- 作曲家
CREATE TABLE composer (
id int4,
composer_name varchar(128)
);
-- 調性
CREATE TABLE tonality (
id int4,
tonality_name varchar(32)
);
-- 唱名
CREATE TABLE note (
id int2,
note_name,
);
-- 配器, 鋼琴, 小提琴, 樂團
-- 編制, 鋼琴演奏者, 小提琴演奏者, 交響樂團 http://en.wikipedia.org/wiki/Musical_ensemble#Classical_chamber_music
-- 曲式, 奏鳴曲, 交響曲, 協奏曲 http://en.wikipedia.org/wiki/Category:Western_classical_music_styles
CREATE TABLE music_styles (
id int4,
music_style_name varchar(128),
);
| shyuan/classical-music-db-schema | classical-music.sql | SQL | mit | 985 |
module PyramidScheme
class RequiredConfigurationNotFound < Exception
end
end
| dpickett/pyramid_scheme | lib/pyramid_scheme/required_configuration_not_found.rb | Ruby | mit | 82 |
require 'ftools'
require 'fileutils'
require 'milton/derivatives/derivative'
module Milton
module Attachment
# Call is_attachment with your options in order to add attachment
# functionality to your ActiveRecord model.
#
# TODO: list options
def is_attachment(options={})
# Check to see that it hasn't already been extended so that subclasses
# can redefine is_attachment from their superclasses and overwrite
# options w/o losing the superclass options.
unless respond_to?(:has_attachment_methods)
extend Milton::Attachment::AttachmentMethods
class_inheritable_accessor :milton_options
end
has_attachment_methods(options)
end
module AttachmentMethods
def require_column(column, message)
begin
raise message unless column_names.include?(column)
rescue ActiveRecord::StatementInvalid => i
# table doesn't exist yet, i.e. hasn't been migrated in...
end
end
def has_attachment_methods(options={})
require_column 'filename', "Milton requires a filename column on #{class_name} table"
# It's possible that this is being included from a class and a sub
# class of that class, in which case we need to merge the existing
# options up.
self.milton_options ||= {}
milton_options.merge!(options)
# Character used to seperate a filename from its derivative options, this
# character will be stripped from all incoming filenames and replaced by
# replacement
milton_options[:separator] ||= '.'
milton_options[:replacement] ||= '-'
milton_options[:tempfile_path] ||= File.join(Rails.root, "tmp", "milton")
milton_options[:storage] ||= :disk
milton_options[:storage_options] ||= {}
milton_options[:processors] ||= {}
milton_options[:uploading] ||= true
# Set to true to allow on-demand processing of derivatives. This can
# be rediculously slow because it requires that the existance of the
# derivative is checked each time it's requested -- throw in S3 and
# that becomes a huge lag. Reccommended only for prototyping.
milton_options[:postproccess] ||= false
# TODO: Write about recipes
# * They're refered to by name in #path
# * They're an order of derivations to make against this attachment
# * They run in the order defined
# * They are created and run when the AR model is created
# * They're necessary when +:postprocessing+ is turned off
milton_options[:recipes] ||= {}
milton_options[:recipes].each do |name, steps|
steps = [steps] unless steps.is_a?(Array)
steps.each do |step|
step.each { |processor, options| Milton.try_require "milton/derivatives/#{processor}", "No '#{processor}' processor found for Milton" }
end
end
# TODO: Write about storage options
# * Late binding (so right_aws is only req'd if you use S3)
Milton.try_require "milton/storage/#{milton_options[:storage]}_file", "No '#{milton_options[:storage]}' storage found for Milton"
# TODO: initialize these options in DiskFile
if milton_options[:storage] == :disk
# root of where the underlying files are stored (or will be stored)
# on the file system
milton_options[:storage_options][:root] ||= File.join(Rails.root, "public", table_name)
milton_options[:storage_options][:root] = File.expand_path(milton_options[:storage_options][:root])
# mode to set on stored files and created directories
milton_options[:storage_options][:chmod] ||= 0755
end
validates_presence_of :filename
after_destroy :destroy_attached_file
after_create :create_derivatives
include Milton::Attachment::InstanceMethods
if milton_options[:uploading]
require 'milton/uploading'
extend Milton::Uploading::ClassMethods
include Milton::Uploading::InstanceMethods
end
end
end
# These get mixed in to your model when you use Milton
module InstanceMethods
# Sets the filename to the given filename (sanitizes the given filename
# as well)
#
# TODO: change the filename on the underlying file system on save so as
# not to orphan the file
def filename=(name)
write_attribute :filename, Storage::StoredFile.sanitize_filename(name, self.class.milton_options)
end
# Returns the content_type of this attachment, tries to determine it if
# hasn't been determined yet or is not saved to the database
def content_type
return self[:content_type] unless self[:content_type].blank?
self.content_type = attached_file.mime_type
end
# Sets the content type to the given type
def content_type=(type)
write_attribute :content_type, type.to_s.strip
end
# Simple helper, same as path except returns the directory from
# .../public/ on, i.e. for showing images in your views.
#
# @asset.path => /var/www/site/public/assets/000/000/001/313/milton.jpg
# @asset.public_path => /assets/000/000/001/313/milton.jpg
#
# Can send a different base path than public if you want to give the
# path from that base on, useful if you change your root path to
# somewhere else.
def public_path(options={}, base='public')
path(options).gsub(/.*?\/#{base}/, '')
end
# The path to the file.
def path(options=nil)
return attached_file.path if options.nil?
process(options).path
end
protected
# Meant to be used as an after_create filter -- loops over all the
# recipes and processes them to create the derivatives.
def create_derivatives
milton_options[:recipes].each{ |name, recipe| process(name, true) } if milton_options[:recipes].any?
end
# Process the given options to produce a final derivative. +options+
# takes a Hash of options to process or the name of a pre-defined
# recipe which will be looked up and processed.
#
# Pass +force = true+ to force processing regardless of if
# +:postprocessing+ is turned on or not.
#
# Returns the final Derivative of all processors in the recipe.
def process(options, force=false)
options = milton_options[:recipes][options] unless options.is_a?(Hash)
options = [options] unless options.is_a?(Array)
source = attached_file
options.each do |recipe|
recipe.each do |processor, opts|
source = Derivative.factory(processor, source, opts, self.class.milton_options).process_if(process? || force).file
end
end
source
end
# Returns true if derivaties of the attachment should be processed,
# returns false if no processing should be done when a derivative is
# requested.
#
# No processing also means the derivative won't be checked for
# existance (since that can be slow) so w/o postprocessing things will
# be much faster but #path will happily return the paths to Derivatives
# which don't exist.
#
# It is highly recommended that you turn +:postprocessing+ off for
# anything but prototyping, and instead use recipes and refer to them
# via #path. +:postprocessing+ relies on checking for existance which
# will kill any real application.
def process?
self.class.milton_options[:postprocessing]
end
# A reference to the attached file, this is probably what you want to
# overwrite to introduce a new behavior
#
# i.e.
# have attached_file return a ResizeableFile, or a TranscodableFile
def attached_file
@attached_file ||= Storage::StoredFile.adapter(self.class.milton_options[:storage]).new(filename, id, self.class.milton_options)
end
# Clean the file from the filesystem
def destroy_attached_file
attached_file.destroy
end
end
end
end
| citrusbyte/milton | lib/milton/attachment.rb | Ruby | mit | 8,465 |
<?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 Wekoin</source>
<translation>Über Wekoin</translation>
</message>
<message>
<location line="+39"/>
<source><b>Wekoin</b> version</source>
<translation><b>Wekoin</b>-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 (eay@cryptsoft.com) 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 (eay@cryptsoft.com) 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 Wekoin developers</source>
<translation>Die Wekoinentwickler</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>&New Address</source>
<translation>&Neue Adresse</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+63"/>
<source>These are your Wekoin 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 Wekoin-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>&Copy Address</source>
<translation>Adresse &kopieren</translation>
</message>
<message>
<location line="+11"/>
<source>Show &QR Code</source>
<translation>&QR-Code anzeigen</translation>
</message>
<message>
<location line="+11"/>
<source>Sign a message to prove you own a Wekoin address</source>
<translation>Eine Nachricht signieren, um den Besitz einer Wekoin-Adresse zu beweisen</translation>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation>Nachricht &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>&Export</source>
<translation>E&xportieren</translation>
</message>
<message>
<location line="-44"/>
<source>Verify a message to ensure it was signed with a specified Wekoin address</source>
<translation>Eine Nachricht verifizieren, um sicherzustellen, dass diese mit einer angegebenen Wekoin-Adresse signiert wurde</translation>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation>Nachricht &verifizieren</translation>
</message>
<message>
<location line="+14"/>
<source>&Delete</source>
<translation>&Löschen</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="-5"/>
<source>These are your Wekoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
<translation>Dies sind Ihre Wekoin-Adressen zum Tätigen von Überweisungen. Bitte prüfen Sie den Betrag und die Empfangsadresse, bevor Sie Wekoins überweisen.</translation>
</message>
<message>
<location line="+13"/>
<source>Copy &Label</source>
<translation>&Bezeichnung kopieren</translation>
</message>
<message>
<location line="+1"/>
<source>&Edit</source>
<translation>&Editieren</translation>
</message>
<message>
<location line="+1"/>
<source>Send &Coins</source>
<translation>Wekoins &ü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.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source>
<translation>Geben Sie die neue Passphrase für die Brieftasche ein.<br>Bitte benutzen Sie eine Passphrase bestehend aus <b>10 oder mehr zufälligen Zeichen</b> oder <b>8 oder mehr Wörtern</b>.</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 <b>LOSE ALL OF YOUR WEKOINS</b>!</source>
<translation>Warnung: Wenn Sie Ihre Brieftasche verschlüsseln und Ihre Passphrase verlieren, werden Sie <b>alle Ihre Wekoins verlieren</b>!</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>Wekoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your wekoins from being stolen by malware infecting your computer.</source>
<translation>Wekoin wird jetzt beendet, um den Verschlüsselungsprozess abzuschließen. Bitte beachten Sie, dass die Verschlüsselung Ihrer Brieftasche nicht vollständig vor Diebstahl Ihrer Wekoins 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 &message...</source>
<translation>Nachricht s&ignieren...</translation>
</message>
<message>
<location line="+280"/>
<source>Synchronizing with network...</source>
<translation>Synchronisiere mit Netzwerk...</translation>
</message>
<message>
<location line="-349"/>
<source>&Overview</source>
<translation>&Ü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>&Transactions</source>
<translation>&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&xit</source>
<translation>&Beenden</translation>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation>Anwendung beenden</translation>
</message>
<message>
<location line="+4"/>
<source>Show information about Wekoin</source>
<translation>Informationen über Wekoin anzeigen</translation>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation>Über &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>&Options...</source>
<translation>&Konfiguration...</translation>
</message>
<message>
<location line="+6"/>
<source>&Encrypt Wallet...</source>
<translation>Brieftasche &verschlüsseln...</translation>
</message>
<message>
<location line="+3"/>
<source>&Backup Wallet...</source>
<translation>Brieftasche &sichern...</translation>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation>Passphrase &ä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 Wekoin address</source>
<translation>Wekoins an eine Wekoin-Adresse überweisen</translation>
</message>
<message>
<location line="+49"/>
<source>Modify configuration options for Wekoin</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>&Debug window</source>
<translation>&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>&Verify message...</source>
<translation>Nachricht &verifizieren...</translation>
</message>
<message>
<location line="-165"/>
<location line="+530"/>
<source>Wekoin</source>
<translation>Wekoin</translation>
</message>
<message>
<location line="-530"/>
<source>Wallet</source>
<translation>Brieftasche</translation>
</message>
<message>
<location line="+101"/>
<source>&Send</source>
<translation>Überweisen</translation>
</message>
<message>
<location line="+7"/>
<source>&Receive</source>
<translation>&Empfangen</translation>
</message>
<message>
<location line="+14"/>
<source>&Addresses</source>
<translation>&Adressen</translation>
</message>
<message>
<location line="+22"/>
<source>&About Wekoin</source>
<translation>&Über Wekoin</translation>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation>&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 Wekoin addresses to prove you own them</source>
<translation>Nachrichten signieren, um den Besitz Ihrer Wekoin-Adressen zu beweisen</translation>
</message>
<message>
<location line="+2"/>
<source>Verify messages to ensure they were signed with specified Wekoin addresses</source>
<translation>Nachrichten verifizieren, um sicherzustellen, dass diese mit den angegebenen Wekoin-Adressen signiert wurden</translation>
</message>
<message>
<location line="+28"/>
<source>&File</source>
<translation>&Datei</translation>
</message>
<message>
<location line="+7"/>
<source>&Settings</source>
<translation>&Einstellungen</translation>
</message>
<message>
<location line="+6"/>
<source>&Help</source>
<translation>&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>Wekoin client</source>
<translation>Wekoin-Client</translation>
</message>
<message numerus="yes">
<location line="+141"/>
<source>%n active connection(s) to Wekoin network</source>
<translation><numerusform>%n aktive Verbindung zum Wekoin-Netzwerk</numerusform><numerusform>%n aktive Verbindungen zum Wekoin-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 Wekoin-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 Wekoin address or malformed URI parameters.</source>
<translation>URI kann nicht analysiert werden! Dies kann durch eine ungültige Wekoin-Adresse oder fehlerhafte URI-Parameter verursacht werden.</translation>
</message>
<message>
<location line="+17"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation>Brieftasche ist <b>verschlüsselt</b> und aktuell <b>entsperrt</b></translation>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation>Brieftasche ist <b>verschlüsselt</b> und aktuell <b>gesperrt</b></translation>
</message>
<message>
<location filename="../bitcoin.cpp" line="+111"/>
<source>A fatal error occurred. Wekoin can no longer continue safely and will quit.</source>
<translation>Ein schwerer Fehler ist aufgetreten. Wekoin 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>&Label</source>
<translation>&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>&Address</source>
<translation>&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 "%1" is already in the address book.</source>
<translation>Die eingegebene Adresse "%1" befindet sich bereits im Adressbuch.</translation>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid Wekoin address.</source>
<translation>Die eingegebene Adresse "%1" ist keine gültige Wekoin-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>Wekoin-Qt</source>
<translation>Wekoin-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 "de_DE" (default: system locale)</source>
<translation>Sprache festlegen, z.B. "de_DE" (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>&Main</source>
<translation>&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 &fee</source>
<translation>Transaktions&gebühr bezahlen</translation>
</message>
<message>
<location line="+31"/>
<source>Automatically start Wekoin after logging in to the system.</source>
<translation>Wekoin nach der Anmeldung am System automatisch ausführen.</translation>
</message>
<message>
<location line="+3"/>
<source>&Start Wekoin on system login</source>
<translation>&Starte Wekoin 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>&Reset Options</source>
<translation>Konfiguration &zurücksetzen</translation>
</message>
<message>
<location line="+13"/>
<source>&Network</source>
<translation>&Netzwerk</translation>
</message>
<message>
<location line="+6"/>
<source>Automatically open the Wekoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation>Automatisch den Wekoin-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 &UPnP</source>
<translation>Portweiterleitung via &UPnP</translation>
</message>
<message>
<location line="+7"/>
<source>Connect to the Wekoin network through a SOCKS proxy (e.g. when connecting through Tor).</source>
<translation>Über einen SOCKS-Proxy mit dem Wekoin-Netzwerk verbinden (z.B. beim Verbinden über Tor).</translation>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS proxy:</source>
<translation>Über einen SOCKS-Proxy &verbinden:</translation>
</message>
<message>
<location line="+9"/>
<source>Proxy &IP:</source>
<translation>Proxy-&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>&Port:</source>
<translation>&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 &Version:</source>
<translation>SOCKS-&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>&Window</source>
<translation>&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>&Minimize to the tray instead of the taskbar</source>
<translation>In den Infobereich anstatt in die Taskleiste &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 "Beenden" im Menü schließen.</translation>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation>Beim Schließen m&inimieren</translation>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation>&Anzeige</translation>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation>&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 Wekoin.</source>
<translation>Legt die Sprache der Benutzeroberfläche fest. Diese Einstellung wird erst nach einem Neustart von Wekoin aktiv.</translation>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation>&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 Wekoins angezeigt werden soll.</translation>
</message>
<message>
<location line="+9"/>
<source>Whether to show Wekoin addresses in the transaction list or not.</source>
<translation>Legt fest, ob Wekoin-Adressen in der Transaktionsliste angezeigt werden.</translation>
</message>
<message>
<location line="+3"/>
<source>&Display addresses in transaction list</source>
<translation>Adressen in der Transaktionsliste &anzeigen</translation>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation>&OK</translation>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation>&Abbrechen</translation>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation>&Ü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 Wekoin.</source>
<translation>Diese Einstellung wird erst nach einem Neustart von Wekoin 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 Wekoin 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 Wekoin-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><b>Recent transactions</b></source>
<translation><b>Letzte Transaktionen</b></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 wekoin: click-to-pay handler</source>
<translation>"wekoin: Klicken-zum-Bezahlen"-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>&Save As...</source>
<translation>&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>&Information</source>
<translation>&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>&Open</source>
<translation>&Öffnen</translation>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation>Kommandozeilenoptionen</translation>
</message>
<message>
<location line="+7"/>
<source>Show the Wekoin-Qt help message to get a list with possible Wekoin command-line options.</source>
<translation>Zeige die Wekoin-Qt-Hilfsnachricht, um eine Liste mit möglichen Kommandozeilenoptionen zu erhalten.</translation>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation>&Anzeigen</translation>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation>&Konsole</translation>
</message>
<message>
<location line="-260"/>
<source>Build date</source>
<translation>Erstellungsdatum</translation>
</message>
<message>
<location line="-104"/>
<source>Wekoin - Debug window</source>
<translation>Wekoin - Debugfenster</translation>
</message>
<message>
<location line="+25"/>
<source>Wekoin Core</source>
<translation>Wekoin-Kern</translation>
</message>
<message>
<location line="+279"/>
<source>Debug log file</source>
<translation>Debugprotokolldatei</translation>
</message>
<message>
<location line="+7"/>
<source>Open the Wekoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation>Öffnet die Wekoin-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 Wekoin RPC console.</source>
<translation>Willkommen in der Wekoin-RPC-Konsole.</translation>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation>Pfeiltaste hoch und runter, um die Historie durchzublättern und <b>Strg-L</b>, um die Konsole zurückzusetzen.</translation>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation>Bitte <b>help</b> 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>Wekoins ü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 &Recipient</source>
<translation>Empfänger &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 &All</source>
<translation>&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&end</source>
<translation>&Überweisen</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-59"/>
<source><b>%1</b> to %2 (%3)</source>
<translation><b>%1</b> 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?<br>%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 Wekoins aus Ihrer Brieftasche bereits ausgegeben wurden. Beispielsweise weil Sie eine Kopie Ihrer wallet.dat genutzt, die Wekoins 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&mount:</source>
<translation>&Betrag:</translation>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation>&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>&Label:</source>
<translation>&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 Wekoin address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation>Wekoin-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>&Sign Message</source>
<translation>Nachricht &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 Wekoin address</source>
<translation>Die Nachricht signieren, um den Besitz dieser Wekoin-Adresse zu beweisen</translation>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation>&Nachricht signieren</translation>
</message>
<message>
<location line="+14"/>
<source>Reset all sign message fields</source>
<translation>Alle "Nachricht signieren"-Felder zurücksetzen</translation>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation>&Zurücksetzen</translation>
</message>
<message>
<location line="-87"/>
<source>&Verify Message</source>
<translation>Nachricht &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 Wekoin address</source>
<translation>Die Nachricht verifizieren, um sicherzustellen, dass diese mit der angegebenen Wekoin-Adresse signiert wurde</translation>
</message>
<message>
<location line="+3"/>
<source>Verify &Message</source>
<translation>&Nachricht verifizieren</translation>
</message>
<message>
<location line="+14"/>
<source>Reset all verify message fields</source>
<translation>Alle "Nachricht verifizieren"-Felder zurücksetzen</translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a Wekoin address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation>Wekoin-Adresse eingeben (z.B. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation>Auf "Nachricht signieren" klicken, um die Signatur zu erzeugen</translation>
</message>
<message>
<location line="+3"/>
<source>Enter Wekoin signature</source>
<translation>Wekoin-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 Wekoin developers</source>
<translation>Die Wekoinentwickler</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 "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation>Generierte Wekoins 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 "nicht angenommen" 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>Wekoins überweisen</translation>
</message>
</context>
<context>
<name>WalletView</name>
<message>
<location filename="../walletview.cpp" line="+42"/>
<source>&Export</source>
<translation>E&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>Wekoin version</source>
<translation>Wekoin-Version</translation>
</message>
<message>
<location line="+102"/>
<source>Usage:</source>
<translation>Benutzung:</translation>
</message>
<message>
<location line="-29"/>
<source>Send command to -server or wekoind</source>
<translation>Befehl an -server oder wekoind 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: wekoin.conf)</source>
<translation>Konfigurationsdatei festlegen (Standard: wekoin.conf)</translation>
</message>
<message>
<location line="+3"/>
<source>Specify pid file (default: wekoind.pid)</source>
<translation>PID-Datei festlegen (Standard: wekoind.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 <port> (default: 9333 or testnet: 19333)</source>
<translation><port> nach Verbindungen abhören (Standard: 9333 oder Testnetz: 19333)</translation>
</message>
<message>
<location line="+5"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation>Maximal <n> 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 <port> (default: 9332 or testnet: 19332)</source>
<translation><port> nach JSON-RPC-Verbindungen abhören (Standard: 9332 oder Testnetz: 19332)</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=wekoinrpc
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 "Wekoin Alert" admin@foo.com
</source>
<translation>%s, Sie müssen den Wert rpcpasswort in dieser Konfigurationsdatei angeben:
%s
Es wird empfohlen das folgende Zufallspasswort zu verwenden:
rpcuser=wekoinrpc
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 \"Wekoin Alert\" admin@foo.com
</translation>
</message>
<message>
<location line="+17"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation>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. Wekoin is probably already running.</source>
<translation>Datenverzeichnis %s kann nicht gesperrt werden. Evtl. wurde Wekoin 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 Wekoins aus Ihrer Brieftasche bereits ausgegeben wurden. Beispielsweise weil Sie eine Kopie Ihrer wallet.dat genutzt, die Wekoins 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 "high-priority/low-fee"-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's date and time are correct! If your clock is wrong Wekoin will not work properly.</source>
<translation>Warnung: Bitte korrigieren Sie die Datums- und Uhrzeiteinstellungen Ihres Computers, da Wekoin 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>Wekoins 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, <0 = leave that many cores free, default: 0)</source>
<translation>Maximale Anzahl an Skript-Verifizierungs-Threads festlegen (bis zu 16, 0 = automatisch, <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: '%s'</source>
<translation>Ungültige Adresse in -tor: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -minrelaytxfee=<amount>: '%s'</source>
<translation>Ungültiger Betrag für -minrelaytxfee=<amount>: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -mintxfee=<amount>: '%s'</source>
<translation>Ungültiger Betrag für -mintxfee=<amount>: '%s'</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, <n>*1000 bytes (default: 5000)</source>
<translation>Maximale Größe, <n> * 1000 Byte, des Empfangspuffers pro Verbindung (Standard: 5000)</translation>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation>Maximale Größe, <n> * 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 <net> (IPv4, IPv6 or Tor)</source>
<translation>Verbinde nur zu Knoten des Netztyps <net> (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 "-debug*"-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 Wekoin Wiki for SSL setup instructions)</source>
<translation>SSL-Optionen: (siehe Wekoin-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 <ip> (default: 127.0.0.1)</source>
<translation>Sende Befehle an Knoten <ip> (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 <n> (default: 100)</source>
<translation>Größe des Schlüsselpools festlegen auf <n> (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 Wekoin</source>
<translation>Fehler beim Laden von wallet.dat: Brieftasche benötigt neuere Version von Wekoin</translation>
</message>
<message>
<location line="+93"/>
<source>Wallet needed to be rewritten: restart Wekoin to complete</source>
<translation>Brieftasche musste neu geschrieben werden: Starten Sie Wekoin 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: '%s'</source>
<translation>Ungültige Adresse in -proxy: '%s'</translation>
</message>
<message>
<location line="+56"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>Unbekannter Netztyp in -onlynet angegeben: '%s'</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: '%s'</source>
<translation>Kann Adresse in -bind nicht auflösen: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation>Kann Adresse in -externalip nicht auflösen: '%s'</translation>
</message>
<message>
<location line="+44"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation>Ungültiger Betrag für -paytxfee=<amount>: '%s'</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. Wekoin is probably already running.</source>
<translation>Kann auf diesem Computer nicht an %s binden. Evtl. wurde Wekoin 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=<password> 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=<passwort> 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> | wekuiz/wekoin | src/qt/locale/bitcoin_de.ts | TypeScript | mit | 120,181 |
# Contributing to Resource Management by Smartsheet API User Guide
## Purpose
This guide explains how to contribute to the Resource Management by Smartsheet User Guide. The actual Resource Management by Smartsheet API documentation can be viewed [here](https://10kft.github.io/10kft-api/).
## Submitting Changes
The project should be tested locally before putting up a pull request to ensure that the changes are working as expected and original functionality is not affected.
### Testing Changes
Follow the steps in the [README.md](README.md#Running-the-Docs-Locally) to run the documentation page locally. Ensure that the original functionality of the page is intact and the new changes are behaving as expected.
### Putting up a Pull Request
After testing the proposed changes, please fork a branch and then submit a pull request. [More info about pull requests here.](https://help.github.com/en/articles/about-pull-requests)
Contributors do not have access to push directly to the `master` branch, so all code changes will be made through approved pull requests.
## Publishing
If you would like to publish changes to the documentation files once your pull request has been approved, see [Publishing](PUBLISHING.md).
## License
Copyright 2021 Smartsheet, Inc.
Licensed under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific
language governing permissions and limitations under the
License.
| 10Kft/10kft-api | CONTRIBUTING.md | Markdown | mit | 1,792 |
/**
* Copyright 2013 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @providesModule getDOMNodeID
* @typechecks
*/
"use strict";
/**
* Accessing "id" or calling getAttribute('id') on a form element can return its
* control whose name or ID is "id". All DOM nodes support `getAttributeNode`
* but this can also get called on other objects so just return '' if we're
* given something other than a DOM node (such as window).
*
* @param {DOMElement|DOMWindow|DOMDocument} domNode DOM node.
* @returns {string} ID of the supplied `domNode`.
*/
function getDOMNodeID(domNode) {
if (domNode.getAttributeNode) {
var attributeNode = domNode.getAttributeNode('id');
return attributeNode && attributeNode.value || '';
} else {
return '';
}
}
module.exports = getDOMNodeID;
| petehunt/rendr-react-template | app/vendor/react/getDOMNodeID.js | JavaScript | mit | 1,322 |
namespace Games.RPG.WoDSheet
{
partial class WodNameSpecialtySlider
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param Name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Flow = new System.Windows.Forms.FlowLayoutPanel();
this.labelTrait = new System.Windows.Forms.Label();
this.textBoxSpecialty = new System.Windows.Forms.TextBox();
this.labelValue = new System.Windows.Forms.Label();
this.trackBarScore = new System.Windows.Forms.TrackBar();
this.Flow.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.trackBarScore)).BeginInit();
this.SuspendLayout();
//
// Flow
//
this.Flow.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.Flow.Controls.Add(this.labelTrait);
this.Flow.Controls.Add(this.textBoxSpecialty);
this.Flow.Controls.Add(this.labelValue);
this.Flow.Controls.Add(this.trackBarScore);
this.Flow.Dock = System.Windows.Forms.DockStyle.Fill;
this.Flow.Location = new System.Drawing.Point(0, 0);
this.Flow.Margin = new System.Windows.Forms.Padding(2);
this.Flow.Name = "Flow";
this.Flow.Size = new System.Drawing.Size(233, 68);
this.Flow.TabIndex = 3;
//
// labelTrait
//
this.labelTrait.AutoSize = true;
this.labelTrait.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelTrait.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelTrait.Location = new System.Drawing.Point(2, 0);
this.labelTrait.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.labelTrait.Name = "labelTrait";
this.labelTrait.Size = new System.Drawing.Size(81, 28);
this.labelTrait.TabIndex = 0;
this.labelTrait.Text = "Trait Name";
this.labelTrait.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// textBoxSpecialty
//
this.textBoxSpecialty.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBoxSpecialty.Location = new System.Drawing.Point(87, 2);
this.textBoxSpecialty.Margin = new System.Windows.Forms.Padding(2);
this.textBoxSpecialty.Name = "textBoxSpecialty";
this.textBoxSpecialty.Size = new System.Drawing.Size(115, 24);
this.textBoxSpecialty.TabIndex = 1;
this.textBoxSpecialty.TextChanged += new System.EventHandler(this.textBoxSpecialty_TextChanged);
//
// labelValue
//
this.labelValue.AutoSize = true;
this.labelValue.Dock = System.Windows.Forms.DockStyle.Fill;
this.Flow.SetFlowBreak(this.labelValue, true);
this.labelValue.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelValue.Location = new System.Drawing.Point(207, 0);
this.labelValue.Name = "labelValue";
this.labelValue.Size = new System.Drawing.Size(18, 28);
this.labelValue.TabIndex = 4;
this.labelValue.Text = "1";
this.labelValue.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// trackBarScore
//
this.trackBarScore.Location = new System.Drawing.Point(2, 30);
this.trackBarScore.Margin = new System.Windows.Forms.Padding(2);
this.trackBarScore.Maximum = 5;
this.trackBarScore.Name = "trackBarScore";
this.trackBarScore.Size = new System.Drawing.Size(223, 45);
this.trackBarScore.TabIndex = 2;
this.trackBarScore.Value = 1;
this.trackBarScore.Scroll += new System.EventHandler(this.trackBarScore_Scroll);
//
// WodNameSpecialtySlider
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.Controls.Add(this.Flow);
this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "WodNameSpecialtySlider";
this.Size = new System.Drawing.Size(233, 68);
this.Flow.ResumeLayout(false);
this.Flow.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.trackBarScore)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.FlowLayoutPanel Flow;
private System.Windows.Forms.Label labelTrait;
private System.Windows.Forms.TextBox textBoxSpecialty;
private System.Windows.Forms.TrackBar trackBarScore;
private System.Windows.Forms.Label labelValue;
}
}
| Syndaryl/WorldOfDarknessCharacterSheet | DotControls/WodNameSpecialtySlider.Designer.cs | C# | mit | 6,010 |
using System.Web.Mvc;
using SFA.DAS.Authorization.Services;
namespace SFA.DAS.EmployerFinance.Web.Helpers
{
public static class HtmlHelperExtensions
{
public static bool IsAuthorized(this HtmlHelper htmlHelper, string featureType)
{
var authorisationService = DependencyResolver.Current.GetService<IAuthorizationService>();
var isAuthorized = authorisationService.IsAuthorized(featureType);
return isAuthorized;
}
}
} | SkillsFundingAgency/das-employerapprenticeshipsservice | src/SFA.DAS.EmployerFinance.Web/Helpers/HtmlHelperExtensions.cs | C# | mit | 494 |
module FortesForum
module Default
module Forum
extend ActiveSupport::Concern
included do
has_many :posts, dependent: :destroy
def self.get_or_create params
@forum = where(params).first
@forum = create(params) unless @forum.present?
@forum
end
def permite_acessar? user
true
end
def permite_excluir? user
true
end
end
end
end
end
| fortesinformatica/fortes_forum | app/models/concerns/fortes_forum/default/forum.rb | Ruby | mit | 469 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Interface co.aikar.taskchain.TaskChainAbortAction (TaskChain (Core) 3.7.2 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Interface co.aikar.taskchain.TaskChainAbortAction (TaskChain (Core) 3.7.2 API)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../co/aikar/taskchain/package-summary.html">Package</a></li>
<li><a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?co/aikar/taskchain/class-use/TaskChainAbortAction.html" target="_top">Frames</a></li>
<li><a href="TaskChainAbortAction.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Interface co.aikar.taskchain.TaskChainAbortAction" class="title">Uses of Interface<br>co.aikar.taskchain.TaskChainAbortAction</h2>
</div>
<div class="classUseContainer">
<ul class="blockList">
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="co.aikar.taskchain">
<!-- -->
</a>
<h3>Uses of <a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a> in <a href="../../../../co/aikar/taskchain/package-summary.html">co.aikar.taskchain</a></h3>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing subinterfaces, and an explanation">
<caption><span>Subinterfaces of <a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a> in <a href="../../../../co/aikar/taskchain/package-summary.html">co.aikar.taskchain</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Interface and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>interface </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChainNullAction.html" title="interface in co.aikar.taskchain">TaskChainNullAction</a><A1,A2,A3></span></code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="block"><span class="deprecationComment">Use <a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain"><code>TaskChainAbortAction</code></a> instead</span></div>
</div>
</td>
</tr>
</tbody>
</table>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../co/aikar/taskchain/package-summary.html">co.aikar.taskchain</a> with parameters of type <a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../co/aikar/taskchain/TaskChain.html" title="class in co.aikar.taskchain">TaskChain</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">TaskChain.</span><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIf-java.util.function.Predicate-co.aikar.taskchain.TaskChainAbortAction-">abortIf</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html?is-external=true" title="class or interface in java.util.function">Predicate</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>> predicate,
<a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a><?,?,?> action)</code>
<div class="block"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIf-T-co.aikar.taskchain.TaskChainAbortAction-A1-A2-A3-"><code>TaskChain.abortIf(Object, TaskChainAbortAction, Object, Object, Object)</code></a></div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><A1> <a href="../../../../co/aikar/taskchain/TaskChain.html" title="class in co.aikar.taskchain">TaskChain</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">TaskChain.</span><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIf-java.util.function.Predicate-co.aikar.taskchain.TaskChainAbortAction-A1-">abortIf</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html?is-external=true" title="class or interface in java.util.function">Predicate</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>> predicate,
<a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a><A1,?,?> action,
A1 arg1)</code>
<div class="block"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIf-T-co.aikar.taskchain.TaskChainAbortAction-A1-A2-A3-"><code>TaskChain.abortIf(Object, TaskChainAbortAction, Object, Object, Object)</code></a></div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><A1,A2> <a href="../../../../co/aikar/taskchain/TaskChain.html" title="class in co.aikar.taskchain">TaskChain</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">TaskChain.</span><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIf-java.util.function.Predicate-co.aikar.taskchain.TaskChainAbortAction-A1-A2-">abortIf</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html?is-external=true" title="class or interface in java.util.function">Predicate</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>> predicate,
<a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a><A1,A2,?> action,
A1 arg1,
A2 arg2)</code>
<div class="block"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIf-T-co.aikar.taskchain.TaskChainAbortAction-A1-A2-A3-"><code>TaskChain.abortIf(Object, TaskChainAbortAction, Object, Object, Object)</code></a></div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><A1,A2,A3> <a href="../../../../co/aikar/taskchain/TaskChain.html" title="class in co.aikar.taskchain">TaskChain</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">TaskChain.</span><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIf-java.util.function.Predicate-co.aikar.taskchain.TaskChainAbortAction-A1-A2-A3-">abortIf</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html?is-external=true" title="class or interface in java.util.function">Predicate</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>> predicate,
<a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a><A1,A2,A3> action,
A1 arg1,
A2 arg2,
A3 arg3)</code>
<div class="block">Checks if the previous task return matches the supplied predicate, and aborts if it was.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../co/aikar/taskchain/TaskChain.html" title="class in co.aikar.taskchain">TaskChain</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">TaskChain.</span><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIf-T-co.aikar.taskchain.TaskChainAbortAction-">abortIf</a></span>(<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a> ifObj,
<a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a><?,?,?> action)</code>
<div class="block"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIf-T-co.aikar.taskchain.TaskChainAbortAction-A1-A2-A3-"><code>TaskChain.abortIf(Object, TaskChainAbortAction, Object, Object, Object)</code></a></div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><A1> <a href="../../../../co/aikar/taskchain/TaskChain.html" title="class in co.aikar.taskchain">TaskChain</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">TaskChain.</span><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIf-T-co.aikar.taskchain.TaskChainAbortAction-A1-">abortIf</a></span>(<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a> ifObj,
<a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a><A1,?,?> action,
A1 arg1)</code>
<div class="block"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIf-T-co.aikar.taskchain.TaskChainAbortAction-A1-A2-A3-"><code>TaskChain.abortIf(Object, TaskChainAbortAction, Object, Object, Object)</code></a></div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><A1,A2> <a href="../../../../co/aikar/taskchain/TaskChain.html" title="class in co.aikar.taskchain">TaskChain</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">TaskChain.</span><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIf-T-co.aikar.taskchain.TaskChainAbortAction-A1-A2-">abortIf</a></span>(<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a> ifObj,
<a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a><A1,A2,?> action,
A1 arg1,
A2 arg2)</code>
<div class="block"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIf-T-co.aikar.taskchain.TaskChainAbortAction-A1-A2-A3-"><code>TaskChain.abortIf(Object, TaskChainAbortAction, Object, Object, Object)</code></a></div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><A1,A2,A3> <a href="../../../../co/aikar/taskchain/TaskChain.html" title="class in co.aikar.taskchain">TaskChain</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">TaskChain.</span><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIf-T-co.aikar.taskchain.TaskChainAbortAction-A1-A2-A3-">abortIf</a></span>(<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a> ifObj,
<a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a><A1,A2,A3> action,
A1 arg1,
A2 arg2,
A3 arg3)</code>
<div class="block"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIf-java.util.function.Predicate-co.aikar.taskchain.TaskChainAbortAction-A1-A2-A3-"><code>TaskChain.abortIf(Predicate, TaskChainAbortAction, Object, Object, Object)</code></a></div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../co/aikar/taskchain/TaskChain.html" title="class in co.aikar.taskchain">TaskChain</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">TaskChain.</span><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIfNot-java.util.function.Predicate-co.aikar.taskchain.TaskChainAbortAction-">abortIfNot</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html?is-external=true" title="class or interface in java.util.function">Predicate</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>> ifNotPredicate,
<a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a><?,?,?> action)</code>
<div class="block"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIfNot-T-co.aikar.taskchain.TaskChainAbortAction-A1-A2-A3-"><code>TaskChain.abortIfNot(Object, TaskChainAbortAction, Object, Object, Object)</code></a></div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><A1> <a href="../../../../co/aikar/taskchain/TaskChain.html" title="class in co.aikar.taskchain">TaskChain</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">TaskChain.</span><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIfNot-java.util.function.Predicate-co.aikar.taskchain.TaskChainAbortAction-A1-">abortIfNot</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html?is-external=true" title="class or interface in java.util.function">Predicate</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>> ifNotPredicate,
<a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a><A1,?,?> action,
A1 arg1)</code>
<div class="block"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIfNot-T-co.aikar.taskchain.TaskChainAbortAction-A1-A2-A3-"><code>TaskChain.abortIfNot(Object, TaskChainAbortAction, Object, Object, Object)</code></a></div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><A1,A2> <a href="../../../../co/aikar/taskchain/TaskChain.html" title="class in co.aikar.taskchain">TaskChain</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">TaskChain.</span><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIfNot-java.util.function.Predicate-co.aikar.taskchain.TaskChainAbortAction-A1-A2-">abortIfNot</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html?is-external=true" title="class or interface in java.util.function">Predicate</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>> ifNotPredicate,
<a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a><A1,A2,?> action,
A1 arg1,
A2 arg2)</code>
<div class="block"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIfNot-T-co.aikar.taskchain.TaskChainAbortAction-A1-A2-A3-"><code>TaskChain.abortIfNot(Object, TaskChainAbortAction, Object, Object, Object)</code></a></div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><A1,A2,A3> <a href="../../../../co/aikar/taskchain/TaskChain.html" title="class in co.aikar.taskchain">TaskChain</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">TaskChain.</span><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIfNot-java.util.function.Predicate-co.aikar.taskchain.TaskChainAbortAction-A1-A2-A3-">abortIfNot</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html?is-external=true" title="class or interface in java.util.function">Predicate</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>> ifNotPredicate,
<a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a><A1,A2,A3> action,
A1 arg1,
A2 arg2,
A3 arg3)</code>
<div class="block">Checks if the previous task return does NOT match the supplied predicate, and aborts if it does not match.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../co/aikar/taskchain/TaskChain.html" title="class in co.aikar.taskchain">TaskChain</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">TaskChain.</span><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIfNot-T-co.aikar.taskchain.TaskChainAbortAction-">abortIfNot</a></span>(<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a> ifNotObj,
<a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a><?,?,?> action)</code>
<div class="block"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIfNot-T-co.aikar.taskchain.TaskChainAbortAction-A1-A2-A3-"><code>TaskChain.abortIfNot(Object, TaskChainAbortAction, Object, Object, Object)</code></a></div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><A1> <a href="../../../../co/aikar/taskchain/TaskChain.html" title="class in co.aikar.taskchain">TaskChain</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">TaskChain.</span><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIfNot-T-co.aikar.taskchain.TaskChainAbortAction-A1-">abortIfNot</a></span>(<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a> ifNotObj,
<a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a><A1,?,?> action,
A1 arg1)</code>
<div class="block"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIfNot-T-co.aikar.taskchain.TaskChainAbortAction-A1-A2-A3-"><code>TaskChain.abortIfNot(Object, TaskChainAbortAction, Object, Object, Object)</code></a></div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><A1,A2> <a href="../../../../co/aikar/taskchain/TaskChain.html" title="class in co.aikar.taskchain">TaskChain</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">TaskChain.</span><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIfNot-T-co.aikar.taskchain.TaskChainAbortAction-A1-A2-">abortIfNot</a></span>(<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a> ifNotObj,
<a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a><A1,A2,?> action,
A1 arg1,
A2 arg2)</code>
<div class="block"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIfNot-T-co.aikar.taskchain.TaskChainAbortAction-A1-A2-A3-"><code>TaskChain.abortIfNot(Object, TaskChainAbortAction, Object, Object, Object)</code></a></div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><A1,A2,A3> <a href="../../../../co/aikar/taskchain/TaskChain.html" title="class in co.aikar.taskchain">TaskChain</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">TaskChain.</span><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIfNot-T-co.aikar.taskchain.TaskChainAbortAction-A1-A2-A3-">abortIfNot</a></span>(<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a> ifNotObj,
<a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a><A1,A2,A3> action,
A1 arg1,
A2 arg2,
A3 arg3)</code>
<div class="block"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIfNot-java.util.function.Predicate-co.aikar.taskchain.TaskChainAbortAction-A1-A2-A3-"><code>TaskChain.abortIfNot(Predicate, TaskChainAbortAction, Object, Object, Object)</code></a></div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../co/aikar/taskchain/TaskChain.html" title="class in co.aikar.taskchain">TaskChain</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">TaskChain.</span><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIfNull-co.aikar.taskchain.TaskChainAbortAction-">abortIfNull</a></span>(<a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a><?,?,?> action)</code>
<div class="block"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIf-T-co.aikar.taskchain.TaskChainAbortAction-A1-A2-A3-"><code>TaskChain.abortIf(Object, TaskChainAbortAction, Object, Object, Object)</code></a></div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><A1> <a href="../../../../co/aikar/taskchain/TaskChain.html" title="class in co.aikar.taskchain">TaskChain</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">TaskChain.</span><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIfNull-co.aikar.taskchain.TaskChainAbortAction-A1-">abortIfNull</a></span>(<a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a><A1,?,?> action,
A1 arg1)</code>
<div class="block"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIf-T-co.aikar.taskchain.TaskChainAbortAction-A1-A2-A3-"><code>TaskChain.abortIf(Object, TaskChainAbortAction, Object, Object, Object)</code></a></div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><A1,A2> <a href="../../../../co/aikar/taskchain/TaskChain.html" title="class in co.aikar.taskchain">TaskChain</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">TaskChain.</span><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIfNull-co.aikar.taskchain.TaskChainAbortAction-A1-A2-">abortIfNull</a></span>(<a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a><A1,A2,?> action,
A1 arg1,
A2 arg2)</code>
<div class="block"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIf-T-co.aikar.taskchain.TaskChainAbortAction-A1-A2-A3-"><code>TaskChain.abortIf(Object, TaskChainAbortAction, Object, Object, Object)</code></a></div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><A1,A2,A3> <a href="../../../../co/aikar/taskchain/TaskChain.html" title="class in co.aikar.taskchain">TaskChain</a><<a href="../../../../co/aikar/taskchain/TaskChain.html" title="type parameter in TaskChain">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">TaskChain.</span><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChain.html#abortIfNull-co.aikar.taskchain.TaskChainAbortAction-A1-A2-A3-">abortIfNull</a></span>(<a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">TaskChainAbortAction</a><A1,A2,A3> action,
A1 arg1,
A2 arg2,
A3 arg3)</code>
<div class="block">Checks if the previous task return was null, and aborts if it was
Then executes supplied action handler
If not null, the previous task return will forward to the next task.</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../co/aikar/taskchain/package-summary.html">Package</a></li>
<li><a href="../../../../co/aikar/taskchain/TaskChainAbortAction.html" title="interface in co.aikar.taskchain">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?co/aikar/taskchain/class-use/TaskChainAbortAction.html" target="_top">Frames</a></li>
<li><a href="TaskChainAbortAction.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright © 2018. All rights reserved.</small></p>
</body>
</html>
| aikar/TaskChain | docs/co/aikar/taskchain/class-use/TaskChainAbortAction.html | HTML | mit | 29,239 |
package p04_recharge.contracts;
public interface Rechargeable {
void recharge();
}
| ivelin1936/Studing-SoftUni- | Java Fundamentals/Java OOP Advanced/Lab SOLID - ISP and DIP/src/main/java/p04_recharge/contracts/Rechargeable.java | Java | mit | 89 |
---
layout: post
title: 使用meld作为git的辅助工具
categories: [git, meld]
description: meld git
keywords: meld, git
---
_`meld`的使用说明可以搜到很多,但是其中说法有所差别。特此重新撰写一份,使用的meld版本为3.16.0_
## 为什么使用meld
当同一个文件被多人编辑时,经常会出现冲突的问题,因此就需要解决冲突。
但是git内置的diff、merge工具比较孱弱,经常会发生一些问题,例如
#### 删除的代码被人合并时又加了回来
删除的代码被人合并时又加了回来,我想这种场景使用git的团队都遇见过。如果出现这种问题时,
解决冲突的人又是一个粗心的家伙,同时代码有没编译出错,则很难再发现产生了这个异常。只有
当bug再次出现时,才会发现“这个bug我明明修复了,怎么代码又回滚了?”。
下面详细说明一下这个问题出现的原因。
当git上原始代码为:
```
conflict begin
Hello world!!!
Here is a misuse code.
conflict end
```
当用户A、B同时下载该代码同时开发时。
用户A发现了一个bug,将bug移除,提交代码,代码变更为:
```
conflict begin
Hello world!!!
conflict end
```
同时用户B添加了一个新的功能,代码变更为:
```
conflict begin
Hello world!!!
Here is a misuse code.
Here is a new feature.
conflict end
```
然后B提交代码时会产生一个冲突,需要解决,则git默认的merge工具则显示冲突代码为:
```
conflict begin
Hello world!!!
<<<<<<< HEAD
Here is a misuse code.
Here is a new feature.
=======
>>>>>>> e84872b222b7a9d8a3e8745ea3c9a3e85237503c
conflict end
```
然而用户B可能对git的merge显示并不熟悉、或者B是一个粗心的人。此时用户B看到`<<<<<<<`
和`=======`之间是自己本地提交的新功能代码,则B将merge合并提示信息删除后,代码变为:
```
conflict begin
Hello world!!!
Here is a misuse code.
Here is a new feature.
conflict end
```
然后B将代码提交,此时可见,被删除的bug代码又回来了,如果此时没有人专门review代码,
大家并没有感觉到上面不对,只有在再次出现bug时才会发现该问题。
## 三路合并工具
最容易避免以上问题出现的方式就是采用三路合并工具。场景的三路合并工具有`kdiff3`、
`meld`、`Beyond Compare`等。在此推荐`meld`,该工具具有良好的跨平台能力,无论你使用
`Window x`/`Linux`/`Mac OS`都可以很容易的一键安装该软件,同时免费使用,而且启动速度
快于`Beyond Compare`等等收费软件。
#### mac 安装 meld
执行以下命令一键安装
```
brew install caskroom/cask/meld
```
#### git 配置
修改本地的`~/.gitconfig`配置文件,加入以下几行配置
```
[merge]
tool = meld
conflictstyle = diff3
[mergetool "meld"]
cmd = meld $LOCAL $BASE $REMOTE --output=$MERGED --auto-merge
```
当用户运行`git pull`或者`git pull --rebase`产生冲突时,执行`git mergetool`就会弹出`meld`
的三路合并界面:

可见界面一共分为3栏,左边一栏为你本地当前文件内容,右面一栏为远端服务器上当前文件内容。
中一栏为本地当前文件原始内容。可见中间一栏meld已经帮你自动合并了,检查无误就可以直接保存
退出了。然后meld帮你自动保存了一份git原始冲突文件`xxx.orig`,检查无误可以删除此文件。
注:当不同行冲突时,meld会帮你自动合并,当同一行冲突时,meld会以git 冲突文件的格式显示在
中间栏,此时你比较判断`<<<<<<< HEAD`/`=========`/`>>>>>>>>`3行直接的差异手动合并即可。
| lrita/lrita.github.io | _posts/2017-05-14-use-meld-as-git-tool.md | Markdown | mit | 3,763 |
/**
* @jsx React.DOM
* @copyright Prometheus Research, LLC 2014
*/
"use strict";
var React = require('react/addons');
var PropTypes = React.PropTypes;
var Header = require('./Header');
var Viewport = require('./Viewport');
var ColumnMetrics = require('./ColumnMetrics');
var DOMMetrics = require('./DOMMetrics');
var GridScrollMixin = {
componentDidMount() {
this._scrollLeft = this.refs.viewport.getScroll().scrollLeft;
this._onScroll();
},
componentDidUpdate() {
this._onScroll();
},
componentWillMount() {
this._scrollLeft = undefined;
},
componentWillUnmount() {
this._scrollLeft = undefined;
},
onScroll({scrollLeft}) {
if (this._scrollLeft !== scrollLeft) {
this._scrollLeft = scrollLeft;
this._onScroll();
}
},
_onScroll() {
if (this._scrollLeft !== undefined) {
this.refs.header.setScrollLeft(this._scrollLeft);
this.refs.viewport.setScrollLeft(this._scrollLeft);
}
}
};
var Grid = React.createClass({
mixins: [
GridScrollMixin,
ColumnMetrics.Mixin,
DOMMetrics.MetricsComputatorMixin
],
propTypes: {
rows: PropTypes.oneOfType([PropTypes.array, PropTypes.func]).isRequired,
columns: PropTypes.array.isRequired
},
getStyle: function(){
return{
overflowX: 'scroll',
overflowY: 'hidden',
outline: 0,
position: 'relative',
minHeight: this.props.minHeight
}
},
render() {
var headerRows = this.props.headerRows || [{ref : 'row'}];
return (
<div {...this.props} style={this.getStyle()} className="react-grid-Grid">
<Header
ref="header"
columns={this.state.columns}
onColumnResize={this.onColumnResize}
height={this.props.rowHeight}
totalWidth={this.DOMMetrics.gridWidth()}
headerRows={headerRows}
/>
<Viewport
ref="viewport"
width={this.state.columns.width}
rowHeight={this.props.rowHeight}
rowRenderer={this.props.rowRenderer}
cellRenderer={this.props.cellRenderer}
rows={this.props.rows}
selectedRows={this.props.selectedRows}
expandedRows={this.props.expandedRows}
length={this.props.length}
columns={this.state.columns}
totalWidth={this.DOMMetrics.gridWidth()}
onScroll={this.onScroll}
onRows={this.props.onRows}
rowOffsetHeight={this.props.rowOffsetHeight || this.props.rowHeight * headerRows.length}
/>
</div>
);
},
getDefaultProps() {
return {
rowHeight: 35,
minHeight: 350
};
},
});
module.exports = Grid;
| adazzle/react-grid | src/Grid.js | JavaScript | mit | 2,744 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>elpi: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.7.1 / elpi - 1.3.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
elpi
<small>
1.3.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2021-12-11 23:07:18 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-11 23:07:18 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
camlp5 7.14 Preprocessor-pretty-printer of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 1 Virtual package relying on perl
coq 8.7.1 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.07.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.07.1 Official release 4.07.1
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Enrico Tassi <enrico.tassi@inria.fr>"
authors: [ "Enrico Tassi" ]
license: "LGPL-2.1-or-later"
homepage: "https://github.com/LPCIC/coq-elpi"
bug-reports: "https://github.com/LPCIC/coq-elpi/issues"
dev-repo: "git+https://github.com/LPCIC/coq-elpi"
build: [ make "COQBIN=%{bin}%/" "ELPIDIR=%{prefix}%/lib/elpi" ]
install: [ make "install" "COQBIN=%{bin}%/" "ELPIDIR=%{prefix}%/lib/elpi" ]
depends: [
"elpi" {>= "1.10.2" & < "1.11.0~"}
"coq" {>= "8.10" & < "8.11~"}
]
synopsis: "Elpi extension language for Coq"
description: """
Coq-elpi provides a Coq plugin that embeds ELPI.
It also provides a way to embed Coq's terms into λProlog using
the Higher-Order Abstract Syntax approach
and a way to read terms back. In addition to that it exports to ELPI a
set of Coq's primitives, e.g. printing a message, accessing the
environment of theorems and data types, defining a new constant and so on.
For convenience it also provides a quotation and anti-quotation for Coq's
syntax in λProlog. E.g. `{{nat}}` is expanded to the type name of natural
numbers, or `{{A -> B}}` to the representation of a product by unfolding
the `->` notation. Finally it provides a way to define new vernacular commands
and new tactics."""
url {
src: "https://github.com/LPCIC/coq-elpi/archive/v1.3.0.tar.gz"
checksum: "sha256=d93545398683231159c1466456ba9d9920fb3ceaecf80c49827be11816762581"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-elpi.1.3.0 coq.8.7.1</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.7.1).
The following dependencies couldn't be met:
- coq-elpi -> coq >= 8.10
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-elpi.1.3.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
| coq-bench/coq-bench.github.io | clean/Linux-x86_64-4.07.1-2.0.6/released/8.7.1/elpi/1.3.0.html | HTML | mit | 7,364 |
import './turn-order-a2314c0f.js';
import 'redux';
import 'immer';
import './reducer-4d135cbd.js';
import './Debug-1ad6801e.js';
import 'flatted';
import './ai-ce6b7ece.js';
import './initialize-ec2b5846.js';
export { C as Client } from './client-abd9e531.js';
| cdnjs/cdnjs | ajax/libs/boardgame-io/0.39.12/esm/client.js | JavaScript | mit | 261 |
'use strict';
angular.module('shoprApp')
.controller('BookrCtrl', function ($scope, localStorageService, Auth, $http, $routeParams, $location) {
$scope.Auth = Auth;
//$scope.books = Auth.getCurrentUser().books;
$scope.mySubs = Auth.getCurrentUser().books;
function getById(books, id) {
for(var b in books) {
if(books[b]._id === id)
return books[b];
}
}
function loadMore(book) {
var page = book.recent[book.recent.length-book.pageIndex-1];
if(page && !page.src) {
$http.get('/api/pages/'+book._id+'/'+page.issue).success(function(fullPage) {
for(var k in fullPage[0]) page[k]=fullPage[0][k];
setTimeout(function(){ $scope.$digest(); }, 500);
});
}
var forward = book.recent[book.recent.length-book.pageIndex];
if(forward && !forward.src) {
$http.get('/api/pages/'+book._id+'/'+forward.issue).success(function(fullPage) {
for(var k in fullPage[0]) forward[k]=fullPage[0][k];
setTimeout(function(){ $scope.$digest(); }, 500);
});
}
var back = book.recent[book.recent.length-book.pageIndex-2];
if(back && !back.src) {
$http.get('/api/pages/'+book._id+'/'+back.issue).success(function(fullPage) {
for(var k in fullPage[0]) back[k]=fullPage[0][k];
setTimeout(function(){ $scope.$digest(); }, 500);
});
}
}
function init(book, pageIndex) {
book.pageIndex = pageIndex;
$scope.$watch(function(){ return this.pageIndex; }.bind(book), function(newValue, oldValue){
console.log(this);
loadMore(this);
// $location.path('/bookr/'+this._id+'/'+this.pageIndex, false);
var elm = $('book[ng-id="'+this._id+'"]')[0];
elm && $('html, body').animate({ scrollTop: elm.offsetTop }, 450);
}.bind(book));
$scope.books.push(book);
}
function pad(books) {
for(var b in books) {
var book = books[b];
console.log(book);
var recentLength = book.recent.length;
for(var i = 0; i < book.count-recentLength; i++)
book.recent.push({_id:book._id+'_'+(book.count-(recentLength+1)-i), issue:book.count-(recentLength+1)-i});
console.log(book);
}
}
var books = [$routeParams];
$scope.books = [];
for(var b in books) {
var book = getById($scope.mySubs, books[b].book);
if(!book) {
var page = books[b].page;
$http.get('/api/books/'+books[b].book).success(function(book){
pad([book]);
console.log(book);
$scope.mySubs.push(book);
init(book, page);
console.log('wtf?');
});
continue;
}
init(book, parseInt(books[b].page));
}
});
| samsface/reads | client/app/bookr/bookr.controller.js | JavaScript | mit | 2,642 |
package com.voxelgameslib.voxelgameslib.util.utils;
import net.kyori.text.Component;
import net.kyori.text.TextComponent;
import net.kyori.text.format.TextColor;
import net.kyori.text.serializer.ComponentSerializers;
import java.lang.reflect.Method;
import java.util.logging.Logger;
import javax.annotation.Nonnull;
import com.voxelgameslib.voxelgameslib.components.chat.ChatChannel;
import com.voxelgameslib.voxelgameslib.components.user.GamePlayer;
import org.bukkit.Bukkit;
/**
* Small util for chat related stuff
*/
public class ChatUtil {
private static final Logger log = Logger.getLogger(ChatUtil.class.getName());
private static String NMS_PREFIX = Bukkit.getServer().getClass().getPackage().getName()
.replace("org.bukkit.craftbukkit", "net.minecraft.server").concat(".");
private static final Method CRAFTPLAYER_GETHANDLE_METHOD;
private static final Method CHATSERIALIZER_A_METHOD;
private static final Method ENTITYPLAYER_SENDMESSAGE_METHOD;
static {
try {
CRAFTPLAYER_GETHANDLE_METHOD = Class.forName(
Bukkit.getServer().getClass().getPackage().getName().concat(".entity.CraftPlayer"))
.getDeclaredMethod("getHandle");
CHATSERIALIZER_A_METHOD = Class
.forName(NMS_PREFIX.concat("IChatBaseComponent$ChatSerializer"))
.getDeclaredMethod("a", String.class);
ENTITYPLAYER_SENDMESSAGE_METHOD = Class.forName(NMS_PREFIX.concat("EntityPlayer"))
.getDeclaredMethod("sendMessage", Class.forName(NMS_PREFIX.concat("IChatBaseComponent")));
} catch (final Exception e) {
throw new RuntimeException(e);
}
}
/**
* Serialises a array of base components into a single string (by calling #toPlainText on them)
*
* @param comps the base components to serialize into text
* @return the readable text
*/
@Nonnull
public static String toPlainText(@Nonnull Component... comps) {
StringBuilder sb = new StringBuilder();
for (Component comp : comps) {
toPlainText(sb, comp);
}
return sb.toString();
}
private static void toPlainText(@Nonnull StringBuilder sb, @Nonnull Component component) {
if (component instanceof TextComponent) {
sb.append(((TextComponent) component).content());
}
if (component.children() != null && component.children().size() > 0) {
component.children().forEach(c -> toPlainText(sb, c));
}
}
/**
* Sends the message to the user
*
* @param gameUser the user that should get the message
* @param message the message to send to the user
*/
public static void sendMessage(@Nonnull GamePlayer gameUser, @Nonnull Component message) {
try {
ENTITYPLAYER_SENDMESSAGE_METHOD.invoke(CRAFTPLAYER_GETHANDLE_METHOD.invoke(gameUser.getPlayer()),
CHATSERIALIZER_A_METHOD.invoke(null, ComponentSerializers.JSON.serialize(message)));
} catch (Exception e) {
throw new RuntimeException("wut", e);
}
}
@Nonnull
public static Component formatChannelMessage(@Nonnull ChatChannel channel, @Nonnull Component displayName, @Nonnull Component message) {
Component prefix = TextComponent.of("");
if (channel.getPrefix() != null) {
prefix.append(channel.getPrefix());
}
return TextComponent.of("")
.append(prefix)
.append(displayName)
.append(TextComponent.of(": ").color(TextColor.WHITE))
.append(message);
}
}
| VoxelGamesLib/VoxelGamesLibv2 | VoxelGamesLib/src/main/java/com/voxelgameslib/voxelgameslib/util/utils/ChatUtil.java | Java | mit | 3,700 |
import { Injectable } from '@angular/core';
import { Http, Response } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/concat';
import 'rxjs/add/operator/map';
import { SearchHelper } from '../helpers/search.helper';
import { Student } from '../models/student.model';
@Injectable()
export class SearchService {
constructor(private http: Http) {}
getInformation(): Observable<Array<Student>> {
const request = this.http.get('https://search.pclub.in/api/students')
.map((res: Response) => {
function compare(a: Student, b: Student) {
if (a.i < b.i) {
return -1;
}
if (a.i > b.i) {
return 1;
}
return 0;
}
const students = res.json() as Array<Student>;
const sorted = students.sort(compare);
localStorage.setItem('search-data', JSON.stringify(sorted));
return sorted;
});
if (localStorage.getItem('search-data')) {
const students = JSON.parse(localStorage.getItem('search-data')) as Array<Student>;
return Observable.of(students).concat(request);
} else {
return request;
}
}
getResults(students: Array<Student>, term: string, year?: Array<string>, gender?: string,
hall?: Array<string>, prog?: Array<string>, dep?: Array<string>,
grp?: Array<string>, hometown ?: string): Array<Student> {
const escape = (s: string) => {
return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
};
const filter = (elem: Student): Boolean => {
if (!(year === null || year.length === 0)) {
if (!year.includes(SearchHelper.ParseYear(elem.i))) {
return false;
}
}
if (!(gender === null || gender === 'Any')) {
if (elem.g !== gender) {
return false;
}
}
if (!(hall === null || hall.length === 0)) {
if (!hall.includes(elem.h)) {
return false;
}
}
if (!(prog === null || prog.length === 0)) {
if (!prog.includes(elem.p)) {
return false;
}
}
if (!(dep === null || dep.length === 0)) {
if (!(dep.includes(SearchHelper.ParseBranch(elem.d)))) {
return false;
}
}
if (!(grp === null || grp.length === 0)) {
if (!grp.includes(elem.b)) {
return false;
}
}
if (!(hometown === null || hometown === '')) {
const addregex = new RegExp(hometown, 'i');
if (!addregex.test(elem.a)) {
return false;
}
}
if (!(term === null || term === '')) {
const termregex = new RegExp(escape(term).replace(/\s+/g, ' '), 'i');
return (termregex.test(elem.i) || termregex.test(elem.u) || termregex.test(elem.n.replace(/\s+/g, ' ')));
}
return true;
};
// Use forloop instead of filter
// see https://jsperf.com/javascript-filter-vs-loop
// return students.filter(filter);
const resultArray = [];
for (let i = 0; i < students.length; i++) {
const student = students[i];
if (filter(student)) {
resultArray.push(student);
}
}
return resultArray;
}
}
| yashsriv/student-search-1 | frontend/src/app/services/search.service.ts | TypeScript | mit | 3,241 |
'use strict';
var express = require("express");
var http = require("http");
var app = express();
var httpServer = http.Server(app);
var io = require('socket.io')(httpServer);
// Users array.
var users = [];
// Channels pre-defined array.
var channels = [
'Angular',
'React',
'Laravel',
'Symfony'
];
// Start http server.
httpServer.listen(3000, function () {
});
// Use static files 'app' folder for '/' path.
app.use(express.static(__dirname + '/app/'));
// Channels endpoint.
app.get('/channels', function (req, res) {
res.send(channels);
});
// On connection event.
io.on('connection', function (socket) {
// Join event.
socket.on('join', function (data) {
// Join socket to channel.
socket.join(data.channel);
// Add user to users lists.
users.push({id: socket.id, name: data.user});
// Bind username to socket object.
socket.username = data.user;
// If socket already exists in a channel, leave.
if (typeof socket.channel != 'undefined') {
socket.leave(socket.channel);
}
// Bind channel to socket.
socket.channel = data.channel;
});
// Message event.
socket.on('message', function (data) {
// Send to selected channel user's message.
io.sockets.in(data.channel).emit('message', {message: data.message, user: data.username});
});
// Private message event.
socket.on('private', function (data) {
// Split message to take receiver name.
var message = data.message.split(" ");
// Get username from message array.
var to_user = message[0].slice(1);
// Filter users to find user's socket id and send message.
users.filter(function (user) {
if (user.name == to_user) {
// Format message.
var private_message = "(private) " + data.message.slice(to_user.length + 2);
// Send message to user who sent the message.
io.sockets.connected[socket.id].emit('message', {message: private_message, user: "me -> " + to_user});
// Send message to receiver.
io.sockets.connected[user.id].emit('message', {message: private_message, user: data.username});
}
});
});
// Disconnect event.
socket.on('disconnect', function () {
// Check if user joined any room and clean users array.
users = users.filter(function (user) {
if (user.id == socket.id) {
return false;
}
return true
});
});
});
| tkorakas/chat-application | server/index.js | JavaScript | mit | 2,630 |
namespace Nethereum.Generator.Console.Generation
{
public interface ICodeGenerationWrapper
{
void FromAbi(string contractName, string abiFilePath, string binFilePath, string baseNamespace, string outputFolder, bool singleFile);
void FromProject(string projectPath, string assemblyName);
void FromTruffle(string inputDirectory, string baseNamespace, string outputFolder, bool singleFile);
}
} | Nethereum/Nethereum | generators/Nethereum.Generator.Console/Generation/ICodeGenerationWrapper.cs | C# | mit | 430 |
# Hugofy
## Intro
Hugofy is a plugin for Sublime Text 3 to make life easier to use [Hugo static site generator](http://gohugo.io)
## Features
* Create new site
* Create new content
* Download themes
* Start Hugo server
## Installation
* Download this repo as zip and extract it in ```Prefrences > Browse Packages``` Directory
* Use [Package control](https://packagecontrol.io/installation)
## Usage
Use command pallete ```Ctrl+Shift+P``` and type Hugofy

Feel free to request a new feature or send a pull request.
| akmittal/Hugofy | README.md | Markdown | mit | 562 |
<div class="commune_descr limited">
<p>
Matzenheim est
une commune localisée dans le département de Bas-Rhin en Alsace. On dénombrait 1 377 habitants en 2008.</p>
<p>À Matzenheim, la valorisation moyenne à la vente d'un appartement s'évalue à 2 122 € du m² en vente. La valeur moyenne d'une maison à l'achat se situe à 2 741 € du m². À la location le prix moyen se situe à 10,89 € du m² mensuel.</p>
<p>À coté de Matzenheim sont positionnées géographiquement les villes de
<a href="{{VLROOT}}/immobilier/sand_67433/">Sand</a> localisée à 1 km, 1 137 habitants,
<a href="{{VLROOT}}/immobilier/erstein_67130/">Erstein</a> à 4 km, 9 592 habitants,
<a href="{{VLROOT}}/immobilier/uttenheim_67501/">Uttenheim</a> localisée à 2 km, 572 habitants,
<a href="{{VLROOT}}/immobilier/benfeld_67028/">Benfeld</a> située à 3 km, 5 260 habitants,
<a href="{{VLROOT}}/immobilier/kertzfeld_67233/">Kertzfeld</a> à 4 km, 1 277 habitants,
<a href="{{VLROOT}}/immobilier/herbsheim_67192/">Herbsheim</a> localisée à 5 km, 793 habitants,
entre autres. De plus, Matzenheim est située à seulement 22 km de <a href="{{VLROOT}}/immobilier/strasbourg_67482/">Strasbourg</a>.</p>
<p>
La commune est équipée concernant l'éducation des jeunes de un collège.
Pour les très jeunes, la ville peut se prévaloir de disposer de une maternelle et deux écoles primaires.
Matzenheim propose les équipements éducatifs facilitant une bonne prise en charge des jeunes.
Lors d'un projet immobilier à Matzenheim, vous devrez impérativement évaluer la qualité des écoles de la communes</p>
<p>Le nombre d'habitations, à Matzenheim, se décomposait en 2011 en 92 appartements et 468 maisons soit
un marché plutôt équilibré.</p>
<p>La ville propose de multiples équipements, elle dispose, entre autres, de un terrain de tennis, deux terrains de sport et un équipement de roller/skate.</p>
</div>
| donaldinou/frontend | src/Viteloge/CoreBundle/Resources/descriptions/67285.html | HTML | mit | 1,997 |
<nav id="contents" class="navbar contents">
<nav class="nav flex-column">
<a href="#try" class="nav-link d-md-none" data-action="sidebar-nav" data-toggle="try">Try CoffeeScript</a>
<a href="#top" class="nav-link" data-action="sidebar-nav">Overview</a>
<a href="#coffeescript-2" class="nav-link" data-action="sidebar-nav">CoffeeScript 2</a>
<nav class="nav flex-column">
<a href="#whats-new-in-coffeescript-2" class="nav-link" data-action="sidebar-nav">What’s New in CoffeeScript 2</a>
<a href="#compatibility" class="nav-link" data-action="sidebar-nav">Compatibility</a>
</nav>
<a href="#installation" class="nav-link" data-action="sidebar-nav">Installation</a>
<a href="#usage" class="nav-link" data-action="sidebar-nav">Usage</a>
<nav class="nav flex-column">
<a href="#cli" class="nav-link" data-action="sidebar-nav">Command Line</a>
<a href="#nodejs-usage" class="nav-link" data-action="sidebar-nav">Node.js</a>
<a href="#transpilation" class="nav-link" data-action="sidebar-nav">Transpilation</a>
</nav>
<a href="#language" class="nav-link" data-action="sidebar-nav">Language Reference</a>
<nav class="nav flex-column">
<a href="#functions" class="nav-link" data-action="sidebar-nav">Functions</a>
<a href="#strings" class="nav-link" data-action="sidebar-nav">Strings</a>
<a href="#objects-and-arrays" class="nav-link" data-action="sidebar-nav">Objects and Arrays</a>
<a href="#comments" class="nav-link" data-action="sidebar-nav">Comments</a>
<a href="#lexical-scope" class="nav-link" data-action="sidebar-nav">Lexical Scoping and Variable Safety</a>
<a href="#conditionals" class="nav-link" data-action="sidebar-nav">If, Else, Unless, and Conditional Assignment</a>
<a href="#splats" class="nav-link" data-action="sidebar-nav">Splats, or Rest Parameters/Spread Syntax</a>
<a href="#loops" class="nav-link" data-action="sidebar-nav">Loops and Comprehensions</a>
<a href="#slices" class="nav-link" data-action="sidebar-nav">Array Slicing and Splicing</a>
<a href="#expressions" class="nav-link" data-action="sidebar-nav">Everything is an Expression</a>
<a href="#operators" class="nav-link" data-action="sidebar-nav">Operators and Aliases</a>
<a href="#existential-operator" class="nav-link" data-action="sidebar-nav">Existential Operator</a>
<a href="#destructuring" class="nav-link" data-action="sidebar-nav">Destructuring Assignment</a>
<a href="#chaining" class="nav-link" data-action="sidebar-nav">Chaining Function Calls</a>
<a href="#fat-arrow" class="nav-link" data-action="sidebar-nav">Bound (Fat Arrow) Functions</a>
<a href="#generators" class="nav-link" data-action="sidebar-nav">Generator Functions</a>
<a href="#async-functions" class="nav-link" data-action="sidebar-nav">Async Functions</a>
<a href="#classes" class="nav-link" data-action="sidebar-nav">Classes</a>
<a href="#prototypal-inheritance" class="nav-link" data-action="sidebar-nav">Prototypal Inheritance</a>
<a href="#switch" class="nav-link" data-action="sidebar-nav">Switch and Try/Catch</a>
<a href="#comparisons" class="nav-link" data-action="sidebar-nav">Chained Comparisons</a>
<a href="#regexes" class="nav-link" data-action="sidebar-nav">Block Regular Expressions</a>
<a href="#tagged-template-literals" class="nav-link" data-action="sidebar-nav">Tagged Template Literals</a>
<a href="#modules" class="nav-link" data-action="sidebar-nav">Modules</a>
<a href="#embedded" class="nav-link" data-action="sidebar-nav">Embedded JavaScript</a>
<a href="#jsx" class="nav-link" data-action="sidebar-nav">JSX</a>
</nav>
<a href="#type-annotations" class="nav-link" data-action="sidebar-nav">Type Annotations</a>
<a href="#literate" class="nav-link" data-action="sidebar-nav">Literate CoffeeScript</a>
<a href="#source-maps" class="nav-link" data-action="sidebar-nav">Source Maps</a>
<a href="#cake" class="nav-link" data-action="sidebar-nav">Cake, and Cakefiles</a>
<a href="#scripts" class="nav-link" data-action="sidebar-nav"><code>"text/coffeescript"</code> Script Tags</a>
<a href="test.html" class="nav-link" data-action="sidebar-nav">Browser-Based Tests</a>
<a href="#resources" class="nav-link" data-action="sidebar-nav">Resources</a>
<nav class="nav flex-column">
<a href="#books" class="nav-link" data-action="sidebar-nav">Books</a>
<a href="#screencasts" class="nav-link" data-action="sidebar-nav">Screencasts</a>
<a href="#examples" class="nav-link" data-action="sidebar-nav">Examples</a>
<a href="#chat" class="nav-link" data-action="sidebar-nav">Chat</a>
<a href="#annotated-source" class="nav-link" data-action="sidebar-nav">Annotated Source</a>
<a href="#contributing" class="nav-link" data-action="sidebar-nav">Contributing</a>
</nav>
<a href="https://github.com/jashkenas/coffeescript/" class="nav-item nav-link d-md-none" data-action="sidebar-nav">GitHub</a>
<a href="#unsupported" class="nav-link" data-action="sidebar-nav">Unsupported ECMAScript Features</a>
<nav class="nav flex-column">
<a href="#unsupported-let-const" class="nav-link" data-action="sidebar-nav"><code>let</code> and <code>const</code></a>
<a href="#unsupported-named-functions" class="nav-link" data-action="sidebar-nav">Named Functions and Function Declarations</a>
<a href="#unsupported-get-set" class="nav-link" data-action="sidebar-nav"><code>get</code> and <code>set</code> Shorthand Syntax</a>
</nav>
<a href="#breaking-changes" class="nav-link" data-action="sidebar-nav">Breaking Changes From 1.x</a>
<nav class="nav flex-column">
<a href="#breaking-change-fat-arrow" class="nav-link" data-action="sidebar-nav">Bound (Fat Arrow) Functions</a>
<a href="#breaking-changes-default-values" class="nav-link" data-action="sidebar-nav">Default Values</a>
<a href="#breaking-changes-bound-generator-functions" class="nav-link" data-action="sidebar-nav">Bound Generator Functions</a>
<a href="#breaking-changes-classes" class="nav-link" data-action="sidebar-nav">Classes</a>
<a href="#breaking-changes-super-this" class="nav-link" data-action="sidebar-nav"><code>super</code> and <code>this</code></a>
<a href="#breaking-changes-super-extends" class="nav-link" data-action="sidebar-nav"><code>super</code> and <code>extends</code></a>
<a href="#breaking-changes-jsx-and-the-less-than-and-greater-than-operators" class="nav-link" data-action="sidebar-nav">JSX and the <code><</code> and <code>></code> Operators</a>
<a href="#breaking-changes-literate-coffeescript" class="nav-link" data-action="sidebar-nav">Literate CoffeeScript Parsing</a>
<a href="#breaking-changes-argument-parsing-and-shebang-lines" class="nav-link" data-action="sidebar-nav">Argument Parsing and <code>#!</code> Lines</a>
</nav>
<a href="#changelog" class="nav-link" data-action="sidebar-nav">Changelog</a>
<a href="/v1/" class="nav-link" data-action="sidebar-nav">Version 1.x Documentation</a>
</nav>
</nav>
| jiangmiao/toffee-script | documentation/site/sidebar.html | HTML | mit | 7,279 |
# AutoSSH tunnels
## Install AutoSSH
Run ```apt install -y autossh```
## Configure AutoSSH
Add a host with command ```echo "-NL 12000:127.0.0.1:6379 ubuntu@192.168.1.10" >> /etc/autossh.hosts```
Copy config files [/etc/init/autossh.conf](https://github.com/Nexination/configuration-collection/raw/master/etc/init/autossh.conf) and [/etc/init/autossh_host.conf](https://github.com/Nexination/configuration-collection/raw/master/etc/init/autossh_host.conf) from this git to your server
Make sure and test if the tunnels work and are operating | Nexination/configuration-collection | linuxguides/AutoSshTunnels.md | Markdown | mit | 544 |
<!doctype html>
<html class="theme-next mist use-motion">
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link href="/vendors/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css"/>
<link href="//fonts.googleapis.com/css?family=Lato:300,400,700,400italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
<link href="/vendors/font-awesome/css/font-awesome.min.css?v=4.4.0" rel="stylesheet" type="text/css" />
<link href="/css/main.css?v=0.5.0" rel="stylesheet" type="text/css" />
<meta name="keywords" content="Hexo, NexT" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=0.5.0" />
<meta name="description" content="我不知道将去何方,但我已在路上。">
<meta property="og:type" content="website">
<meta property="og:title" content="TSpace">
<meta property="og:url" content="http://www.lshiyangnianhuax.com/page/17/index.html">
<meta property="og:site_name" content="TSpace">
<meta property="og:description" content="我不知道将去何方,但我已在路上。">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="TSpace">
<meta name="twitter:description" content="我不知道将去何方,但我已在路上。">
<script type="text/javascript" id="hexo.configuration">
var NexT = window.NexT || {};
var CONFIG = {
scheme: 'Mist',
sidebar: {"position":"left","display":"post"},
fancybox: true,
motion: true,
duoshuo: {
userId: 0,
author: '博主'
}
};
</script>
<title> TSpace </title>
</head>
<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">
<div class="container one-collumn sidebar-position-left
page-home
">
<div class="headband"></div>
<header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
<div class="header-inner"><div class="site-meta ">
<div class="custom-logo-site-title">
<a href="/" class="brand" rel="start">
<span class="logo-line-before"><i></i></span>
<span class="site-title">TSpace</span>
<span class="logo-line-after"><i></i></span>
</a>
</div>
<p class="site-subtitle"></p>
</div>
<div class="site-nav-toggle">
<button>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
</button>
</div>
<nav class="site-nav">
<ul id="menu" class="menu">
<li class="menu-item menu-item-home">
<a href="/" rel="section">
<i class="menu-item-icon fa fa-home fa-fw"></i> <br />
首页
</a>
</li>
<li class="menu-item menu-item-categories">
<a href="/categories" rel="section">
<i class="menu-item-icon fa fa-th fa-fw"></i> <br />
分类
</a>
</li>
<li class="menu-item menu-item-archives">
<a href="/archives" rel="section">
<i class="menu-item-icon fa fa-archive fa-fw"></i> <br />
归档
</a>
</li>
<li class="menu-item menu-item-tags">
<a href="/tags" rel="section">
<i class="menu-item-icon fa fa-tags fa-fw"></i> <br />
标签
</a>
</li>
</ul>
</nav>
</div>
</header>
<main id="main" class="main">
<div class="main-inner">
<div class="content-wrap">
<div id="content" class="content">
<section id="posts" class="posts-expand">
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/03/07/cp命令/" itemprop="url">
cp命令
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time itemprop="dateCreated" datetime="2017-03-07T12:13:40+08:00" content="2017-03-07">
2017-03-07
</time>
</span>
<span class="post-category" >
|
<span class="post-meta-item-icon">
<i class="fa fa-folder-o"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="https://schema.org/Thing">
<a href="/categories/Linux学习笔记/" itemprop="url" rel="index">
<span itemprop="name">Linux学习笔记</span>
</a>
</span>
</span>
<span class="post-comments-count">
|
<a href="/2017/03/07/cp命令/#comments" itemprop="discussionUrl">
<span class="post-comments-count ds-thread-count" data-thread-key="2017/03/07/cp命令/" itemprop="commentsCount"></span>
</a>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<ol>
<li><code>cp 文件 目标地址</code></li>
<li><code>cp -r 目录 目录地址</code></li>
<li><code>df -h</code>     查看当前分区情况
<div class="post-more-link text-center">
<a class="btn" href="/2017/03/07/cp命令/#more" rel="contents">
阅读全文 »
</a>
</div>
</div>
<div>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/03/07/fdisk命令/" itemprop="url">
fdisk命令
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time itemprop="dateCreated" datetime="2017-03-07T12:13:40+08:00" content="2017-03-07">
2017-03-07
</time>
</span>
<span class="post-category" >
|
<span class="post-meta-item-icon">
<i class="fa fa-folder-o"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="https://schema.org/Thing">
<a href="/categories/Linux学习笔记/" itemprop="url" rel="index">
<span itemprop="name">Linux学习笔记</span>
</a>
</span>
</span>
<span class="post-comments-count">
|
<a href="/2017/03/07/fdisk命令/#comments" itemprop="discussionUrl">
<span class="post-comments-count ds-thread-count" data-thread-key="2017/03/07/fdisk命令/" itemprop="commentsCount"></span>
</a>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<ol>
<li><code>fdisk -l</code>    查看目前电脑的磁盘分区状况</li>
<li><code>fdisk -l 磁盘名(完整设备名称 如:/dev/sda1)</code>     查看指定磁盘分区状况</li>
<li><code>fdisk 磁盘名</code>     进行分区 当磁盘大小大于2T时,fdisk 就没用了,就要用parted来进行分区
<div class="post-more-link text-center">
<a class="btn" href="/2017/03/07/fdisk命令/#more" rel="contents">
阅读全文 »
</a>
</div>
</div>
<div>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/03/07/chown命令/" itemprop="url">
chown命令
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time itemprop="dateCreated" datetime="2017-03-07T12:13:40+08:00" content="2017-03-07">
2017-03-07
</time>
</span>
<span class="post-category" >
|
<span class="post-meta-item-icon">
<i class="fa fa-folder-o"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="https://schema.org/Thing">
<a href="/categories/Linux学习笔记/" itemprop="url" rel="index">
<span itemprop="name">Linux学习笔记</span>
</a>
</span>
</span>
<span class="post-comments-count">
|
<a href="/2017/03/07/chown命令/#comments" itemprop="discussionUrl">
<span class="post-comments-count ds-thread-count" data-thread-key="2017/03/07/chown命令/" itemprop="commentsCount"></span>
</a>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<ol>
<li>chown命令,用来修改用户的属组和属主</li>
<li><code>chown 用户名 文件名</code>     修改所属主</li>
<li><code>chown :组名 文件名</code>     修改所属组<br>=<code>chown .组名 文件名</code></li>
<li><code>!ls</code>     表示命令历史里面,由下往上找,以ls开头的离我们最近的命令</li>
<li><code>!301</code>     表示命令历史里面,编号为301的命令</li>
<li><code>chown -R 目录</code>     表示该目录下的所有文件和目录都继承该目录的关于所属主和所属组以及其他人的修改
<div class="post-more-link text-center">
<a class="btn" href="/2017/03/07/chown命令/#more" rel="contents">
阅读全文 »
</a>
</div>
</div>
<div>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/03/07/chmod命令/" itemprop="url">
chmod命令
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time itemprop="dateCreated" datetime="2017-03-07T12:13:40+08:00" content="2017-03-07">
2017-03-07
</time>
</span>
<span class="post-category" >
|
<span class="post-meta-item-icon">
<i class="fa fa-folder-o"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="https://schema.org/Thing">
<a href="/categories/Linux学习笔记/" itemprop="url" rel="index">
<span itemprop="name">Linux学习笔记</span>
</a>
</span>
</span>
<span class="post-comments-count">
|
<a href="/2017/03/07/chmod命令/#comments" itemprop="discussionUrl">
<span class="post-comments-count ds-thread-count" data-thread-key="2017/03/07/chmod命令/" itemprop="commentsCount"></span>
</a>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<ol>
<li>chmod     用来更改用户权限 r-4 w-2 x-1</li>
<li><code>chmod u-所属主 g-所属组 o-其他人</code></li>
<li><code>chmod u,g,o +(r,w,x)文件名</code>     用来修改文件权限</li>
<li><code>chmod a +(r,w,x)文件名</code>     a表示对所有人</li>
<li><code>chmod -R 700 目录名</code>     -R表示对该目录下的所有文件和目录继承该目录的权限</li>
<li><code>umask</code>     用来规定新建文件和目录的默认权限<br>一般为0022,第一个0为默认特殊权限位,其余三位用来确定文件和目录的默认权限,所以,目录的默认计算为777-022=755<br>文件的默认权限计算为666-022=644</li>
<li>Linux 规定所有的目录都必须要有x权限,这样才能进入目录中</li>
<li><code>umask 011</code>     更改umask值为0011
<div class="post-more-link text-center">
<a class="btn" href="/2017/03/07/chmod命令/#more" rel="contents">
阅读全文 »
</a>
</div>
</div>
<div>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/03/07/C语言/" itemprop="url">
字符串操作
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time itemprop="dateCreated" datetime="2017-03-07T12:13:40+08:00" content="2017-03-07">
2017-03-07
</time>
</span>
<span class="post-category" >
|
<span class="post-meta-item-icon">
<i class="fa fa-folder-o"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="https://schema.org/Thing">
<a href="/categories/C语言/" itemprop="url" rel="index">
<span itemprop="name">C语言</span>
</a>
</span>
</span>
<span class="post-comments-count">
|
<a href="/2017/03/07/C语言/#comments" itemprop="discussionUrl">
<span class="post-comments-count ds-thread-count" data-thread-key="2017/03/07/C语言/" itemprop="commentsCount"></span>
</a>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h2 id="1-流和C语言"><a href="#1-流和C语言" class="headerlink" title="1.流和C语言"></a>1.流和C语言</h2><p>       无论什么设备,也不管它是用于输入还是输出,C语言都采用流的方式执行输入和输出操作。</p>
<h3 id="1-1-流"><a href="#1-1-流" class="headerlink" title="1.1 流"></a>1.1 流</h3><p>       流是一个字符序列。更准确的说,是一个数据字节序列。它分为两种:文本流和二进制流。<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">文本流:在流中处理的数据是以字符出现。在文本流中,<span class="string">'\n'</span>被转换成回车符CR和换行符LF的ASCII码0DH和0AH。而当输出时,0DH和0AH被转换成<span class="string">'\n'</span>。</div><div class="line"></div><div class="line">如:数字2001在文本流中的表示方法为<span class="string">'2'</span> <span class="string">'0'</span> <span class="string">'0'</span> <span class="string">'1'</span></div><div class="line"> ASCII 50 48 48 49</div></pre></td></tr></table></figure></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">二进制流:流中处理的数据是二进制序列,若流中有字符,则用一个字节的二进制ASCII码表示,若是数字,则用对应的二进制数表示,对<span class="string">'\n'</span>不进行转换 。</div><div class="line"></div><div class="line">如:数字2001在二进制流中表示方法为 00000111 11010001</div></pre></td></tr></table></figure>
<p>二进制流与文本流的区别:<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">在windows中,文本文件和二进制文件在处理回车换行符是是有区别的:文本方式写时,每遇到一个<span class="string">'\n'</span>换行符,将其转换成<span class="string">'\r\n'</span>回车换行,然后再写入文件;当文本读取时,它每遇到一个<span class="string">'\r\n'</span>回车换行,会将其反变化为<span class="string">'\n'</span>换行。而二进制文件没有这样的转换处理。</div><div class="line">总之,从编程角度来说,C中文本或二进制读写都是缓冲区与文件中二进制流的交互,只是windows中文本读写时有回车换行的转换。所以当缓冲区中无换行符<span class="string">'\n'</span>(0AH)时,文本写与二进制写的结果是一样的,同理,当文件中不存在<span class="string">'\r\n'</span>(0DH0AH)时,文本读与二进制读的结果一样。</div></pre></td></tr></table></figure></p>
<div class="post-more-link text-center">
<a class="btn" href="/2017/03/07/C语言/#more" rel="contents">
阅读全文 »
</a>
</div>
</div>
<div>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/03/07/find命令/" itemprop="url">
find命令
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time itemprop="dateCreated" datetime="2017-03-07T12:13:40+08:00" content="2017-03-07">
2017-03-07
</time>
</span>
<span class="post-category" >
|
<span class="post-meta-item-icon">
<i class="fa fa-folder-o"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="https://schema.org/Thing">
<a href="/categories/Linux学习笔记/" itemprop="url" rel="index">
<span itemprop="name">Linux学习笔记</span>
</a>
</span>
</span>
<span class="post-comments-count">
|
<a href="/2017/03/07/find命令/#comments" itemprop="discussionUrl">
<span class="post-comments-count ds-thread-count" data-thread-key="2017/03/07/find命令/" itemprop="commentsCount"></span>
</a>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<ol>
<li><code>which</code> 用于搜索命令 ,与PATH有关<br>还有个<code>whereis</code>命令,不常用,与某些目录有关</li>
<li><code>locate</code> 用来记录搜索的文件,目录的一个列表库,默认不存在,每天执行一个计划去生成这个库。可用<code>updatedb</code>去生成该库。该locate命令不会去搜索tmp/下的目录文件。</li>
<li><code>find文件路径 文件名</code> 如:<code>find /tmp/ -name '阿铭'</code>。</li>
<li><code>find /tmp/ -type f</code> 搜索文件<br><code>find /tmp/ -type d</code> 搜索目录 均按照文件格式进行搜索。
<div class="post-more-link text-center">
<a class="btn" href="/2017/03/07/find命令/#more" rel="contents">
阅读全文 »
</a>
</div>
</div>
<div>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/03/07/df命令/" itemprop="url">
df命令
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time itemprop="dateCreated" datetime="2017-03-07T12:13:40+08:00" content="2017-03-07">
2017-03-07
</time>
</span>
<span class="post-category" >
|
<span class="post-meta-item-icon">
<i class="fa fa-folder-o"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="https://schema.org/Thing">
<a href="/categories/Linux学习笔记/" itemprop="url" rel="index">
<span itemprop="name">Linux学习笔记</span>
</a>
</span>
</span>
<span class="post-comments-count">
|
<a href="/2017/03/07/df命令/#comments" itemprop="discussionUrl">
<span class="post-comments-count ds-thread-count" data-thread-key="2017/03/07/df命令/" itemprop="commentsCount"></span>
</a>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<ol>
<li><code>df</code>     查看分区及使用情况(以k为单位)。</li>
<li><code>free</code>      查看swap</li>
<li><code>df -h</code>     对使用情况以M,G等显示。</li>
<li><code>df -k</code>     对使用情况以k为单位显示</li>
<li><code>df -m</code>     对使用情况以M为单位显示</li>
<li><code>df -i</code>     查看inode的使用情况</li>
<li><code>df -T</code>     查看分区格式
<div class="post-more-link text-center">
<a class="btn" href="/2017/03/07/df命令/#more" rel="contents">
阅读全文 »
</a>
</div>
</div>
<div>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/03/07/Cut命令/" itemprop="url">
Cut命令
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time itemprop="dateCreated" datetime="2017-03-07T12:13:40+08:00" content="2017-03-07">
2017-03-07
</time>
</span>
<span class="post-category" >
|
<span class="post-meta-item-icon">
<i class="fa fa-folder-o"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="https://schema.org/Thing">
<a href="/categories/Linux学习笔记/" itemprop="url" rel="index">
<span itemprop="name">Linux学习笔记</span>
</a>
</span>
</span>
<span class="post-comments-count">
|
<a href="/2017/03/07/Cut命令/#comments" itemprop="discussionUrl">
<span class="post-comments-count ds-thread-count" data-thread-key="2017/03/07/Cut命令/" itemprop="commentsCount"></span>
</a>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<ol>
<li>作用:将一个文件分段<br>如比较有规律性的 /etc/passwd 文件<br>就可以使用 <code>cut -d: -f 3 /etc/passwd</code> 命令分段<br>-d:表示以:为分隔符将passwd文件分段<br>-f 3 表示取第三段进行显示<br><code>cut -d: -f 3,4,5 /etc/passwd</code> 表示将passwd文件以:为分隔符,并取其中的3,4,5段显示</li>
<li><code>cut -c 10 /etc/passwd</code> 表示截取第10个字符显示</li>
<li><code>cut -c 1-10 /etc/passwd</code> 表示截取第1-10个字符进行显示
<div class="post-more-link text-center">
<a class="btn" href="/2017/03/07/Cut命令/#more" rel="contents">
阅读全文 »
</a>
</div>
</div>
<div>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/03/07/Cron 计划任务/" itemprop="url">
Cron 计划任务
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time itemprop="dateCreated" datetime="2017-03-07T12:13:40+08:00" content="2017-03-07">
2017-03-07
</time>
</span>
<span class="post-category" >
|
<span class="post-meta-item-icon">
<i class="fa fa-folder-o"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="https://schema.org/Thing">
<a href="/categories/Linux学习笔记/" itemprop="url" rel="index">
<span itemprop="name">Linux学习笔记</span>
</a>
</span>
</span>
<span class="post-comments-count">
|
<a href="/2017/03/07/Cron 计划任务/#comments" itemprop="discussionUrl">
<span class="post-comments-count ds-thread-count" data-thread-key="2017/03/07/Cron 计划任务/" itemprop="commentsCount"></span>
</a>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<ol>
<li>进行一些类似于日志备份,文件切割等计划性任务。</li>
<li><code>crontab -l</code><br>查看当前用户的一些已经创建的计划任务</li>
<li>可以指定用户,用-u命令<br>如:crontab -u aming -l<br>查看用户aming下的一些任务计划</li>
<li><p>一个任务计划具体分为两部分:时间,命令<br>时间分为五段:第一段为分钟(0-59),第二段为小时(0-23),第三段为日(1-31),第四段为月(1-12),第五段为周(0-6或者1-7) </p>
<div class="post-more-link text-center">
<a class="btn" href="/2017/03/07/Cron 计划任务/#more" rel="contents">
阅读全文 »
</a>
</div>
</div>
<div>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/03/07/du命令/" itemprop="url">
du命令
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time itemprop="dateCreated" datetime="2017-03-07T12:13:40+08:00" content="2017-03-07">
2017-03-07
</time>
</span>
<span class="post-category" >
|
<span class="post-meta-item-icon">
<i class="fa fa-folder-o"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="https://schema.org/Thing">
<a href="/categories/Linux学习笔记/" itemprop="url" rel="index">
<span itemprop="name">Linux学习笔记</span>
</a>
</span>
</span>
<span class="post-comments-count">
|
<a href="/2017/03/07/du命令/#comments" itemprop="discussionUrl">
<span class="post-comments-count ds-thread-count" data-thread-key="2017/03/07/du命令/" itemprop="commentsCount"></span>
</a>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<ol>
<li><code>du 目录</code>     把该目录下所有文件和目录的大小都显示出来,单位为k,最后一行为总和</li>
<li><code>du -m 目录</code>     以M为单位显示,但并不精准</li>
<li><code>du -h 目录</code>     按文件大小以合适单位显示</li>
<li><code>du -sh 目录</code>     查看指定文件或目录的总大小</li>
<li><code>du -sh 文件/目录</code>      显示的是文件占磁盘空间的大小,不一定是文件真实大小(跟磁盘格式化时将磁盘分为块有关)</li>
<li><code>ls -lh</code>     查看文件真实大小
<div class="post-more-link text-center">
<a class="btn" href="/2017/03/07/du命令/#more" rel="contents">
阅读全文 »
</a>
</div>
</div>
<div>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</section>
<nav class="pagination">
<a class="extend prev" rel="prev" href="/page/16/"><i class="fa fa-angle-left"></i></a><a class="page-number" href="/">1</a><span class="space">…</span><a class="page-number" href="/page/16/">16</a><span class="page-number current">17</span><a class="page-number" href="/page/18/">18</a><a class="extend next" rel="next" href="/page/18/"><i class="fa fa-angle-right"></i></a>
</nav>
</div>
</div>
<div class="sidebar-toggle">
<div class="sidebar-toggle-line-wrap">
<span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
<span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
<span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
</div>
</div>
<aside id="sidebar" class="sidebar">
<div class="sidebar-inner">
<section class="site-overview sidebar-panel sidebar-panel-active ">
<div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
<img class="site-author-image" itemprop="image"
src="/images/1.png"
alt="TSpace" />
<p class="site-author-name" itemprop="name">TSpace</p>
<p class="site-description motion-element" itemprop="description">我不知道将去何方,但我已在路上。</p>
<p class="site-description motion-element" itemprop="description1">I do not know go where,but I have been on the road.</p>
</div>
<nav class="site-state motion-element">
<div class="site-state-item site-state-posts">
<a href="/archives">
<span class="site-state-item-count">175</span>
<span class="site-state-item-name">日志</span>
</a>
</div>
<div class="site-state-item site-state-categories">
<a href="/categories">
<span class="site-state-item-count">5</span>
<span class="site-state-item-name">分类</span>
</a>
</div>
<div class="site-state-item site-state-tags">
<a href="/tags">
<span class="site-state-item-count">26</span>
<span class="site-state-item-name">标签</span>
</a>
</div>
</nav>
<div class="links-of-author motion-element">
<span class="links-of-author-item">
<a href="http://github.com/shiyangnianhua" target="_blank">
<i class="fa fa-github"></i> GitHub
</a>
</span>
</div>
<div class="links-of-blogroll motion-element">
</div>
</section>
</div>
</aside>
</div>
</main>
<footer id="footer" class="footer">
<div class="footer-inner">
<div class="copyright" >
©
<span itemprop="copyrightYear">2017</span>
<span class="with-love">
<i class="fa fa-heart"></i>
</span>
<span class="author" itemprop="copyrightHolder">TSpace</span>
</div>
<!--
<div class="powered-by">
由 <a class="theme-link" href="http://hexo.io">Hexo</a> 强力驱动
</div>
<div class="theme-info">
主题 -
<a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
NexT.Mist
</a>
</div>
-->
</div>
</footer>
<div class="back-to-top">
<i class="fa fa-arrow-up"></i>
</div>
</div>
<script type="text/javascript">
if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
window.Promise = null;
}
</script>
<script type="text/javascript" src="/vendors/jquery/index.js?v=2.1.3"></script>
<script type="text/javascript" src="/vendors/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
<script type="text/javascript" src="/vendors/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
<script type="text/javascript" src="/vendors/velocity/velocity.min.js"></script>
<script type="text/javascript" src="/vendors/velocity/velocity.ui.min.js"></script>
<script type="text/javascript" src="/vendors/fancybox/source/jquery.fancybox.pack.js"></script>
<script type="text/javascript" src="/js/src/utils.js?v=0.5.0"></script>
<script type="text/javascript" src="/js/src/motion.js?v=0.5.0"></script>
<script type="text/javascript" src="/js/src/bootstrap.js?v=0.5.0"></script>
<script type="text/javascript">
var duoshuoQuery = {short_name:"spacem"};
(function() {
var ds = document.createElement('script');
ds.type = 'text/javascript';ds.async = true;
ds.id = 'duoshuo-script';
ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
ds.charset = 'UTF-8';
(document.getElementsByTagName('head')[0]
|| document.getElementsByTagName('body')[0]).appendChild(ds);
})();
</script>
</body>
</html>
| shiyangnianhua/shiyangnianhua.github.io | page/17/index.html | HTML | mit | 42,653 |
---
ID: 1502
post_title: >
Really Good Resource for Sorting
Algorithms
author: Shwuzzle
post_date: 2011-01-05 13:55:15
post_excerpt: ""
layout: post
published: true
aktt_notify_twitter:
- 'yes'
ratings_users:
- "0"
ratings_score:
- "0"
ratings_average:
- "0"
aktt_tweeted:
- "1"
---
This is something definitely worth sharing, very useful for anyone who wants to learn more about different sorting algorithms. If you want to learn more about different types of sorting this is the perfect place to start. It even has animations to show how different algorithms work and pseudo-code to help you get started with implementation!
Check out the site here: <a href="http://www.sorting-algorithms.com/">Sorting Algorithm Animations (sorting-algorithms.com)</a>
Here is an example of some of the sorting animations:
<a href="http://shwuzzle.com/wp-content/uploads/2011/01/Screen-shot-2011-01-05-at-12.53.18-PM.png"><img class="alignleft size-medium wp-image-1503" title="sorting algorithms" src="http://shwuzzle.com/wp-content/uploads/2011/01/Screen-shot-2011-01-05-at-12.53.18-PM-300x152.png" alt="" width="300" height="152" /></a>
| darkmuck/darkmuck.github.io | _posts/2011-01-05-really-good-resource-for-sorting-algorithms.md | Markdown | mit | 1,145 |
import globalize from 'globalize';
import configure from '../src/configure';
export default function testLocalizer() {
function getCulture(culture){
return culture ? globalize.findClosestCulture(culture) : globalize.culture()
}
function shortDay(dayOfTheWeek, culture) {
let names = getCulture(culture).calendar.days.namesShort;
return names[dayOfTheWeek.getDay()];
}
var date = {
formats: {
date: 'd',
time: 't',
default: 'f',
header: 'MMMM yyyy',
footer: 'D',
weekday: shortDay,
dayOfMonth: 'dd',
month: 'MMM',
year: 'yyyy',
decade: 'yyyy',
century: 'yyyy',
},
firstOfWeek(culture) {
culture = getCulture(culture)
return (culture && culture.calendar.firstDay) || 0
},
parse(value, format, culture){
return globalize.parseDate(value, format, culture)
},
format(value, format, culture){
return globalize.format(value, format, culture)
}
}
function formatData(format, _culture){
var culture = getCulture(_culture)
, numFormat = culture.numberFormat
if (typeof format === 'string') {
if (format.indexOf('p') !== -1) numFormat = numFormat.percent
if (format.indexOf('c') !== -1) numFormat = numFormat.curency
}
return numFormat
}
var number = {
formats: {
default: 'D'
},
parse(value, culture) {
return globalize.parseFloat(value, 10, culture)
},
format(value, format, culture){
return globalize.format(value, format, culture)
},
decimalChar(format, culture){
var data = formatData(format, culture)
return data['.'] || '.'
},
precision(format, _culture){
var data = formatData(format, _culture)
if (typeof format === 'string' && format.length > 1)
return parseFloat(format.substr(1))
return data ? data.decimals : null
}
}
configure.setLocalizers({ date, number })
}
| haneev/react-widgets | packages/react-widgets/test/test-localizer.js | JavaScript | mit | 1,970 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Kiwi.Time.Clock - Kiwi.js</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
<script src="http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
<div id="doc">
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="../assets/css/logo.png" title="Kiwi.js"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.4.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
<div class="yui3-u-1-4">
<div id="docs-sidebar" class="sidebar apidocs">
<div id="api-list">
<h2 class="off-left">APIs</h2>
<div id="api-tabview" class="tabview">
<ul class="tabs">
<li><a href="#api-classes">Classes</a></li>
<li><a href="#api-modules">Modules</a></li>
</ul>
<div id="api-tabview-filter">
<input type="search" id="api-filter" placeholder="Type to filter APIs">
</div>
<div id="api-tabview-panel">
<ul id="api-classes" class="apis classes">
<li><a href="../classes/Kiwi.Animations.Animation.html">Kiwi.Animations.Animation</a></li>
<li><a href="../classes/Kiwi.Animations.Sequence.html">Kiwi.Animations.Sequence</a></li>
<li><a href="../classes/Kiwi.Animations.Tween.html">Kiwi.Animations.Tween</a></li>
<li><a href="../classes/Kiwi.Animations.Tweens.Easing.Back.html">Kiwi.Animations.Tweens.Easing.Back</a></li>
<li><a href="../classes/Kiwi.Animations.Tweens.Easing.Bounce.html">Kiwi.Animations.Tweens.Easing.Bounce</a></li>
<li><a href="../classes/Kiwi.Animations.Tweens.Easing.Circular.html">Kiwi.Animations.Tweens.Easing.Circular</a></li>
<li><a href="../classes/Kiwi.Animations.Tweens.Easing.Cubic.html">Kiwi.Animations.Tweens.Easing.Cubic</a></li>
<li><a href="../classes/Kiwi.Animations.Tweens.Easing.Elastic.html">Kiwi.Animations.Tweens.Easing.Elastic</a></li>
<li><a href="../classes/Kiwi.Animations.Tweens.Easing.Exponential.html">Kiwi.Animations.Tweens.Easing.Exponential</a></li>
<li><a href="../classes/Kiwi.Animations.Tweens.Easing.Linear.html">Kiwi.Animations.Tweens.Easing.Linear</a></li>
<li><a href="../classes/Kiwi.Animations.Tweens.Easing.Quadratic.html">Kiwi.Animations.Tweens.Easing.Quadratic</a></li>
<li><a href="../classes/Kiwi.Animations.Tweens.Easing.Quartic.html">Kiwi.Animations.Tweens.Easing.Quartic</a></li>
<li><a href="../classes/Kiwi.Animations.Tweens.Easing.Quintic.html">Kiwi.Animations.Tweens.Easing.Quintic</a></li>
<li><a href="../classes/Kiwi.Animations.Tweens.Easing.Sinusoidal.html">Kiwi.Animations.Tweens.Easing.Sinusoidal</a></li>
<li><a href="../classes/Kiwi.Animations.Tweens.TweenManager.html">Kiwi.Animations.Tweens.TweenManager</a></li>
<li><a href="../classes/Kiwi.Camera.html">Kiwi.Camera</a></li>
<li><a href="../classes/Kiwi.CameraManager.html">Kiwi.CameraManager</a></li>
<li><a href="../classes/Kiwi.Component.html">Kiwi.Component</a></li>
<li><a href="../classes/Kiwi.ComponentManager.html">Kiwi.ComponentManager</a></li>
<li><a href="../classes/Kiwi.Components.AnimationManager.html">Kiwi.Components.AnimationManager</a></li>
<li><a href="../classes/Kiwi.Components.ArcadePhysics.html">Kiwi.Components.ArcadePhysics</a></li>
<li><a href="../classes/Kiwi.Components.Box.html">Kiwi.Components.Box</a></li>
<li><a href="../classes/Kiwi.Components.Input.html">Kiwi.Components.Input</a></li>
<li><a href="../classes/Kiwi.Components.Sound.html">Kiwi.Components.Sound</a></li>
<li><a href="../classes/Kiwi.Entity.html">Kiwi.Entity</a></li>
<li><a href="../classes/Kiwi.Files.AudioFile.html">Kiwi.Files.AudioFile</a></li>
<li><a href="../classes/Kiwi.Files.DataFile.html">Kiwi.Files.DataFile</a></li>
<li><a href="../classes/Kiwi.Files.DataLibrary.html">Kiwi.Files.DataLibrary</a></li>
<li><a href="../classes/Kiwi.Files.File.html">Kiwi.Files.File</a></li>
<li><a href="../classes/Kiwi.Files.FileStore.html">Kiwi.Files.FileStore</a></li>
<li><a href="../classes/Kiwi.Files.Loader.html">Kiwi.Files.Loader</a></li>
<li><a href="../classes/Kiwi.Files.TextureFile.html">Kiwi.Files.TextureFile</a></li>
<li><a href="../classes/Kiwi.Game.html">Kiwi.Game</a></li>
<li><a href="../classes/Kiwi.GameManager.html">Kiwi.GameManager</a></li>
<li><a href="../classes/Kiwi.GameObjects.Sprite.html">Kiwi.GameObjects.Sprite</a></li>
<li><a href="../classes/Kiwi.GameObjects.StaticImage.html">Kiwi.GameObjects.StaticImage</a></li>
<li><a href="../classes/Kiwi.GameObjects.TextField.html">Kiwi.GameObjects.TextField</a></li>
<li><a href="../classes/Kiwi.GameObjects.Tilemap.TileMap.html">Kiwi.GameObjects.Tilemap.TileMap</a></li>
<li><a href="../classes/Kiwi.GameObjects.Tilemap.TileMapLayer.html">Kiwi.GameObjects.Tilemap.TileMapLayer</a></li>
<li><a href="../classes/Kiwi.GameObjects.Tilemap.TileMapLayerIsometric.html">Kiwi.GameObjects.Tilemap.TileMapLayerIsometric</a></li>
<li><a href="../classes/Kiwi.GameObjects.Tilemap.TileMapLayerOrthogonal.html">Kiwi.GameObjects.Tilemap.TileMapLayerOrthogonal</a></li>
<li><a href="../classes/Kiwi.GameObjects.Tilemap.TileType.html">Kiwi.GameObjects.Tilemap.TileType</a></li>
<li><a href="../classes/Kiwi.Geom.AABB.html">Kiwi.Geom.AABB</a></li>
<li><a href="../classes/Kiwi.Geom.Circle.html">Kiwi.Geom.Circle</a></li>
<li><a href="../classes/Kiwi.Geom.Intersect.html">Kiwi.Geom.Intersect</a></li>
<li><a href="../classes/Kiwi.Geom.IntersectResult.html">Kiwi.Geom.IntersectResult</a></li>
<li><a href="../classes/Kiwi.Geom.Line.html">Kiwi.Geom.Line</a></li>
<li><a href="../classes/Kiwi.Geom.Matrix.html">Kiwi.Geom.Matrix</a></li>
<li><a href="../classes/Kiwi.Geom.Point.html">Kiwi.Geom.Point</a></li>
<li><a href="../classes/Kiwi.Geom.Ray.html">Kiwi.Geom.Ray</a></li>
<li><a href="../classes/Kiwi.Geom.Rectangle.html">Kiwi.Geom.Rectangle</a></li>
<li><a href="../classes/Kiwi.Geom.Transform.html">Kiwi.Geom.Transform</a></li>
<li><a href="../classes/Kiwi.Geom.Vector2.html">Kiwi.Geom.Vector2</a></li>
<li><a href="../classes/Kiwi.Group.html">Kiwi.Group</a></li>
<li><a href="../classes/Kiwi.HUD.HUDComponents.Counter.html">Kiwi.HUD.HUDComponents.Counter</a></li>
<li><a href="../classes/Kiwi.HUD.HUDComponents.Time.html">Kiwi.HUD.HUDComponents.Time</a></li>
<li><a href="../classes/Kiwi.HUD.HUDComponents.WidgetInput.html">Kiwi.HUD.HUDComponents.WidgetInput</a></li>
<li><a href="../classes/Kiwi.HUD.HUDDisplay.html">Kiwi.HUD.HUDDisplay</a></li>
<li><a href="../classes/Kiwi.HUD.HUDManager.html">Kiwi.HUD.HUDManager</a></li>
<li><a href="../classes/Kiwi.HUD.HUDWidget.html">Kiwi.HUD.HUDWidget</a></li>
<li><a href="../classes/Kiwi.HUD.Widget.Bar.html">Kiwi.HUD.Widget.Bar</a></li>
<li><a href="../classes/Kiwi.HUD.Widget.BasicScore.html">Kiwi.HUD.Widget.BasicScore</a></li>
<li><a href="../classes/Kiwi.HUD.Widget.Button.html">Kiwi.HUD.Widget.Button</a></li>
<li><a href="../classes/Kiwi.HUD.Widget.Icon.html">Kiwi.HUD.Widget.Icon</a></li>
<li><a href="../classes/Kiwi.HUD.Widget.IconBar.html">Kiwi.HUD.Widget.IconBar</a></li>
<li><a href="../classes/Kiwi.HUD.Widget.Menu.html">Kiwi.HUD.Widget.Menu</a></li>
<li><a href="../classes/Kiwi.HUD.Widget.MenuItem.html">Kiwi.HUD.Widget.MenuItem</a></li>
<li><a href="../classes/Kiwi.HUD.Widget.TextField.html">Kiwi.HUD.Widget.TextField</a></li>
<li><a href="../classes/Kiwi.HUD.Widget.Time.html">Kiwi.HUD.Widget.Time</a></li>
<li><a href="../classes/Kiwi.IChild.html">Kiwi.IChild</a></li>
<li><a href="../classes/Kiwi.Input.Finger.html">Kiwi.Input.Finger</a></li>
<li><a href="../classes/Kiwi.Input.InputManager.html">Kiwi.Input.InputManager</a></li>
<li><a href="../classes/Kiwi.Input.Key.html">Kiwi.Input.Key</a></li>
<li><a href="../classes/Kiwi.Input.Keyboard.html">Kiwi.Input.Keyboard</a></li>
<li><a href="../classes/Kiwi.Input.Keycodes.html">Kiwi.Input.Keycodes</a></li>
<li><a href="../classes/Kiwi.Input.Mouse.html">Kiwi.Input.Mouse</a></li>
<li><a href="../classes/Kiwi.Input.MouseCursor.html">Kiwi.Input.MouseCursor</a></li>
<li><a href="../classes/Kiwi.Input.Pointer.html">Kiwi.Input.Pointer</a></li>
<li><a href="../classes/Kiwi.Input.Touch.html">Kiwi.Input.Touch</a></li>
<li><a href="../classes/Kiwi.PluginManager.html">Kiwi.PluginManager</a></li>
<li><a href="../classes/Kiwi.Renderers.CanvasRenderer.html">Kiwi.Renderers.CanvasRenderer</a></li>
<li><a href="../classes/Kiwi.Renderers.GLArrayBuffer.html">Kiwi.Renderers.GLArrayBuffer</a></li>
<li><a href="../classes/Kiwi.Renderers.GLBlendMode.html">Kiwi.Renderers.GLBlendMode</a></li>
<li><a href="../classes/Kiwi.Renderers.GLElementArrayBuffer.html">Kiwi.Renderers.GLElementArrayBuffer</a></li>
<li><a href="../classes/Kiwi.Renderers.GLRenderManager.html">Kiwi.Renderers.GLRenderManager</a></li>
<li><a href="../classes/Kiwi.Renderers.GLTextureManager.html">Kiwi.Renderers.GLTextureManager</a></li>
<li><a href="../classes/Kiwi.Renderers.GLTextureWrapper.html">Kiwi.Renderers.GLTextureWrapper</a></li>
<li><a href="../classes/Kiwi.Renderers.Renderer.html">Kiwi.Renderers.Renderer</a></li>
<li><a href="../classes/Kiwi.Renderers.TextureAtlasRenderer.html">Kiwi.Renderers.TextureAtlasRenderer</a></li>
<li><a href="../classes/Kiwi.Shaders.ShaderManager.html">Kiwi.Shaders.ShaderManager</a></li>
<li><a href="../classes/Kiwi.Shaders.ShaderPair.html">Kiwi.Shaders.ShaderPair</a></li>
<li><a href="../classes/Kiwi.Shaders.TextureAtlasShader.html">Kiwi.Shaders.TextureAtlasShader</a></li>
<li><a href="../classes/Kiwi.Signal.html">Kiwi.Signal</a></li>
<li><a href="../classes/Kiwi.SignalBinding.html">Kiwi.SignalBinding</a></li>
<li><a href="../classes/Kiwi.Sound.Audio.html">Kiwi.Sound.Audio</a></li>
<li><a href="../classes/Kiwi.Sound.AudioLibrary.html">Kiwi.Sound.AudioLibrary</a></li>
<li><a href="../classes/Kiwi.Sound.AudioManager.html">Kiwi.Sound.AudioManager</a></li>
<li><a href="../classes/Kiwi.Stage.html">Kiwi.Stage</a></li>
<li><a href="../classes/Kiwi.State.html">Kiwi.State</a></li>
<li><a href="../classes/Kiwi.StateConfig.html">Kiwi.StateConfig</a></li>
<li><a href="../classes/Kiwi.StateManager.html">Kiwi.StateManager</a></li>
<li><a href="../classes/Kiwi.System.Bootstrap.html">Kiwi.System.Bootstrap</a></li>
<li><a href="../classes/Kiwi.System.Device.html">Kiwi.System.Device</a></li>
<li><a href="../classes/Kiwi.Textures.SingleImage.html">Kiwi.Textures.SingleImage</a></li>
<li><a href="../classes/Kiwi.Textures.SpriteSheet.html">Kiwi.Textures.SpriteSheet</a></li>
<li><a href="../classes/Kiwi.Textures.TextureAtlas.html">Kiwi.Textures.TextureAtlas</a></li>
<li><a href="../classes/Kiwi.Textures.TextureLibrary.html">Kiwi.Textures.TextureLibrary</a></li>
<li><a href="../classes/Kiwi.Time.Clock.html">Kiwi.Time.Clock</a></li>
<li><a href="../classes/Kiwi.Time.ClockManager.html">Kiwi.Time.ClockManager</a></li>
<li><a href="../classes/Kiwi.Time.MasterClock.html">Kiwi.Time.MasterClock</a></li>
<li><a href="../classes/Kiwi.Time.Timer.html">Kiwi.Time.Timer</a></li>
<li><a href="../classes/Kiwi.Time.TimerEvent.html">Kiwi.Time.TimerEvent</a></li>
<li><a href="../classes/Kiwi.Utils.Canvas.html">Kiwi.Utils.Canvas</a></li>
<li><a href="../classes/Kiwi.Utils.Color.html">Kiwi.Utils.Color</a></li>
<li><a href="../classes/Kiwi.Utils.Common.html">Kiwi.Utils.Common</a></li>
<li><a href="../classes/Kiwi.Utils.GameMath.html">Kiwi.Utils.GameMath</a></li>
<li><a href="../classes/Kiwi.Utils.Log.html">Kiwi.Utils.Log</a></li>
<li><a href="../classes/Kiwi.Utils.RandomDataGenerator.html">Kiwi.Utils.RandomDataGenerator</a></li>
<li><a href="../classes/Kiwi.Utils.RequestAnimationFrame.html">Kiwi.Utils.RequestAnimationFrame</a></li>
<li><a href="../classes/Kiwi.Utils.Version.html">Kiwi.Utils.Version</a></li>
</ul>
<ul id="api-modules" class="apis modules">
<li><a href="../modules/Animations.html">Animations</a></li>
<li><a href="../modules/Components.html">Components</a></li>
<li><a href="../modules/Easing.html">Easing</a></li>
<li><a href="../modules/Files.html">Files</a></li>
<li><a href="../modules/GameObjects.html">GameObjects</a></li>
<li><a href="../modules/Geom.html">Geom</a></li>
<li><a href="../modules/HUD.html">HUD</a></li>
<li><a href="../modules/HUDComponents.html">HUDComponents</a></li>
<li><a href="../modules/Input.html">Input</a></li>
<li><a href="../modules/Kiwi.html">Kiwi</a></li>
<li><a href="../modules/Renderers.html">Renderers</a></li>
<li><a href="../modules/Shaders.html">Shaders</a></li>
<li><a href="../modules/Sound.html">Sound</a></li>
<li><a href="../modules/System.html">System</a></li>
<li><a href="../modules/Textures.html">Textures</a></li>
<li><a href="../modules/Tilemap.html">Tilemap</a></li>
<li><a href="../modules/Time.html">Time</a></li>
<li><a href="../modules/Tweens.html">Tweens</a></li>
<li><a href="../modules/Utils.html">Utils</a></li>
<li><a href="../modules/Utils..html">Utils.</a></li>
<li><a href="../modules/Widget.html">Widget</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="yui3-u-3-4">
<div id="api-options">
Show:
<label for="api-show-inherited">
<input type="checkbox" id="api-show-inherited" checked>
Inherited
</label>
<label for="api-show-protected">
<input type="checkbox" id="api-show-protected">
Protected
</label>
<label for="api-show-private">
<input type="checkbox" id="api-show-private">
Private
</label>
<label for="api-show-deprecated">
<input type="checkbox" id="api-show-deprecated">
Deprecated
</label>
</div>
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1>Kiwi.Time.Clock Class</h1>
<div class="box meta">
<div class="foundat">
Defined in: <a href="../files/src_time_Clock.ts.html#l8"><code>src\time\Clock.ts:8</code></a>
</div>
Module: <a href="../modules/Time.html">Time</a><br>
Parent Module: <a href="../modules/Kiwi.html">Kiwi</a>
</div>
<div class="box intro">
<p>The Clock class offers a way of tracking time within a game.
When creating a new Clock you should NOT directly instantiate this class
but instead use the addClock method on a ClockManager.</p>
<ul>
<li>The MasterClock is a property of the Kiwi.Time.Manager class and tracks
real world time in milliseconds elapsed since the application started.
This happens automatically and there is no need to do anything to set
this up.</li>
<li>An instance of a clock is used to track time in arbitrary units
(milliseconds by default)</li>
<li>A clock can be started, paused, unpaused and stopped. Once stopped,
re-starting the clock again will reset it. It can also have its time
scale freely transformed.</li>
<li>Any number of timers can be attached to a clock. See the Kiwi.Time.Timer
class for timer details.</li>
<li>If the clock is paused, any timers attached to the clock will take this
into account and not continue to fire events until the clock is
unpaused. (Note that this is not the same as pausing timers, which can
be done manually and needs to be undone manually.)</li>
<li>Animations and TweenManagers can use any Clock.</li>
</ul>
</div>
<div class="constructor">
<h2>Constructor</h2>
<div id="method_Kiwi.Time.Clock" class="method item">
<h3 class="name"><code>Kiwi.Time.Clock</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>manager</code>
</li>
<li class="arg">
<code>master</code>
</li>
<li class="arg">
<code>name</code>
</li>
<li class="arg">
<code class="optional">[units=1000]</code>
</li>
</ul><span class="paren">)</span>
</div>
<span class="returns-inline">
<span class="type"><a href="../classes/Kiwi.Time.Clock.html" class="crosslink">Kiwi.Time.Clock</a></span>
</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l8"><code>src\time\Clock.ts:8</code></a>
</p>
</div>
<div class="description">
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">manager</code>
<span class="type">ClockManager</span>
<div class="param-description">
<p>ClockManager that this clock belongs to</p>
</div>
</li>
<li class="param">
<code class="param-name">master</code>
<span class="type"><a href="../classes/Kiwi.Time.MasterClock.html" class="crosslink">Kiwi.Time.MasterClock</a></span>
<div class="param-description">
<p>MasterClock that this is getting
the time in relation to</p>
</div>
</li>
<li class="param">
<code class="param-name">name</code>
<span class="type">String</span>
<div class="param-description">
<p>Name of the clock</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[units=1000]</code>
<span class="type">Number</span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>Units that this clock is to operate in
per second</p>
</div>
</li>
</ul>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type"><a href="../classes/Kiwi.Time.Clock.html" class="crosslink">Kiwi.Time.Clock</a></span>:
<p>This Clock object</p>
</div>
</div>
</div>
</div>
<div id="classdocs" class="tabview">
<ul class="api-class-tabs">
<li class="api-class-tab index"><a href="#index">Index</a></li>
<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
<li class="api-class-tab properties"><a href="#properties">Properties</a></li>
</ul>
<div>
<div id="index" class="api-class-tabpanel index">
<h2 class="off-left">Item Index</h2>
<div class="index-section methods">
<h3>Methods</h3>
<ul class="index-list methods">
<li class="index-item method public">
<a href="#method_addTimer">addTimer</a>
</li>
<li class="index-item method public">
<a href="#method_checkExists">checkExists</a>
</li>
<li class="index-item method public">
<a href="#method_createTimer">createTimer</a>
</li>
<li class="index-item method public">
<a href="#method_elapsed">elapsed</a>
</li>
<li class="index-item method public">
<a href="#method_elapsedSinceFirstStarted">elapsedSinceFirstStarted</a>
</li>
<li class="index-item method public">
<a href="#method_elapsedSinceLastPaused">elapsedSinceLastPaused</a>
</li>
<li class="index-item method public">
<a href="#method_elapsedSinceLastStopped">elapsedSinceLastStopped</a>
</li>
<li class="index-item method public">
<a href="#method_elapsedSinceLastUnpaused">elapsedSinceLastUnpaused</a>
</li>
<li class="index-item method public">
<a href="#method_isPaused">isPaused</a>
</li>
<li class="index-item method public">
<a href="#method_isRunning">isRunning</a>
</li>
<li class="index-item method public">
<a href="#method_isStopped">isStopped</a>
</li>
<li class="index-item method public">
<a href="#method_objType">objType</a>
</li>
<li class="index-item method public">
<a href="#method_pause">pause</a>
</li>
<li class="index-item method public">
<a href="#method_removeTimer">removeTimer</a>
</li>
<li class="index-item method public">
<a href="#method_resume">resume</a>
</li>
<li class="index-item method public">
<a href="#method_setInterval">setInterval</a>
</li>
<li class="index-item method public">
<a href="#method_setTimeout">setTimeout</a>
</li>
<li class="index-item method public">
<a href="#method_start">start</a>
</li>
<li class="index-item method public">
<a href="#method_started">started</a>
</li>
<li class="index-item method public">
<a href="#method_stop">stop</a>
</li>
<li class="index-item method public">
<a href="#method_stopAllTimers">stopAllTimers</a>
</li>
<li class="index-item method public">
<a href="#method_toMilliseconds">toMilliseconds</a>
</li>
<li class="index-item method public">
<a href="#method_toString">toString</a>
</li>
<li class="index-item method public">
<a href="#method_update">update</a>
</li>
</ul>
</div>
<div class="index-section properties">
<h3>Properties</h3>
<ul class="index-list properties">
<li class="index-item property private">
<a href="#property__currentMasterElapsed">_currentMasterElapsed</a>
</li>
<li class="index-item property private">
<a href="#property__elapsed">_elapsed</a>
</li>
<li class="index-item property private">
<a href="#property__elapsedState">_elapsedState</a>
</li>
<li class="index-item property private">
<a href="#property__isPaused">_isPaused</a>
</li>
<li class="index-item property private">
<a href="#property__isRunning">_isRunning</a>
</li>
<li class="index-item property private">
<a href="#property__isStopped">_isStopped</a>
</li>
<li class="index-item property private">
<a href="#property__lastMasterElapsed">_lastMasterElapsed</a>
</li>
<li class="index-item property private">
<a href="#property__maxFrameDuration">_maxFrameDuration</a>
</li>
<li class="index-item property private">
<a href="#property__PAUSED">_PAUSED</a>
<span class="flag static">static</span>
</li>
<li class="index-item property private">
<a href="#property__RESUMED">_RESUMED</a>
<span class="flag static">static</span>
</li>
<li class="index-item property private">
<a href="#property__RUNNING">_RUNNING</a>
<span class="flag static">static</span>
</li>
<li class="index-item property private">
<a href="#property__STOPPED">_STOPPED</a>
<span class="flag static">static</span>
</li>
<li class="index-item property private">
<a href="#property__timeFirstStarted">_timeFirstStarted</a>
</li>
<li class="index-item property private">
<a href="#property__timeLastPaused">_timeLastPaused</a>
</li>
<li class="index-item property private">
<a href="#property__timeLastStarted">_timeLastStarted</a>
</li>
<li class="index-item property private">
<a href="#property__timeLastStopped">_timeLastStopped</a>
</li>
<li class="index-item property private">
<a href="#property__timeLastUnpaused">_timeLastUnpaused</a>
</li>
<li class="index-item property private">
<a href="#property__totalPaused">_totalPaused</a>
</li>
<li class="index-item property public">
<a href="#property_delta">delta</a>
</li>
<li class="index-item property public">
<a href="#property_manager">manager</a>
</li>
<li class="index-item property public">
<a href="#property_master">master</a>
</li>
<li class="index-item property public">
<a href="#property_maxFrameDuration">maxFrameDuration</a>
</li>
<li class="index-item property public">
<a href="#property_name">name</a>
</li>
<li class="index-item property public">
<a href="#property_rate">rate</a>
</li>
<li class="index-item property private">
<a href="#property_timers">timers</a>
</li>
<li class="index-item property public">
<a href="#property_timeScale">timeScale</a>
</li>
<li class="index-item property public">
<a href="#property_units">units</a>
</li>
</ul>
</div>
</div>
<div id="methods" class="api-class-tabpanel">
<h2 class="off-left">Methods</h2>
<div id="method_addTimer" class="method item public">
<h3 class="name"><code>addTimer</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>timer</code>
</li>
</ul><span class="paren">)</span>
</div>
<span class="returns-inline">
<span class="type"><a href="../classes/Kiwi.Time.Clock.html" class="crosslink">Kiwi.Time.Clock</a></span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l451"><code>src\time\Clock.ts:451</code></a>
</p>
</div>
<div class="description">
<p>Add an existing Timer to the Clock.</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">timer</code>
<span class="type">Timer</span>
<div class="param-description">
<p>Timer object instance to be added to this Clock</p>
</div>
</li>
</ul>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type"><a href="../classes/Kiwi.Time.Clock.html" class="crosslink">Kiwi.Time.Clock</a></span>:
<p>This Clock object</p>
</div>
</div>
</div>
<div id="method_checkExists" class="method item public">
<h3 class="name"><code>checkExists</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>name</code>
</li>
</ul><span class="paren">)</span>
</div>
<span class="returns-inline">
<span class="type">Boolean</span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l521"><code>src\time\Clock.ts:521</code></a>
</p>
</div>
<div class="description">
<p>Check if the Timer already exists on this Clock.</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">name</code>
<span class="type">String</span>
<div class="param-description">
<p>Name of the Timer</p>
</div>
</li>
</ul>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type">Boolean</span>:
<p><code>true</code> if the Timer exists</p>
</div>
</div>
</div>
<div id="method_createTimer" class="method item public">
<h3 class="name"><code>createTimer</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>name</code>
</li>
<li class="arg">
<code class="optional">[delay=1]</code>
</li>
<li class="arg">
<code class="optional">[repeatCount=0]</code>
</li>
<li class="arg">
<code class="optional">[start=true]</code>
</li>
</ul><span class="paren">)</span>
</div>
<span class="returns-inline">
<span class="type"><a href="../classes/Kiwi.Time.Timer.html" class="crosslink">Kiwi.Time.Timer</a></span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l465"><code>src\time\Clock.ts:465</code></a>
</p>
</div>
<div class="description">
<p>Create a new Timer and add it to this Clock.</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">name</code>
<span class="type">String</span>
<div class="param-description">
<p>Name of the Timer (must be unique on this Clock)</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[delay=1]</code>
<span class="type">Number</span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>Number of clock units to wait between
firing events</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[repeatCount=0]</code>
<span class="type">Number</span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>Number of times to repeat the Timer
(default 0)</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[start=true]</code>
<span class="type">Boolean</span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>If the timer should start</p>
</div>
</li>
</ul>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type"><a href="../classes/Kiwi.Time.Timer.html" class="crosslink">Kiwi.Time.Timer</a></span>:
<p>The newly created Timer</p>
</div>
</div>
</div>
<div id="method_elapsed" class="method item public">
<h3 class="name"><code>elapsed</code></h3>
<span class="paren">()</span>
<span class="returns-inline">
<span class="type">Number</span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l203"><code>src\time\Clock.ts:203</code></a>
</p>
</div>
<div class="description">
<p>Number of clock units elapsed since the clock was most recently
started (not including time spent paused)</p>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type">Number</span>:
<p>Number of clock units</p>
</div>
</div>
</div>
<div id="method_elapsedSinceFirstStarted" class="method item public">
<h3 class="name"><code>elapsedSinceFirstStarted</code></h3>
<span class="paren">()</span>
<span class="returns-inline">
<span class="type">Number</span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l85"><code>src\time\Clock.ts:85</code></a>
</p>
</div>
<div class="description">
<p>Number of clock units elapsed since the clock was first started</p>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type">Number</span>:
<p>Number of clock units elapsed</p>
</div>
</div>
</div>
<div id="method_elapsedSinceLastPaused" class="method item public">
<h3 class="name"><code>elapsedSinceLastPaused</code></h3>
<span class="paren">()</span>
<span class="returns-inline">
<span class="type">Number</span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l248"><code>src\time\Clock.ts:248</code></a>
</p>
</div>
<div class="description">
<p>Number of clock units elapsed since the clock was most recently paused.</p>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type">Number</span>:
<p>Number of clock units</p>
</div>
</div>
</div>
<div id="method_elapsedSinceLastStopped" class="method item public">
<h3 class="name"><code>elapsedSinceLastStopped</code></h3>
<span class="paren">()</span>
<span class="returns-inline">
<span class="type">Number</span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l224"><code>src\time\Clock.ts:224</code></a>
</p>
</div>
<div class="description">
<p>Number of clock units elapsed since the clock was most recently
stopped.</p>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type">Number</span>:
<p>Number of clock units</p>
</div>
</div>
</div>
<div id="method_elapsedSinceLastUnpaused" class="method item public">
<h3 class="name"><code>elapsedSinceLastUnpaused</code></h3>
<span class="paren">()</span>
<span class="returns-inline">
<span class="type">Number</span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l271"><code>src\time\Clock.ts:271</code></a>
</p>
</div>
<div class="description">
<p>Number of clock units elapsed since the clock was most recently
unpaused.</p>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type">Number</span>:
<p>Number of clock units</p>
</div>
</div>
</div>
<div id="method_isPaused" class="method item public">
<h3 class="name"><code>isPaused</code></h3>
<span class="paren">()</span>
<span class="returns-inline">
<span class="type">Boolean</span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l346"><code>src\time\Clock.ts:346</code></a>
</p>
</div>
<div class="description">
<p>Check if the clock is in the paused state</p>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type">Boolean</span>:
<p><code>true</code> if paused</p>
</div>
</div>
</div>
<div id="method_isRunning" class="method item public">
<h3 class="name"><code>isRunning</code></h3>
<span class="paren">()</span>
<span class="returns-inline">
<span class="type">Boolean</span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l304"><code>src\time\Clock.ts:304</code></a>
</p>
</div>
<div class="description">
<p>Check if the clock is currently running</p>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type">Boolean</span>:
<p><code>true</code> if running</p>
</div>
</div>
</div>
<div id="method_isStopped" class="method item public">
<h3 class="name"><code>isStopped</code></h3>
<span class="paren">()</span>
<span class="returns-inline">
<span class="type">Boolean</span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l325"><code>src\time\Clock.ts:325</code></a>
</p>
</div>
<div class="description">
<p>Check if the clock is in the stopped state</p>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type">Boolean</span>:
<p><code>true</code> if stopped</p>
</div>
</div>
</div>
<div id="method_objType" class="method item public">
<h3 class="name"><code>objType</code></h3>
<span class="paren">()</span>
<span class="returns-inline">
<span class="type">String</span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l58"><code>src\time\Clock.ts:58</code></a>
</p>
</div>
<div class="description">
<p>The type of object that this is</p>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type">String</span>:
<p>"Clock"</p>
</div>
</div>
</div>
<div id="method_pause" class="method item public">
<h3 class="name"><code>pause</code></h3>
<span class="paren">()</span>
<span class="returns-inline">
<span class="type"><a href="../classes/Kiwi.Time.Clock.html" class="crosslink">Kiwi.Time.Clock</a></span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l639"><code>src\time\Clock.ts:639</code></a>
</p>
</div>
<div class="description">
<p>Pause the clock. This can only be paused if it is already running.</p>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type"><a href="../classes/Kiwi.Time.Clock.html" class="crosslink">Kiwi.Time.Clock</a></span>:
<p>This Clock object</p>
</div>
</div>
</div>
<div id="method_removeTimer" class="method item public">
<h3 class="name"><code>removeTimer</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code class="optional">[timer=null]</code>
</li>
<li class="arg">
<code class="optional">[timerName='']</code>
</li>
</ul><span class="paren">)</span>
</div>
<span class="returns-inline">
<span class="type">Boolean</span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l489"><code>src\time\Clock.ts:489</code></a>
</p>
</div>
<div class="description">
<p>Remove a Timer from this Clock based on either the Timer object
or its name.</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name optional">[timer=null]</code>
<span class="type">Timer</span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>Timer object you wish to remove.
If you wish to delete by Timer Name set this to null.</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[timerName='']</code>
<span class="type">String</span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>Name of the Timer object to remove</p>
</div>
</li>
</ul>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type">Boolean</span>:
<p><code>true</code> if the Timer was successfully removed</p>
</div>
</div>
</div>
<div id="method_resume" class="method item public">
<h3 class="name"><code>resume</code></h3>
<span class="paren">()</span>
<span class="returns-inline">
<span class="type"><a href="../classes/Kiwi.Time.Clock.html" class="crosslink">Kiwi.Time.Clock</a></span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l660"><code>src\time\Clock.ts:660</code></a>
</p>
</div>
<div class="description">
<p>Resume the clock. This can only be resumed if it is already paused.</p>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type"><a href="../classes/Kiwi.Time.Clock.html" class="crosslink">Kiwi.Time.Clock</a></span>:
<p>This Clock object</p>
</div>
</div>
</div>
<div id="method_setInterval" class="method item public">
<h3 class="name"><code>setInterval</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>callback</code>
</li>
<li class="arg">
<code>timeout</code>
</li>
<li class="arg">
<code class="optional">[context=window]</code>
</li>
</ul><span class="paren">)</span>
</div>
<span class="returns-inline">
<span class="type"><a href="../classes/Kiwi.Time.Timer.html" class="crosslink">Kiwi.Time.Timer</a></span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l768"><code>src\time\Clock.ts:768</code></a>
</p>
</div>
<div class="description">
<p>Set a function to repeatedly execute at fixed time intervals.
Emulates <code>window.setInterval</code>, except attached to a <code>Kiwi.Time.Clock</code>.
This allows you to pause and manipulate time, and the timeout will
respect the clock on which it is created.</p>
<p>No <code>clearInterval</code> is provided; you should use <code>Kiwi.Time.Timer</code>
functions to achieve further control.</p>
<p>Any parameters after <code>context</code> will be passed as parameters to the
callback function. Note that you must specify <code>context</code> in order for
this to work. You may specify <code>null</code>, in which case it will default
to the global scope <code>window</code>.</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">callback</code>
<span class="type">Function</span>
<div class="param-description">
<p>Function to execute</p>
</div>
</li>
<li class="param">
<code class="param-name">timeout</code>
<span class="type">Number</span>
<div class="param-description">
<p>Milliseconds between executions</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[context=window]</code>
<span class="type">Object</span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>Object to be <code>this</code> for the callback</p>
</div>
</li>
</ul>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type"><a href="../classes/Kiwi.Time.Timer.html" class="crosslink">Kiwi.Time.Timer</a></span>:
<p>Kiwi.Time.Timer object
which can be used to further manipulate the timer</p>
</div>
</div>
</div>
<div id="method_setTimeout" class="method item public">
<h3 class="name"><code>setTimeout</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>callback</code>
</li>
<li class="arg">
<code>timeout</code>
</li>
<li class="arg">
<code class="optional">[context]</code>
</li>
</ul><span class="paren">)</span>
</div>
<span class="returns-inline">
<span class="type"><a href="../classes/Kiwi.Time.Timer.html" class="crosslink">Kiwi.Time.Timer</a></span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l725"><code>src\time\Clock.ts:725</code></a>
</p>
</div>
<div class="description">
<p>Set a function to execute after a certain time interval.
Emulates <code>window.setTimeout</code>, except attached to a <code>Kiwi.Time.Clock</code>.
This allows you to pause and manipulate time, and the timeout will
respect the clock on which it is created.</p>
<p>No <code>clearTimeout</code> is provided; you should use <code>Kiwi.Time.Timer</code>
functions to achieve further control.</p>
<p>Any parameters after <code>context</code> will be passed as parameters to the
callback function. Note that you must specify <code>context</code> in order for
this to work. You may specify <code>null</code>, in which case it will default
to the global scope <code>window</code>.</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">callback</code>
<span class="type">Function</span>
<div class="param-description">
<p>Function to execute</p>
</div>
</li>
<li class="param">
<code class="param-name">timeout</code>
<span class="type">Number</span>
<div class="param-description">
<p>Milliseconds before execution</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[context]</code>
<span class="type">Object</span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>Object to be <code>this</code> for the callback</p>
</div>
</li>
</ul>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type"><a href="../classes/Kiwi.Time.Timer.html" class="crosslink">Kiwi.Time.Timer</a></span>:
<p>Kiwi.Time.Timer object which can be used
to further manipulate the timer</p>
</div>
</div>
</div>
<div id="method_start" class="method item public">
<h3 class="name"><code>start</code></h3>
<span class="paren">()</span>
<span class="returns-inline">
<span class="type">Clock</span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l609"><code>src\time\Clock.ts:609</code></a>
</p>
</div>
<div class="description">
<p>Start the clock. This resets the clock and starts it running.</p>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type">Clock</span>:
<p>This Clock object</p>
</div>
</div>
</div>
<div id="method_started" class="method item public">
<h3 class="name"><code>started</code></h3>
<span class="paren">()</span>
<span class="returns-inline">
<span class="type">Number</span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l106"><code>src\time\Clock.ts:106</code></a>
</p>
</div>
<div class="description">
<p>Most recent time the clock was started relative to the master clock</p>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type">Number</span>:
<p>Milliseconds</p>
</div>
</div>
</div>
<div id="method_stop" class="method item public">
<h3 class="name"><code>stop</code></h3>
<span class="paren">()</span>
<span class="returns-inline">
<span class="type"><a href="../classes/Kiwi.Time.Clock.html" class="crosslink">Kiwi.Time.Clock</a></span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l683"><code>src\time\Clock.ts:683</code></a>
</p>
</div>
<div class="description">
<p>Stop the clock. This can only be stopped if it is already running
or is paused.</p>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type"><a href="../classes/Kiwi.Time.Clock.html" class="crosslink">Kiwi.Time.Clock</a></span>:
<p>This Clock object</p>
</div>
</div>
</div>
<div id="method_stopAllTimers" class="method item public">
<h3 class="name"><code>stopAllTimers</code></h3>
<span class="paren">()</span>
<span class="returns-inline">
<span class="type">Clock</span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l541"><code>src\time\Clock.ts:541</code></a>
</p>
</div>
<div class="description">
<p>Stop all timers attached to the clock.</p>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type">Clock</span>:
<p>This Clock object</p>
</div>
</div>
</div>
<div id="method_toMilliseconds" class="method item public">
<h3 class="name"><code>toMilliseconds</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>time</code>
</li>
</ul><span class="paren">)</span>
</div>
<span class="returns-inline">
<span class="type">Number</span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l558"><code>src\time\Clock.ts:558</code></a>
</p>
</div>
<div class="description">
<p>Convert a number to milliseconds based on clock units.</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">time</code>
<span class="type">Number</span>
<div class="param-description">
<p>Seconds</p>
</div>
</li>
</ul>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type">Number</span>:
<p>Milliseconds</p>
</div>
</div>
</div>
<div id="method_toString" class="method item public">
<h3 class="name"><code>toString</code></h3>
<span class="paren">()</span>
<span class="returns-inline">
<span class="type">String</span>
</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l712"><code>src\time\Clock.ts:712</code></a>
</p>
</div>
<div class="description">
<p>Return a string representation of this object.</p>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type">String</span>:
<p>String representation of the instance</p>
</div>
</div>
</div>
<div id="method_update" class="method item public">
<h3 class="name"><code>update</code></h3>
<span class="paren">()</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l571"><code>src\time\Clock.ts:571</code></a>
</p>
</div>
<div class="description">
<p>Update all Timers linked to this Clock.</p>
</div>
</div>
</div>
<div id="properties" class="api-class-tabpanel">
<h2 class="off-left">Properties</h2>
<div id="property__currentMasterElapsed" class="property item private">
<h3 class="name"><code>_currentMasterElapsed</code></h3>
<span class="type">Number</span>
<span class="flag private">private</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l150"><code>src\time\Clock.ts:150</code></a>
</p>
<p>Available since 1.2.0</p>
</div>
<div class="description">
<p>Master time on current frame</p>
</div>
</div>
<div id="property__elapsed" class="property item private">
<h3 class="name"><code>_elapsed</code></h3>
<span class="type">Number</span>
<span class="flag private">private</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l131"><code>src\time\Clock.ts:131</code></a>
</p>
<p>Available since 1.2.0</p>
</div>
<div class="description">
<p>Clock units elapsed since the clock was most recently started,
not including paused time.</p>
</div>
</div>
<div id="property__elapsedState" class="property item private">
<h3 class="name"><code>_elapsedState</code></h3>
<span class="type">Number</span>
<span class="flag private">private</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l358"><code>src\time\Clock.ts:358</code></a>
</p>
</div>
<div class="description">
<p>Internal reference to the state of the elapsed timer</p>
</div>
</div>
<div id="property__isPaused" class="property item private">
<h3 class="name"><code>_isPaused</code></h3>
<span class="type">Boolean</span>
<span class="flag private">private</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l337"><code>src\time\Clock.ts:337</code></a>
</p>
</div>
<div class="description">
<p>Whether the clock is in a paused state</p>
</div>
<p><strong>Default:</strong> false</p>
</div>
<div id="property__isRunning" class="property item private">
<h3 class="name"><code>_isRunning</code></h3>
<span class="type">Boolean</span>
<span class="flag private">private</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l295"><code>src\time\Clock.ts:295</code></a>
</p>
</div>
<div class="description">
<p>Whether the clock is in a running state</p>
</div>
<p><strong>Default:</strong> false</p>
</div>
<div id="property__isStopped" class="property item private">
<h3 class="name"><code>_isStopped</code></h3>
<span class="type">Boolean</span>
<span class="flag private">private</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l316"><code>src\time\Clock.ts:316</code></a>
</p>
</div>
<div class="description">
<p>Whether the clock is in a stopped state</p>
</div>
<p><strong>Default:</strong> true</p>
</div>
<div id="property__lastMasterElapsed" class="property item private">
<h3 class="name"><code>_lastMasterElapsed</code></h3>
<span class="type">Number</span>
<span class="flag private">private</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l141"><code>src\time\Clock.ts:141</code></a>
</p>
<p>Available since 1.2.0</p>
</div>
<div class="description">
<p>Master time on last frame</p>
</div>
</div>
<div id="property__maxFrameDuration" class="property item private">
<h3 class="name"><code>_maxFrameDuration</code></h3>
<span class="type">Number</span>
<span class="flag private">private</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l172"><code>src\time\Clock.ts:172</code></a>
</p>
</div>
<div class="description">
<p>Maximum frame duration. If a frame takes longer than this to render,
the clock will only advance this far, in effect slowing down time.
If this value is 0 or less, it will not be checked and frames can
take any amount of time to render.</p>
</div>
<p><strong>Default:</strong> -1</p>
</div>
<div id="property__PAUSED" class="property item private">
<h3 class="name"><code>_PAUSED</code></h3>
<span class="type">Number</span>
<span class="flag private">private</span>
<span class="flag static">static</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l420"><code>src\time\Clock.ts:420</code></a>
</p>
</div>
<div class="description">
<p>Constant indicating that the Clock is paused</p>
</div>
<p><strong>Default:</strong> 1</p>
</div>
<div id="property__RESUMED" class="property item private">
<h3 class="name"><code>_RESUMED</code></h3>
<span class="type">Number</span>
<span class="flag private">private</span>
<span class="flag static">static</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l430"><code>src\time\Clock.ts:430</code></a>
</p>
</div>
<div class="description">
<p>Constant indicating that the Clock is running
(and has been paused then resumed)</p>
</div>
<p><strong>Default:</strong> 2</p>
</div>
<div id="property__RUNNING" class="property item private">
<h3 class="name"><code>_RUNNING</code></h3>
<span class="type">Number</span>
<span class="flag private">private</span>
<span class="flag static">static</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l409"><code>src\time\Clock.ts:409</code></a>
</p>
</div>
<div class="description">
<p>Constant indicating that the Clock is running
(and has not yet been paused and resumed)</p>
</div>
<p><strong>Default:</strong> 0</p>
</div>
<div id="property__STOPPED" class="property item private">
<h3 class="name"><code>_STOPPED</code></h3>
<span class="type">Number</span>
<span class="flag private">private</span>
<span class="flag static">static</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l441"><code>src\time\Clock.ts:441</code></a>
</p>
</div>
<div class="description">
<p>Constant indicating that the Clock is stopped</p>
</div>
<p><strong>Default:</strong> 3</p>
</div>
<div id="property__timeFirstStarted" class="property item private">
<h3 class="name"><code>_timeFirstStarted</code></h3>
<span class="type">Number</span>
<span class="flag private">private</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l76"><code>src\time\Clock.ts:76</code></a>
</p>
</div>
<div class="description">
<p>Time the clock was first started relative to the master clock</p>
</div>
<p><strong>Default:</strong> null</p>
</div>
<div id="property__timeLastPaused" class="property item private">
<h3 class="name"><code>_timeLastPaused</code></h3>
<span class="type">Number</span>
<span class="flag private">private</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l237"><code>src\time\Clock.ts:237</code></a>
</p>
</div>
<div class="description">
<p>Time the clock was most receently paused relative to the
master clock.</p>
</div>
<p><strong>Default:</strong> null</p>
</div>
<div id="property__timeLastStarted" class="property item private">
<h3 class="name"><code>_timeLastStarted</code></h3>
<span class="type">Number</span>
<span class="flag private">private</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l97"><code>src\time\Clock.ts:97</code></a>
</p>
</div>
<div class="description">
<p>Most recent time the clock was started relative to the master clock</p>
</div>
<p><strong>Default:</strong> null</p>
</div>
<div id="property__timeLastStopped" class="property item private">
<h3 class="name"><code>_timeLastStopped</code></h3>
<span class="type">Number</span>
<span class="flag private">private</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l214"><code>src\time\Clock.ts:214</code></a>
</p>
</div>
<div class="description">
<p>Time the clock was most recently stopped relative to the
master clock.</p>
</div>
<p><strong>Default:</strong> null</p>
</div>
<div id="property__timeLastUnpaused" class="property item private">
<h3 class="name"><code>_timeLastUnpaused</code></h3>
<span class="type">Number</span>
<span class="flag private">private</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l260"><code>src\time\Clock.ts:260</code></a>
</p>
</div>
<div class="description">
<p>Time the clock was most recently unpaused relative to the
master clock.</p>
</div>
<p><strong>Default:</strong> null</p>
</div>
<div id="property__totalPaused" class="property item private">
<h3 class="name"><code>_totalPaused</code></h3>
<span class="type">Number</span>
<span class="flag private">private</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l284"><code>src\time\Clock.ts:284</code></a>
</p>
</div>
<div class="description">
<p>Total number of milliseconds the clock has been paused
since it was last started</p>
</div>
<p><strong>Default:</strong> 0</p>
</div>
<div id="property_delta" class="property item public">
<h3 class="name"><code>delta</code></h3>
<span class="type">Number</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l382"><code>src\time\Clock.ts:382</code></a>
</p>
<p>Available since 1.3.0</p>
</div>
<div class="description">
<p>The time it takes for the time to update. Using this you can calculate the fps.</p>
</div>
</div>
<div id="property_manager" class="property item public">
<h3 class="name"><code>manager</code></h3>
<span class="type">ClockManager</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l366"><code>src\time\Clock.ts:366</code></a>
</p>
</div>
<div class="description">
<p>Time manager that this clock belongs to</p>
</div>
</div>
<div id="property_master" class="property item public">
<h3 class="name"><code>master</code></h3>
<span class="type"><a href="../classes/Kiwi.Time.MasterClock.html" class="crosslink">Kiwi.Time.MasterClock</a></span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l374"><code>src\time\Clock.ts:374</code></a>
</p>
</div>
<div class="description">
<p>Master clock from which time is derived</p>
</div>
</div>
<div id="property_maxFrameDuration" class="property item public">
<h3 class="name"><code>maxFrameDuration</code></h3>
<span class="type">Number</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l184"><code>src\time\Clock.ts:184</code></a>
</p>
</div>
<div class="description">
<p>Maximum frame duration. If a frame takes longer than this to render,
the clock will only advance this far, in effect slowing down time.
If this value is 0 or less, it will not be checked and frames can
take any amount of time to render.</p>
</div>
<p><strong>Default:</strong> -1</p>
</div>
<div id="property_name" class="property item public">
<h3 class="name"><code>name</code></h3>
<span class="type">String</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l392"><code>src\time\Clock.ts:392</code></a>
</p>
</div>
<div class="description">
<p>Name of the clock</p>
</div>
</div>
<div id="property_rate" class="property item public">
<h3 class="name"><code>rate</code></h3>
<span class="type">Number</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l160"><code>src\time\Clock.ts:160</code></a>
</p>
<p>Available since 1.2.0</p>
</div>
<div class="description">
<p>Rate of time passage, as modified by time scale and frame rate.
Under ideal conditions this should be 1.
If the frame rate drops, this will rise. Multiply transformations
by rate to get smooth change over time.</p>
</div>
</div>
<div id="property_timers" class="property item private">
<h3 class="name"><code>timers</code></h3>
<span class="type">Timer</span>
<span class="flag private">private</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l68"><code>src\time\Clock.ts:68</code></a>
</p>
</div>
<div class="description">
<p>Collection of Timer objects using this clock</p>
</div>
</div>
<div id="property_timeScale" class="property item public">
<h3 class="name"><code>timeScale</code></h3>
<span class="type">Number</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l119"><code>src\time\Clock.ts:119</code></a>
</p>
<p>Available since 1.2.0</p>
</div>
<div class="description">
<p>Rate at which time passes on this clock.
1 is normal speed. 1.5 is faster. 0 is no speed. -1 is backwards.
This mostly affects timers, animations and tweens.</p>
</div>
<p><strong>Default:</strong> 1.0</p>
</div>
<div id="property_units" class="property item public">
<h3 class="name"><code>units</code></h3>
<span class="type">Number</span>
<span class="flag public">public</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_time_Clock.ts.html#l400"><code>src\time\Clock.ts:400</code></a>
</p>
</div>
<div class="description">
<p>Number of milliseconds counted as one unit of time by the clock</p>
</div>
<p><strong>Default:</strong> 0</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>
| gamelab/kiwi.js | docs/classes/Kiwi.Time.Clock.html | HTML | mit | 104,081 |
{% extends "theme_bootstrap/base.html" %}
{% load staticfiles %}
{% block styles %}
<!-- Bootstrap Core CSS -->
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet" type="text/css" />
<link href="{% static 'css/font-awesome.min.css' %}" rel="stylesheet" type="text/css" />
<!-- Custom CSS -->
<link href="{% static 'css/blog-home.css' %}" rel="stylesheet" type="text/css" />
{% endblock %}
{% block nav %}
<ul class="nav navbar-nav">
<li>
<a href="{% url 'new_blog_post' %}">New post</a>
</li>
<li>
<a href="{% url 'sections_list' %}">Sections</a>
</li>
</ul>
{% endblock %}
{% block scripts %}
<script src="{% static 'js/jquery2.min.js' %}"></script>
<script src="{% static 'js/bootstrap.min.js' %}"></script>
<script src="{% static 'js/eldarion-ajax.min.js' %}"></script>
{% endblock %}
<!-- Footer -->
{% block footer %}
<footer>
<div class="row">
<div class="col-md-2">
<p>Copyright © No-Slack 2015 </p>
</div>
<!-- /.col-lg-12 -->
</div>
<!-- /.row -->
</footer>
{% endblock %}
| eduard-sukharev/noslack | templates/site_base.html | HTML | mit | 1,301 |
<section ng-controller="UpsertUserController">
<div>
<h1><img src="../images/ajax-loader.gif" ng-show='ajax'></h1>
<form class="form-horizontal" role="form" ng-submit="submit()">
<div class="form-group" ng-show="userId != -1">
<label class="control-label col-sm-2">id</label>
<div class="col-sm-2">
<span class="form-control" id="id" disabled>{{userId}}</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="name">name</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="name" placeholder="Enter name" ng-model="name">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="name">email</label>
<div class="col-sm-5">
<input type="email" class="form-control" id="email" placeholder="Enter email" ng-model="email">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="role">role</label>
<div class="col-sm-2">
<select class="form-control" name="role" id="role"
ng-options="role.Name for role in roles track by role.Id"
ng-model="selectedRole"
ng-selected="role.Id == selectedRole.Id"></select>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-clear">submit</button>
</div>
</div>
<div class="form-group">
<div class="alert alert-danger-clear col-sm-offset-2 col-sm-10" role="alert" ng-hide="!error">{{error}}</div>
</div>
<div class="form-group">
<div class="alert alert-success-clear col-sm-offset-2 col-sm-10" role="alert" ng-hide="!info">{{info}}</div>
</div>
</form>
</div>
</section>
| CatalystCode/VideoTaggingTool | public/partials/upsertUser.html | HTML | mit | 2,239 |
# The Ahead-of-Time (AOT) Compiler
The Angular Ahead-of-Time (AOT) compiler converts your Angular HTML and TypeScript code into efficient JavaScript code during the build phase _before_ the browser downloads and runs that code.
This guide explains how to build with the AOT compiler using different compiler options and how to write Angular metadata that AOT can compile.
<div class="l-sub-section">
<a href="https://www.youtube.com/watch?v=kW9cJsvcsGo">Watch compiler author Tobias Bosch explain the Angular Compiler</a> at AngularConnect 2016.
</div>
{@a overview}
## Angular compilation
An Angular application consists largely of components and their HTML templates.
Before the browser can render the application,
the components and templates must be converted to executable JavaScript by an _Angular compiler_.
Angular offers two ways to compile your application:
1. **_Just-in-Time_ (JIT)**, which compiles your app in the browser at runtime
1. **_Ahead-of-Time_ (AOT)**, which compiles your app at build time.
JIT compilation is the default when you run the _build-only_ or the _build-and-serve-locally_ CLI commands:
<code-example language="sh" class="code-shell">
ng build
ng serve
</code-example>
{@a compile}
For AOT compilation, append the `--aot` flags to the _build-only_ or the _build-and-serve-locally_ CLI commands:
<code-example language="sh" class="code-shell">
ng build --aot
ng serve --aot
</code-example>
<div class="l-sub-section">
The `--prod` meta-flag compiles with AOT by default.
See the [CLI documentation](https://github.com/angular/angular-cli/wiki) for details, especially the [`build` topic](https://github.com/angular/angular-cli/wiki/build).
</div>
{@a why-aot}
## Why compile with AOT?
*Faster rendering*
With AOT, the browser downloads a pre-compiled version of the application.
The browser loads executable code so it can render the application immediately, without waiting to compile the app first.
*Fewer asynchronous requests*
The compiler _inlines_ external HTML templates and CSS style sheets within the application JavaScript,
eliminating separate ajax requests for those source files.
*Smaller Angular framework download size*
There's no need to download the Angular compiler if the app is already compiled.
The compiler is roughly half of Angular itself, so omitting it dramatically reduces the application payload.
*Detect template errors earlier*
The AOT compiler detects and reports template binding errors during the build step
before users can see them.
*Better security*
AOT compiles HTML templates and components into JavaScript files long before they are served to the client.
With no templates to read and no risky client-side HTML or JavaScript evaluation,
there are fewer opportunities for injection attacks.
{@a compiler-options}
## Angular Compiler Options
You can control your app compilation by providing template compiler options in the `tsconfig.json` file along with the options supplied to the TypeScript compiler. The template compiler options are specified as members of
`"angularCompilerOptions"` object as shown below:
```json
{
"compilerOptions": {
"experimentalDecorators": true,
...
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"preserveWhiteSpace": false,
...
}
}
```
### *skipMetadataEmit*
This option tells the compiler not to produce `.metadata.json` files.
The option is `false` by default.
`.metadata.json` files contain infomration needed by the template compiler from a `.ts`
file that is not included in the `.d.ts` file produced by the TypeScript compiler. This information contains,
for example, the content of annotations (such as a component's template) which TypeScript
emits to the `.js` file but not to the `.d.ts` file.
This option should be set to `true` if using TypeScript's `--outFile` option, as the metadata files
are not valid for this style of TypeScript output. It is not recommeded to use `--outFile` with
Angular. Use a bundler, such as [webpack](https://webpack.js.org/), instead.
This option can also be set to `true` when using factory summaries as the factory summaries
include a copy of the information that is in the `.metadata.json` file.
### *strictMetadataEmit*
This option tells the template compiler to report an error to the `.metadata.json`
file if `"skipMetadataEmit"` is `false` . This option is `false` by default. This should only be used when `"skipMetadataEmit"` is `false` and `"skipTemplateCodeGen"` is `true`.
It is intended to validate the `.metadata.json` files emitted for bundling with an `npm` package. The validation is overly strict and can emit errors for metadata that would never produce an error when used by the template compiler. You can choose to suppress the error emitted by this option for an exported symbol by including `@dynamic` in the comment documenting the symbol.
It is valid for `.metadata.json` files to contain errors. The template compiler reports these errors
if the metadata is used to determine the contents of an annotation. The metadata
collector cannot predict the symbols that are designed to use in an annotation, so it will preemptively
include error nodes in the metadata for the exported symbols. The template compiler can then use the error
nodes to report an error if these symbols are used. If the client of a library intends to use a symbol in an annotation, the template compiler will not normally report
this until the client uses the symbol. This option allows detecting these errors during the build phase of
the library and is used, for example, in producing Angular libraries themselves.
### *skipTemplateCodegen*
This option tells the compiler to suppress emitting `.ngfactory.js` and `.ngstyle.js` files. When set,
this turns off most of the template compiler and disables reporting template diagnostics.
This option can be used to instruct the
template compiler to produce `.metadata.json` files for distribution with an `npm` package while
avoiding the production of `.ngfactory.js` and `.ngstyle.js` files that cannot be distributed to
`npm`.
### *strictInjectionParameters*
When set to `true`, this options tells the compiler to report an error for a parameter supplied
whose injection type cannot be determined. When this value option is not provided or is `false`, constructor parameters of classes marked with `@Injectable` whose type cannot be resolved will
produce a warning.
*Note*: It is recommended to change this option explicitly to `true` as this option will default to `true` in the future.
### *flatModuleOutFile*
When set to `true`, this option tells the template compiler to generate a flat module
index of the given file name and the corresponding flat module metadata. Use this option when creating
flat modules that are packaged similarly to `@angular/core` and `@angular/common`. When this option
is used, the `package.json` for the library should refer
to the generated flat module index instead of the library index file. With this
option only one `.metadata.json` file is produced that contains all the metadata necessary
for symbols exported from the library index. In the generated `.ngfactory.js` files, the flat
module index is used to import symbols that includes both the public API from the library index
as well as shrowded internal symbols.
By default the `.ts` file supplied in the `files` field is assumed to be library index.
If more than one `.ts` file is specified, `libraryIndex` is used to select the file to use.
If more than one `.ts` file is supplied without a `libraryIndex`, an error is produced. A flat module
index `.d.ts` and `.js` will be created with the given `flatModuleOutFile` name in the same
location as the library index `.d.ts` file. For example, if a library uses
`public_api.ts` file as the library index of the module, the `tsconfig.json` `files` field
would be `["public_api.ts"]`. The `flatModuleOutFile` options could then be set to, for
example `"index.js"`, which produces `index.d.ts` and `index.metadata.json` files. The
library's `package.json`'s `module` field would be `"index.js"` and the `typings` field
would be `"index.d.ts"`.
### *flatModuleId*
This option specifies the preferred module id to use for importing a flat module.
References generated by the template compiler will use this module name when importing symbols
from the flat module.
This is only meaningful when `flatModuleOutFile` is also supplied. Otherwise the compiler ignores
this option.
### *generateCodeForLibraries*
This option tells the template compiler to generate factory files (`.ngfactory.js` and `.ngstyle.js`)
for `.d.ts` files with a corresponding `.metadata.json` file. This option defaults to
`true`. When this option is `false`, factory files are generated only for `.ts` files.
This option should be set to `false` when using factory summaries.
### *fullTemplateTypeCheck*
This option tells the compiler to enable the [binding expression validation](#binding-expresion-validation)
phase of the template compiler which uses TypeScript to validate binding expressions.
This option is `false` by default.
*Note*: It is recommended to set this to `true` as this option will default to `true` in the future.
### *annotateForClosureCompiler*
This option tells the compiler to use [Tsickle](https://github.com/angular/tsickle) to annotate the emitted
JavaScript with [JsDoc](http://usejsdoc.org/) comments needed by the
[Closure Compiler](https://github.com/google/closure-compiler). This option defaults to `false`.
### *annotationsAs*
Use this option to modify how the Angular specific annotations are emitted to improve tree-shaking. Non-Angular
annotations and decorators are unnaffected. Default is `static fields`.
value | description
----------------|-------------------------------------------------------------
`decorators` | Leave the Decorators in-place. This makes compilation faster. TypeScript will emit calls to the __decorate helper. Use `--emitDecoratorMetadata` for runtime reflection. However, the resulting code will not properly tree-shake.
`static fields` | Replace decorators with a static field in the class. Allows advanced tree-shakers like [Closure Compiler](https://github.com/google/closure-compiler) to remove unused classes.
### *trace*
This tells the compiler to print extra information while compiling templates.
### *enableLegacyTemplate*
The use of `<template>` element was deprecated starting in Angular 4.0 in favor of using
`<ng-template>` to avoid colliding with the DOM's element of the same name. Setting this option to
`true` enables the use of the deprecated `<template>` element . This option
is `false` by default. This option might be required by some third-party Angular libraries.
### *disableExpressionLowering*
The Angular template compiler transforms code that is used, or could be used, in an annotation
to allow it to be imported from template factory modules. See
[metadata rewriting](#metadata-rewriting) for more information.
Setting this option to `false` disables this rewriting, requiring the rewriting to be
done manually.
### *preserveWhitespaces*
This option tells the compiler whether to remove blank text nodes from compiled templates.
This option is `true` by default.
*Note*: It is recommended to set this explicitly to `false` as it emits smaller template factory modules and might be set to `false` by default in the future.
### *allowEmptyCodegenFiles*
Tells the compiler to generate all the possible generated files even if they are empty. This option is
`false` by default. This is an option used by `bazel` build rules and is needed to simplify
how `bazel` rules track file dependencies. It is not recommended to use this option outside of the `bazel`
rules.
### *enableIvy*
Tells the compiler to generate definitions using the Render3 style code generation. This option defaults to `false`.
Not all features are supported with this option enabled. It is only supported
for experimentation and testing of Render3 style code generation.
*Note*: Is it not recommended to use this option as it is not yet feature complete with the Render2 code generation.
## Angular Metadata and AOT
The Angular **AOT compiler** extracts and interprets **metadata** about the parts of the application that Angular is supposed to manage.
Angular metadata tells Angular how to construct instances of your application classes and interact with them at runtime.
You specify the metadata with **decorators** such as `@Component()` and `@Input()`.
You also specify metadata implicitly in the constructor declarations of these decorated classes.
In the following example, the `@Component()` metadata object and the class constructor tell Angular how to create and display an instance of `TypicalComponent`.
```typescript
@Component({
selector: 'app-typical',
template: '<div>A typical component for {{data.name}}</div>'
)}
export class TypicalComponent {
@Input() data: TypicalData;
constructor(private someService: SomeService) { ... }
}
```
The Angular compiler extracts the metadata _once_ and generates a _factory_ for `TypicalComponent`.
When it needs to create a `TypicalComponent` instance, Angular calls the factory, which produces a new visual element, bound to a new instance of the component class with its injected dependency.
## Metadata restrictions
You write metadata in a _subset_ of TypeScript that must conform to the following general constraints:
1. Limit [expression syntax](#expression-syntax) to the supported subset of JavaScript.
2. Only reference exported symbols after [code folding](#folding).
3. Only call [functions supported](#supported-functions) by the compiler.
4. Decorated and data-bound class members must be public.
The next sections elaborate on these points.
## How AOT works
It helps to think of the AOT compiler as having two phases: a code analysis phase in which it simply records a representation of the source; and a code generation phase in which the compiler's `StaticReflector` handles the interpretation as well as places restrictions on what it interprets.
## Phase 1: analysis
The TypeScript compiler does some of the analytic work of the first phase. It emits the `.d.ts` _type definition files_ with type information that the AOT compiler needs to generate application code.
At the same time, the AOT **_collector_** analyzes the metadata recorded in the Angular decorators and outputs metadata information in **`.metadata.json`** files, one per `.d.ts` file.
You can think of `.metadata.json` as a diagram of the overall structure of a decorator's metadata, represented as an [abstract syntax tree (AST)](https://en.wikipedia.org/wiki/Abstract_syntax_tree).
<div class="l-sub-section">
Angular's [schema.ts](https://github.com/angular/angular/blob/master/packages/compiler-cli/src/metadata/schema.ts)
describes the JSON format as a collection of TypeScript interfaces.
</div>
{@a expression-syntax}
### Expression syntax
The _collector_ only understands a subset of JavaScript.
Define metadata objects with the following limited syntax:
Syntax | Example
-----------------------------------|-----------------------------------
Literal object | `{cherry: true, apple: true, mincemeat: false}`
Literal array | `['cherries', 'flour', 'sugar']`
Spread in literal array | `['apples', 'flour', ...the_rest]`
Calls | `bake(ingredients)`
New | `new Oven()`
Property access | `pie.slice`
Array index | `ingredients[0]`
Identifier reference | `Component`
A template string | <code>`pie is ${multiplier} times better than cake`</code>
Literal string | `'pi'`
Literal number | `3.14153265`
Literal boolean | `true`
Literal null | `null`
Supported prefix operator | `!cake`
Supported Binary operator | `a + b`
Conditional operator | `a ? b : c`
Parentheses | `(a + b)`
If an expression uses unsupported syntax, the _collector_ writes an error node to the `.metadata.json` file. The compiler later reports the error if it needs that
piece of metadata to generate the application code.
<div class="l-sub-section">
If you want `ngc` to report syntax errors immediately rather than produce a `.metadata.json` file with errors, set the `strictMetadataEmit` option in `tsconfig`.
```
"angularCompilerOptions": {
...
"strictMetadataEmit" : true
}
```
Angular libraries have this option to ensure that all Angular `.metadata.json` files are clean and it is a best practice to do the same when building your own libraries.
</div>
{@a function-expression}
{@a arrow-functions}
### No arrow functions
The AOT compiler does not support [function expressions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/function)
and [arrow functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions), also called _lambda_ functions.
Consider the following component decorator:
```typescript
@Component({
...
providers: [{provide: server, useFactory: () => new Server()}]
})
```
The AOT _collector_ does not support the arrow function, `() => new Server()`, in a metadata expression.
It generates an error node in place of the function.
When the compiler later interprets this node, it reports an error that invites you to turn the arrow function into an _exported function_.
You can fix the error by converting to this:
```typescript
export function serverFactory() {
return new Server();
}
@Component({
...
providers: [{provide: server, useFactory: serverFactory}]
})
```
Beginning in version 5, the compiler automatically performs this rewritting while emitting the `.js` file.
{@a function-calls}
### Limited function calls
The _collector_ can represent a function call or object creation with `new` as long as the syntax is valid. The _collector_ only cares about proper syntax.
But beware. The compiler may later refuse to generate a call to a _particular_ function or creation of a _particular_ object.
The compiler only supports calls to a small set of functions and will use `new` for only a few designated classes. These functions and classes are in a table of [below](#supported-functions).
### Folding
{@a exported-symbols}
The compiler can only resolve references to **_exported_** symbols.
Fortunately, the _collector_ enables limited use of non-exported symbols through _folding_.
The _collector_ may be able to evaluate an expression during collection and record the result in the `.metadata.json` instead of the original expression.
For example, the _collector_ can evaluate the expression `1 + 2 + 3 + 4` and replace it with the result, `10`.
This process is called _folding_. An expression that can be reduced in this manner is _foldable_.
{@a var-declaration}
The collector can evaluate references to
module-local `const` declarations and initialized `var` and `let` declarations, effectively removing them from the `.metadata.json` file.
Consider the following component definition:
```typescript
const template = '<div>{{hero.name}}</div>';
@Component({
selector: 'app-hero',
template: template
})
export class HeroComponent {
@Input() hero: Hero;
}
```
The compiler could not refer to the `template` constant because it isn't exported.
But the _collector_ can _fold_ the `template` constant into the metadata definition by inlining its contents.
The effect is the same as if you had written:
```typescript
@Component({
selector: 'app-hero',
template: '<div>{{hero.name}}</div>'
})
export class HeroComponent {
@Input() hero: Hero;
}
```
There is no longer a reference to `template` and, therefore, nothing to trouble the compiler when it later interprets the _collector's_ output in `.metadata.json`.
You can take this example a step further by including the `template` constant in another expression:
```typescript
const template = '<div>{{hero.name}}</div>';
@Component({
selector: 'app-hero',
template: template + '<div>{{hero.title}}</div>'
})
export class HeroComponent {
@Input() hero: Hero;
}
```
The _collector_ reduces this expression to its equivalent _folded_ string:
`'<div>{{hero.name}}</div><div>{{hero.title}}</div>'`.
#### Foldable syntax
The following table describes which expressions the _collector_ can and cannot fold:
Syntax | Foldable
-----------------------------------|-----------------------------------
Literal object | yes
Literal array | yes
Spread in literal array | no
Calls | no
New | no
Property access | yes, if target is foldable
Array index | yes, if target and index are foldable
Identifier reference | yes, if it is a reference to a local
A template with no substitutions | yes
A template with substitutions | yes, if the substitutions are foldable
Literal string | yes
Literal number | yes
Literal boolean | yes
Literal null | yes
Supported prefix operator | yes, if operand is foldable
Supported binary operator | yes, if both left and right are foldable
Conditional operator | yes, if condition is foldable
Parentheses | yes, if the expression is foldable
If an expression is not foldable, the collector writes it to `.metadata.json` as an [AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree) for the compiler to resolve.
## Phase 2: code generation
The _collector_ makes no attempt to understand the metadata that it collects and outputs to `.metadata.json`. It represents the metadata as best it can and records errors when it detects a metadata syntax violation.
It's the compiler's job to interpret the `.metadata.json` in the code generation phase.
The compiler understands all syntax forms that the _collector_ supports, but it may reject _syntactically_ correct metadata if the _semantics_ violate compiler rules.
The compiler can only reference _exported symbols_.
Decorated component class members must be public. You cannot make an `@Input()` property private or internal.
Data bound properties must also be public.
```typescript
// BAD CODE - title is private
@Component({
selector: 'app-root',
template: '<h1>{{title}}</h1>'
})
export class AppComponent {
private title = 'My App'; // Bad
}
```
{@a supported-functions}
Most importantly, the compiler only generates code to create instances of certain classes, support certain decorators, and call certain functions from the following lists.
### New instances
The compiler only allows metadata that create instances of the class `InjectionToken` from `@angular/core`.
### Annotations/Decorators
The compiler only supports metadata for these Angular decorators.
Decorator | Module
------------------|--------------
`Attribute` | `@angular/core`
`Component` | `@angular/core`
`ContentChild` | `@angular/core`
`ContentChildren` | `@angular/core`
`Directive` | `@angular/core`
`Host` | `@angular/core`
`HostBinding` | `@angular/core`
`HostListener` | `@angular/core`
`Inject` | `@angular/core`
`Injectable` | `@angular/core`
`Input` | `@angular/core`
`NgModule` | `@angular/core`
`Optional` | `@angular/core`
`Output` | `@angular/core`
`Pipe` | `@angular/core`
`Self` | `@angular/core`
`SkipSelf` | `@angular/core`
`ViewChild` | `@angular/core`
### Macro-functions and macro-static methods
The compiler also supports _macros_ in the form of functions or static
methods that return an expression.
For example, consider the following function:
```typescript
export function wrapInArray<T>(value: T): T[] {
return [value];
}
```
You can call the `wrapInArray` in a metadata definition because it returns the value of an expression that conforms to the compiler's restrictive JavaScript subset.
You might use `wrapInArray()` like this:
```typescript
@NgModule({
declarations: wrapInArray(TypicalComponent)
})
export class TypicalModule {}
```
The compiler treats this usage as if you had written:
```typescript
@NgModule({
declarations: [TypicalComponent]
})
export class TypicalModule {}
```
The collector is simplistic in its determination of what qualifies as a macro
function; it can only contain a single `return` statement.
The Angular [`RouterModule`](api/router/RouterModule) exports two macro static methods, `forRoot` and `forChild`, to help declare root and child routes.
Review the [source code](https://github.com/angular/angular/blob/master/packages/router/src/router_module.ts#L139 "RouterModule.forRoot source code")
for these methods to see how macros can simplify configuration of complex [NgModules](guide/ngmodules).
{@a metadata-rewriting}
### Metadata rewriting
The compiler treats object literals containing the fields `useClass`, `useValue`, `useFactory`, and `data` specially. The compiler converts the expression initializing one of these fields into an exported variable, which replaces the expression. This process of rewriting these expressions removes all the restrictions on what can be in them because
the compiler doesn't need to know the expression's value—it just needs to be able to generate a reference to the value.
You might write something like:
```typescript
class TypicalServer {
}
@NgModule({
providers: [{provide: SERVER, useFactory: () => TypicalServer}]
})
export class TypicalModule {}
```
Without rewriting, this would be invalid because lambdas are not supported and `TypicalServer` is not exported.
To allow this, the compiler automatically rewrites this to something like:
```typescript
class TypicalServer {
}
export const ɵ0 = () => new TypicalServer();
@NgModule({
providers: [{provide: SERVER, useFactory: ɵ0}]
})
export class TypicalModule {}
```
This allows the compiler to generate a reference to `ɵ0` in the
factory without having to know what the value of `ɵ0` contains.
The compiler does the rewriting during the emit of the `.js` file. This doesn't rewrite the `.d.ts` file, however, so TypeScript doesn't recognize it as being an export. Thus, it does not pollute the ES module's exported API.
## Metadata Errors
The following are metadata errors you may encounter, with explanations and suggested corrections.
[Expression form not supported](#expression-form-not-supported)<br>
[Reference to a local (non-exported) symbol](#reference-to-a-local-symbol)<br>
[Only initialized variables and constants](#only-initialized-variables)<br>
[Reference to a non-exported class](#reference-to-a-non-exported-class)<br>
[Reference to a non-exported function](#reference-to-a-non-exported-function)<br>
[Function calls are not supported](#function-calls-not-supported)<br>
[Destructured variable or constant not supported](#destructured-variable-not-supported)<br>
[Could not resolve type](#could-not-resolve-type)<br>
[Name expected](#name-expected)<br>
[Unsupported enum member name](#unsupported-enum-member-name)<br>
[Tagged template expressions are not supported](#tagged-template-expressions-not-supported)<br>
[Symbol reference expected](#symbol-reference-expected)<br>
<hr>
<h3 class="no-toc">Expression form not supported</h3>
The compiler encountered an expression it didn't understand while evalutating Angular metadata.
Language features outside of the compiler's [restricted expression syntax](#expression-syntax)
can produce this error, as seen in the following example:
```
// ERROR
export class Fooish { ... }
...
const prop = typeof Fooish; // typeof is not valid in metadata
...
// bracket notation is not valid in metadata
{ provide: 'token', useValue: { [prop]: 'value' } };
...
```
You can use `typeof` and bracket notation in normal application code.
You just can't use those features within expressions that define Angular metadata.
Avoid this error by sticking to the compiler's [restricted expression syntax](#expression-syntax)
when writing Angular metadata
and be wary of new or unusual TypeScript features.
<hr>
{@a reference-to-a-local-symbol}
<h3 class="no-toc">Reference to a local (non-exported) symbol</h3>
<div class="alert is-helpful">
_Reference to a local (non-exported) symbol 'symbol name'. Consider exporting the symbol._
</div>
The compiler encountered a referenced to a locally defined symbol that either wasn't exported or wasn't initialized.
Here's a `provider` example of the problem.
```
// ERROR
let foo: number; // neither exported nor initialized
@Component({
selector: 'my-component',
template: ... ,
providers: [
{ provide: Foo, useValue: foo }
]
})
export class MyComponent {}
```
The compiler generates the component factory, which includes the `useValue` provider code, in a separate module. _That_ factory module can't reach back to _this_ source module to access the local (non-exported) `foo` variable.
You could fix the problem by initializing `foo`.
```
let foo = 42; // initialized
```
The compiler will [fold](#folding) the expression into the provider as if you had written this.
```
providers: [
{ provide: Foo, useValue: 42 }
]
```
Alternatively, you can fix it by exporting `foo` with the expectation that `foo` will be assigned at runtime when you actually know its value.
```
// CORRECTED
export let foo: number; // exported
@Component({
selector: 'my-component',
template: ... ,
providers: [
{ provide: Foo, useValue: foo }
]
})
export class MyComponent {}
```
Adding `export` often works for variables referenced in metadata such as `providers` and `animations` because the compiler can generate _references_ to the exported variables in these expressions. It doesn't need the _values_ of those variables.
Adding `export` doesn't work when the compiler needs the _actual value_
in order to generate code.
For example, it doesn't work for the `template` property.
```
// ERROR
export let someTemplate: string; // exported but not initialized
@Component({
selector: 'my-component',
template: someTemplate
})
export class MyComponent {}
```
The compiler needs the value of the `template` property _right now_ to generate the component factory.
The variable reference alone is insufficient.
Prefixing the declaration with `export` merely produces a new error, "[`Only initialized variables and constants can be referenced`](#only-initialized-variables)".
<hr>
{@a only-initialized-variables}
<h3 class="no-toc">Only initialized variables and constants</h3>
<div class="alert is-helpful">
_Only initialized variables and constants can be referenced because the value of this variable is needed by the template compiler._
</div>
The compiler found a reference to an exported variable or static field that wasn't initialized.
It needs the value of that variable to generate code.
The following example tries to set the component's `template` property to the value of
the exported `someTemplate` variable which is declared but _unassigned_.
```
// ERROR
export let someTemplate: string;
@Component({
selector: 'my-component',
template: someTemplate
})
export class MyComponent {}
```
You'd also get this error if you imported `someTemplate` from some other module and neglected to initialize it there.
```
// ERROR - not initialized there either
import { someTemplate } from './config';
@Component({
selector: 'my-component',
template: someTemplate
})
export class MyComponent {}
```
The compiler cannot wait until runtime to get the template information.
It must statically derive the value of the `someTemplate` variable from the source code
so that it can generate the component factory, which includes
instructions for building the element based on the template.
To correct this error, provide the initial value of the variable in an initializer clause _on the same line_.
```
// CORRECTED
export let someTemplate = '<h1>Greetings from Angular</h1>';
@Component({
selector: 'my-component',
template: someTemplate
})
export class MyComponent {}
```
<hr>
<h3 class="no-toc">Reference to a non-exported class</h3>
<div class="alert is-helpful">
_Reference to a non-exported class <class name>. Consider exporting the class._
</div>
Metadata referenced a class that wasn't exported.
For example, you may have defined a class and used it as an injection token in a providers array
but neglected to export that class.
```
// ERROR
abstract class MyStrategy { }
...
providers: [
{ provide: MyStrategy, useValue: ... }
]
...
```
Angular generates a class factory in a separate module and that
factory [can only access exported classes](#exported-symbols).
To correct this error, export the referenced class.
```
// CORRECTED
export abstract class MyStrategy { }
...
providers: [
{ provide: MyStrategy, useValue: ... }
]
...
```
<hr>
<h3 class="no-toc">Reference to a non-exported function</h3>
Metadata referenced a function that wasn't exported.
For example, you may have set a providers `useFactory` property to a locally defined function that you neglected to export.
```
// ERROR
function myStrategy() { ... }
...
providers: [
{ provide: MyStrategy, useFactory: myStrategy }
]
...
```
Angular generates a class factory in a separate module and that
factory [can only access exported functions](#exported-symbols).
To correct this error, export the function.
```
// CORRECTED
export function myStrategy() { ... }
...
providers: [
{ provide: MyStrategy, useFactory: myStrategy }
]
...
```
<hr>
{@a function-calls-not-supported}
<h3 class="no-toc">Function calls are not supported</h3>
<div class="alert is-helpful">
_Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function._
</div>
The compiler does not currently support [function expressions or lambda functions](#function-expression).
For example, you cannot set a provider's `useFactory` to an anonymous function or arrow function like this.
```
// ERROR
...
providers: [
{ provide: MyStrategy, useFactory: function() { ... } },
{ provide: OtherStrategy, useFactory: () => { ... } }
]
...
```
You also get this error if you call a function or method in a provider's `useValue`.
```
// ERROR
import { calculateValue } from './utilities';
...
providers: [
{ provide: SomeValue, useValue: calculateValue() }
]
...
```
To correct this error, export a function from the module and refer to the function in a `useFactory` provider instead.
<code-example linenums="false">
// CORRECTED
import { calculateValue } from './utilities';
export function myStrategy() { ... }
export function otherStrategy() { ... }
export function someValueFactory() {
return calculateValue();
}
...
providers: [
{ provide: MyStrategy, useFactory: myStrategy },
{ provide: OtherStrategy, useFactory: otherStrategy },
{ provide: SomeValue, useFactory: someValueFactory }
]
...
</code-example>
<hr>
{@a destructured-variable-not-supported}
<h3 class="no-toc">Destructured variable or constant not supported</h3>
<div class="alert is-helpful">
_Referencing an exported destructured variable or constant is not supported by the template compiler. Consider simplifying this to avoid destructuring._
</div>
The compiler does not support references to variables assigned by [destructuring](https://www.typescriptlang.org/docs/handbook/variable-declarations.html#destructuring).
For example, you cannot write something like this:
<code-example linenums="false">
// ERROR
import { configuration } from './configuration';
// destructured assignment to foo and bar
const {foo, bar} = configuration;
...
providers: [
{provide: Foo, useValue: foo},
{provide: Bar, useValue: bar},
]
...
</code-example>
To correct this error, refer to non-destructured values.
<code-example linenums="false">
// CORRECTED
import { configuration } from './configuration';
...
providers: [
{provide: Foo, useValue: configuration.foo},
{provide: Bar, useValue: configuration.bar},
]
...
</code-example>
<hr>
<h3 class="no-toc">Could not resolve type</h3>
The compiler encountered a type and can't determine which module exports that type.
This can happen if you refer to an ambient type.
For example, the `Window` type is an ambiant type declared in the global `.d.ts` file.
You'll get an error if you reference it in the component constructor,
which the compiler must statically analyze.
```
// ERROR
@Component({ })
export class MyComponent {
constructor (private win: Window) { ... }
}
```
TypeScript understands ambiant types so you don't import them.
The Angular compiler does not understand a type that you neglect to export or import.
In this case, the compiler doesn't understand how to inject something with the `Window` token.
Do not refer to ambient types in metadata expressions.
If you must inject an instance of an ambiant type,
you can finesse the problem in four steps:
1. Create an injection token for an instance of the ambiant type.
1. Create a factory function that returns that instance.
1. Add a `useFactory` provider with that factory function.
1. Use `@Inject` to inject the instance.
Here's an illustrative example.
<code-example linenums="false">
// CORRECTED
import { Inject } from '@angular/core';
export const WINDOW = new InjectionToken('Window');
export function _window() { return window; }
@Component({
...
providers: [
{ provide: WINDOW, useFactory: _window }
]
})
export class MyComponent {
constructor (@Inject(WINDOW) private win: Window) { ... }
}
</code-example>
The `Window` type in the constructor is no longer a problem for the compiler because it
uses the `@Inject(WINDOW)` to generate the injection code.
Angular does something similar with the `DOCUMENT` token so you can inject the browser's `document` object (or an abstraction of it, depending upon the platform in which the application runs).
<code-example linenums="false">
import { Inject } from '@angular/core';
import { DOCUMENT } from '@angular/platform-browser';
@Component({ ... })
export class MyComponent {
constructor (@Inject(DOCUMENT) private doc: Document) { ... }
}
</code-example>
<hr>
<h3 class="no-toc">Name expected</h3>
The compiler expected a name in an expression it was evaluating.
This can happen if you use a number as a property name as in the following example.
```
// ERROR
provider: [{ provide: Foo, useValue: { 0: 'test' } }]
```
Change the name of the property to something non-numeric.
```
// CORRECTED
provider: [{ provide: Foo, useValue: { '0': 'test' } }]
```
<hr>
<h3 class="no-toc">Unsupported enum member name</h3>
Angular couldn't determine the value of the [enum member](https://www.typescriptlang.org/docs/handbook/enums.html)
that you referenced in metadata.
The compiler can understand simple enum values but not complex values such as those derived from computed properties.
<code-example linenums="false">
// ERROR
enum Colors {
Red = 1,
White,
Blue = "Blue".length // computed
}
...
providers: [
{ provide: BaseColor, useValue: Colors.White } // ok
{ provide: DangerColor, useValue: Colors.Red } // ok
{ provide: StrongColor, useValue: Colors.Blue } // bad
]
...
</code-example>
Avoid referring to enums with complicated initializers or computed properties.
<hr>
{@a tagged-template-expressions-not-supported}
<h3 class="no-toc">Tagged template expressions are not supported</h3>
<div class="alert is-helpful">
_Tagged template expressions are not supported in metadata._
</div>
The compiler encountered a JavaScript ES2015 [tagged template expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Tagged_template_literals) such as,
```
// ERROR
const expression = 'funky';
const raw = String.raw`A tagged template ${expression} string`;
...
template: '<div>' + raw + '</div>'
...
```
[`String.raw()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw)
is a _tag function_ native to JavaScript ES2015.
The AOT compiler does not support tagged template expressions; avoid them in metadata expressions.
<hr>
<h3 class="no-toc">Symbol reference expected</h3>
The compiler expected a reference to a symbol at the location specified in the error message.
This error can occur if you use an expression in the `extends` clause of a class.
<!--
Chuck: After reviewing your PR comment I'm still at a loss. See [comment there](https://github.com/angular/angular/pull/17712#discussion_r132025495).
-->
{@a binding-expresion-validation}
## Phase 3: binding expression validation
In the validation phase, the Angular template compiler uses the TypeScript compiler to validate the
binding expressions in templates. Enable this phase explicity by adding the compiler
option `"fullTemplateTypeCheck"` in the `"angularCompilerOptions"` of the project's `tsconfig.json` (see
[Angular Compiler Options](#compiler-options)).
Template validation produces error messages when a type error is detected in a template binding
expression, similar to how type errors are reported by the TypeScript compiler against code in a `.ts`
file.
For example, consider the following component:
```typescript
@Component({
selector: 'my-component',
template: '{{person.addresss.street}}'
})
class MyComponent {
person?: Person;
}
```
This will produce the following error:
```
my.component.ts.MyComponent.html(1,1): : Property 'addresss' does not exist on type 'Person'. Did you mean 'address'?
```
The file name reported in the error message, `my.component.ts.MyComponent.html`, is a synthetic file
generated by the template compiler that holds contents of the `MyComponent` class template.
Compiler never writes this file to disk. The line and column numbers are relative to the template string
in the `@Component` annotation of the class, `MyComponent` in this case. If a component uses
`templateUrl` instead of `template`, the errors are reported in the HTML file refereneced by the
`templateUrl` instead of a synthetic file.
The error location is the beginning of the text node that contains the interpolation expression with
the error. If the error is in an attribute binding such as `[value]="person.address.street"`, the error
location is the location of the attribute that contains the error.
The validation uses the TypeScript type checker and the options supplied to the TypeScript compiler to control
how detailed the type validation is. For example, if the `strictTypeChecks` is specified, the error ```my.component.ts.MyComponent.html(1,1): : Object is possibly 'undefined'``` is reported as well as the above error message.
### Type narrowing
The expression used in an `ngIf` directive is used to narrow type unions in the Angular
template compiler, the same way the `if` expression does in TypeScript. For example, to avoid
`Object is possibly 'undefined'` error in the template above, modify it to only emit the
interpolation if the value of `person` is initialized as shown below:
```typescript
@Component({
selector: 'my-component',
template: '<span *ngIf="person"> {{person.addresss.street}} </span>'
})
class MyComponent {
person?: Person;
}
```
Using `*ngIf` allows the TypeScript compiler to infer that the `person` used in the
binding expression will never be `undefined`.
#### Custom `ngIf` like directives
Directives that behave like `*ngIf` can declare that they want the same treatment by including
a static member marker that is a signal to the template compiler to treat them
like `*ngIf`. This static member for `*ngIf` is:
```typescript
public static ngIfUseIfTypeGuard: void;
```
This declares that the input property `ngIf` of the `NgIf` directive should be treated as a
guard to the use of its template, implying that the template will only be instantiated if
the `ngIf` input property is true.
### Non-null type assertion operator
Use the [non-null type assertion operator](guide/template-syntax#non-null-assertion-operator)
to suppress the `Object is possibly 'undefined'` error when it is incovienent to use
`*ngIf` or when some constraint in the component ensures that the expression is always
non-null when the binding expression is interpolated.
In the following example, the `person` and `address` properties are always set together,
implying that `address` is always non-null if `person` is non-null. There is no convenient
way to describe this constraint to TypeScript and the template compiler, but the error
is suppressed in the example by using `address!.street`.
```typescript
@Component({
selector: 'my-component',
template: '<span *ngIf="person"> {{person.name}} lives on {{address!.street}} </span>'
})
class MyComponent {
person?: Person;
address?: Address;
setData(person: Person, address: Address) {
this.person = person;
this.address = address;
}
}
```
The non-null assertion operator should be used sparingly as refactoring of the component
might break this constraint.
In this example it is recommended to include the checking of `address`
in the `*ngIf`as shown below:
```typescript
@Component({
selector: 'my-component',
template: '<span *ngIf="person && address"> {{person.name}} lives on {{address.street}} </span>'
})
class MyComponent {
person?: Person;
address?: Address;
setData(person: Person, address: Address) {
this.person = person;
this.address = address;
}
}
```
### Disabling type checking using `$any()`
Disable checking of a binding expression by surrounding the expression
in a call to the [`$any()` cast pseudo-function](guide/template-syntax).
The compiler treats it as a cast to the `any` type just like in TypeScript when a `<any>`
or `as any` cast is used.
In the following example, the error `Property addresss does not exist` is suppressed
by casting `person` to the `any` type.
```typescript
@Component({
selector: 'my-component',
template: '{{$any(person).addresss.street}}'
})
class MyComponent {
person?: Person;
}
```
## Summary
* What the AOT compiler does and why it is important.
* Why metadata must be written in a subset of JavaScript.
* What that subset is.
* Other restrictions on metadata definition.
* Macro-functions and macro-static methods.
* Compiler errors related to metadata.
* Validation of binding expressions
| vsavkin/angular | aio/content/guide/aot-compiler.md | Markdown | mit | 47,116 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>cfml-basis: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.12.0 / cfml-basis - 20211215</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
cfml-basis
<small>
20211215
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-03-02 09:40:27 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-03-02 09:40:27 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-num base Num library distributed with the OCaml compiler
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
coq 8.12.0 Formal proof management system
num 0 The Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.05.0 The OCaml compiler (virtual package)
ocaml-base-compiler 4.05.0 Official 4.05.0 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.3 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "arthur.chargueraud@inria.fr"
homepage: "https://gitlab.inria.fr/charguer/cfml2"
dev-repo: "git+https://gitlab.inria.fr/charguer/cfml2.git"
bug-reports: "https://gitlab.inria.fr/charguer/cfml2/-/issues"
license: "MIT"
synopsis: "The CFML Basis library"
description: """
This library provides theoretical foundations for the CFML tool.
"""
build: [
[make "-C" "lib/coq" "-j%{jobs}%"]
]
install: [
[make "-C" "lib/coq" "install"]
]
depends: [
"coq" { >= "8.13" }
"coq-tlc" { >= "20211215"}
]
tags: [
"date:"
"logpath:CFML"
"category:Computer Science/Programming Languages/Formal Definitions and Theory"
"keyword:program verification"
"keyword:separation logic"
"keyword:weakest precondition"
]
authors: [
"Arthur Charguéraud"
]
url {
src:
"https://gitlab.inria.fr/charguer/cfml2/-/archive/20211215/archive.tar.gz"
checksum: [
"md5=1ce2b343adf77f5d75cccd7b860cc19b"
"sha512=9205fbcf8bf3dcc7131bcbfd63f68694fa59145422741f6f67f0881f0dd2d923a947f10f6a979d43f569e2ae83464aac366ff6445a074d22625769b436e6e5e9"
]
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-cfml-basis.20211215 coq.8.12.0</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.12.0).
The following dependencies couldn't be met:
- coq-cfml-basis -> coq >= 8.13
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-cfml-basis.20211215</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
| coq-bench/coq-bench.github.io | clean/Linux-x86_64-4.05.0-2.0.1/released/8.12.0/cfml-basis/20211215.html | HTML | mit | 7,051 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>weak-up-to: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.11.1 / weak-up-to - 8.9.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
weak-up-to
<small>
8.9.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-02-09 07:07:27 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-02-09 07:07:27 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
coq 8.11.1 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.11.2 The OCaml compiler (virtual package)
ocaml-base-compiler 4.11.2 Official release 4.11.2
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.3 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "http://perso.ens-lyon.fr/damien.pous/upto/"
license: "GPL"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/WeakUpTo"]
depends: [
"ocaml"
"coq" {>= "8.9" & < "8.10~"}
]
tags: [
"keyword: weak bisimilarity"
"keyword: weak bisimulation"
"keyword: up-to techniques"
"keyword: termination"
"keyword: commutation"
"keyword: Newman's lemma"
"category: Computer Science/Concurrent Systems and Protocols/Theory of concurrent systems"
"date: 2005-02-22"
]
authors: [
"Damien Pous <damien.pous at ens-lyon.fr> [http://perso.ens-lyon.fr/damien.pous/]"
]
bug-reports: "https://github.com/coq-contribs/weak-up-to/issues"
dev-repo: "git+https://github.com/coq-contribs/weak-up-to.git"
synopsis: "New Up-to Techniques for Weak Bisimulation"
description: """
This contribution is the formalisation of a paper that appeared in
Proc. of ICALP 2005: "Up-to Techniques for Weak Bisimulation".
First we define a framework for defining up-to techniques for weak
bisimulation in a modular way. Then we prove the correctness of some
new up-to techniques, based on termination guarantees. Notably, a
generalisation of Newman's Lemma to commutation results is
established."""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/weak-up-to/archive/v8.9.0.tar.gz"
checksum: "md5=6c91d9b73aee52981c01c0f5b300aafe"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-weak-up-to.8.9.0 coq.8.11.1</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.11.1).
The following dependencies couldn't be met:
- coq-weak-up-to -> coq < 8.10~ -> ocaml < 4.10
base of this switch (use `--unlock-base' to force)
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-weak-up-to.8.9.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
| coq-bench/coq-bench.github.io | clean/Linux-x86_64-4.11.2-2.0.7/released/8.11.1/weak-up-to/8.9.0.html | HTML | mit | 7,345 |
/*
* Copyright 2014-2017 Gil Mendes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.continuum.generators;
import org.continuum.main.Configuration;
import org.continuum.world.WorldProvider;
public class ObjectGeneratorFirTree extends ObjectGenerator {
/**
* @param w
* @param seed
*/
public ObjectGeneratorFirTree(WorldProvider w, String seed) {
super(w, seed);
}
/**
* Generates the tree.
*
* @param posX Origin on the x-axis
* @param posY Origin on the y-axis
* @param posZ Origin on the z-axis
*/
@Override
public void generate(int posX, int posY, int posZ, boolean update) {
int height = Math.abs(_rand.randomInt() % 4) + 8;
if (posY + height >= Configuration.CHUNK_DIMENSIONS.y) {
return;
}
// Generate tree trunk
for (int i = 0; i < height; i++) {
_worldProvider.setBlock(posX, posY + i, posZ, (byte) 0x5, update, true);
}
int stage = 2;
// Generate the treetop
for (int y = height - 1; y >= (height * (1.0 / 3.0)); y--) {
for (int x = -(stage / 2); x <= (stage / 2); x++) {
if (!(x == 0)) {
_worldProvider.setBlock(posX + x, posY + y, posZ, (byte) 0x16, update, false);
_worldProvider.refreshSunlightAt(posX + x, 0, false, true);
}
}
for (int z = -(stage / 2); z <= (stage / 2); z++) {
if (!(z == 0)) {
_worldProvider.setBlock(posX, posY + y, posZ + z, (byte) 0x16, update, false);
_worldProvider.refreshSunlightAt(0, posZ + z, false, true);
}
}
stage++;
}
_worldProvider.setBlock(posX, posY + height, posZ, (byte) 0x16, update, false);
}
}
| gil0mendes/continuum | engine/src/main/java/org/continuum/generators/ObjectGeneratorFirTree.java | Java | mit | 2,381 |
create table quality_center_queries_defects
(
QualityCenterQueryId int not null,
QualityCenterDefectId int not null,
primary key (QualityCenterQueryId, QualityCenterDefectId),
constraint qcqd_QualityCenterDefectId_QualityCenterQueryId_uindex
unique (QualityCenterDefectId, QualityCenterQueryId),
constraint quality_center_queries_defects_quality_center_queries_Id_fk
foreign key (QualityCenterQueryId) references hub.quality_center_queries (Id),
constraint quality_center_queries_defects_quality_center_defects_Id_fk
foreign key (QualityCenterDefectId) references hub.quality_center_defects (Id)
)
comment 'Associates defects with the query or queries from which they were retrieved'
;
create index quality_center_queries_defects_QualityCenterQueryId_index
on quality_center_queries_defects (QualityCenterQueryId)
; | lchase/hub | hub-db/src/main/resources/db/migration/V0.82__AddQualityCenterQueryDefects.sql | SQL | mit | 829 |
var instance = null;
OptionSelect = function OptionSelect(optionSelectFunction, id, options) {
this.optionSelect = optionSelectFunction;
this.containerId = id;
this.options = options;
instance.instanceData.set(this);
}
OptionSelect.prototype.open = function() {
$(this.containerId).show();
};
Template.optionSelect.onCreated(function() {
this.instanceData = new ReactiveVar({});
instance = this;
});
Template.optionSelect.helpers({
options: function() {
return instance.instanceData.get().options;
}
});
Template.optionSelect.events({
'click .option-select__selection': function() {
var obj = instance.instanceData.get();
obj.optionSelect(this);
$(obj.containerId).hide();
},
'click #option-select-close': function() {
$(instance.instanceData.get().containerId).hide();
}
});
| Spartano/fl-maps | client/templates/eventsForm/optionSelect/optionSelect.js | JavaScript | mit | 805 |
package coin.tracker.zxr.search;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.StaggeredGridLayoutManager;
/**
* Created by Mayur on 23-09-2017.
*/
public abstract class EndlessRecyclerViewScrollListener extends RecyclerView.OnScrollListener {
// The minimum amount of items to have below your current scroll position
// before loading more.
private int visibleThreshold = 4;
// The current offset index of data you have loaded
private int currentPage = 0;
// The total number of items in the dataset after the last load
private int previousTotalItemCount = 0;
// True if we are still waiting for the last set of data to load.
private boolean loading = true;
// Sets the starting page index
private int startingPageIndex = 0;
RecyclerView.LayoutManager mLayoutManager;
public EndlessRecyclerViewScrollListener(LinearLayoutManager layoutManager) {
this.mLayoutManager = layoutManager;
}
public EndlessRecyclerViewScrollListener(GridLayoutManager layoutManager) {
this.mLayoutManager = layoutManager;
visibleThreshold = visibleThreshold * layoutManager.getSpanCount();
}
public EndlessRecyclerViewScrollListener(StaggeredGridLayoutManager layoutManager) {
this.mLayoutManager = layoutManager;
visibleThreshold = visibleThreshold * layoutManager.getSpanCount();
}
public int getLastVisibleItem(int[] lastVisibleItemPositions) {
int maxSize = 0;
for (int i = 0; i < lastVisibleItemPositions.length; i++) {
if (i == 0) {
maxSize = lastVisibleItemPositions[i];
}
else if (lastVisibleItemPositions[i] > maxSize) {
maxSize = lastVisibleItemPositions[i];
}
}
return maxSize;
}
// This happens many times a second during a scroll, so be wary of the code you place here.
// We are given a few useful parameters to help us work out if we need to load some more data,
// but first we check if we are waiting for the previous load to finish.
@Override
public void onScrolled(RecyclerView view, int dx, int dy) {
int lastVisibleItemPosition = 0;
int totalItemCount = mLayoutManager.getItemCount();
if (mLayoutManager instanceof StaggeredGridLayoutManager) {
int[] lastVisibleItemPositions = ((StaggeredGridLayoutManager) mLayoutManager).findLastVisibleItemPositions(null);
// get maximum element within the list
lastVisibleItemPosition = getLastVisibleItem(lastVisibleItemPositions);
} else if (mLayoutManager instanceof GridLayoutManager) {
lastVisibleItemPosition = ((GridLayoutManager) mLayoutManager).findLastVisibleItemPosition();
} else if (mLayoutManager instanceof LinearLayoutManager) {
lastVisibleItemPosition = ((LinearLayoutManager) mLayoutManager).findLastVisibleItemPosition();
}
// If the total item count is zero and the previous isn't, assume the
// list is invalidated and should be reset back to initial state
if (totalItemCount < previousTotalItemCount) {
this.currentPage = this.startingPageIndex;
this.previousTotalItemCount = totalItemCount;
if (totalItemCount == 0) {
this.loading = true;
}
}
// If it’s still loading, we check to see if the dataset count has
// changed, if so we conclude it has finished loading and update the current page
// number and total item count.
if (loading && (totalItemCount > previousTotalItemCount)) {
loading = false;
previousTotalItemCount = totalItemCount;
}
// If it isn’t currently loading, we check to see if we have breached
// the visibleThreshold and need to reload more data.
// If we do need to reload some more data, we execute onLoadMore to fetch the data.
// threshold should reflect how many total columns there are too
if (!loading && (lastVisibleItemPosition + visibleThreshold) > totalItemCount) {
currentPage++;
onLoadMore(currentPage, totalItemCount, view);
loading = true;
}
}
// Call this method whenever performing new searches
public void resetState() {
this.currentPage = this.startingPageIndex;
this.previousTotalItemCount = 0;
this.loading = true;
}
// Defines the process for actually loading more data based on page
public abstract void onLoadMore(int page, int totalItemsCount, RecyclerView view);
} | mayuroks/Coin-Tracker | app/src/main/java/coin/tracker/zxr/search/EndlessRecyclerViewScrollListener.java | Java | mit | 4,783 |
import { hideProperty } from '../util';
export const scopeKey = '__scope__';
export class ScopeData {
public $state: any = {};
public $getters: any = {};
public static get(ctx: any): ScopeData {
return ctx[scopeKey] || (function () {
const scope = new ScopeData();
hideProperty(ctx, scopeKey, scope);
return scope;
})();
}
}
| zetaplus006/vubx | src/state/scope.ts | TypeScript | mit | 399 |
.qwizzer{
text-align: center;
left:0;
position: absolute;
height:10em;
width:100%;
color:#fff;
background-color: #000;
opacity:.9;
}
.qwizzer h5{
font-size: 20px;line-height: .5em;
}
.qwizzer label{
font-size:14px;
} | Wesonk/Qwizzer | css/qwizzer.css | CSS | mit | 237 |
---
layout: post
title: 垃圾炸弹
category: algorithm
tags:
- POJ
- 搜索
- 暴力
keywords:
description:
---
[垃圾炸弹](http://cxsjsx.openjudge.cn/2015finalpractice/33/)
{% highlight c++ %}
#include <iostream>
using namespace std;
void func(){
int d;
cin >> d;
int n;
cin >> n;
int x[21],y[21],m[21];
for(int i = 0;i < n;i ++){
cin >> x[i] >> y[i] >> m[i];
}
int result = 0;
int c = 1;
for(int i = 0;i < 1025;i++){
for(int j = 0;j < 1025;j++){
int cn = 0;
for(int k=0;k<n;k++){
if(x[k] >= i-d && x[k]<= i + d && y[k] >= j-d && y[k] <= j + d){
cn += m[k];
}
}
if(cn > result){
result = cn;
c = 1;
}else if(cn == result){
c++;
}
}
}
cout << c << " " << result << endl;
}
int main(){
int T;
cin >> T;
while(T--){
func();
}
}
{% endhighlight %}
| KarmaGYZ/karmagyz.github.io | _posts/2015-09-27-垃圾炸弹.markdown | Markdown | mit | 838 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Data Type Formatting Functions</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REV="MADE"
HREF="mailto:pgsql-docs@postgresql.org"><LINK
REL="HOME"
TITLE="PostgreSQL 9.0.10 Documentation"
HREF="index.html"><LINK
REL="UP"
TITLE="Functions and Operators"
HREF="functions.html"><LINK
REL="PREVIOUS"
TITLE="Pattern Matching"
HREF="functions-matching.html"><LINK
REL="NEXT"
TITLE="Date/Time Functions and Operators"
HREF="functions-datetime.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="stylesheet.css"><META
HTTP-EQUIV="Content-Type"
CONTENT="text/html; charset=ISO-8859-1"><META
NAME="creation"
CONTENT="2012-09-19T22:08:45"></HEAD
><BODY
CLASS="SECT1"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="5"
ALIGN="center"
VALIGN="bottom"
><A
HREF="index.html"
>PostgreSQL 9.0.10 Documentation</A
></TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
TITLE="Pattern Matching"
HREF="functions-matching.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
HREF="functions.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="60%"
ALIGN="center"
VALIGN="bottom"
>Chapter 9. Functions and Operators</TD
><TD
WIDTH="20%"
ALIGN="right"
VALIGN="top"
><A
TITLE="Date/Time Functions and Operators"
HREF="functions-datetime.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="FUNCTIONS-FORMATTING"
>9.8. Data Type Formatting Functions</A
></H1
><P
> The <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> formatting functions
provide a powerful set of tools for converting various data types
(date/time, integer, floating point, numeric) to formatted strings
and for converting from formatted strings to specific data types.
<A
HREF="functions-formatting.html#FUNCTIONS-FORMATTING-TABLE"
>Table 9-20</A
> lists them.
These functions all follow a common calling convention: the first
argument is the value to be formatted and the second argument is a
template that defines the output or input format.
</P
><P
> A single-argument <CODE
CLASS="FUNCTION"
>to_timestamp</CODE
> function is also
available; it accepts a
<TT
CLASS="TYPE"
>double precision</TT
> argument and converts from Unix epoch
(seconds since 1970-01-01 00:00:00+00) to
<TT
CLASS="TYPE"
>timestamp with time zone</TT
>.
(<TT
CLASS="TYPE"
>Integer</TT
> Unix epochs are implicitly cast to
<TT
CLASS="TYPE"
>double precision</TT
>.)
</P
><DIV
CLASS="TABLE"
><A
NAME="FUNCTIONS-FORMATTING-TABLE"
></A
><P
><B
>Table 9-20. Formatting Functions</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><COL><COL><THEAD
><TR
><TH
>Function</TH
><TH
>Return Type</TH
><TH
>Description</TH
><TH
>Example</TH
></TR
></THEAD
><TBODY
><TR
><TD
><TT
CLASS="LITERAL"
><CODE
CLASS="FUNCTION"
>to_char(<TT
CLASS="TYPE"
>timestamp</TT
>, <TT
CLASS="TYPE"
>text</TT
>)</CODE
></TT
></TD
><TD
><TT
CLASS="TYPE"
>text</TT
></TD
><TD
>convert time stamp to string</TD
><TD
><TT
CLASS="LITERAL"
>to_char(current_timestamp, 'HH12:MI:SS')</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
><CODE
CLASS="FUNCTION"
>to_char(<TT
CLASS="TYPE"
>interval</TT
>, <TT
CLASS="TYPE"
>text</TT
>)</CODE
></TT
></TD
><TD
><TT
CLASS="TYPE"
>text</TT
></TD
><TD
>convert interval to string</TD
><TD
><TT
CLASS="LITERAL"
>to_char(interval '15h 2m 12s', 'HH24:MI:SS')</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
><CODE
CLASS="FUNCTION"
>to_char(<TT
CLASS="TYPE"
>int</TT
>, <TT
CLASS="TYPE"
>text</TT
>)</CODE
></TT
></TD
><TD
><TT
CLASS="TYPE"
>text</TT
></TD
><TD
>convert integer to string</TD
><TD
><TT
CLASS="LITERAL"
>to_char(125, '999')</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
><CODE
CLASS="FUNCTION"
>to_char</CODE
>(<TT
CLASS="TYPE"
>double precision</TT
>,
<TT
CLASS="TYPE"
>text</TT
>)</TT
></TD
><TD
><TT
CLASS="TYPE"
>text</TT
></TD
><TD
>convert real/double precision to string</TD
><TD
><TT
CLASS="LITERAL"
>to_char(125.8::real, '999D9')</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
><CODE
CLASS="FUNCTION"
>to_char(<TT
CLASS="TYPE"
>numeric</TT
>, <TT
CLASS="TYPE"
>text</TT
>)</CODE
></TT
></TD
><TD
><TT
CLASS="TYPE"
>text</TT
></TD
><TD
>convert numeric to string</TD
><TD
><TT
CLASS="LITERAL"
>to_char(-125.8, '999D99S')</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
><CODE
CLASS="FUNCTION"
>to_date(<TT
CLASS="TYPE"
>text</TT
>, <TT
CLASS="TYPE"
>text</TT
>)</CODE
></TT
></TD
><TD
><TT
CLASS="TYPE"
>date</TT
></TD
><TD
>convert string to date</TD
><TD
><TT
CLASS="LITERAL"
>to_date('05 Dec 2000', 'DD Mon YYYY')</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
><CODE
CLASS="FUNCTION"
>to_number(<TT
CLASS="TYPE"
>text</TT
>, <TT
CLASS="TYPE"
>text</TT
>)</CODE
></TT
></TD
><TD
><TT
CLASS="TYPE"
>numeric</TT
></TD
><TD
>convert string to numeric</TD
><TD
><TT
CLASS="LITERAL"
>to_number('12,454.8-', '99G999D9S')</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
><CODE
CLASS="FUNCTION"
>to_timestamp(<TT
CLASS="TYPE"
>text</TT
>, <TT
CLASS="TYPE"
>text</TT
>)</CODE
></TT
></TD
><TD
><TT
CLASS="TYPE"
>timestamp with time zone</TT
></TD
><TD
>convert string to time stamp</TD
><TD
><TT
CLASS="LITERAL"
>to_timestamp('05 Dec 2000', 'DD Mon YYYY')</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
><CODE
CLASS="FUNCTION"
>to_timestamp(<TT
CLASS="TYPE"
>double precision</TT
>)</CODE
></TT
></TD
><TD
><TT
CLASS="TYPE"
>timestamp with time zone</TT
></TD
><TD
>convert Unix epoch to time stamp</TD
><TD
><TT
CLASS="LITERAL"
>to_timestamp(1284352323)</TT
></TD
></TR
></TBODY
></TABLE
></DIV
><P
> In a <CODE
CLASS="FUNCTION"
>to_char</CODE
> output template string, there are certain
patterns that are recognized and replaced with appropriately-formatted
data based on the given value. Any text that is not a template pattern is
simply copied verbatim. Similarly, in an input template string (for the
other functions), template patterns identify the values to be supplied by
the input data string.
</P
><P
> <A
HREF="functions-formatting.html#FUNCTIONS-FORMATTING-DATETIME-TABLE"
>Table 9-21</A
> shows the
template patterns available for formatting date and time values.
</P
><DIV
CLASS="TABLE"
><A
NAME="FUNCTIONS-FORMATTING-DATETIME-TABLE"
></A
><P
><B
>Table 9-21. Template Patterns for Date/Time Formatting</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><THEAD
><TR
><TH
>Pattern</TH
><TH
>Description</TH
></TR
></THEAD
><TBODY
><TR
><TD
><TT
CLASS="LITERAL"
>HH</TT
></TD
><TD
>hour of day (01-12)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>HH12</TT
></TD
><TD
>hour of day (01-12)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>HH24</TT
></TD
><TD
>hour of day (00-23)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>MI</TT
></TD
><TD
>minute (00-59)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>SS</TT
></TD
><TD
>second (00-59)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>MS</TT
></TD
><TD
>millisecond (000-999)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>US</TT
></TD
><TD
>microsecond (000000-999999)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>SSSS</TT
></TD
><TD
>seconds past midnight (0-86399)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>AM</TT
>, <TT
CLASS="LITERAL"
>am</TT
>,
<TT
CLASS="LITERAL"
>PM</TT
> or <TT
CLASS="LITERAL"
>pm</TT
></TD
><TD
>meridiem indicator (without periods)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>A.M.</TT
>, <TT
CLASS="LITERAL"
>a.m.</TT
>,
<TT
CLASS="LITERAL"
>P.M.</TT
> or <TT
CLASS="LITERAL"
>p.m.</TT
></TD
><TD
>meridiem indicator (with periods)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>Y,YYY</TT
></TD
><TD
>year (4 and more digits) with comma</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>YYYY</TT
></TD
><TD
>year (4 and more digits)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>YYY</TT
></TD
><TD
>last 3 digits of year</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>YY</TT
></TD
><TD
>last 2 digits of year</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>Y</TT
></TD
><TD
>last digit of year</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>IYYY</TT
></TD
><TD
>ISO year (4 and more digits)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>IYY</TT
></TD
><TD
>last 3 digits of ISO year</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>IY</TT
></TD
><TD
>last 2 digits of ISO year</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>I</TT
></TD
><TD
>last digit of ISO year</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>BC</TT
>, <TT
CLASS="LITERAL"
>bc</TT
>,
<TT
CLASS="LITERAL"
>AD</TT
> or <TT
CLASS="LITERAL"
>ad</TT
></TD
><TD
>era indicator (without periods)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>B.C.</TT
>, <TT
CLASS="LITERAL"
>b.c.</TT
>,
<TT
CLASS="LITERAL"
>A.D.</TT
> or <TT
CLASS="LITERAL"
>a.d.</TT
></TD
><TD
>era indicator (with periods)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>MONTH</TT
></TD
><TD
>full upper case month name (blank-padded to 9 chars)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>Month</TT
></TD
><TD
>full capitalized month name (blank-padded to 9 chars)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>month</TT
></TD
><TD
>full lower case month name (blank-padded to 9 chars)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>MON</TT
></TD
><TD
>abbreviated upper case month name (3 chars in English, localized lengths vary)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>Mon</TT
></TD
><TD
>abbreviated capitalized month name (3 chars in English, localized lengths vary)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>mon</TT
></TD
><TD
>abbreviated lower case month name (3 chars in English, localized lengths vary)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>MM</TT
></TD
><TD
>month number (01-12)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>DAY</TT
></TD
><TD
>full upper case day name (blank-padded to 9 chars)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>Day</TT
></TD
><TD
>full capitalized day name (blank-padded to 9 chars)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>day</TT
></TD
><TD
>full lower case day name (blank-padded to 9 chars)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>DY</TT
></TD
><TD
>abbreviated upper case day name (3 chars in English, localized lengths vary)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>Dy</TT
></TD
><TD
>abbreviated capitalized day name (3 chars in English, localized lengths vary)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>dy</TT
></TD
><TD
>abbreviated lower case day name (3 chars in English, localized lengths vary)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>DDD</TT
></TD
><TD
>day of year (001-366)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>IDDD</TT
></TD
><TD
>ISO day of year (001-371; day 1 of the year is Monday of the first ISO week.)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>DD</TT
></TD
><TD
>day of month (01-31)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>D</TT
></TD
><TD
>day of the week, Sunday(<TT
CLASS="LITERAL"
>1</TT
>) to Saturday(<TT
CLASS="LITERAL"
>7</TT
>)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>ID</TT
></TD
><TD
>ISO day of the week, Monday(<TT
CLASS="LITERAL"
>1</TT
>) to Sunday(<TT
CLASS="LITERAL"
>7</TT
>)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>W</TT
></TD
><TD
>week of month (1-5) (The first week starts on the first day of the month.)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>WW</TT
></TD
><TD
>week number of year (1-53) (The first week starts on the first day of the year.)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>IW</TT
></TD
><TD
>ISO week number of year (01 - 53; the first Thursday of the new year is in week 1.)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>CC</TT
></TD
><TD
>century (2 digits) (The twenty-first century starts on 2001-01-01.)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>J</TT
></TD
><TD
>Julian Day (days since November 24, 4714 BC at midnight)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>Q</TT
></TD
><TD
>quarter (ignored by <CODE
CLASS="FUNCTION"
>to_date</CODE
> and <CODE
CLASS="FUNCTION"
>to_timestamp</CODE
>)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>RM</TT
></TD
><TD
>month in upper case Roman numerals (I-XII; I=January)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>rm</TT
></TD
><TD
>month in lower case Roman numerals (i-xii; i=January)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>TZ</TT
></TD
><TD
>upper case time-zone name</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>tz</TT
></TD
><TD
>lower case time-zone name</TD
></TR
></TBODY
></TABLE
></DIV
><P
> Modifiers can be applied to any template pattern to alter its
behavior. For example, <TT
CLASS="LITERAL"
>FMMonth</TT
>
is the <TT
CLASS="LITERAL"
>Month</TT
> pattern with the
<TT
CLASS="LITERAL"
>FM</TT
> modifier.
<A
HREF="functions-formatting.html#FUNCTIONS-FORMATTING-DATETIMEMOD-TABLE"
>Table 9-22</A
> shows the
modifier patterns for date/time formatting.
</P
><DIV
CLASS="TABLE"
><A
NAME="FUNCTIONS-FORMATTING-DATETIMEMOD-TABLE"
></A
><P
><B
>Table 9-22. Template Pattern Modifiers for Date/Time Formatting</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><COL><THEAD
><TR
><TH
>Modifier</TH
><TH
>Description</TH
><TH
>Example</TH
></TR
></THEAD
><TBODY
><TR
><TD
><TT
CLASS="LITERAL"
>FM</TT
> prefix</TD
><TD
>fill mode (suppress padding blanks and zeroes)</TD
><TD
><TT
CLASS="LITERAL"
>FMMonth</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>TH</TT
> suffix</TD
><TD
>upper case ordinal number suffix</TD
><TD
><TT
CLASS="LITERAL"
>DDTH</TT
>, e.g., <TT
CLASS="LITERAL"
>12TH</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>th</TT
> suffix</TD
><TD
>lower case ordinal number suffix</TD
><TD
><TT
CLASS="LITERAL"
>DDth</TT
>, e.g., <TT
CLASS="LITERAL"
>12th</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>FX</TT
> prefix</TD
><TD
>fixed format global option (see usage notes)</TD
><TD
><TT
CLASS="LITERAL"
>FX Month DD Day</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>TM</TT
> prefix</TD
><TD
>translation mode (print localized day and month names based on
<A
HREF="runtime-config-client.html#GUC-LC-TIME"
>lc_time</A
>)</TD
><TD
><TT
CLASS="LITERAL"
>TMMonth</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>SP</TT
> suffix</TD
><TD
>spell mode (not implemented)</TD
><TD
><TT
CLASS="LITERAL"
>DDSP</TT
></TD
></TR
></TBODY
></TABLE
></DIV
><P
> Usage notes for date/time formatting:
<P
></P
></P><UL
><LI
><P
> <TT
CLASS="LITERAL"
>FM</TT
> suppresses leading zeroes and trailing blanks
that would otherwise be added to make the output of a pattern be
fixed-width. In <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
>,
<TT
CLASS="LITERAL"
>FM</TT
> modifies only the next specification, while in
Oracle <TT
CLASS="LITERAL"
>FM</TT
> affects all subsequent
specifications, and repeated <TT
CLASS="LITERAL"
>FM</TT
> modifiers
toggle fill mode on and off.
</P
></LI
><LI
><P
> <TT
CLASS="LITERAL"
>TM</TT
> does not include trailing blanks.
</P
></LI
><LI
><P
> <CODE
CLASS="FUNCTION"
>to_timestamp</CODE
> and <CODE
CLASS="FUNCTION"
>to_date</CODE
>
skip multiple blank spaces in the input string unless the
<TT
CLASS="LITERAL"
>FX</TT
> option is used. For example,
<TT
CLASS="LITERAL"
>to_timestamp('2000 JUN', 'YYYY MON')</TT
> works, but
<TT
CLASS="LITERAL"
>to_timestamp('2000 JUN', 'FXYYYY MON')</TT
> returns an error
because <CODE
CLASS="FUNCTION"
>to_timestamp</CODE
> expects one space only.
<TT
CLASS="LITERAL"
>FX</TT
> must be specified as the first item in
the template.
</P
></LI
><LI
><P
> Ordinary text is allowed in <CODE
CLASS="FUNCTION"
>to_char</CODE
>
templates and will be output literally. You can put a substring
in double quotes to force it to be interpreted as literal text
even if it contains pattern key words. For example, in
<TT
CLASS="LITERAL"
>'"Hello Year "YYYY'</TT
>, the <TT
CLASS="LITERAL"
>YYYY</TT
>
will be replaced by the year data, but the single <TT
CLASS="LITERAL"
>Y</TT
> in <TT
CLASS="LITERAL"
>Year</TT
>
will not be. In <CODE
CLASS="FUNCTION"
>to_date</CODE
>, <CODE
CLASS="FUNCTION"
>to_number</CODE
>,
and <CODE
CLASS="FUNCTION"
>to_timestamp</CODE
>, double-quoted strings skip the number of
input characters contained in the string, e.g. <TT
CLASS="LITERAL"
>"XX"</TT
>
skips two input characters.
</P
></LI
><LI
><P
> If you want to have a double quote in the output you must
precede it with a backslash, for example <TT
CLASS="LITERAL"
>E'\\"YYYY
Month\\"'</TT
>.
(Two backslashes are necessary because the backslash
has special meaning when using the escape string syntax.)
</P
></LI
><LI
><P
> The <TT
CLASS="LITERAL"
>YYYY</TT
> conversion from string to <TT
CLASS="TYPE"
>timestamp</TT
> or
<TT
CLASS="TYPE"
>date</TT
> has a restriction when processing years with more than 4 digits. You must
use some non-digit character or template after <TT
CLASS="LITERAL"
>YYYY</TT
>,
otherwise the year is always interpreted as 4 digits. For example
(with the year 20000):
<TT
CLASS="LITERAL"
>to_date('200001131', 'YYYYMMDD')</TT
> will be
interpreted as a 4-digit year; instead use a non-digit
separator after the year, like
<TT
CLASS="LITERAL"
>to_date('20000-1131', 'YYYY-MMDD')</TT
> or
<TT
CLASS="LITERAL"
>to_date('20000Nov31', 'YYYYMonDD')</TT
>.
</P
></LI
><LI
><P
> In conversions from string to <TT
CLASS="TYPE"
>timestamp</TT
> or
<TT
CLASS="TYPE"
>date</TT
>, the <TT
CLASS="LITERAL"
>CC</TT
> (century) field is ignored
if there is a <TT
CLASS="LITERAL"
>YYY</TT
>, <TT
CLASS="LITERAL"
>YYYY</TT
> or
<TT
CLASS="LITERAL"
>Y,YYY</TT
> field. If <TT
CLASS="LITERAL"
>CC</TT
> is used with
<TT
CLASS="LITERAL"
>YY</TT
> or <TT
CLASS="LITERAL"
>Y</TT
> then the year is computed
as <TT
CLASS="LITERAL"
>(CC-1)*100+YY</TT
>.
</P
></LI
><LI
><P
> An ISO week date (as distinct from a Gregorian date) can be
specified to <CODE
CLASS="FUNCTION"
>to_timestamp</CODE
> and
<CODE
CLASS="FUNCTION"
>to_date</CODE
> in one of two ways:
<P
></P
></P><UL
><LI
><P
> Year, week, and weekday: for example <TT
CLASS="LITERAL"
>to_date('2006-42-4',
'IYYY-IW-ID')</TT
> returns the date
<TT
CLASS="LITERAL"
>2006-10-19</TT
>. If you omit the weekday it
is assumed to be 1 (Monday).
</P
></LI
><LI
><P
> Year and day of year: for example <TT
CLASS="LITERAL"
>to_date('2006-291',
'IYYY-IDDD')</TT
> also returns <TT
CLASS="LITERAL"
>2006-10-19</TT
>.
</P
></LI
></UL
><P>
</P
><P
> Attempting to construct a date using a mixture of ISO week and
Gregorian date fields is nonsensical, and will cause an error. In the
context of an ISO year, the concept of a <SPAN
CLASS="QUOTE"
>"month"</SPAN
> or <SPAN
CLASS="QUOTE"
>"day
of month"</SPAN
> has no meaning. In the context of a Gregorian year, the
ISO week has no meaning. Users should avoid mixing Gregorian and
ISO date specifications.
</P
></LI
><LI
><P
> In a conversion from string to <TT
CLASS="TYPE"
>timestamp</TT
>, millisecond
(<TT
CLASS="LITERAL"
>MS</TT
>) or microsecond (<TT
CLASS="LITERAL"
>US</TT
>)
values are used as the
seconds digits after the decimal point. For example
<TT
CLASS="LITERAL"
>to_timestamp('12:3', 'SS:MS')</TT
> is not 3 milliseconds,
but 300, because the conversion counts it as 12 + 0.3 seconds.
This means for the format <TT
CLASS="LITERAL"
>SS:MS</TT
>, the input values
<TT
CLASS="LITERAL"
>12:3</TT
>, <TT
CLASS="LITERAL"
>12:30</TT
>, and <TT
CLASS="LITERAL"
>12:300</TT
> specify the
same number of milliseconds. To get three milliseconds, one must use
<TT
CLASS="LITERAL"
>12:003</TT
>, which the conversion counts as
12 + 0.003 = 12.003 seconds.
</P
><P
> Here is a more
complex example:
<TT
CLASS="LITERAL"
>to_timestamp('15:12:02.020.001230', 'HH:MI:SS.MS.US')</TT
>
is 15 hours, 12 minutes, and 2 seconds + 20 milliseconds +
1230 microseconds = 2.021230 seconds.
</P
></LI
><LI
><P
> <CODE
CLASS="FUNCTION"
>to_char(..., 'ID')</CODE
>'s day of the week numbering
matches the <CODE
CLASS="FUNCTION"
>extract(isodow from ...)</CODE
> function, but
<CODE
CLASS="FUNCTION"
>to_char(..., 'D')</CODE
>'s does not match
<CODE
CLASS="FUNCTION"
>extract(dow from ...)</CODE
>'s day numbering.
</P
></LI
><LI
><P
> <CODE
CLASS="FUNCTION"
>to_char(interval)</CODE
> formats <TT
CLASS="LITERAL"
>HH</TT
> and
<TT
CLASS="LITERAL"
>HH12</TT
> as shown on a 12-hour clock, i.e. zero hours
and 36 hours output as <TT
CLASS="LITERAL"
>12</TT
>, while <TT
CLASS="LITERAL"
>HH24</TT
>
outputs the full hour value, which can exceed 23 for intervals.
</P
></LI
></UL
><P>
</P
><P
> <A
HREF="functions-formatting.html#FUNCTIONS-FORMATTING-NUMERIC-TABLE"
>Table 9-23</A
> shows the
template patterns available for formatting numeric values.
</P
><DIV
CLASS="TABLE"
><A
NAME="FUNCTIONS-FORMATTING-NUMERIC-TABLE"
></A
><P
><B
>Table 9-23. Template Patterns for Numeric Formatting</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><THEAD
><TR
><TH
>Pattern</TH
><TH
>Description</TH
></TR
></THEAD
><TBODY
><TR
><TD
><TT
CLASS="LITERAL"
>9</TT
></TD
><TD
>value with the specified number of digits</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>0</TT
></TD
><TD
>value with leading zeros</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>.</TT
> (period)</TD
><TD
>decimal point</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>,</TT
> (comma)</TD
><TD
>group (thousand) separator</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>PR</TT
></TD
><TD
>negative value in angle brackets</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>S</TT
></TD
><TD
>sign anchored to number (uses locale)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>L</TT
></TD
><TD
>currency symbol (uses locale)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>D</TT
></TD
><TD
>decimal point (uses locale)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>G</TT
></TD
><TD
>group separator (uses locale)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>MI</TT
></TD
><TD
>minus sign in specified position (if number < 0)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>PL</TT
></TD
><TD
>plus sign in specified position (if number > 0)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>SG</TT
></TD
><TD
>plus/minus sign in specified position</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>RN</TT
></TD
><TD
>Roman numeral (input between 1 and 3999)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>TH</TT
> or <TT
CLASS="LITERAL"
>th</TT
></TD
><TD
>ordinal number suffix</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>V</TT
></TD
><TD
>shift specified number of digits (see notes)</TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>EEEE</TT
></TD
><TD
>exponent for scientific notation</TD
></TR
></TBODY
></TABLE
></DIV
><P
> Usage notes for numeric formatting:
<P
></P
></P><UL
><LI
><P
> A sign formatted using <TT
CLASS="LITERAL"
>SG</TT
>, <TT
CLASS="LITERAL"
>PL</TT
>, or
<TT
CLASS="LITERAL"
>MI</TT
> is not anchored to
the number; for example,
<TT
CLASS="LITERAL"
>to_char(-12, 'MI9999')</TT
> produces <TT
CLASS="LITERAL"
>'- 12'</TT
>
but <TT
CLASS="LITERAL"
>to_char(-12, 'S9999')</TT
> produces <TT
CLASS="LITERAL"
>' -12'</TT
>.
The Oracle implementation does not allow the use of
<TT
CLASS="LITERAL"
>MI</TT
> before <TT
CLASS="LITERAL"
>9</TT
>, but rather
requires that <TT
CLASS="LITERAL"
>9</TT
> precede
<TT
CLASS="LITERAL"
>MI</TT
>.
</P
></LI
><LI
><P
> <TT
CLASS="LITERAL"
>9</TT
> results in a value with the same number of
digits as there are <TT
CLASS="LITERAL"
>9</TT
>s. If a digit is
not available it outputs a space.
</P
></LI
><LI
><P
> <TT
CLASS="LITERAL"
>TH</TT
> does not convert values less than zero
and does not convert fractional numbers.
</P
></LI
><LI
><P
> <TT
CLASS="LITERAL"
>PL</TT
>, <TT
CLASS="LITERAL"
>SG</TT
>, and
<TT
CLASS="LITERAL"
>TH</TT
> are <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
>
extensions.
</P
></LI
><LI
><P
> <TT
CLASS="LITERAL"
>V</TT
> effectively
multiplies the input values by
<TT
CLASS="LITERAL"
>10^<TT
CLASS="REPLACEABLE"
><I
>n</I
></TT
></TT
>, where
<TT
CLASS="REPLACEABLE"
><I
>n</I
></TT
> is the number of digits following
<TT
CLASS="LITERAL"
>V</TT
>.
<CODE
CLASS="FUNCTION"
>to_char</CODE
> does not support the use of
<TT
CLASS="LITERAL"
>V</TT
> combined with a decimal point
(e.g., <TT
CLASS="LITERAL"
>99.9V99</TT
> is not allowed).
</P
></LI
><LI
><P
> <TT
CLASS="LITERAL"
>EEEE</TT
> (scientific notation) cannot be used in
combination with any of the other formatting patterns or
modifiers other than digit and decimal point patterns, and must be at the end of the format string
(e.g., <TT
CLASS="LITERAL"
>9.99EEEE</TT
> is a valid pattern).
</P
></LI
></UL
><P>
</P
><P
> Certain modifiers can be applied to any template pattern to alter its
behavior. For example, <TT
CLASS="LITERAL"
>FM9999</TT
>
is the <TT
CLASS="LITERAL"
>9999</TT
> pattern with the
<TT
CLASS="LITERAL"
>FM</TT
> modifier.
<A
HREF="functions-formatting.html#FUNCTIONS-FORMATTING-NUMERICMOD-TABLE"
>Table 9-24</A
> shows the
modifier patterns for numeric formatting.
</P
><DIV
CLASS="TABLE"
><A
NAME="FUNCTIONS-FORMATTING-NUMERICMOD-TABLE"
></A
><P
><B
>Table 9-24. Template Pattern Modifiers for Numeric Formatting</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><COL><THEAD
><TR
><TH
>Modifier</TH
><TH
>Description</TH
><TH
>Example</TH
></TR
></THEAD
><TBODY
><TR
><TD
><TT
CLASS="LITERAL"
>FM</TT
> prefix</TD
><TD
>fill mode (suppress padding blanks and zeroes)</TD
><TD
><TT
CLASS="LITERAL"
>FM9999</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>TH</TT
> suffix</TD
><TD
>upper case ordinal number suffix</TD
><TD
><TT
CLASS="LITERAL"
>999TH</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>th</TT
> suffix</TD
><TD
>lower case ordinal number suffix</TD
><TD
><TT
CLASS="LITERAL"
>999th</TT
></TD
></TR
></TBODY
></TABLE
></DIV
><P
> <A
HREF="functions-formatting.html#FUNCTIONS-FORMATTING-EXAMPLES-TABLE"
>Table 9-25</A
> shows some
examples of the use of the <CODE
CLASS="FUNCTION"
>to_char</CODE
> function.
</P
><DIV
CLASS="TABLE"
><A
NAME="FUNCTIONS-FORMATTING-EXAMPLES-TABLE"
></A
><P
><B
>Table 9-25. <CODE
CLASS="FUNCTION"
>to_char</CODE
> Examples</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><THEAD
><TR
><TH
>Expression</TH
><TH
>Result</TH
></TR
></THEAD
><TBODY
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(current_timestamp, 'Day, DD HH12:MI:SS')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>'Tuesday , 06 05:39:18'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(current_timestamp, 'FMDay, FMDD HH12:MI:SS')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>'Tuesday, 6 05:39:18'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(-0.1, '99.99')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>' -.10'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(-0.1, 'FM9.99')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>'-.1'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(0.1, '0.9')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>' 0.1'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(12, '9990999.9')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>' 0012.0'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(12, 'FM9990999.9')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>'0012.'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(485, '999')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>' 485'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(-485, '999')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>'-485'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(485, '9 9 9')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>' 4 8 5'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(1485, '9,999')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>' 1,485'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(1485, '9G999')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>' 1 485'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(148.5, '999.999')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>' 148.500'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(148.5, 'FM999.999')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>'148.5'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(148.5, 'FM999.990')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>'148.500'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(148.5, '999D999')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>' 148,500'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(3148.5, '9G999D999')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>' 3 148,500'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(-485, '999S')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>'485-'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(-485, '999MI')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>'485-'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(485, '999MI')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>'485 '</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(485, 'FM999MI')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>'485'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(485, 'PL999')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>'+485'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(485, 'SG999')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>'+485'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(-485, 'SG999')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>'-485'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(-485, '9SG99')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>'4-85'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(-485, '999PR')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>'<485>'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(485, 'L999')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>'DM 485</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(485, 'RN')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>' CDLXXXV'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(485, 'FMRN')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>'CDLXXXV'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(5.2, 'FMRN')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>'V'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(482, '999th')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>' 482nd'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(485, '"Good number:"999')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>'Good number: 485'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(485.8, '"Pre:"999" Post:" .999')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>'Pre: 485 Post: .800'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(12, '99V999')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>' 12000'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(12.4, '99V999')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>' 12400'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(12.45, '99V9')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>' 125'</TT
></TD
></TR
><TR
><TD
><TT
CLASS="LITERAL"
>to_char(0.0004859, '9.99EEEE')</TT
></TD
><TD
><TT
CLASS="LITERAL"
>' 4.86e-04'</TT
></TD
></TR
></TBODY
></TABLE
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="functions-matching.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="functions-datetime.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Pattern Matching</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="functions.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Date/Time Functions and Operators</TD
></TR
></TABLE
></DIV
></BODY
></HTML
> | jenmwang/portfolio_site_2013 | postgresql/html/functions-formatting.html | HTML | mit | 32,560 |
// Ember.merge only supports 2 arguments
// Ember.assign isn't available in older Embers
// Ember.$.extend isn't available in Fastboot
import Ember from 'ember';
export default function(...objects) {
let merged = {};
objects.forEach(obj => {
merged = Ember.merge(merged, obj);
});
return merged;
} | rlivsey/fireplace | addon/utils/merge.js | JavaScript | mit | 311 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'><head><title>/Library/Ruby/Gems/1.8/gems/mocha-0.5.6/lib/mocha/parameter_matchers/has_entries.rb - C0 code coverage information</title>
<style type='text/css'>body { background-color: rgb(240, 240, 245); }</style>
<style type='text/css'>span.cross-ref-title {
font-size: 140%;
}
span.cross-ref a {
text-decoration: none;
}
span.cross-ref {
background-color:#f3f7fa;
border: 1px dashed #333;
margin: 1em;
padding: 0.5em;
overflow: hidden;
}
a.crossref-toggle {
text-decoration: none;
}
span.marked0 {
background-color: rgb(185, 210, 200);
display: block;
}
span.marked1 {
background-color: rgb(190, 215, 205);
display: block;
}
span.inferred0 {
background-color: rgb(175, 200, 200);
display: block;
}
span.inferred1 {
background-color: rgb(180, 205, 205);
display: block;
}
span.uncovered0 {
background-color: rgb(225, 110, 110);
display: block;
}
span.uncovered1 {
background-color: rgb(235, 120, 120);
display: block;
}
span.overview {
border-bottom: 8px solid black;
}
div.overview {
border-bottom: 8px solid black;
}
body {
font-family: verdana, arial, helvetica;
}
div.footer {
font-size: 68%;
margin-top: 1.5em;
}
h1, h2, h3, h4, h5, h6 {
margin-bottom: 0.5em;
}
h5 {
margin-top: 0.5em;
}
.hidden {
display: none;
}
div.separator {
height: 10px;
}
/* Commented out for better readability, esp. on IE */
/*
table tr td, table tr th {
font-size: 68%;
}
td.value table tr td {
font-size: 11px;
}
*/
table.percent_graph {
height: 12px;
border: #808080 1px solid;
empty-cells: show;
}
table.percent_graph td.covered {
height: 10px;
background: #00f000;
}
table.percent_graph td.uncovered {
height: 10px;
background: #e00000;
}
table.percent_graph td.NA {
height: 10px;
background: #eaeaea;
}
table.report {
border-collapse: collapse;
width: 100%;
}
table.report td.heading {
background: #dcecff;
border: #d0d0d0 1px solid;
font-weight: bold;
text-align: center;
}
table.report td.heading:hover {
background: #c0ffc0;
}
table.report td.text {
border: #d0d0d0 1px solid;
}
table.report td.value,
table.report td.lines_total,
table.report td.lines_code {
text-align: right;
border: #d0d0d0 1px solid;
}
table.report tr.light {
background-color: rgb(240, 240, 245);
}
table.report tr.dark {
background-color: rgb(230, 230, 235);
}
</style>
<script type='text/javascript'>
// <![CDATA[
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make cross-references hidden by default
document.writeln( "<style type=\"text/css\">span.cross-ref { display: none }</style>" )
// ]]>
</script>
<style type='text/css'>span.run0 {
background-color: rgb(178, 204, 255);
display: block;
}
span.run1 {
background-color: rgb(178, 206, 255);
display: block;
}
span.run2 {
background-color: rgb(178, 209, 255);
display: block;
}
span.run3 {
background-color: rgb(178, 211, 255);
display: block;
}
span.run4 {
background-color: rgb(178, 214, 255);
display: block;
}
span.run5 {
background-color: rgb(178, 218, 255);
display: block;
}
span.run6 {
background-color: rgb(178, 220, 255);
display: block;
}
span.run7 {
background-color: rgb(178, 223, 255);
display: block;
}
span.run8 {
background-color: rgb(178, 225, 255);
display: block;
}
span.run9 {
background-color: rgb(178, 228, 255);
display: block;
}
span.run10 {
background-color: rgb(178, 232, 255);
display: block;
}
span.run11 {
background-color: rgb(178, 234, 255);
display: block;
}
span.run12 {
background-color: rgb(178, 237, 255);
display: block;
}
span.run13 {
background-color: rgb(178, 239, 255);
display: block;
}
span.run14 {
background-color: rgb(178, 242, 255);
display: block;
}
span.run15 {
background-color: rgb(178, 246, 255);
display: block;
}
span.run16 {
background-color: rgb(178, 248, 255);
display: block;
}
span.run17 {
background-color: rgb(178, 251, 255);
display: block;
}
span.run18 {
background-color: rgb(178, 253, 255);
display: block;
}
span.run19 {
background-color: rgb(178, 255, 253);
display: block;
}
span.run20 {
background-color: rgb(178, 255, 249);
display: block;
}
span.run21 {
background-color: rgb(178, 255, 247);
display: block;
}
span.run22 {
background-color: rgb(178, 255, 244);
display: block;
}
span.run23 {
background-color: rgb(178, 255, 242);
display: block;
}
span.run24 {
background-color: rgb(178, 255, 239);
display: block;
}
span.run25 {
background-color: rgb(178, 255, 235);
display: block;
}
span.run26 {
background-color: rgb(178, 255, 233);
display: block;
}
span.run27 {
background-color: rgb(178, 255, 230);
display: block;
}
span.run28 {
background-color: rgb(178, 255, 228);
display: block;
}
span.run29 {
background-color: rgb(178, 255, 225);
display: block;
}
span.run30 {
background-color: rgb(178, 255, 221);
display: block;
}
span.run31 {
background-color: rgb(178, 255, 219);
display: block;
}
span.run32 {
background-color: rgb(178, 255, 216);
display: block;
}
span.run33 {
background-color: rgb(178, 255, 214);
display: block;
}
span.run34 {
background-color: rgb(178, 255, 211);
display: block;
}
span.run35 {
background-color: rgb(178, 255, 207);
display: block;
}
span.run36 {
background-color: rgb(178, 255, 205);
display: block;
}
span.run37 {
background-color: rgb(178, 255, 202);
display: block;
}
span.run38 {
background-color: rgb(178, 255, 200);
display: block;
}
span.run39 {
background-color: rgb(178, 255, 197);
display: block;
}
span.run40 {
background-color: rgb(178, 255, 193);
display: block;
}
span.run41 {
background-color: rgb(178, 255, 191);
display: block;
}
span.run42 {
background-color: rgb(178, 255, 188);
display: block;
}
span.run43 {
background-color: rgb(178, 255, 186);
display: block;
}
span.run44 {
background-color: rgb(178, 255, 183);
display: block;
}
span.run45 {
background-color: rgb(178, 255, 179);
display: block;
}
span.run46 {
background-color: rgb(179, 255, 178);
display: block;
}
span.run47 {
background-color: rgb(182, 255, 178);
display: block;
}
span.run48 {
background-color: rgb(184, 255, 178);
display: block;
}
span.run49 {
background-color: rgb(187, 255, 178);
display: block;
}
span.run50 {
background-color: rgb(191, 255, 178);
display: block;
}
span.run51 {
background-color: rgb(193, 255, 178);
display: block;
}
span.run52 {
background-color: rgb(196, 255, 178);
display: block;
}
span.run53 {
background-color: rgb(198, 255, 178);
display: block;
}
span.run54 {
background-color: rgb(201, 255, 178);
display: block;
}
span.run55 {
background-color: rgb(205, 255, 178);
display: block;
}
span.run56 {
background-color: rgb(207, 255, 178);
display: block;
}
span.run57 {
background-color: rgb(210, 255, 178);
display: block;
}
span.run58 {
background-color: rgb(212, 255, 178);
display: block;
}
span.run59 {
background-color: rgb(215, 255, 178);
display: block;
}
span.run60 {
background-color: rgb(219, 255, 178);
display: block;
}
span.run61 {
background-color: rgb(221, 255, 178);
display: block;
}
span.run62 {
background-color: rgb(224, 255, 178);
display: block;
}
span.run63 {
background-color: rgb(226, 255, 178);
display: block;
}
span.run64 {
background-color: rgb(229, 255, 178);
display: block;
}
span.run65 {
background-color: rgb(233, 255, 178);
display: block;
}
span.run66 {
background-color: rgb(235, 255, 178);
display: block;
}
span.run67 {
background-color: rgb(238, 255, 178);
display: block;
}
span.run68 {
background-color: rgb(240, 255, 178);
display: block;
}
span.run69 {
background-color: rgb(243, 255, 178);
display: block;
}
span.run70 {
background-color: rgb(247, 255, 178);
display: block;
}
span.run71 {
background-color: rgb(249, 255, 178);
display: block;
}
span.run72 {
background-color: rgb(252, 255, 178);
display: block;
}
span.run73 {
background-color: rgb(255, 255, 178);
display: block;
}
span.run74 {
background-color: rgb(255, 252, 178);
display: block;
}
span.run75 {
background-color: rgb(255, 248, 178);
display: block;
}
span.run76 {
background-color: rgb(255, 246, 178);
display: block;
}
span.run77 {
background-color: rgb(255, 243, 178);
display: block;
}
span.run78 {
background-color: rgb(255, 240, 178);
display: block;
}
span.run79 {
background-color: rgb(255, 238, 178);
display: block;
}
span.run80 {
background-color: rgb(255, 234, 178);
display: block;
}
span.run81 {
background-color: rgb(255, 232, 178);
display: block;
}
span.run82 {
background-color: rgb(255, 229, 178);
display: block;
}
span.run83 {
background-color: rgb(255, 226, 178);
display: block;
}
span.run84 {
background-color: rgb(255, 224, 178);
display: block;
}
span.run85 {
background-color: rgb(255, 220, 178);
display: block;
}
span.run86 {
background-color: rgb(255, 218, 178);
display: block;
}
span.run87 {
background-color: rgb(255, 215, 178);
display: block;
}
span.run88 {
background-color: rgb(255, 212, 178);
display: block;
}
span.run89 {
background-color: rgb(255, 210, 178);
display: block;
}
span.run90 {
background-color: rgb(255, 206, 178);
display: block;
}
span.run91 {
background-color: rgb(255, 204, 178);
display: block;
}
span.run92 {
background-color: rgb(255, 201, 178);
display: block;
}
span.run93 {
background-color: rgb(255, 198, 178);
display: block;
}
span.run94 {
background-color: rgb(255, 196, 178);
display: block;
}
span.run95 {
background-color: rgb(255, 192, 178);
display: block;
}
span.run96 {
background-color: rgb(255, 189, 178);
display: block;
}
span.run97 {
background-color: rgb(255, 187, 178);
display: block;
}
span.run98 {
background-color: rgb(255, 184, 178);
display: block;
}
span.run99 {
background-color: rgb(255, 182, 178);
display: block;
}
span.run100 {
background-color: rgb(255, 178, 178);
display: block;
}
</style>
</head>
<body><h3>C0 code coverage information</h3>
<p>Generated on Wed Sep 30 08:18:10 +0100 2009 with <a href='http://eigenclass.org/hiki/rcov'>rcov 0.8.1.2</a>
</p>
<hr/>
<pre><span class='marked0'>Code reported as executed by Ruby looks like this...
</span><span class='marked1'>and this: this line is also marked as covered.
</span><span class='inferred0'>Lines considered as run by rcov, but not reported by Ruby, look like this,
</span><span class='inferred1'>and this: these lines were inferred by rcov (using simple heuristics).
</span><span class='uncovered0'>Finally, here's a line marked as not executed.
</span></pre>
<table class='report'><thead><tr><td class='heading'>Name</td>
<td class='heading'>Total lines</td>
<td class='heading'>Lines of code</td>
<td class='heading'>Total coverage</td>
<td class='heading'>Code coverage</td>
</tr>
</thead>
<tbody><tr class='light'><td><a href='-Library-Ruby-Gems-1_8-gems-mocha-0_5_6-lib-mocha-parameter_matchers-has_entries_rb.html'>/Library/Ruby/Gems/1.8/gems/mocha-0.5.6/lib/mocha/parameter_matchers/has_entries.rb</a>
</td>
<td class='lines_total'><tt>42</tt>
</td>
<td class='lines_code'><tt>20</tt>
</td>
<td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_total'>64.3%</tt>
</td>
<td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='64'/>
<td class='uncovered' width='36'/>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_code'>40.0%</tt>
</td>
<td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='40'/>
<td class='uncovered' width='60'/>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
<pre><span class="marked1"><a name="line1"></a> 1 require 'mocha/parameter_matchers/base'
</span><span class="inferred0"><a name="line2"></a> 2
</span><span class="marked1"><a name="line3"></a> 3 module Mocha
</span><span class="inferred0"><a name="line4"></a> 4
</span><span class="marked1"><a name="line5"></a> 5 module ParameterMatchers
</span><span class="inferred0"><a name="line6"></a> 6
</span><span class="inferred1"><a name="line7"></a> 7 # :call-seq: has_entries(entries) -> parameter_matcher
</span><span class="inferred0"><a name="line8"></a> 8 #
</span><span class="inferred1"><a name="line9"></a> 9 # Matches +Hash+ containing all +entries+.
</span><span class="inferred0"><a name="line10"></a>10 # object = mock()
</span><span class="inferred1"><a name="line11"></a>11 # object.expects(:method_1).with(has_entries('key_1' => 1, 'key_2' => 2))
</span><span class="inferred0"><a name="line12"></a>12 # object.method_1('key_1' => 1, 'key_2' => 2, 'key_3' => 3)
</span><span class="inferred1"><a name="line13"></a>13 # # no error raised
</span><span class="inferred0"><a name="line14"></a>14 #
</span><span class="inferred1"><a name="line15"></a>15 # object = mock()
</span><span class="inferred0"><a name="line16"></a>16 # object.expects(:method_1).with(has_entries('key_1' => 1, 'key_2' => 2))
</span><span class="inferred1"><a name="line17"></a>17 # object.method_1('key_1' => 1, 'key_2' => 99)
</span><span class="inferred0"><a name="line18"></a>18 # # error raised, because method_1 was not called with Hash containing entries: 'key_1' => 1, 'key_2' => 2
</span><span class="marked1"><a name="line19"></a>19 def has_entries(entries)
</span><span class="uncovered0"><a name="line20"></a>20 HasEntries.new(entries)
</span><span class="uncovered1"><a name="line21"></a>21 end
</span><span class="inferred0"><a name="line22"></a>22
</span><span class="marked1"><a name="line23"></a>23 class HasEntries < Base # :nodoc:
</span><span class="inferred0"><a name="line24"></a>24
</span><span class="marked1"><a name="line25"></a>25 def initialize(entries)
</span><span class="uncovered0"><a name="line26"></a>26 @entries = entries
</span><span class="uncovered1"><a name="line27"></a>27 end
</span><span class="inferred0"><a name="line28"></a>28
</span><span class="marked1"><a name="line29"></a>29 def matches?(available_parameters)
</span><span class="uncovered0"><a name="line30"></a>30 parameter = available_parameters.shift
</span><span class="uncovered1"><a name="line31"></a>31 @entries.all? { |key, value| parameter[key] == value }
</span><span class="uncovered0"><a name="line32"></a>32 end
</span><span class="inferred1"><a name="line33"></a>33
</span><span class="marked0"><a name="line34"></a>34 def mocha_inspect
</span><span class="uncovered1"><a name="line35"></a>35 "has_entries(#{@entries.mocha_inspect})"
</span><span class="uncovered0"><a name="line36"></a>36 end
</span><span class="uncovered1"><a name="line37"></a>37
</span><span class="uncovered0"><a name="line38"></a>38 end
</span><span class="uncovered1"><a name="line39"></a>39
</span><span class="uncovered0"><a name="line40"></a>40 end
</span><span class="uncovered1"><a name="line41"></a>41
</span><span class="uncovered0"><a name="line42"></a>42 end
</span></pre><hr/>
<p>Generated using the <a href='http://eigenclass.org/hiki.rb?rcov'>rcov code coverage analysis tool for Ruby</a>
version 0.8.1.2.</p>
<p><a href='http://validator.w3.org/check/referer'><img src='http://www.w3.org/Icons/valid-xhtml10' height='31' alt='Valid XHTML 1.0!' width='88'/>
</a>
<a href='http://jigsaw.w3.org/css-validator/check/referer'><img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Valid CSS!' style='border:0;width:88px;height:31px'/>
</a>
</p>
</body>
</html>
| starapor/slippers | coverage/-Library-Ruby-Gems-1_8-gems-mocha-0_5_6-lib-mocha-parameter_matchers-has_entries_rb.html | HTML | mit | 16,722 |
var fs = require('fs');
var dot = require('dot');
var defaults = require('defaults');
var Block = require('glint-block');
var Style = require('glint-plugin-block-style-editable');
var TextBlock = require('glint-block-text');
var MDBlock = require('glint-block-markdown');
var MetaBlock = require('glint-block-meta');
var CKEditorBlock = require('glint-block-ckeditor');
var Adapter = require('glint-adapter');
var PageAdapter = require('page-adapter');
var Container = require('glint-container');
var Wrap = require('glint-wrap');
var Widget = require('glint-widget');
var LayoutWrap = require('wrap-layout');
var template = fs.readFileSync(__dirname + '/index.dot', 'utf-8');
var compiled = dot.template(template);
function text() {
return Block(TextBlock()).use(Style());
}
function markdown() {
return Block(MDBlock()).use(Style());
}
function editor() {
return Block(CKEditorBlock()).use(Style());
}
exports = module.exports = function wrap(o) {
o = o || {};
var wrap = Wrap();
var blocks = {
'home-title': text().selector('[data-id=home-title]'),
'home-teaser': editor().selector('[data-id=home-teaser]'),
'home-subtitle': markdown().selector('[data-id=home-subtitle]'),
'home-box-1': markdown().selector('[data-id=home-box-1]'),
'home-box-2': markdown().selector('[data-id=home-box-2]'),
'home-box-3': markdown().selector('[data-id=home-box-3]'),
'home-box-4': markdown().selector('[data-id=home-box-4]'),
'home-box-5': markdown().selector('[data-id=home-box-5]'),
'home-box-6': markdown().selector('[data-id=home-box-6]'),
'www-title': text().selector('[data-id=www-title]'),
'www-content': editor().selector('[data-id=www-content]'),
'bb-title': text().selector('[data-id=bb-title]'),
'bb-content': markdown().selector('[data-id=bb-content]'),
'doc-title': text().selector('[data-id=doc-title]'),
'doc-content': markdown().selector('[data-id=doc-content]'),
'img-title': text().selector('[data-id=img-title]'),
'img-content': editor().selector('[data-id=img-content]'),
'contact-title': text().selector('[data-id=contact-title]'),
'contact-content': markdown().selector('[data-id=doc-content]'),
meta: Block(MetaBlock())
};
var adapter = o.adapter || PageAdapter(o);
var db = o.db || 'glint';
var type = o.type || 'main';
var id = o.id || 'main';
var templateData = o.templateData || '__template__';
var homeAdapter = Adapter(adapter)
.db(db)
.type(type)
var container = Container(blocks, homeAdapter)
.id(id)
.template(templateData);
wrap
.parallel(container)
.series('content', Widget(function(options) {
return compiled(options)
}).place('force:server'))
.series(LayoutWrap(o.layout).place('force:server'))
wrap.routes = adapter.routes;
return wrap;
};
| glintcms/glintcms-starter-glintcms | local_modules/page-main/wrap.js | JavaScript | mit | 2,840 |
var Logger = require("./Logger.js");
var Level = require("./Level.js");
var PrintPattern = require("./PrintPattern.js");
module.exports = (function() {
/* STATE VARIABLES */
// OUT configuration
var OUT_INTERVAL = undefined; // 1sec
var OUT_INTERVAL_TIMEOUT = 1000; // 1sec
var OUT_SIZE = 1000;
// logger objects
var loggers = {};
// appender list
var appenders = {};
appenders[Level.trace] = {};
appenders[Level.log] = {};
appenders[Level.info] = {};
appenders[Level.warn] = {};
appenders[Level.error] = {};
// information to log
var records = new Array();
// --------------------------------------------------------------------------
/* METHODS */
// add a logger to the map
// logger_name should be something like group.subgroup.name
var createLogger = function(logger_name) {
if (loggers[logger_name] == undefined) {
loggers[logger_name] = new Logger(logger_name, function(record) {
records.push(record);
writeLog();
});
}
return loggers[logger_name];
}
// create the appender objects
// the appender_config should be something like
// [{
// "name": "appender name",
// "type": "appender implementation",
// "level": "level that appender listens",
// "loggers": ["logger1", "logger2", "group.logger3"],
// Follows the optional attributes
// --------------------------------------------------
// "print_pattern": "[{y}/{M}/{d} {w} {h}:{m}:{s}.{ms}] [{lvl}] [{lg}]
// {out}",
// "config": {...[appender exclusive configuration]}
// }, ...]
var loadAppenderConfig = function(appender_configs) {
realeaseAppenders();
for ( var i in appender_configs) {
// get an appender config
var appender_config = appender_configs[i];
// create appender object
var AppenderType = require("./appender/" + appender_config.type
+ "Appender.js");
var appender_object = new AppenderType(appender_config.name,
new PrintPattern(appender_config.print_pattern),
appender_config.config);
for ( var l in appender_config.loggers) {
var listened_logger = appender_config.loggers[l];
// initialize listened logger appender list
if (appenders[Level[appender_config.level]][listened_logger] == undefined) {
appenders[Level[appender_config.level]][listened_logger] = new Array();
}
appenders[Level[appender_config.level]][listened_logger]
.push(appender_object);
}
}
}
// realease appenders internal resources;
var realeaseAppenders = function() {
for (lv in appenders) {
var level_appender = appenders[lv];
for (lg in level_appender) {
var logger_appender = level_appender[lg];
if (logger_appender.length > 0) {
for (i in logger_appender) {
var appender = logger_appender[i];
appender.release();
}
}
delete level_appender[lg];
}
}
};
// Wrapper that decides when the app will log without hold the process
var writeLog = function() {
if (OUT_INTERVAL == undefined) {
OUT_INTERVAL = setTimeout(writeLogImpl, OUT_INTERVAL_TIMEOUT);
}
};
// real log process
var writeLogImpl = function() {
for (var i = 0; i < OUT_SIZE; i++) {
// getting message record
var record = records[i];
// stop the loop when ther record list is empty;
if (record == undefined) {
break;
}
// the record should be logged on all appender that listen the same
// level or the appenders that listen lower levels
for (var level = record.level; level >= 1; level--) {
// getting appender list by level
var level_appenders = appenders[level];
// try to catch all appenders as possible
var logger_composition = record.logger.split(".");
var logger_name = undefined;
for (var lc = 0; lc < logger_composition.length; lc++) {
// logger name rebuild process
if (logger_name == undefined) {
logger_name = logger_composition[lc];
} else {
logger_name = logger_name + "."
+ logger_composition[lc];
}
// getting appender list by logger
var logger_appenders = level_appenders[logger_name];
// using appender
if (logger_appenders != undefined) {
for (a in logger_appenders) {
var appender = logger_appenders[a];
appender.write(record);
}
}
}
}
}
records.splice(0, OUT_SIZE);
// clean interval identifier
OUT_INTERVAL = undefined;
// if still remain any record, start again the log process
if (records.length > 0) {
writeLog();
}
};
// public interface
return {
"createLogger" : createLogger,
"loadAppenderConfig" : loadAppenderConfig
}
})();
| michelwooller/LogAPI | index.js | JavaScript | mit | 4,562 |
Contributors
============
* James Hart (james@wanelo.com)
* Paul Henry (paul@wanelo.com)
* Eric Saxby (sax@wanelo.com)
| wanelo/sequel-schema-sharding | CONTRIBUTORS.md | Markdown | mit | 120 |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from .proxy_only_resource import ProxyOnlyResource
class ReissueCertificateOrderRequest(ProxyOnlyResource):
"""Class representing certificate reissue request.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Resource Id.
:vartype id: str
:ivar name: Resource Name.
:vartype name: str
:param kind: Kind of resource.
:type kind: str
:ivar type: Resource type.
:vartype type: str
:param key_size: Certificate Key Size.
:type key_size: int
:param delay_existing_revoke_in_hours: Delay in hours to revoke existing
certificate after the new certificate is issued.
:type delay_existing_revoke_in_hours: int
:param csr: Csr to be used for re-key operation.
:type csr: str
:param is_private_key_external: Should we change the ASC type (from
managed private key to external private key and vice versa).
:type is_private_key_external: bool
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'kind': {'key': 'kind', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'key_size': {'key': 'properties.keySize', 'type': 'int'},
'delay_existing_revoke_in_hours': {'key': 'properties.delayExistingRevokeInHours', 'type': 'int'},
'csr': {'key': 'properties.csr', 'type': 'str'},
'is_private_key_external': {'key': 'properties.isPrivateKeyExternal', 'type': 'bool'},
}
def __init__(self, kind=None, key_size=None, delay_existing_revoke_in_hours=None, csr=None, is_private_key_external=None):
super(ReissueCertificateOrderRequest, self).__init__(kind=kind)
self.key_size = key_size
self.delay_existing_revoke_in_hours = delay_existing_revoke_in_hours
self.csr = csr
self.is_private_key_external = is_private_key_external
| lmazuel/azure-sdk-for-python | azure-mgmt-web/azure/mgmt/web/models/reissue_certificate_order_request.py | Python | mit | 2,522 |
<?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
'accepted' => 'The :attribute must be accepted.',
'active_url' => 'The :attribute is not a valid URL.',
'after' => 'The :attribute must be a date after :date.',
'alpha' => 'The :attribute may only contain letters.',
'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
'alpha_num' => 'The :attribute may only contain letters and numbers.',
'array' => 'The :attribute must be an array.',
'before' => 'The :attribute must be a date before :date.',
'between' => [
'numeric' => 'The :attribute must be between :min and :max.',
'file' => 'The :attribute must be between :min and :max kilobytes.',
'string' => 'The :attribute must be between :min and :max characters.',
'array' => 'The :attribute must have between :min and :max items.',
],
'boolean' => 'The :attribute field must be true or false.',
'confirmed' => 'The :attribute confirmation does not match.',
'date' => 'The :attribute is not a valid date.',
'date_format' => 'The :attribute does not match the format :format.',
'different' => 'The :attribute and :other must be different.',
'digits' => 'The :attribute must be :digits digits.',
'digits_between' => 'The :attribute must be between :min and :max digits.',
'email' => 'The :attribute must be a valid email address.',
'filled' => 'The :attribute field is required.',
'exists' => 'The selected :attribute is invalid.',
'image' => 'The :attribute must be an image.',
'in' => 'The selected :attribute is invalid.',
'integer' => 'The :attribute must be an integer.',
'ip' => 'The :attribute must be a valid IP address.',
'max' => [
'numeric' => 'The :attribute may not be greater than :max.',
'file' => 'The :attribute may not be greater than :max kilobytes.',
'string' => 'The :attribute may not be greater than :max characters.',
'array' => 'The :attribute may not have more than :max items.',
],
'mimes' => 'The :attribute must be a file of type: :values.',
'min' => [
'numeric' => 'The :attribute must be at least :min.',
'file' => 'The :attribute must be at least :min kilobytes.',
'string' => 'The :attribute must be at least :min characters.',
'array' => 'The :attribute must have at least :min items.',
],
'not_in' => 'The selected :attribute is invalid.',
'numeric' => 'The :attribute must be a number.',
'regex' => 'The :attribute format is invalid.',
'required' => 'The :attribute field is required.',
'required_if' => 'The :attribute field is required when :other is :value.',
'required_with' => 'The :attribute field is required when :values is present.',
'required_with_all' => 'The :attribute field is required when :values is present.',
'required_without' => 'The :attribute field is required when :values is not present.',
'required_without_all' => 'The :attribute field is required when none of :values are present.',
'same' => 'The :attribute and :other must match.',
'size' => [
'numeric' => 'The :attribute must be :size.',
'file' => 'The :attribute must be :size kilobytes.',
'string' => 'The :attribute must be :size characters.',
'array' => 'The :attribute must contain :size items.',
],
'string' => 'The :attribute must be a string.',
'timezone' => 'The :attribute must be a valid zone.',
'unique' => 'The :attribute has already been taken.',
'url' => 'The :attribute format is invalid.',
/*
|--------------------------------------------------------------------------
| Custom Validation Language Lines
|--------------------------------------------------------------------------
|
| Here you may specify custom validation messages for attributes using the
| convention "attribute.rule" to name the lines. This makes it quick to
| specify a specific custom language line for a given attribute rule.
|
*/
'custom' => [
'attribute-name' => [
'rule-name' => 'custom-message',
],
],
/*
|--------------------------------------------------------------------------
| Custom Validation Attributes
|--------------------------------------------------------------------------
|
| The following language lines are used to swap attribute place-holders
| with something more reader friendly such as E-Mail Address instead
| of "email". This simply helps us make messages a little cleaner.
|
*/
'attributes' => [],
];
| zolotarev-om/vk-birthday | resources/lang/en/validation.php | PHP | mit | 5,620 |
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
namespace GodaddyWrapper.Responses
{
public class CartItemPricingResponse
{
public int Subtotal { get; set; }
public int List { get; set; }
public int Savings { get; set; }
public int Sale { get; set; }
public int Discount { get; set; }
public CartFeeResponse Fees { get; set; }
public CartItemUnitPricingResponse Unit { get; set; }
public CartItemPricingRenewalResponse Renewal { get; set; }
}
}
| vip30/GodaddyWrapper.Net | src/GodaddyWrapper/Responses/CartItemPricingResponse.cs | C# | mit | 619 |
<TS language="ne" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>ठेगाना वा लेबल सम्पादन गर्न दायाँ-क्लिक गर्नुहोस्</translation>
</message>
<message>
<source>Create a new address</source>
<translation>नयाँ ठेगाना सिर्जना गर्नुहोस्</translation>
</message>
<message>
<source>&New</source>
<translation>&amp;नयाँ</translation>
</message>
<message>
<source>Copy the currently selected address to the system clipboard</source>
<translation>भर्खरै चयन गरेको ठेगाना प्रणाली क्लिपबोर्डमा कपी गर्नुहोस्</translation>
</message>
<message>
<source>&Copy</source>
<translation>&amp;कपी गर्नुहोस्</translation>
</message>
<message>
<source>C&lose</source>
<translation>बन्द गर्नुहोस्</translation>
</message>
<message>
<source>Delete the currently selected address from the list</source>
<translation>भर्खरै चयन गरेको ठेगाना सूचीबाट मेटाउनुहोस्</translation>
</message>
<message>
<source>Export the data in the current tab to a file</source>
<translation>वर्तमान ट्याबको डाटालाई फाइलमा निर्यात गर्नुहोस्</translation>
</message>
<message>
<source>&Export</source>
<translation>&amp;निर्यात गर्नुहोस्</translation>
</message>
<message>
<source>&Delete</source>
<translation>&amp;मेटाउनुहोस्</translation>
</message>
<message>
<source>C&hoose</source>
<translation>छनौट गर्नुहोस्...</translation>
</message>
<message>
<source>Sending addresses</source>
<translation>पठाउने ठेगानाहरू...</translation>
</message>
<message>
<source>Receiving addresses</source>
<translation>प्राप्त गर्ने ठेगानाहरू...</translation>
</message>
<message>
<source>&Copy Address</source>
<translation>ठेगाना कपी गर्नुहोस्</translation>
</message>
</context>
<context>
<name>AddressTableModel</name>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<source>Passphrase Dialog</source>
<translation>पासफ्रेज संवाद</translation>
</message>
<message>
<source>Enter passphrase</source>
<translation>पासफ्रेज प्रवेश गर्नुहोस्</translation>
</message>
<message>
<source>New passphrase</source>
<translation>नयाँ पासफ्रेज</translation>
</message>
<message>
<source>Repeat new passphrase</source>
<translation>नयाँ पासफ्रेज दोहोर्याउनुहोस्</translation>
</message>
</context>
<context>
<name>BanTableModel</name>
<message>
<source>IP/Netmask</source>
<translation>IP/नेटमास्क</translation>
</message>
<message>
<source>Banned Until</source>
<translation>प्रतिबन्धित समय</translation>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<source>Sign &message...</source>
<translation>सन्देशमा &amp;हस्ताक्षर गर्नुहोस्...</translation>
</message>
<message>
<source>Synchronizing with network...</source>
<translation>नेटवर्कमा समिकरण हुँदै...</translation>
</message>
<message>
<source>&Overview</source>
<translation>शारांश</translation>
</message>
<message>
<source>Show general overview of wallet</source>
<translation>वालेटको साधारण शारांश देखाउनुहोस्</translation>
</message>
<message>
<source>&Transactions</source>
<translation>&amp;कारोबार</translation>
</message>
<message>
<source>Browse transaction history</source>
<translation>कारोबारको इतिहास हेर्नुहोस्</translation>
</message>
<message>
<source>E&xit</source>
<translation>बाहिर निस्कनुहोस्</translation>
</message>
<message>
<source>Quit application</source>
<translation>एप्लिकेसन बन्द गर्नुहोस्</translation>
</message>
<message>
<source>&About %1</source>
<translation>&amp;बारेमा %1</translation>
</message>
<message>
<source>Show information about %1</source>
<translation>%1 को बारेमा सूचना देखाउनुहोस्</translation>
</message>
<message>
<source>About &Qt</source>
<translation>&amp;Qt</translation>
</message>
<message>
<source>Show information about Qt</source>
<translation>Qt को बारेमा सूचना देखाउनुहोस्</translation>
</message>
<message>
<source>&Options...</source>
<translation>&amp;विकल्प...</translation>
</message>
<message>
<source>Modify configuration options for %1</source>
<translation>%1 का लागि कन्फिगुरेसनको विकल्प परिमार्जन गर्नुहोस</translation>
</message>
<message>
<source>&Encrypt Wallet...</source>
<translation>&amp;वालेटलाई इन्क्रिप्ट गर्नुहोस्...</translation>
</message>
<message>
<source>&Backup Wallet...</source>
<translation>&amp;वालेटलाई ब्याकअप गर्नुहोस्...</translation>
</message>
<message>
<source>&Change Passphrase...</source>
<translation>&amp;पासफ्रेज परिवर्तन गर्नुहोस्...</translation>
</message>
<message>
<source>Open &URI...</source>
<translation>URI &amp;खोल्नुहोस्...</translation>
</message>
<message>
<source>Reindexing blocks on disk...</source>
<translation>डिस्कमा ब्लकलाई पुनः सूचीकरण गरिँदै...</translation>
</message>
<message>
<source>Send coins to a Bitcoin address</source>
<translation>बिटकोइन ठेगानामा सिक्का पठाउनुहोस्</translation>
</message>
<message>
<source>Backup wallet to another location</source>
<translation>वालेटलाई अर्को ठेगानामा ब्याकअप गर्नुहोस्</translation>
</message>
<message>
<source>Change the passphrase used for wallet encryption</source>
<translation>वालेट इन्क्रिप्सनमा प्रयोग हुने इन्क्रिप्सन पासफ्रेज परिवर्तन गर्नुहोस्</translation>
</message>
</context>
<context>
<name>CoinControlDialog</name>
<message>
<source>Amount</source>
<translation>रकम</translation>
</message>
<message>
<source>Copy address</source>
<translation>ठेगाना कपी गर्नुहोस्</translation>
</message>
</context>
<context>
<name>CreateWalletActivity</name>
</context>
<context>
<name>CreateWalletDialog</name>
</context>
<context>
<name>EditAddressDialog</name>
</context>
<context>
<name>FreespaceChecker</name>
</context>
<context>
<name>HelpMessageDialog</name>
</context>
<context>
<name>Intro</name>
</context>
<context>
<name>ModalOverlay</name>
</context>
<context>
<name>OpenURIDialog</name>
</context>
<context>
<name>OpenWalletActivity</name>
</context>
<context>
<name>OptionsDialog</name>
<message>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation>इन्टरफेसमा र सिक्का पठाउँदा देखिने डिफल्ट उपविभाजन एकाइ चयन गर्नुहोस् ।</translation>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
<translation>देखाइएको सूचना पूरानो हुन सक्छ । कनेक्सन स्थापित भएपछि, तपाईंको वालेट बिटकोइन नेटवर्कमा स्वचालित रूपमा समिकरण हुन्छ , तर यो प्रक्रिया अहिले सम्म पूरा भएको छैन ।</translation>
</message>
<message>
<source>Watch-only:</source>
<translation>हेर्ने-मात्र:</translation>
</message>
<message>
<source>Available:</source>
<translation>उपलब्ध:</translation>
</message>
<message>
<source>Your current spendable balance</source>
<translation>तपाईंको खर्च गर्न मिल्ने ब्यालेन्स</translation>
</message>
<message>
<source>Pending:</source>
<translation>विचाराधिन:</translation>
</message>
<message>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
<translation>अझै पुष्टि हुन बाँकी र खर्च गर्न मिल्ने ब्यालेन्समा गणना गर्न नमिल्ने जम्मा कारोबार</translation>
</message>
<message>
<source>Immature:</source>
<translation>अपरिपक्व:</translation>
</message>
<message>
<source>Mined balance that has not yet matured</source>
<translation>अझै परिपक्व नभएको खनन गरिएको ब्यालेन्स</translation>
</message>
<message>
<source>Balances</source>
<translation>ब्यालेन्स</translation>
</message>
<message>
<source>Mined balance in watch-only addresses that has not yet matured</source>
<translation>अहिलेसम्म परिपक्व नभएको खनन गरिएको, हेर्ने-मात्र ठेगानामा रहेको ब्यालेन्स</translation>
</message>
<message>
<source>Current total balance in watch-only addresses</source>
<translation>हेर्ने-मात्र ठेगानामा रहेको हालको जम्मा ब्यालेन्स</translation>
</message>
</context>
<context>
<name>PaymentServer</name>
</context>
<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
<translation>प्रयोगकर्ता एजेन्ट</translation>
</message>
<message>
<source>Node/Service</source>
<translation>नोड/सेव</translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<source>Amount</source>
<translation>रकम</translation>
</message>
<message>
<source>Enter a Bitcoin address (e.g. %1)</source>
<translation>कृपया बिटकोइन ठेगाना प्रवेश गर्नुहोस् (उदाहरण %1)</translation>
</message>
</context>
<context>
<name>QRImageWidget</name>
</context>
<context>
<name>RPCConsole</name>
<message>
<source>User Agent</source>
<translation>प्रयोगकर्ता एजेन्ट</translation>
</message>
<message>
<source>Ping Time</source>
<translation>पिङ समय</translation>
</message>
</context>
<context>
<name>ReceiveCoinsDialog</name>
</context>
<context>
<name>ReceiveRequestDialog</name>
<message>
<source>Amount</source>
<translation>रकम</translation>
</message>
</context>
<context>
<name>RecentRequestsTableModel</name>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<source>Choose...</source>
<translation>छनौट गर्नुहोस्...</translation>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<source>Choose previously used address</source>
<translation>पहिला प्रयोग गरिएको ठेगाना प्रयोग गर्नुहोस्</translation>
</message>
<message>
<source>The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. If multiple recipients are selected, the fee is split equally.</source>
<translation>पठाइँदै गरेको रकमबाट शुल्क कटौती गरिनेछ । प्राप्तकर्ताले तपाईंले रकम क्षेत्रमा प्रवेष गरेको भन्दा थोरै बिटकोइन प्राप्त गर्ने छन् । धेरै प्राप्तकर्ता चयन गरिएको छ भने समान रूपमा शुल्क विभाजित गरिनेछ ।</translation>
</message>
<message>
<source>Enter a label for this address to add it to the list of used addresses</source>
<translation>यो ठेगानालाई प्रयोग गरिएको ठेगानाको सूचीमा थप्न एउटा लेबल प्रविष्ट गर्नुहोस्</translation>
</message>
<message>
<source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
<translation>बिटकोइनमा संलग्न गरिएको सन्देश: तपाईंको मध्यस्थको लागि कारोबारको साथमा भण्डारण गरिने URI । नोट: यो सन्देश बिटकोइन नेटवर्क मार्फत पठाइने छैन ।</translation>
</message>
</context>
<context>
<name>ShutdownWindow</name>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<source>You can sign messages/agreements with your addresses to prove you can receive bitcoins sent to them. Be careful not to sign anything vague or random, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
<translation>आफ्नो ठेगानामा पठाइएको बिटकोइन प्राप्त गर्न सकिन्छ भनेर प्रमाणित गर्न तपाईंले ती ठेगानाले सन्देश/सम्झौताहरूमा हस्ताक्षर गर्न सक्नुहुन्छ । फिसिङ आक्रमणले तपाईंलाई छक्याएर अरूका लागि तपाईंको परिचयमा हस्ताक्षर गराउने प्रयास गर्न सक्ने भएकाले अस्पष्ट वा जथाभावीमा हस्ताक्षर गर्दा ध्यान दिनुहोस् । आफू सहमत भएको पूर्ण विस्तृत-कथनमा मात्र हस्ताक्षर गर्नुहोस् ।</translation>
</message>
<message>
<source>Choose previously used address</source>
<translation>पहिला प्रयोग गरिएको ठेगाना प्रयोग गर्नुहोस्</translation>
</message>
<message>
<source>Copy the current signature to the system clipboard</source>
<translation>वर्तमान हस्ताक्षरलाई प्रणाली क्लिपबोर्डमा कपी गर्नुहोस्</translation>
</message>
<message>
<source>Enter the receiver's 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. Note that this only proves the signing party receives with the address, it cannot prove sendership of any transaction!</source>
<translation>सन्देश प्रमाणित गर्न, तल दिइएको स्थानमा प्राप्तकर्ता ठेगाना, सन्देश (लाइन ब्रेक, स्पेस, ट्याब, आदि उस्तै गरी कपी गर्ने कुरा सुनिश्चित गर्नुहोस्) र हस्ताक्षर &apos;s प्रविष्ट गर्नुहोस् । बीचमा-मानिसको-आक्रमणबाट बच्न हस्ताक्षर पढ्दा हस्ताक्षर गरिएको सन्देशमा जे छ त्यो भन्दा धेरै कुरामा ध्यान नदिनुहोस् । यो कार्यले हस्ताक्षर गर्ने पक्षले मात्र यो ठेगानाले प्राप्त गर्छ भन्ने कुरा प्रमाणित गर्छ, यसले कुनै पनि कारोबारको प्रेषककर्तालाई प्रमाणित गर्न सक्दैन भन्ने कुरा याद गर्नुहोस्!</translation>
</message>
</context>
<context>
<name>TrafficGraphWidget</name>
</context>
<context>
<name>TransactionDesc</name>
<message>
<source>Amount</source>
<translation>रकम</translation>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
</context>
<context>
<name>TransactionTableModel</name>
</context>
<context>
<name>TransactionView</name>
<message>
<source>Copy address</source>
<translation>ठेगाना कपी गर्नुहोस्</translation>
</message>
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
<name>WalletController</name>
</context>
<context>
<name>WalletFrame</name>
</context>
<context>
<name>WalletModel</name>
</context>
<context>
<name>WalletView</name>
<message>
<source>&Export</source>
<translation>&amp;निर्यात गर्नुहोस्</translation>
</message>
<message>
<source>Export the data in the current tab to a file</source>
<translation>वर्तमान ट्याबको डाटालाई फाइलमा निर्यात गर्नुहोस्</translation>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<source>The block database contains a block which appears to be from the future. This may be due to your computer's date and time being set incorrectly. Only rebuild the block database if you are sure that your computer's date and time are correct</source>
<translation>ब्लक डाटाबेसमा भविष्यबाट आए जस्तो देखिने एउटा ब्लक हुन्छ । तपाईंको कम्प्युटरको मिति र समय गलत तरिकाले सेट गरिएकाले यस्तो हुन सक्छ । तपाईं आफ्नो कम्प्युटरको मिति र समय सही छ भनेर पक्का हुनुहुन्छ भने मात्र ब्लक डाटाबेस पुनर्निर्माण गर्नुहोस् ।</translation>
</message>
<message>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
<translation>यो जारी गर्नु पूर्वको परीक्षण संस्करण हो - आफ्नै जोखिममा प्रयोग गर्नुहोस् - खनन वा व्यापारीक प्रयोगको लागि प्रयोग नगर्नुहोस</translation>
</message>
<message>
<source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source>
<translation>प्रि-फर्क अवस्थामा डाटाबेस रिवाइन्ड गर्न सकिएन । तपाईंले फेरि ब्लकचेन डाउनलोड गर्नु पर्ने हुन्छ</translation>
</message>
<message>
<source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
<translation>चेतावनी: नेटवर्क पूरै तरिकाले सहमत छैन जस्तो देखिन्छ! केही खननकर्ताहरूले समस्या भोगिरहेका छन् जस्तो देखिन्छ ।</translation>
</message>
<message>
<source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
<translation>चेतावनी: हामी हाम्रा सहकर्मीहरूसँग पूर्णतया सहमत छैनौं जस्तो देखिन्छ! तपाईंले अपग्रेड गर्नु पर्ने हुनसक्छ वा अरू नोडहरूले अपग्रेड गर्नु पर्ने हुनसक्छ ।</translation>
</message>
<message>
<source>%s corrupt, salvage failed</source>
<translation>%s मा क्षति, बचाव विफल भयो</translation>
</message>
<message>
<source>-maxmempool must be at least %d MB</source>
<translation>-maxmempool कम्तिमा %d MB को हुनुपर्छ ।</translation>
</message>
<message>
<source>Cannot resolve -%s address: '%s'</source>
<translation>-%s ठेगाना: &apos;%s&apos; निश्चय गर्न सकिँदैन</translation>
</message>
<message>
<source>Change index out of range</source>
<translation>सूचकांक परिवर्तन सीमा भन्दा बाहर</translation>
</message>
<message>
<source>Copyright (C) %i-%i</source>
<translation>सर्वाधिकार (C) %i-%i</translation>
</message>
<message>
<source>Corrupted block database detected</source>
<translation>क्षति पुगेको ब्लक डाटाबेस फेला पर</translation>
</message>
<message>
<source>Do you want to rebuild the block database now?</source>
<translation>तपाईं अहिले ब्लक डेटाबेस पुनर्निर्माण गर्न चाहनुहुन्छ ?</translation>
</message>
<message>
<source>Unable to bind to %s on this computer. %s is probably already running.</source>
<translation>यो कम्प्युटरको %s मा बाँध्न सकिएन । %s सम्भवित रूपमा पहिलैबाट चलिरहेको छ ।</translation>
</message>
<message>
<source>User Agent comment (%s) contains unsafe characters.</source>
<translation>प्रयोगकर्ता एजेन्टको टिप्पणी (%s) मा असुरक्षित अक्षरहरू छन् ।</translation>
</message>
<message>
<source>Verifying blocks...</source>
<translation>ब्लक प्रमाणित गरिँदै...</translation>
</message>
<message>
<source>Wallet needed to be rewritten: restart %s to complete</source>
<translation>वालेट फेरि लेख्नु आवश्यक छ: पूरा गर्न %s लाई पुन: सुरु गर्नुहोस्</translation>
</message>
<message>
<source>Error: Listening for incoming connections failed (listen returned error %s)</source>
<translation>त्रुटि: आगमन कनेक्सनमा सुन्ने कार्य असफल भयो (सुन्ने कार्यले त्रुटि %s फर्कायो)</translation>
</message>
<message>
<source>Invalid amount for -maxtxfee=<amount>: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
<translation>maxtxfee=&lt;रकम&gt;: का लागि अमान्य रकम &apos;%s&apos; (कारोबारलाई अड्कन नदिन अनिवार्य रूपमा कम्तिमा %s को न्यूनतम रिले शुल्क हुनु पर्छ)</translation>
</message>
<message>
<source>The transaction amount is too small to send after the fee has been deducted</source>
<translation>कारोबार रकम शुल्क कटौती गरेपछि पठाउँदा धेरै नै सानो हुन्छ</translation>
</message>
<message>
<source>You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain</source>
<translation>तपाईंले काटछाँट नगरेको मोडमा जान पुनः सूचकांक प्रयोग गरेर डाटाबेस पुनर्निर्माण गर्नु पर्ने हुन्छ । यसले सम्पूर्ण ब्लकचेनलाई फेरि डाउनलोड गर्नेछ</translation>
</message>
</context>
</TS> | OmniLayer/omnicore | src/qt/locale/bitcoin_ne.ts | TypeScript | mit | 28,567 |
<!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" dir="rtl" lang="fa-IR">
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8" dir="rtl" lang="fa-IR">
<![endif]-->
<!--[if !(IE 7) | !(IE 8) ]><!-->
<html dir="rtl" lang="fa-IR">
<!--<![endif]-->
<head>
<meta charset="utf-8"/>
<meta content="IE-edge,chrome=1" http-equiv="X-UA-Compatable"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="keywords" content=", "/>
<meta name="author" content="Sadra Isapanah Amlashi | صدرا عیسی پناه املشی"/>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script>
(function(b,l,e,g,h,f){1!==parseInt(e.msDoNotTrack||b.doNotTrack||e.doNotTrack,10)&&b.addEventListener("load",function(){var r=(new Date).getTime();b.galite=b.galite||{};var m=new XMLHttpRequest,n="https://www.google-analytics.com/collect?cid="+(l.uid=l.uid||Math.random()+"."+Math.random())+"&v=1&tid="+galite.UA+"&dl="+f(h.location.href)+"&ul=en-us&de=UTF-8",a=function(b){var d="",c;for(c in b){if(void 0===b[c])return!1;d+=f(b[c])}return d},p={dt:[h.title],sd:[g.colorDepth,"-bit"],sr:[g.availHeight,
"x",g.availWidth],vp:[innerWidth,"x",innerHeight],dr:[h.referrer]},k;for(k in p){var q=k+"="+a(p[k]);q&&(n+="&"+q)}a=function(b,d){var c="",a;for(a in d)c+="&"+a+"="+f(d[a]);return function(){var a=n+c+(galite.anonymizeIp?"&aip=1":"")+"&t="+f(b)+"&z="+(new Date).getTime();if(e.sendBeacon)e.sendBeacon(a);else try{m.open("GET",a,!1),m.send()}catch(t){(new Image).src=a}}};setTimeout(a("pageview",null),100);b.addEventListener("unload",a("timing",{utc:"JS Dependencies",utv:"unload",utt:(new Date).getTime()-
r}))})})(window,localStorage,navigator,screen,document,encodeURIComponent);
var galite = galite || {};
galite.UA = 'UA-107934487-1'; // Insert your tracking code here
</script>
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@sadra_amlashi" />
<meta name="twitter:creator" content="@sadra_amlashi" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="fa_IR" />
<meta property="og:url" content="https://sadra.me/tag/%D9%81%D9%84%D8%B3%D9%81%D9%87/" />
<meta name="description" content="سلام! من صدرا عیسی پناه املشی هستم. توسعه دهنده اپلیکیشن iOS و Android.
"/>
<meta property="og:description" content="سلام! من صدرا عیسی پناه املشی هستم. توسعه دهنده اپلیکیشن iOS و Android.
"/>
<meta name="twitter:description" content="سلام! من صدرا عیسی پناه املشی هستم. توسعه دهنده اپلیکیشن iOS و Android.
"/>
<title>فلسفه | صدرا املشی</title>
<meta property="twitter:title" content="فلسفه | صدرا املشی"/>
<meta property="og:site_name" content="فلسفه | صدرا املشی"/>
<meta property="og:title" content="فلسفه | صدرا املشی"/>
<meta property="twitter:image" content="https://sadra.me/assets/img/avatar.jpg" />
<meta property="og:image" content="https://sadra.me/assets/img/avatar.jpg" />
<link rel="alternate" type="application/rss+xml" title="وبلاگ صدرا املشی » Feed" href="/site-map.xml"/>
<link rel="alternative" href="/site-map.xml" title="وبلاگ صدرا املشی" type="application/atom+xml"/>
<link rel="short icon" type="image/x-icon" href="https://sadra.me/assets/img/base/favicon.png"/>
<link rel="stylesheet" type="text/css" href="https://sadra.me/assets/css/styles.css"/>
</head>
<body dir="rtl" lang="Farsi" >
<!-- Header -->
<header class="header-rtl">
<nav class="nav-wrap">
<a href="/" class="nav-logo">وبلاگ صدرا املشی</a>
<ul class="navigation">
<li><a href="/">یادداشتها</a></li>
<li><a href="/list/items">موضوعات</a></li>
<li><a href="/about">درباره</a></li>
<li><a href="http://cv.sadra.me/">رزومه</a></li>
<li><a href="https://sadra.me/english">English</a></li>
</ul>
</nav>
</header>
<!-- /Header -->
<div class="content">
<h1 class="archive-title">پستهای مرتبط با هشتگ <span>#فلسفه</span></h1>
<div class="blog-post-list">
<div class="blog-post-item-container">
<div class="post-date-box">
<p class="post-item-date">05 <br/>مهر</p>
</div>
<div class="post-feature-box">
<a class="post-item-title-link" href="/2018/sapiens"><p class="post-item-title">انسان خردمند - تاریخ مختصر بشر!</p></a>
<div class="post-list-routes">
<a class="category-link" href="/category/book">Book</a>
<a class="category-link" href="/category/کتاب">کتاب</a>
<a class="tag-link" href="/tag/انسان">انسان</a>
<a class="tag-link" href="/tag/تاریخ">تاریخ</a>
<a class="tag-link" href="/tag/جامعه-شناسی">جامعهشناسی</a>
<a class="tag-link" href="/tag/فلسفه">فلسفه</a>
</div>
</div>
</div>
</div>
</div>
<!-- Footer -->
<footer class="footer-wrapper">
<div class="delimiter">
<a href="/" class="footer-logo">
<img src="https://sadra.me/assets/img/base/favicon.png" class="logo-wrapper">
</a>
</div>
<p class="footer-copyright">
2008 - 2017<br>
مطالب تحت لیسانس <a href="http://creativecommons.org/licenses/by-nc-nd/3.0/" rel="license" target="_blank">کریتیو کامنز</a> منتشر میشوند.
</p>
<div class="footer-social-links">
<a href="https://twitter.com/sadra-amlashi" title="Twitter" target="_blank"><i class="fa fa-twitter"></i></a>
<a href="https://github.com/sadra" title="Github" target="_blank"><i class="fa fa-github"></i></a>
<a href="https://medium.com/sadra" title="Medium" target="_blank"><i class="fa fa-medium"></i></a>
<a href="https://www.linkedin.com/in/amlashisadra/" title="Linkedin" target="_blank"><i class="fa fa-linkedin"></i></a>
<a href="https://facebook.com/sadra.am123" title="Facebook" target="_blank"><i class="fa fa-facebook"></i></a>
</div>
</footer>
<!-- /Footer -->
</body>
</html>
| sadra/sadra.github.io | tag/فلسفه/index.html | HTML | mit | 6,802 |
/* xlprint.c - xlisp print routine */
/* Copyright (c) 1984-2002, by David Michael Betz
All Rights Reserved
See the included file 'license.txt' for the full license.
*/
#include "xlisp.h"
/* global variables */
int xlPRBreadth = -1;
int xlPRDepth = -1;
/* local variables */
static char buf[200];
/* external variables */
extern xlValue s_printcase,k_downcase;
extern xlValue s_fixfmt,s_flofmt,xlUnboundObject;
static void print(xlValue fptr,xlValue vptr,int escflag,int depth);
static void putatm(xlValue fptr,char *tag,xlValue val);
static void putfstream(xlValue fptr,xlValue val);
static void putstring(xlValue fptr,xlValue str);
static void putqstring(xlValue fptr,xlValue str);
static void putsymbol(xlValue fptr,xlValue sym);
static void putsympname(xlValue fptr,xlValue pname);
static void putpackage(xlValue fptr,xlValue val);
static void putsubr(xlValue fptr,char *tag,xlValue val);
static void putclosure(xlValue fptr,char *tag,xlValue val);
static void putcode(xlValue fptr,char *tag,xlValue val);
static void putnumber(xlValue fptr,xlFIXTYPE n);
static void putoct(xlValue fptr,int n);
static void putflonum(xlValue fptr,xlFLOTYPE n);
static void putcharacter(xlValue fptr,int ch);
static void putobject(xlValue fptr,xlValue val);
static void putforeignptr(xlValue fptr,xlValue val);
static void putfree(xlValue fptr,xlValue val);
/* xlDisplay - print an expression without quoting */
xlEXPORT void xlDisplay(xlValue expr,xlValue file)
{
xlCheck(2);
xlPush(file);
xlPush(expr);
print(file,expr,FALSE,0);
xlDrop(2);
}
/* xlDisplaySize - determine the size of display output */
xlEXPORT xlFIXTYPE xlDisplaySize(xlValue val)
{
extern xlFIXTYPE xlfsize;
xlfsize = 0;
xlDisplay(val,xlNil);
return xlfsize;
}
/* xlWrite - print an expression with quoting */
xlEXPORT void xlWrite(xlValue expr,xlValue file)
{
xlCheck(2);
xlPush(file);
xlPush(expr);
print(file,expr,TRUE,0);
xlDrop(2);
}
/* xlWriteSize - determine the size of write output */
xlEXPORT xlFIXTYPE xlWriteSize(xlValue val)
{
extern xlFIXTYPE xlfsize;
xlfsize = 0;
xlWrite(val,xlNil);
return xlfsize;
}
/* xlNewline - terminate the current print line */
xlEXPORT void xlNewline(xlValue fptr)
{
xlPutC(fptr,'\n');
}
/* xlFreshLine - terminate the current print line if necessary */
xlEXPORT void xlFreshLine(xlValue fptr)
{
if (!xlAtBOLP(fptr))
xlNewline(fptr);
}
/* xlPutStr - output a string */
xlEXPORT void xlPutStr(xlValue fptr,char *str)
{
while (*str)
xlPutC(fptr,*str++);
}
/* print - internal print routine */
static void print(xlValue fptr,xlValue vptr,int escflag,int depth)
{
xlFIXTYPE size,i;
xlValue nptr,next;
int breadth;
/* print nil */
if (vptr == xlNil) {
xlPutStr(fptr,"()");
return;
}
/* check value type */
switch (xlNodeType(vptr)) {
case xlSUBR:
putsubr(fptr,"Subr",vptr);
break;
case xlXSUBR:
putsubr(fptr,"XSubr",vptr);
break;
case xlCONS:
if (xlPRDepth >= 0 && depth >= xlPRDepth) {
xlPutStr(fptr,"(...)");
break;
}
xlPutC(fptr,'(');
breadth = 0;
for (nptr = vptr; nptr != xlNil; nptr = next) {
if (xlPRBreadth >= 0 && breadth++ >= xlPRBreadth) {
xlPutStr(fptr,"...");
break;
}
print(fptr,xlCar(nptr),escflag,depth+1);
if ((next = xlCdr(nptr)) != xlNil) {
if (xlConsP(next))
xlPutC(fptr,' ');
else {
xlPutStr(fptr," . ");
print(fptr,next,escflag,depth+1);
break;
}
}
}
xlPutC(fptr,')');
break;
case xlVECTOR:
xlPutStr(fptr,"#(");
for (i = 0, size = xlGetSize(vptr); i < size; ++i) {
if (i != 0) xlPutC(fptr,' ');
print(fptr,xlGetElement(vptr,i),escflag,depth+1);
}
xlPutC(fptr,')');
break;
case xlSYMBOL:
putsymbol(fptr,vptr);
break;
case xlPACKAGE:
putpackage(fptr,vptr);
break;
case xlPROMISE:
if (xlGetPProc(vptr) != xlNil)
putatm(fptr,"Promise",vptr);
else
putatm(fptr,"Forced-promise",vptr);
break;
case xlCLOSURE:
putclosure(fptr,"Procedure",vptr);
break;
case xlFIXNUM:
putnumber(fptr,xlGetFixnum(vptr));
break;
case xlFLONUM:
putflonum(fptr,xlGetFlonum(vptr));
break;
case xlCHARACTER:
if (escflag)
putcharacter(fptr,xlGetChCode(vptr));
else
xlPutC(fptr,xlGetChCode(vptr));
break;
case xlSTRING:
if (escflag)
putqstring(fptr,vptr);
else
putstring(fptr,vptr);
break;
case xlFSTREAM:
putfstream(fptr,vptr);
break;
case xlUSTREAM:
putatm(fptr,"Unnamed-stream",vptr);
break;
case xlOSTREAM:
putatm(fptr,"Object-stream",vptr);
break;
case xlCODE:
putcode(fptr,"Code",vptr);
break;
case xlCONTINUATION:
putatm(fptr,"Escape-procedure",vptr);
break;
case xlENV:
putatm(fptr,"Environment",vptr);
break;
case xlSENV:
putatm(fptr,"Stack-environment",vptr);
break;
case xlMSENV:
putatm(fptr,"Moved-stack-environment",vptr);
break;
case xlMENV:
putatm(fptr,"Method-environment",vptr);
break;
case xlSMENV:
putatm(fptr,"Stack-method-environment",vptr);
break;
case xlOBJECT:
putobject(fptr,vptr);
break;
case xlFOREIGNPTR:
putforeignptr(fptr,vptr);
break;
case xlTABLE:
putatm(fptr,"Table",vptr);
break;
case xlFREE:
putfree(fptr,vptr);
break;
default:
putatm(fptr,"Foo",vptr);
break;
}
}
/* putatm - output an atom */
static void putatm(xlValue fptr,char *tag,xlValue val)
{
sprintf(buf,"#<%s #x",tag); xlPutStr(fptr,buf);
sprintf(buf,xlAFMT,val); xlPutStr(fptr,buf);
xlPutC(fptr,'>');
}
/* putfstream - output a file stream */
static void putfstream(xlValue fptr,xlValue val)
{
xlPutStr(fptr,"#<File-stream #x");
sprintf(buf,xlAFMT,val); xlPutStr(fptr,buf);
xlPutC(fptr,':');
sprintf(buf,xlAFMT,xlGetFile(val)); xlPutStr(fptr,buf);
xlPutC(fptr,'>');
}
/* putstring - output a string */
static void putstring(xlValue fptr,xlValue str)
{
xlFIXTYPE len,i;
/* get the string length */
len = xlGetSLength(str);
/* output each character in the string */
for (i = 0; i < len; ++i)
xlPutC(fptr,xlGetString(str)[i]);
}
/* putqstring - output a quoted string */
static void putqstring(xlValue fptr,xlValue str)
{
xlFIXTYPE len,i;
int ch;
/* get the string length */
len = xlGetSLength(str);
/* output the initial quote */
xlPutC(fptr,'"');
/* output each character in the string */
for (i = 0; i < len; ++i)
/* check for a control character */
if ((ch = xlGetString(str)[i]) < 040 || ch == '\\' || ch == '"') {
xlPutC(fptr,'\\');
switch (ch) {
case '\033':
xlPutC(fptr,'e');
break;
case '\n':
xlPutC(fptr,'n');
break;
case '\r':
xlPutC(fptr,'r');
break;
case '\t':
xlPutC(fptr,'t');
break;
case '\\':
case '"':
xlPutC(fptr,ch);
break;
default:
putoct(fptr,ch);
break;
}
}
/* output a normal character */
else
xlPutC(fptr,ch);
/* output the terminating quote */
xlPutC(fptr,'"');
}
/* putsymbol - output a symbol */
static void putsymbol(xlValue fptr,xlValue sym)
{
extern xlValue s_package,xlKeywordPackage,k_internal;
xlValue package,key;
if ((package = xlGetPackage(sym)) == xlNil)
xlPutStr(fptr,"#:");
else if (package == xlKeywordPackage)
xlPutC(fptr,':');
else if (!xlVisibleP(sym,xlGetValue(s_package))) {
xlFindSymbol(xlGetString(xlGetPName(sym)),package,&key);
putsympname(fptr,xlCar(xlGetNames(xlGetPackage(sym))));
if (key == k_internal) xlPutC(fptr,':');
xlPutC(fptr,':');
}
putsympname(fptr,xlGetPName(sym));
}
/* putsympname - output a symbol print name */
static void putsympname(xlValue fptr,xlValue pname)
{
xlFIXTYPE len,i;
/* get the string length */
len = xlGetSLength(pname);
/* print the symbol name */
if (xlGetValue(s_printcase) == k_downcase)
for (i = 0; i < len; ++i) {
int ch = xlGetString(pname)[i];
xlPutC(fptr,isupper(ch) ? tolower(ch) : ch);
}
else
for (i = 0; i < len; ++i) {
int ch = xlGetString(pname)[i];
xlPutC(fptr,islower(ch) ? toupper(ch) : ch);
}
}
/* putpackage - output a package */
static void putpackage(xlValue fptr,xlValue val)
{
xlPutStr(fptr,"#<Package ");
putstring(fptr,xlCar(xlGetNames(val)));
xlPutStr(fptr,">");
}
/* putsubr - output a subr/fsubr */
static void putsubr(xlValue fptr,char *tag,xlValue val)
{
sprintf(buf,"#<%s %s>",tag,xlGetSubrName(val));
xlPutStr(fptr,buf);
}
/* putclosure - output a closure */
static void putclosure(xlValue fptr,char *tag,xlValue val)
{
putcode(fptr,tag,xlGetCode(val));
}
/* putcode - output a code object */
static void putcode(xlValue fptr,char *tag,xlValue val)
{
xlValue name;
if ((name = xlGetElement(val,1)) != xlNil) {
xlPutStr(fptr,"#<");
xlPutStr(fptr,tag);
xlPutStr(fptr," ");
putstring(fptr,xlGetPName(name));
xlPutStr(fptr,">");
}
else
putatm(fptr,tag,val);
}
/* putnumber - output a number */
static void putnumber(xlValue fptr,xlFIXTYPE n)
{
xlValue fmt = xlGetValue(s_fixfmt);
sprintf(buf,xlStringP(fmt) ? xlGetString(fmt) : xlIFMT,n);
xlPutStr(fptr,buf);
}
/* putoct - output an octal byte value */
static void putoct(xlValue fptr,int n)
{
sprintf(buf,"%03o",n);
xlPutStr(fptr,buf);
}
/* putflonum - output a flonum */
static void putflonum(xlValue fptr,xlFLOTYPE n)
{
xlValue fmt = xlGetValue(s_flofmt);
sprintf(buf,xlStringP(fmt) ? xlGetString(fmt) : xlFFMT,n);
xlPutStr(fptr,buf);
}
/* putcharacter - output a character value */
static void putcharacter(xlValue fptr,int ch)
{
switch (ch) {
case '\n':
xlPutStr(fptr,"#\\Newline");
break;
case '\r':
xlPutStr(fptr,"#\\Enter");
break;
case ' ':
xlPutStr(fptr,"#\\Space");
break;
default:
sprintf(buf,"#\\%c",ch);
xlPutStr(fptr,buf);
break;
}
}
/* putobject - output an object value */
static void putobject(xlValue fptr,xlValue obj)
{
extern xlValue s_print;
xlInternalCall(&obj,1,obj,2,s_print,fptr);
}
/* putforeignptr - output a foreign pointer value */
static void putforeignptr(xlValue fptr,xlValue val)
{
char buf[100];
xlPutStr(fptr,"#<FP:");
xlPutStr(fptr,xlGetFPType(val)->def->name);
xlPutStr(fptr," #");
sprintf(buf,xlAFMT,val);
strcat(buf,":");
sprintf(&buf[strlen(buf)],xlAFMT,xlGetFPtr(val));
strcat(buf,">");
xlPutStr(fptr,buf);
}
/* must be in type id order */
static char *typenames[] = {
"FREE",
"CONS",
"SYMBOL",
"FIXNUM",
"FLONUM",
"STRING",
"FSTREAM",
"USTREAM",
"OSTREAM",
"VECTOR",
"CLOSURE",
"CODE",
"SUBR",
"XSUBR",
"CONTINUATION",
"CHARACTER",
"PROMISE",
"ENV",
"SENV",
"MSENV",
"MENV",
"SMENV",
"OBJECT",
"PACKAGE",
"FOREIGNPTR"
};
/* putfree - output a free value */
static void putfree(xlValue fptr,xlValue val)
{
char buf[100];
int typeid;
xlPutStr(fptr,"#<Free #");
sprintf(buf,xlAFMT,val);
strcat(buf," was ");
typeid = (int)(long)xlCar(val);
if (typeid >= 0 && typeid <= xlMAXTYPEID)
sprintf(&buf[strlen(buf)],"%s",typenames[typeid]);
else
sprintf(&buf[strlen(buf)],"unknown type (%d)",typeid);
strcat(buf,">");
xlPutStr(fptr,buf);
}
| dbetz/xlisp | src/xlprint.c | C | mit | 12,771 |
<?php
namespace Mrgrain\EloquentServiceInjection\Tests;
use Illuminate\Support\Facades\App;
use PHPUnit_Framework_TestCase;
use \Mockery as m;
/**
* Class ServiceInjectionTraitTest
*
* @package Mrgrain\EloquentServiceInjection\Tests
*/
class ServiceInjectionTraitTest extends PHPUnit_Framework_TestCase
{
/**
* Tear down tests.
*/
public function tearDown()
{
m::close();
}
/**
* Test if getting a service works for models.
*/
public function testGetServiceForModel()
{
// Arrange
App::shouldReceive('make')
->once()
->with(\Exception::class)
->andReturn(new \Exception);
$model = new ModelStub();
// Act
$exception = $model->exception;
// Assert
$this->assertInstanceOf(\Exception::class, $exception);
}
/**
* Test if getting a service works for other object.
*/
public function testGetServiceForOtherObject()
{
// Arrange
App::shouldReceive('make')
->once()
->with(\Exception::class)
->andReturn(new \Exception);
$object = new OtherStub();
// Act
$exception = $object->exception;
// Assert
$this->assertInstanceOf(\Exception::class, $exception);
}
/**
* Test if it correctly falls back to the parent if it is a model (or anything else with __get).
*/
public function testGetServiceNotFoundForModel()
{
// Arrange
App::shouldReceive('make')->never();
$somethingElse = new \stdClass();
// use a proxy partial to ensure parents setAttribute is called
// This is a limitation of mockery not allowing to mock magic methods (__get, __set)
$mock = \Mockery::mock(new ModelStub)->makePartial();
$mock->shouldReceive('setAttribute')->once();
$mock->shouldReceive('getAttribute')->once()->andReturn($somethingElse);
// test against a raw model to validate fallback to model methods
$model = new ModelStub;
// Act
$mock->noService = $somethingElse;
$model->noService = $somethingElse;
// Assert
$this->assertSame($somethingElse, $mock->noService);
$this->assertSame($somethingElse, $model->getAttributeValue('noService'));
}
/**
* Test if it fails correctly if no service is found on other objects.
*/
public function testGetServiceNotFoundForOtherObject()
{
// Arrange
App::shouldReceive('make')->never();
$somethingElse = new \stdClass();
$mock = \Mockery::mock('OtherStub')->makePartial();
$mock->shouldReceive('setService', 'getService')->never();
// test against a raw model to validate fallback to normal __get/__set functionality
$model = new OtherStub;
// Act
$mock->noService = $somethingElse;
$model->noService = $somethingElse;
// Assert
$this->assertSame($somethingElse, $mock->noService);
$this->assertSame($somethingElse, $model->noService);
}
/**
* Test if setting a defined service to something else works for a model.
*/
public function testSetServiceForModel()
{
// Arrange
App::shouldReceive('make')->never();
// Act
$model = new ModelStub();
$somethingElse = new \stdClass();
$model->exception = $somethingElse;
// Assert
$this->assertSame($somethingElse, $model->exception);
}
/**
* Test if setting a service to something else works for other objects.
*/
public function testSetServiceForOtherObject()
{
// Arrange
App::shouldReceive('make')->never();
// Act
$model = new OtherStub();
$somethingElse = new \stdClass();
$model->exception = $somethingElse;
// Assert
$this->assertSame($somethingElse, $model->exception);
}
/**
* Test if it correctly falls back to the parent if it is a model (or anything else with __get).
*/
public function testSetServiceNotFoundForModel()
{
// Arrange
App::shouldReceive('make')->never();
$somethingElse = new \stdClass();
// use a proxy partial to ensure parents setAttribute is called
// This is a limitation of mockery not allowing to mock magic methods (__get, __set)
$mock = \Mockery::mock(new ModelStub)->makePartial();
$mock->shouldReceive('setAttribute')->once();
// Act
$mock->noService = $somethingElse;
}
/**
* Test if it correctly falls back to the parent if it is a model (or anything else with __get).
*/
public function testSetServiceNotFoundForOtherObject()
{
// Arrange
App::shouldReceive('make')->never();
$somethingElse = new \stdClass();
$mock = \Mockery::mock('OtherStub')->makePartial();
$mock->shouldReceive('setService')->never();
// Act
$mock->noService = $somethingElse;
}
}
| mrgrain/eloquent-service-injection | tests/ServiceInjectionTraitTest.php | PHP | mit | 5,125 |
<?php
declare(strict_types=1);
/*
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sonata\AdminBundle\Form\Type\Operator;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType as FormChoiceType;
use Symfony\Component\Form\FormTypeInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
final class StringOperatorType extends AbstractType
{
public const TYPE_CONTAINS = 1;
public const TYPE_NOT_CONTAINS = 2;
public const TYPE_EQUAL = 3;
public const TYPE_STARTS_WITH = 4;
public const TYPE_ENDS_WITH = 5;
public const TYPE_NOT_EQUAL = 6;
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'choice_translation_domain' => 'SonataAdminBundle',
'choices' => [
'label_type_contains' => self::TYPE_CONTAINS,
'label_type_not_contains' => self::TYPE_NOT_CONTAINS,
'label_type_equals' => self::TYPE_EQUAL,
'label_type_starts_with' => self::TYPE_STARTS_WITH,
'label_type_ends_with' => self::TYPE_ENDS_WITH,
'label_type_not_equals' => self::TYPE_NOT_EQUAL,
],
]);
}
/**
* @phpstan-return class-string<FormTypeInterface>
*/
public function getParent(): string
{
return FormChoiceType::class;
}
public function getBlockPrefix(): string
{
return 'sonata_type_operator_string';
}
}
| sonata-project/SonataAdminBundle | src/Form/Type/Operator/StringOperatorType.php | PHP | mit | 1,716 |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { codeModelSchema, CodeModel } from "@autorest/codemodel";
import { AutorestExtensionHost, startSession } from "@autorest/extension-base";
import { serialize } from "@azure-tools/codegen";
import { Example } from "./example";
export async function processRequest(host: AutorestExtensionHost) {
const debug = (await host.getValue("debug")) || false;
try {
const session = await startSession<CodeModel>(host, codeModelSchema);
// process
const plugin = new Example(session);
// go!
const result = plugin.process();
// output the model to the pipeline
host.writeFile({
filename: "code-model-v4.yaml",
content: serialize(result, codeModelSchema),
artifactType: "code-model-v4",
});
host.writeFile({
filename: "code-model-v4-no-tags.yaml",
content: serialize(result),
artifactType: "code-model-v4-no-tags",
});
} catch (error: any) {
if (debug) {
// eslint-disable-next-line no-console
console.error(`${__filename} - FAILURE ${JSON.stringify(error)} ${error.stack}`);
}
throw error;
}
}
| Azure/autorest | packages/extensions/modelerfour/src/example/plugin-flattener.ts | TypeScript | mit | 1,456 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0-beta2) on Mon Mar 19 18:24:20 CST 2007 -->
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<TITLE>
ActivationDesc (Java Platform SE 6)
</TITLE><script>var _hmt = _hmt || [];(function() {var hm = document.createElement("script");hm.src = "//hm.baidu.com/hm.js?dd1361ca20a10cc161e72d4bc4fef6df";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(hm, s);})();</script>
<META NAME="date" CONTENT="2007-03-19">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ActivationDesc (Java Platform SE 6)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="跳过导航链接"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>概述</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>软件包</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>类</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ActivationDesc.html"><FONT CLASS="NavBarFont1"><B>使用</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>树</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>已过时</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>索引</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>帮助</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<b>Java<sup><font size=-2>TM</font></sup> Platform<br>Standard Ed. 6</b></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../java/rmi/activation/ActivateFailedException.html" title="java.rmi.activation 中的类"><B>上一个类</B></A>
<A HREF="../../../java/rmi/activation/ActivationException.html" title="java.rmi.activation 中的类"><B>下一个类</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?java/rmi/activation/ActivationDesc.html" target="_top"><B>框架</B></A>
<A HREF="ActivationDesc.html" target="_top"><B>无框架</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>所有类</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>所有类</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
摘要: 嵌套 | 字段 | <A HREF="#constructor_summary">构造方法</A> | <A HREF="#method_summary">方法</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
详细信息: 字段 | <A HREF="#constructor_detail">构造方法</A> | <A HREF="#method_detail">方法</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
java.rmi.activation</FONT>
<BR>
类 ActivationDesc</H2>
<PRE>
<A HREF="../../../java/lang/Object.html" title="java.lang 中的类">java.lang.Object</A>
<IMG SRC="../../../resources/inherit.gif" ALT="继承者 "><B>java.rmi.activation.ActivationDesc</B>
</PRE>
<DL>
<DT><B>所有已实现的接口:</B> <DD><A HREF="../../../java/io/Serializable.html" title="java.io 中的接口">Serializable</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public final class <B>ActivationDesc</B><DT>extends <A HREF="../../../java/lang/Object.html" title="java.lang 中的类">Object</A><DT>implements <A HREF="../../../java/io/Serializable.html" title="java.io 中的接口">Serializable</A></DL>
</PRE>
<P>
激活描述符包含激活对象所必需的信息: <ul>
<li> 对象的组标识符,
<li> 对象的完全限定的类名,
<li> 对象的代码基(类中的位置),一个代码基 URL 路径,
<li> 对象的重启“模式”,以及
<li> 一个可包含特定于对象的初始化数据的“编组”对象。</ul>
<p>一个描述符通过激活系统注册,可用于重建/激活描述符所指定的对象。对象描述符中的 <code>MarshalledObject</code> 被传入作为远程对象构造方法的第二个参数,供对象在重新初始化/激活过程中使用。
<P>
<P>
<DL>
<DT><B>从以下版本开始:</B></DT>
<DD>1.2</DD>
<DT><B>另请参见:</B><DD><A HREF="../../../java/rmi/activation/Activatable.html" title="java.rmi.activation 中的类"><CODE>Activatable</CODE></A>,
<A HREF="../../../serialized-form.html#java.rmi.activation.ActivationDesc">序列化表格</A></DL>
<HR>
<P>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>构造方法摘要</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../java/rmi/activation/ActivationDesc.html#ActivationDesc(java.rmi.activation.ActivationGroupID, java.lang.String, java.lang.String, java.rmi.MarshalledObject)">ActivationDesc</A></B>(<A HREF="../../../java/rmi/activation/ActivationGroupID.html" title="java.rmi.activation 中的类">ActivationGroupID</A> groupID,
<A HREF="../../../java/lang/String.html" title="java.lang 中的类">String</A> className,
<A HREF="../../../java/lang/String.html" title="java.lang 中的类">String</A> location,
<A HREF="../../../java/rmi/MarshalledObject.html" title="java.rmi 中的类">MarshalledObject</A><?> data)</CODE>
<BR>
为类名为 <code>className</code> 的对象构造一个对象描述符,这可从代码 <code>location</code> 处加载,并且其初始化信息为 <code>data</code>。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../java/rmi/activation/ActivationDesc.html#ActivationDesc(java.rmi.activation.ActivationGroupID, java.lang.String, java.lang.String, java.rmi.MarshalledObject, boolean)">ActivationDesc</A></B>(<A HREF="../../../java/rmi/activation/ActivationGroupID.html" title="java.rmi.activation 中的类">ActivationGroupID</A> groupID,
<A HREF="../../../java/lang/String.html" title="java.lang 中的类">String</A> className,
<A HREF="../../../java/lang/String.html" title="java.lang 中的类">String</A> location,
<A HREF="../../../java/rmi/MarshalledObject.html" title="java.rmi 中的类">MarshalledObject</A><?> data,
boolean restart)</CODE>
<BR>
为类名为 <code>className</code> 的对象构造一个对象描述符,这可从代码的 <code>location</code> 处加载,并且其初始化信息为 <code>data</code>。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../java/rmi/activation/ActivationDesc.html#ActivationDesc(java.lang.String, java.lang.String, java.rmi.MarshalledObject)">ActivationDesc</A></B>(<A HREF="../../../java/lang/String.html" title="java.lang 中的类">String</A> className,
<A HREF="../../../java/lang/String.html" title="java.lang 中的类">String</A> location,
<A HREF="../../../java/rmi/MarshalledObject.html" title="java.rmi 中的类">MarshalledObject</A><?> data)</CODE>
<BR>
为类名为 <code>className</code> 的对象构造一个对象描述符,这可从代码 <code>location</code> 处加载,并且其初始化信息为 <code>data</code>。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../java/rmi/activation/ActivationDesc.html#ActivationDesc(java.lang.String, java.lang.String, java.rmi.MarshalledObject, boolean)">ActivationDesc</A></B>(<A HREF="../../../java/lang/String.html" title="java.lang 中的类">String</A> className,
<A HREF="../../../java/lang/String.html" title="java.lang 中的类">String</A> location,
<A HREF="../../../java/rmi/MarshalledObject.html" title="java.rmi 中的类">MarshalledObject</A><?> data,
boolean restart)</CODE>
<BR>
为类名为 <code>className</code> 的对象构造一个对象描述符,这可从代码 <code>location</code> 处加载,并且其初始化信息为 <code>data</code>。</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>方法摘要</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../java/rmi/activation/ActivationDesc.html#equals(java.lang.Object)">equals</A></B>(<A HREF="../../../java/lang/Object.html" title="java.lang 中的类">Object</A> obj)</CODE>
<BR>
比较两个激活描述符的内容相等性。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../java/lang/String.html" title="java.lang 中的类">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../java/rmi/activation/ActivationDesc.html#getClassName()">getClassName</A></B>()</CODE>
<BR>
返回此描述符指定的对象的类名。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../java/rmi/MarshalledObject.html" title="java.rmi 中的类">MarshalledObject</A><?></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../java/rmi/activation/ActivationDesc.html#getData()">getData</A></B>()</CODE>
<BR>
为此描述符指定的对象返回包含初始化/激活数据的“编组对象”。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../java/rmi/activation/ActivationGroupID.html" title="java.rmi.activation 中的类">ActivationGroupID</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../java/rmi/activation/ActivationDesc.html#getGroupID()">getGroupID</A></B>()</CODE>
<BR>
返回由此描述符指定的对象的组标识符。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../java/lang/String.html" title="java.lang 中的类">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../java/rmi/activation/ActivationDesc.html#getLocation()">getLocation</A></B>()</CODE>
<BR>
返回此描述符指定的对象的代码基。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../java/rmi/activation/ActivationDesc.html#getRestartMode()">getRestartMode</A></B>()</CODE>
<BR>
返回与此激活描述符关联的对象的“重启”模式。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../java/rmi/activation/ActivationDesc.html#hashCode()">hashCode</A></B>()</CODE>
<BR>
为类似的 <code>ActivationDesc</code> 返回相同的哈希码</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>从类 java.lang.<A HREF="../../../java/lang/Object.html" title="java.lang 中的类">Object</A> 继承的方法</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD>
</TR>
</TABLE>
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>构造方法详细信息</B></FONT></TH>
</TR>
</TABLE>
<A NAME="ActivationDesc(java.lang.String, java.lang.String, java.rmi.MarshalledObject)"><!-- --></A><H3>
ActivationDesc</H3>
<PRE>
public <B>ActivationDesc</B>(<A HREF="../../../java/lang/String.html" title="java.lang 中的类">String</A> className,
<A HREF="../../../java/lang/String.html" title="java.lang 中的类">String</A> location,
<A HREF="../../../java/rmi/MarshalledObject.html" title="java.rmi 中的类">MarshalledObject</A><?> data)
throws <A HREF="../../../java/rmi/activation/ActivationException.html" title="java.rmi.activation 中的类">ActivationException</A></PRE>
<DL>
<DD>为类名为 <code>className</code> 的对象构造一个对象描述符,这可从代码 <code>location</code> 处加载,并且其初始化信息为 <code>data</code>。如果使用这种形式的构造方法,<code>groupID</code> 默认为此 VM 的 <code>ActivationGroup</code> 的当前 id。在同一 VM 中,具有相同 <code>ActivationGroupID</code> 的所有对象都被激活。
<p>注意,由此构造方法所创建的描述符指定的对象将仅仅按需被激活(默认情况下,重启模式为 <code>false</code>)。如果一个可激活的对象需要重启服务,使用带有 boolean 参数 <code>restart</code> 的 <code>ActivationDesc</code> 构造方法之一。
<p> 如果此 VM 当前没有任何激活组,则此构造方法将抛出 <code>ActivationException</code>。使用 <code>ActivationGroup.createGroup</code> 方法创建一个 <code>ActivationGroup</code>。
<P>
<DL>
<DT><B>参数:</B><DD><CODE>className</CODE> - 对象的完全限定包的类名<DD><CODE>location</CODE> - 对象的代码基(类被加载处)<DD><CODE>data</CODE> - 以编组形式包含的对象初始化(激活)数据。
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../java/rmi/activation/ActivationException.html" title="java.rmi.activation 中的类">ActivationException</A></CODE> - 如果当前组不存在<DT><B>从以下版本开始:</B></DT>
<DD>1.2</DD>
</DL>
</DL>
<HR>
<A NAME="ActivationDesc(java.lang.String, java.lang.String, java.rmi.MarshalledObject, boolean)"><!-- --></A><H3>
ActivationDesc</H3>
<PRE>
public <B>ActivationDesc</B>(<A HREF="../../../java/lang/String.html" title="java.lang 中的类">String</A> className,
<A HREF="../../../java/lang/String.html" title="java.lang 中的类">String</A> location,
<A HREF="../../../java/rmi/MarshalledObject.html" title="java.rmi 中的类">MarshalledObject</A><?> data,
boolean restart)
throws <A HREF="../../../java/rmi/activation/ActivationException.html" title="java.rmi.activation 中的类">ActivationException</A></PRE>
<DL>
<DD>为类名为 <code>className</code> 的对象构造一个对象描述符,这可从代码 <code>location</code> 处加载,并且其初始化信息为 <code>data</code>。如果使用这种形式的构造方法,<code>groupID</code> 默认为此 VM 的 <code>ActivationGroup</code> 的当前 id。在同一 VM 中,具有相同 <code>ActivationGroupID</code> 的所有对象都被激活。
<p>如果此 VM 当前没有任何激活组,则此构造方法将抛出 <code>ActivationException</code>。使用 <code>ActivationGroup.createGroup</code> 方法创建一个 <code>ActivationGroup</code>。
<P>
<DL>
<DT><B>参数:</B><DD><CODE>className</CODE> - 对象的完全限定包的类名<DD><CODE>location</CODE> - 对象的代码基(类被加载处)<DD><CODE>data</CODE> - 以编组形式包含的对象初始化(激活)数据。<DD><CODE>restart</CODE> - 如果为 true,则在一次意外崩溃之后,如果激活器被重启或者对象的激活组被重启,则该对象也会被重启(激活);如果为 false,对象只能按需激活。指定 <code>restart</code> 为 <code>true</code>,不强制对新注册的对象立即进行一次初始激活操作;初始激活是延后的。
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../java/rmi/activation/ActivationException.html" title="java.rmi.activation 中的类">ActivationException</A></CODE> - 如果当前组不存在<DT><B>从以下版本开始:</B></DT>
<DD>1.2</DD>
</DL>
</DL>
<HR>
<A NAME="ActivationDesc(java.rmi.activation.ActivationGroupID, java.lang.String, java.lang.String, java.rmi.MarshalledObject)"><!-- --></A><H3>
ActivationDesc</H3>
<PRE>
public <B>ActivationDesc</B>(<A HREF="../../../java/rmi/activation/ActivationGroupID.html" title="java.rmi.activation 中的类">ActivationGroupID</A> groupID,
<A HREF="../../../java/lang/String.html" title="java.lang 中的类">String</A> className,
<A HREF="../../../java/lang/String.html" title="java.lang 中的类">String</A> location,
<A HREF="../../../java/rmi/MarshalledObject.html" title="java.rmi 中的类">MarshalledObject</A><?> data)</PRE>
<DL>
<DD>为类名为 <code>className</code> 的对象构造一个对象描述符,这可从代码 <code>location</code> 处加载,并且其初始化信息为 <code>data</code>。在同一 VM 中,具有相同 <code>groupID</code> 的所有对象都被激活。
<p>注意,由此构造方法所创建的描述符指定的对象将仅仅按需激活(默认情况下,重启模式为 <code>false</code>)。如果可激活对象需要重启服务,使用带有 boolean 参数 <code>restart</code> 的 <code>ActivationDesc</code> 构造方法之一。
<P>
<DL>
<DT><B>参数:</B><DD><CODE>groupID</CODE> - 组的标识符(从注册 <code>ActivationSystem.registerGroup</code> 方法处获得)。该组指示 VM 中的对象应当被激活。<DD><CODE>className</CODE> - 对象的完全限定包的类名<DD><CODE>location</CODE> - 对象的代码基(类被加载处)<DD><CODE>data</CODE> - 以编组形式包含的对象初始化(激活)数据。
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html" title="java.lang 中的类">IllegalArgumentException</A></CODE> - 如果 <code>groupID</code> 为 null<DT><B>从以下版本开始:</B></DT>
<DD>1.2</DD>
</DL>
</DL>
<HR>
<A NAME="ActivationDesc(java.rmi.activation.ActivationGroupID, java.lang.String, java.lang.String, java.rmi.MarshalledObject, boolean)"><!-- --></A><H3>
ActivationDesc</H3>
<PRE>
public <B>ActivationDesc</B>(<A HREF="../../../java/rmi/activation/ActivationGroupID.html" title="java.rmi.activation 中的类">ActivationGroupID</A> groupID,
<A HREF="../../../java/lang/String.html" title="java.lang 中的类">String</A> className,
<A HREF="../../../java/lang/String.html" title="java.lang 中的类">String</A> location,
<A HREF="../../../java/rmi/MarshalledObject.html" title="java.rmi 中的类">MarshalledObject</A><?> data,
boolean restart)</PRE>
<DL>
<DD>为类名为 <code>className</code> 的对象构造一个对象描述符,这可从代码的 <code>location</code> 处加载,并且其初始化信息为 <code>data</code>。在同一 VM 中,具有相同 <code>groupID</code> 的所有对象都被激活。
<P>
<DL>
<DT><B>参数:</B><DD><CODE>groupID</CODE> - 组的标识符(从注册 <code>ActivationSystem.registerGroup</code> 方法中获得)。该组指示 VM 中的对象应当被激活。<DD><CODE>className</CODE> - 对象的完全限定包的类名<DD><CODE>location</CODE> - 对象的代码基(类被加载处)<DD><CODE>data</CODE> - 以编组形式包含的对象初始化(激活)数据。<DD><CODE>restart</CODE> - 如果为 true,则在一次意外崩溃之后,如果激活器被重启或者对象的激活组被重启,该对象将会被重启(激活);如果为 false,对象只能按需激活。指定 <code>restart</code> 为 <code>true</code>,不强制对新创建的对象立即进行一次初始激活操作;初始激活是延后的。
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html" title="java.lang 中的类">IllegalArgumentException</A></CODE> - 如果 <code>groupID</code> 为 null<DT><B>从以下版本开始:</B></DT>
<DD>1.2</DD>
</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>方法详细信息</B></FONT></TH>
</TR>
</TABLE>
<A NAME="getGroupID()"><!-- --></A><H3>
getGroupID</H3>
<PRE>
public <A HREF="../../../java/rmi/activation/ActivationGroupID.html" title="java.rmi.activation 中的类">ActivationGroupID</A> <B>getGroupID</B>()</PRE>
<DL>
<DD>返回由此描述符指定的对象的组标识符。组提供一种将对象聚合到单个 Java 虚拟机中的方法。RMI 在同一虚拟机中创建/激活具有相同 <code>groupID</code> 的对象。
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>返回:</B><DD>组标识符<DT><B>从以下版本开始:</B></DT>
<DD>1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getClassName()"><!-- --></A><H3>
getClassName</H3>
<PRE>
public <A HREF="../../../java/lang/String.html" title="java.lang 中的类">String</A> <B>getClassName</B>()</PRE>
<DL>
<DD>返回此描述符指定的对象的类名。
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>返回:</B><DD>类名<DT><B>从以下版本开始:</B></DT>
<DD>1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getLocation()"><!-- --></A><H3>
getLocation</H3>
<PRE>
public <A HREF="../../../java/lang/String.html" title="java.lang 中的类">String</A> <B>getLocation</B>()</PRE>
<DL>
<DD>返回此描述符指定的对象的代码基。
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>返回:</B><DD>代码基<DT><B>从以下版本开始:</B></DT>
<DD>1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getData()"><!-- --></A><H3>
getData</H3>
<PRE>
public <A HREF="../../../java/rmi/MarshalledObject.html" title="java.rmi 中的类">MarshalledObject</A><?> <B>getData</B>()</PRE>
<DL>
<DD>为此描述符指定的对象返回包含初始化/激活数据的“编组对象”。
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>返回:</B><DD>特定于对象的“初始化”数据<DT><B>从以下版本开始:</B></DT>
<DD>1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getRestartMode()"><!-- --></A><H3>
getRestartMode</H3>
<PRE>
public boolean <B>getRestartMode</B>()</PRE>
<DL>
<DD>返回与此激活描述符关联的对象的“重启”模式。
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>返回:</B><DD>当守护程序出现或者对象的组在一次意外崩溃后被重启时,如果与此激活描述符关联的可激活对象也通过守护程序被重启,则返回 true;否则返回 false,这意味着该对象仅通过方法调用来按需激活。注意,如果重启模式为 <code>true</code>,则激活器不强制对新注册的对象立即进行一次初始激活操作;初始激活是延后的。<DT><B>从以下版本开始:</B></DT>
<DD>1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
equals</H3>
<PRE>
public boolean <B>equals</B>(<A HREF="../../../java/lang/Object.html" title="java.lang 中的类">Object</A> obj)</PRE>
<DL>
<DD>比较两个激活描述符的内容相等性。
<P>
<DD><DL>
<DT><B>覆盖:</B><DD>类 <CODE><A HREF="../../../java/lang/Object.html" title="java.lang 中的类">Object</A></CODE> 中的 <CODE><A HREF="../../../java/lang/Object.html#equals(java.lang.Object)">equals</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>参数:</B><DD><CODE>obj</CODE> - 要与之比较的 Object
<DT><B>返回:</B><DD>如果这些 Object 相等,则返回 true;否则返回 false。<DT><B>从以下版本开始:</B></DT>
<DD>1.2</DD>
<DT><B>另请参见:</B><DD><A HREF="../../../java/util/Hashtable.html" title="java.util 中的类"><CODE>Hashtable</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="hashCode()"><!-- --></A><H3>
hashCode</H3>
<PRE>
public int <B>hashCode</B>()</PRE>
<DL>
<DD>为类似的 <code>ActivationDesc</code> 返回相同的哈希码
<P>
<DD><DL>
<DT><B>覆盖:</B><DD>类 <CODE><A HREF="../../../java/lang/Object.html" title="java.lang 中的类">Object</A></CODE> 中的 <CODE><A HREF="../../../java/lang/Object.html#hashCode()">hashCode</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>返回:</B><DD>一个整数<DT><B>另请参见:</B><DD><A HREF="../../../java/util/Hashtable.html" title="java.util 中的类"><CODE>Hashtable</CODE></A></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="跳过导航链接"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>概述</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>软件包</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>类</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ActivationDesc.html"><FONT CLASS="NavBarFont1"><B>使用</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>树</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>已过时</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>索引</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>帮助</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<b>Java<sup><font size=-2>TM</font></sup> Platform<br>Standard Ed. 6</b></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../java/rmi/activation/ActivateFailedException.html" title="java.rmi.activation 中的类"><B>上一个类</B></A>
<A HREF="../../../java/rmi/activation/ActivationException.html" title="java.rmi.activation 中的类"><B>下一个类</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?java/rmi/activation/ActivationDesc.html" target="_top"><B>框架</B></A>
<A HREF="ActivationDesc.html" target="_top"><B>无框架</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>所有类</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>所有类</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
摘要: 嵌套 | 字段 | <A HREF="#constructor_summary">构造方法</A> | <A HREF="#method_summary">方法</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
详细信息: 字段 | <A HREF="#constructor_detail">构造方法</A> | <A HREF="#method_detail">方法</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<font size="-1"><a href="http://bugs.sun.com/services/bugreport/index.jsp">提交错误或意见</a><br>有关更多的 API 参考资料和开发人员文档,请参阅 <a href="http://java.sun.com/javase/6/webnotes/devdocs-vs-specs.html">Java SE 开发人员文档</a>。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。 <p>版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守<a href="http://java.sun.com/javase/6/docs/legal/license.html">许可证条款</a>。另请参阅<a href="http://java.sun.com/docs/redist.html">文档重新分发政策</a>。</font>
</BODY>
</HTML>
| piterlin/piterlin.github.io | doc/jdk6_cn/java/rmi/activation/ActivationDesc.html | HTML | mit | 31,297 |
/**
* A simple theme for reveal.js presentations, similar
* to the default theme. The accent color is brown.
*
* This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed.
*/
.reveal a {
line-height: 1.3em; }
/*********************************************
* GLOBAL STYLES
*********************************************/
body {
background: #F0F1EB;
background-color: #F0F1EB; }
.reveal {
font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif;
font-size: 36px;
font-weight: normal;
color: #000; }
::selection {
color: #fff;
background: #26351C;
text-shadow: none; }
.reveal .slides > section,
.reveal .slides > section > section {
line-height: 1.3;
font-weight: inherit; }
/*********************************************
* HEADERS
*********************************************/
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #383D3D;
font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif;
font-weight: normal;
line-height: 1.2;
letter-spacing: normal;
text-transform: none;
text-shadow: none;
word-wrap: break-word; }
.reveal h1 {
font-size: 3.77em; }
.reveal h2 {
font-size: 2.11em; }
.reveal h3 {
font-size: 1.55em; }
.reveal h4 {
font-size: 1em; }
.reveal h1 {
text-shadow: none; }
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: 20px 0;
line-height: 1.6; }
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%; }
.reveal strong,
.reveal b {
font-weight: bold; }
.reveal em {
font-style: italic; }
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em; }
.reveal ol {
list-style-type: decimal; }
.reveal ul {
list-style-type: disc; }
.reveal ul ul {
list-style-type: square; }
.reveal ul ul ul {
list-style-type: circle; }
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px; }
.reveal dt {
font-weight: bold; }
.reveal dd {
margin-left: 40px; }
.reveal q,
.reveal blockquote {
quotes: none; }
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: 20px auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); }
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block; }
.reveal q {
font-style: italic; }
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: 20px auto;
text-align: left;
font-size: 0.55em;
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
.reveal code {
font-family: monospace; }
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal; }
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0; }
.reveal table th {
font-weight: bold; }
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid; }
.reveal table th[align="center"],
.reveal table td[align="center"] {
text-align: center; }
.reveal table th[align="right"],
.reveal table td[align="right"] {
text-align: right; }
.reveal table tr:last-child td {
border-bottom: none; }
.reveal sup {
vertical-align: super; }
.reveal sub {
vertical-align: sub; }
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top; }
.reveal small * {
vertical-align: top; }
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #51483D;
text-decoration: none;
-webkit-transition: color .15s ease;
-moz-transition: color .15s ease;
transition: color .15s ease; }
.reveal a:hover {
color: #8b7c69;
text-shadow: none;
border: none; }
.reveal .roll span:after {
color: #fff;
background: #25211c; }
/*********************************************
* IMAGES
*********************************************/
.reveal section img {
margin: 15px 0px;
background: rgba(255, 255, 255, 0.12);
border: 4px solid #000;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); }
.reveal section img.plain {
border: 0;
box-shadow: none; }
.reveal a img {
-webkit-transition: all .15s linear;
-moz-transition: all .15s linear;
transition: all .15s linear; }
.reveal a:hover img {
background: rgba(255, 255, 255, 0.2);
border-color: #51483D;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls .navigate-left,
.reveal .controls .navigate-left.enabled {
border-right-color: #51483D; }
.reveal .controls .navigate-right,
.reveal .controls .navigate-right.enabled {
border-left-color: #51483D; }
.reveal .controls .navigate-up,
.reveal .controls .navigate-up.enabled {
border-bottom-color: #51483D; }
.reveal .controls .navigate-down,
.reveal .controls .navigate-down.enabled {
border-top-color: #51483D; }
.reveal .controls .navigate-left.enabled:hover {
border-right-color: #8b7c69; }
.reveal .controls .navigate-right.enabled:hover {
border-left-color: #8b7c69; }
.reveal .controls .navigate-up.enabled:hover {
border-bottom-color: #8b7c69; }
.reveal .controls .navigate-down.enabled:hover {
border-top-color: #8b7c69; }
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2); }
.reveal .progress span {
background: #51483D;
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
| pakmanlh/flexbox-dcspain2016 | css/theme/serif.css | CSS | mit | 6,116 |
package emperror
import (
"errors"
"fmt"
)
// Recover accepts a recovered panic (if any) and converts it to an error (if necessary).
func Recover(r interface{}) (err error) {
if r != nil {
switch x := r.(type) {
case string:
err = errors.New(x)
case error:
err = x
default:
err = fmt.Errorf("unknown panic, received: %v", r)
}
if _, ok := StackTrace(err); !ok {
err = &wrappedError{
err: err,
stack: callers()[2:], // TODO: improve callers?
}
}
}
return err
}
| goph/emperror | recover.go | GO | mit | 508 |
class CreateReplays < ActiveRecord::Migration
def change
create_table :replays do |t|
t.string :title
t.string :link
t.string :belong
t.timestamps
end
end
end
| rockman1510/AIW | db/migrate/20141221073815_create_replays.rb | Ruby | mit | 196 |
import { PLATFORM } from 'aurelia-framework';
import { RouterConfiguration, Router } from 'aurelia-router';
export class App {
appDate: Date = new Date();
message = 'Hello, welcome to Aurelia!';
router: Router;
configureRouter(config: RouterConfiguration, router: Router) {
this.router = router;
config
.map([
{
route: ['', '/home'],
name: 'home',
moduleId: PLATFORM.moduleName('./pages/home/home', 'home-page'),
nav: true,
settings: {
text: 'Home'
}
},
{
route: '/about',
name: 'about',
moduleId: PLATFORM.moduleName('./pages/about/about', 'about-page'),
nav: true,
settings: {
text: 'About'
}
},
])
.mapUnknownRoutes({ redirect: 'home' })
}
}
| aurelia/webpack-plugin | tests/app-router/src/app.ts | TypeScript | mit | 859 |
---
place: "Münster"
title: "senseBox-Lehrerfortbildung"
description: "Kostenlose Fortbildung \"Einsatz von Mikrocontrollern im Unterricht - Programmieren lernen und Messgeräte bauen mit der senseBox\" am Institut für Geoinformatik, Raum 255 Anmeldung unter <a href=\"/fortbildung\">sensebox.de/fortbildung</a>"
link: "https://suche.lehrerfortbildung.schulministerium.nrw.de/search/detailedSearch?aid=20003798&sid=senseBox04"
starting-date: 2019-06-07
time: "13:00-16:00"
ending-date: 2019-06-07
---
| sensebox/sensebox.github.io | _events/senseBox-Lehrerfortbildung.md | Markdown | mit | 503 |
/**
* @constructor
*/
var TwoSum = function() {
this.dict = {};
};
/**
* @param {number} input
* @returns {void}
*/
TwoSum.prototype.add = function(input) {
// no need to bigger that 2
this.dict[input] = this.dict[input] ? 2 : 1;
};
/**
* @param {number} val
* @returns {boolean}
*/
TwoSum.prototype.find = function(val) {
var dict = this.dict;
var keys = Object.keys(dict);
for (var i = 0; i < keys.length; i++) {
var key = parseInt(keys[i]);
var target = val - key;
if (!dict[target]) continue;
if ((target === key && dict[target] === 2) ||
target !== key) {
return true;
}
}
return false;
};
var eq = require('assert').equal;
var ts = new TwoSum();
ts.add(0);
ts.find(0)
eq(ts.find(0), false);
ts = new TwoSum();
ts.add(0);
ts.add(0);
ts.find(0)
eq(ts.find(0), true);
ts = new TwoSum();
ts.add(1);
ts.add(3);
ts.add(5);
eq(ts.find(1), false);
eq(ts.find(4), true);
eq(ts.find(7), false);
| zhiyelee/leetcode | js/twoSumIiiDataStructureDesign/two_sum_iii_data_structure_design.js | JavaScript | mit | 959 |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ConsoleApplication1")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ConsoleApplication1")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("b26f5a42-5173-473a-b336-e3f78807b6ab")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| Avarea/Programming-Basics | CurrencyConverter/ConsoleApplication1/Properties/AssemblyInfo.cs | C# | mit | 1,414 |
body {
padding: 50px;
font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
}
a {
color: #00B7FF;
}
#logout {
list-style: none none !important;
background-color: #bdbdbd !important;
}
@media (min-width: 820px) {
.small {
display: none !important;
}
}
#login {
background: #bdbdbd;
border-radius: 6px;
margin: 0 0 2em 0;
padding: 3em;
-webkit-box-shadow: 0px 0px 19px 5px rgba(66,66,66,1);
-moz-box-shadow: 0px 0px 19px 5px rgba(66,66,66,1);
box-shadow: 0px 0px 19px 5px rgba(66,66,66,1);
}
ul li{
list-style: none;
}
#select {
display: none;
text-align: center;
position: absolute;
right: 0;
background: #bdbdbd;
list-style: none;
width: 100%;
max-width: 150px;
height: 200%;
border: black;
border-radius: 6px;
box-shadow: 0 0 19px 5px rgba(66, 66, 66, 1);
}
#select a {
margin-left: -30px;
width: 100%;
text-align: center;
color: black;
}
#profile {
width: 500px;
background-color: #bdbdbd;
margin-left: auto;
margin-right: auto;
text-align: center;
margin-top: 50px;
}
@media (max-width: 500px) {
#profile {
width: 100%;
background-color: #bdbdbd;
margin-left: auto;
margin-right: auto;
text-align: center;
border-radius: 6px;
margin: 0 0 2em 0;
padding: 3em;
-webkit-box-shadow: 0px 0px 19px 5px rgba(66,66,66,1);
-moz-box-shadow: 0px 0px 19px 5px rgba(66,66,66,1);
box-shadow: 0px 0px 19px 5px rgba(66,66,66,1);
}
}
#stuff {
margin-top: 50px;
text-align: center;
}
#log {
background-color: #bdbdbd;
border-radius: 6px;
margin: 0 0 2em 0;
padding: 3em;
-webkit-box-shadow: 0px 0px 19px 5px rgba(66,66,66,1);
-moz-box-shadow: 0px 0px 19px 5px rgba(66,66,66,1);
box-shadow: 0px 0px 19px 5px rgba(66,66,66,1);
}
#enter, #entry, #Entry {
width: 100%;
margin-left: auto;
margin-right: auto;
}
#Entry {
margin-left: -15px;
}
#submit {
margin-right: auto;
margin-left: auto;
}
#sub {
text-align: center;
}
#accept {
background-color: green;
text-align: center;
}
#reject {
background-color: red;
text-align: center;
}
#history {
width: 100%;
text-align: center;
}
.log {
margin-bottom: 10px;
}
| euranium/pingpong-server | public/stylesheets/style.css | CSS | mit | 2,097 |
<?php
get_header();
?>
<div class="home">
<div id="content" class="container">
<?php get_template_part('social'); ?>
<div id="inner-content" class="row">
<?php if(!$GLOBALS['is_mobile']){ ?>
<div class="hidden-sm-down col-xs-12">
<?php
$banners = new WP_Query(
array(
'post_type' => 'banner',
'meta_key' => 'banners_text_order',
'order' => 'ASC',
'orderby' => 'meta_value_num',
'nopaging' => true
)
);
$html = [];
if ( $banners->have_posts() ) {
$classes = 'active';
while($banners->have_posts()): $banners->the_post();
if(get_post_status() == 'publish') {
$imageMeta = get_post_meta($post->ID);
$image = wp_get_attachment_url($imageMeta['banners_image'][0], 'fullsize');
$title = $imageMeta['banners_text_title'][0];
$subheading = $imageMeta['banners_text_subheading'][0];
$caption = $imageMeta['banners_text_caption'][0];
$link = $imageMeta['banners_text_link'][0];
$linktext = $imageMeta['banners_text_link_text'][0];
$display = $title != '' && $subheading != '';
$banner =
'<li class="item ' . $classes . '">' .
(($link != '') ? '<a href="' . $link . '">' : '') . '<img src="' . $image . '" alt="">'. (($link != '') ? '</a>' : '') .
($display ?
'<div class="caption-container">
<div class="carousel-caption">' .
(($link != '') ? '<a href="' . $link . '">' : '') .
(($title != '') ? '<h5>' . $title . '</h5>' : '') .
(($subheading != '') ? '<h6>' . $subheading . '</h6>' : '') .
(($link != '') ? '</a>' : '') .
'</div>
</div>'
: '') .
'</li>';
array_push($html, $banner);
$classes = '';
}
endwhile;
}
wp_reset_query();
?>
<div id="home-carousel" class="simpleBanner">
<div class="bannerListWpr">
<ul class="bannerList">
<?php
foreach($html as $banner){
echo $banner;
}
?>
</ul>
</div>
<?php if(count($html) > 1){ ?>
<div class="bannerControlsWpr bannerControlsPrev" onClick="ga('send', 'event', 'Banner', 'click', 'Previous')" title="Previous"><div class="bannerControls"></div></div>
<div class="bannerIndicators"><ul onClick="ga('send', 'event', 'Banner', 'click', 'Indicator')"></ul></div>
<div class="bannerControlsWpr bannerControlsNext" onClick="ga('send', 'event', 'Banner', 'click', 'Next')" title="Next"><div class="bannerControls"></div></div>
<?php } ?>
</div>
</div>
<?php } ?>
<div class="col-xs-12 hidden-md-up">
<div class="operating-hours small"></div>
</div>
<div class="col-xs-12 hidden-md-up menu-buttons-container">
<div class="menu-buttons">
<a class="col-xs-4 center action-lunch" href="/menu/lunch-menu">Lunch</a>
<a class="col-xs-4 center action-dinner" href="/menu/dinner-menu">Dinner</a>
<a class="col-xs-4 center action-wine" href="/menu/wine-list">Wine</a>
</div>
</div>
<div class="col-xs-12">
<div class="operating-hours large">
<h2>Opening Hours & Address</h2>
<?php
if (have_posts()) :
while (have_posts()) : the_post();
the_content();
endwhile;
endif;
?>
<a class="address" href="https://www.google.com/maps/place/Escargot+Bistro/@26.1886258,-80.1304127,17z/data=!4m2!3m1!1s0x0000000000000000:0x0da6a02deb22bddf?hl=en" target="_blank">
<address>1506 E. Commercial Blvd Oakland Park, FL, 33334</address>
</a>
</div>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>
| EnzoMartin/Escargot-Bistro-WordPress | wp-content/themes/escargot-bistro/page-home.php | PHP | mit | 5,195 |
import Element from './Element'
export default class extends Element {
constructor (
val
) {
super({ 'w:type': {} })
if (val) this.setVal(val || null)
}
setVal (value) {
if (value) {
this.src['w:type']['@w:val'] = value
}
else {
delete this.src['w:type']['@w:val']
}
}
getVal () {
return this.src['w:type']['@w:val'] || null
}
}
| zuck/jsdocx | src/SectionType.js | JavaScript | mit | 390 |
# We borrow heavily from the kernel build setup, though we are simpler since
# we don't have Kconfig tweaking settings on us.
# The implicit make rules have it looking for RCS files, among other things.
# We instead explicitly write all the rules we care about.
# It's even quicker (saves ~200ms) to pass -r on the command line.
MAKEFLAGS=-r
# The source directory tree.
srcdir := ..
abs_srcdir := $(abspath $(srcdir))
# The name of the builddir.
builddir_name ?= .
# The V=1 flag on command line makes us verbosely print command lines.
ifdef V
quiet=
else
quiet=quiet_
endif
# Specify BUILDTYPE=Release on the command line for a release build.
BUILDTYPE ?= Release
# Directory all our build output goes into.
# Note that this must be two directories beneath src/ for unit tests to pass,
# as they reach into the src/ directory for data with relative paths.
builddir ?= $(builddir_name)/$(BUILDTYPE)
abs_builddir := $(abspath $(builddir))
depsdir := $(builddir)/.deps
# Object output directory.
obj := $(builddir)/obj
abs_obj := $(abspath $(obj))
# We build up a list of every single one of the targets so we can slurp in the
# generated dependency rule Makefiles in one pass.
all_deps :=
CC.target ?= $(CC)
CFLAGS.target ?= $(CFLAGS)
CXX.target ?= $(CXX)
CXXFLAGS.target ?= $(CXXFLAGS)
LINK.target ?= $(LINK)
LDFLAGS.target ?= $(LDFLAGS)
AR.target ?= $(AR)
# C++ apps need to be linked with g++.
#
# Note: flock is used to seralize linking. Linking is a memory-intensive
# process so running parallel links can often lead to thrashing. To disable
# the serialization, override LINK via an envrionment variable as follows:
#
# export LINK=g++
#
# This will allow make to invoke N linker processes as specified in -jN.
LINK ?= ./gyp-mac-tool flock $(builddir)/linker.lock $(CXX.target)
# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
# to replicate this environment fallback in make as well.
CC.host ?= gcc
CFLAGS.host ?=
CXX.host ?= g++
CXXFLAGS.host ?=
LINK.host ?= $(CXX.host)
LDFLAGS.host ?=
AR.host ?= ar
# Define a dir function that can handle spaces.
# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions
# "leading spaces cannot appear in the text of the first argument as written.
# These characters can be put into the argument value by variable substitution."
empty :=
space := $(empty) $(empty)
# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces
replace_spaces = $(subst $(space),?,$1)
unreplace_spaces = $(subst ?,$(space),$1)
dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1)))
# Flags to make gcc output dependency info. Note that you need to be
# careful here to use the flags that ccache and distcc can understand.
# We write to a dep file on the side first and then rename at the end
# so we can't end up with a broken dep file.
depfile = $(depsdir)/$(call replace_spaces,$@).d
DEPFLAGS = -MMD -MF $(depfile).raw
# We have to fixup the deps output in a few ways.
# (1) the file output should mention the proper .o file.
# ccache or distcc lose the path to the target, so we convert a rule of
# the form:
# foobar.o: DEP1 DEP2
# into
# path/to/foobar.o: DEP1 DEP2
# (2) we want missing files not to cause us to fail to build.
# We want to rewrite
# foobar.o: DEP1 DEP2 \
# DEP3
# to
# DEP1:
# DEP2:
# DEP3:
# so if the files are missing, they're just considered phony rules.
# We have to do some pretty insane escaping to get those backslashes
# and dollar signs past make, the shell, and sed at the same time.
# Doesn't work with spaces, but that's fine: .d files have spaces in
# their names replaced with other characters.
define fixup_dep
# The depfile may not exist if the input file didn't have any #includes.
touch $(depfile).raw
# Fixup path as in (1).
sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
# Add extra rules as in (2).
# We remove slashes and replace spaces with new lines;
# remove blank lines;
# delete the first line and append a colon to the remaining lines.
sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\
grep -v '^$$' |\
sed -e 1d -e 's|$$|:|' \
>> $(depfile)
rm $(depfile).raw
endef
# Command definitions:
# - cmd_foo is the actual command to run;
# - quiet_cmd_foo is the brief-output summary of the command.
quiet_cmd_cc = CC($(TOOLSET)) $@
cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $<
quiet_cmd_cxx = CXX($(TOOLSET)) $@
cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
quiet_cmd_objc = CXX($(TOOLSET)) $@
cmd_objc = $(CC.$(TOOLSET)) $(GYP_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $<
quiet_cmd_objcxx = CXX($(TOOLSET)) $@
cmd_objcxx = $(CXX.$(TOOLSET)) $(GYP_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $<
# Commands for precompiled header files.
quiet_cmd_pch_c = CXX($(TOOLSET)) $@
cmd_pch_c = $(CC.$(TOOLSET)) $(GYP_PCH_CFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
quiet_cmd_pch_cc = CXX($(TOOLSET)) $@
cmd_pch_cc = $(CC.$(TOOLSET)) $(GYP_PCH_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
quiet_cmd_pch_m = CXX($(TOOLSET)) $@
cmd_pch_m = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $<
quiet_cmd_pch_mm = CXX($(TOOLSET)) $@
cmd_pch_mm = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $<
# gyp-mac-tool is written next to the root Makefile by gyp.
# Use $(4) for the command, since $(2) and $(3) are used as flag by do_cmd
# already.
quiet_cmd_mac_tool = MACTOOL $(4) $<
cmd_mac_tool = ./gyp-mac-tool $(4) $< "$@"
quiet_cmd_mac_package_framework = PACKAGE FRAMEWORK $@
cmd_mac_package_framework = ./gyp-mac-tool package-framework "$@" $(4)
quiet_cmd_infoplist = INFOPLIST $@
cmd_infoplist = $(CC.$(TOOLSET)) -E -P -Wno-trigraphs -x c $(INFOPLIST_DEFINES) "$<" -o "$@"
quiet_cmd_touch = TOUCH $@
cmd_touch = touch $@
quiet_cmd_copy = COPY $@
# send stderr to /dev/null to ignore messages when linking directories.
cmd_copy = rm -rf "$@" && cp -af "$<" "$@"
quiet_cmd_alink = LIBTOOL-STATIC $@
cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^)
quiet_cmd_link = LINK($(TOOLSET)) $@
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
quiet_cmd_solink = SOLINK($(TOOLSET)) $@
cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
cmd_solink_module = $(LINK.$(TOOLSET)) -bundle $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS)
# Define an escape_quotes function to escape single quotes.
# This allows us to handle quotes properly as long as we always use
# use single quotes and escape_quotes.
escape_quotes = $(subst ','\'',$(1))
# This comment is here just to include a ' to unconfuse syntax highlighting.
# Define an escape_vars function to escape '$' variable syntax.
# This allows us to read/write command lines with shell variables (e.g.
# $LD_LIBRARY_PATH), without triggering make substitution.
escape_vars = $(subst $$,$$$$,$(1))
# Helper that expands to a shell command to echo a string exactly as it is in
# make. This uses printf instead of echo because printf's behaviour with respect
# to escape sequences is more portable than echo's across different shells
# (e.g., dash, bash).
exact_echo = printf '%s\n' '$(call escape_quotes,$(1))'
# Helper to compare the command we're about to run against the command
# we logged the last time we ran the command. Produces an empty
# string (false) when the commands match.
# Tricky point: Make has no string-equality test function.
# The kernel uses the following, but it seems like it would have false
# positives, where one string reordered its arguments.
# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \
# $(filter-out $(cmd_$@), $(cmd_$(1))))
# We instead substitute each for the empty string into the other, and
# say they're equal if both substitutions produce the empty string.
# .d files contain ? instead of spaces, take that into account.
command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\
$(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1))))
# Helper that is non-empty when a prerequisite changes.
# Normally make does this implicitly, but we force rules to always run
# so we can check their command lines.
# $? -- new prerequisites
# $| -- order-only dependencies
prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?))
# Helper that executes all postbuilds until one fails.
define do_postbuilds
@E=0;\
for p in $(POSTBUILDS); do\
eval $$p;\
E=$$?;\
if [ $$E -ne 0 ]; then\
break;\
fi;\
done;\
if [ $$E -ne 0 ]; then\
rm -rf "$@";\
exit $$E;\
fi
endef
# do_cmd: run a command via the above cmd_foo names, if necessary.
# Should always run for a given target to handle command-line changes.
# Second argument, if non-zero, makes it do asm/C/C++ dependency munging.
# Third argument, if non-zero, makes it do POSTBUILDS processing.
# Note: We intentionally do NOT call dirx for depfile, since it contains ? for
# spaces already and dirx strips the ? characters.
define do_cmd
$(if $(or $(command_changed),$(prereq_changed)),
@$(call exact_echo, $($(quiet)cmd_$(1)))
@mkdir -p "$(call dirx,$@)" "$(dir $(depfile))"
$(if $(findstring flock,$(word 2,$(cmd_$1))),
@$(cmd_$(1))
@echo " $(quiet_cmd_$(1)): Finished",
@$(cmd_$(1))
)
@$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile)
@$(if $(2),$(fixup_dep))
$(if $(and $(3), $(POSTBUILDS)),
$(call do_postbuilds)
)
)
endef
# Declare the "all" target first so it is the default,
# even though we don't have the deps yet.
.PHONY: all
all:
# make looks for ways to re-generate included makefiles, but in our case, we
# don't have a direct way. Explicitly telling make that it has nothing to do
# for them makes it go faster.
%.d: ;
# Use FORCE_DO_CMD to force a target to run. Should be coupled with
# do_cmd.
.PHONY: FORCE_DO_CMD
FORCE_DO_CMD:
TOOLSET := target
# Suffix rules, putting all outputs into $(obj).
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.m FORCE_DO_CMD
@$(call do_cmd,objc,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.mm FORCE_DO_CMD
@$(call do_cmd,objcxx,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD
@$(call do_cmd,cc,1)
# Try building from generated source, too.
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.m FORCE_DO_CMD
@$(call do_cmd,objc,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.mm FORCE_DO_CMD
@$(call do_cmd,objcxx,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.m FORCE_DO_CMD
@$(call do_cmd,objc,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.mm FORCE_DO_CMD
@$(call do_cmd,objcxx,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD
@$(call do_cmd,cc,1)
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
$(findstring $(join ^,$(prefix)),\
$(join ^,bufferutil.target.mk)))),)
include bufferutil.target.mk
endif
quiet_cmd_regen_makefile = ACTION Regenerating $@
cmd_regen_makefile = cd $(srcdir); /usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/Users/marlene/Documents/Proyectos/Montana-Studio/sitios/_Hydrogreen/htdocs/node_modules/grunt-browser-sync/node_modules/browser-sync/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil/build/config.gypi -I/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/Users/marlene/.node-gyp/0.12.2/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/Users/marlene/.node-gyp/0.12.2" "-Dmodule_root_dir=/Users/marlene/Documents/Proyectos/Montana-Studio/sitios/_Hydrogreen/htdocs/node_modules/grunt-browser-sync/node_modules/browser-sync/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil" binding.gyp
Makefile: $(srcdir)/../../../../../../../../../../../../../../../../../../../../.node-gyp/0.12.2/common.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(srcdir)/../../../../../../../../../../../../../../../../../../../../../../usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi
$(call do_cmd,regen_makefile)
# "all" is a concatenation of the "all" targets from all the included
# sub-makefiles. This is just here to clarify.
all:
# Add in dependency-tracking rules. $(all_deps) is the list of every single
# target in our tree. Only consider the ones with .d (dependency) info:
d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d))
ifneq ($(d_files),)
include $(d_files)
endif
| Montana-Studio/Hydrogreen_site | node_modules/grunt-browser-sync/node_modules/browser-sync/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil/build/Makefile | Makefile | mit | 14,074 |
# SimpleBdd::Examples
This is an example of how to use the simple_bdd library alongside mixing in modules depending on the type of test being run.
It's test framework agnostic, but here this is using RSpec. The strings sent to the methods 'Given', 'When', 'Then' and 'And' are translated into a method which is called in the current scope.
it "has this amazing new feature" do
Given "Some state in the application"
When "this state transition is applied"
Then "this side affect occurs"
end
In the RSpec config, modules are loaded depending on what tags are on the example. Here different tags are applied to the same test, effectively duplicating the test but with different tags applied each time.
[:integration, :journey].each do |type|
describe "Example", group: type do
it "has this amazing new feature" do
Given "Some state in the application"
When "this state transition is applied"
Then "this side affect occurs"
end
end
end
Then the configuration loads different helper modules depending on the tags.
require 'simple_bdd'
require 'journey_helpers'
require 'integration_helpers'
RSpec.configure do |config|
config.include SimpleBdd
config.include JourneyHelpers, group: :journey
config.include IntegrationHelpers, group: :integration
end
Then the JourneyHelpers and IntegrationHelpers modules have the methods that each tag requires such as:
module IntegrationHelpers
def some_state_in_the_application
end
def this_state_transition_is_applied
end
def this_side_affect_occurs
end
end
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
| robb1e/simple_bdd_examples | README.md | Markdown | mit | 1,867 |
#ifndef VIENNASHE_PHYSICS_PHYSICS_HPP
#define VIENNASHE_PHYSICS_PHYSICS_HPP
/* ============================================================================
Copyright (c) 2011-2014, Institute for Microelectronics,
Institute for Analysis and Scientific Computing,
TU Wien.
-----------------
ViennaSHE - The Vienna Spherical Harmonics Expansion Boltzmann Solver
-----------------
http://viennashe.sourceforge.net/
License: MIT (X11), see file LICENSE in the base directory
=============================================================================== */
// std
#include <math.h>
#include <cmath>
// viennashe
#include "viennashe/forwards.h"
#include "viennashe/math/constants.hpp"
#include "viennashe/physics/constants.hpp"
#include "viennashe/physics/exception.hpp"
#include "viennashe/materials/all.hpp"
/** @file viennashe/physics/physics.hpp
@brief Returns a few helper routines for computing physical quantities. To be replaced in the future.
*/
namespace viennashe
{
namespace physics
{
/** @brief Auxiliary namespace for converting quantities of different units
*
*/
namespace convert
{
//
// Replace this by a sane unit framework!
//
inline double joule_to_eV(const double eps)
{
return eps / viennashe::physics::constants::q;
}
inline double eV_to_joule(const double eps)
{
return eps * viennashe::physics::constants::q;
}
}
/** @brief Returns the thermal potential for the provided temperature */
inline double get_thermal_potential(double T)
{
return (constants::kB * T) / constants::q;
}
/** @brief Returns the optical phonon number for use with optical phonon scattering
*
* @param eps_optical The phonon energy
* @param temperature The lattice temperature
*/
inline double get_optical_phonon_number(double eps_optical, double temperature = 300.0 /* Kelvin */)
{
const double kB = constants::kB;
return 1.0 / (std::exp(eps_optical / (kB * temperature)) - 1.0);
}
/**
* @brief Returns the band weight (N_c or N_v)
* @param temperature The lattice temperature
* @param ctype Determines whether to return N_c (electrons) or N_v (holes)
* @return The band weight
*
*/
inline double get_band_weight(double temperature, viennashe::carrier_type_id ctype)
{
const double Ncv0 = 2.50933670314359713002e19 * 100 * 100 * 100;
// Insert carrier mass model here
const double me = (ctype == viennashe::ELECTRON_TYPE_ID) ? 0.33 : 0.6;
return Ncv0 * std::pow(me * (temperature / 300.0), 1.5) * 6.0;
}
/**
* @brief Returns the band edge relative to the reference energy (mid-gap)
* @param ctype Give electrons for E_c and holes for E_v
* @return The band edge in Joule
*
*/
inline double get_band_edge(viennashe::carrier_type_id const & ctype)
{
return ((ctype == viennashe::ELECTRON_TYPE_ID) ? 1.0 : -1.0) * viennashe::materials::si::band_gap() * 0.5;
}
/**
* @brief Returns the thermal velocity at the given lattice temperature for a given carrier type
* @param temperature The lattice temperature
* @param ctype The charge carrier type
* @return The thermal velocity in meters per second
*/
inline double get_thermal_velocity(double temperature, viennashe::carrier_type_id ctype)
{
// TODO: use carrier mass model
(void)ctype; // fix unused parameter warning
const double kBT = viennashe::physics::constants::kB * temperature;
return std::sqrt(8.0 * kBT / (viennashe::math::constants::pi * viennashe::physics::constants::mass_electron) );
}
/**
* @brief Returns the auxilary carrier concentration
* @param temperature The lattice temperature
* @param ctype The carrier type (electrons or holes)
* @return A carrier concentration
*/
inline double get_auxilary_concentration(double temperature, viennashe::carrier_type_id ctype)
{
const double kbT = viennashe::physics::constants::kB * temperature;
const double band_edge = viennashe::physics::get_band_edge(ctype);
const double band_weight = viennashe::physics::get_band_weight(temperature, ctype);
const double polarity = (ctype == viennashe::ELECTRON_TYPE_ID) ? -1.0 : 1.0;
return band_weight * std::exp(polarity * band_edge / kbT);
}
/**
* @brief Computes the built-in potential for a given temperature and given doping
* @param temperature The lattice temperature
* @param doping_n The donor doping (SI units only!)
* @param doping_p The acceptor doping (SI units only!)
* @return The built-in potential in Volt
*/
inline double built_in_potential(double temperature, double doping_n, double doping_p)
{
if (doping_n <= 0 && doping_p <= 0) return 0;
const double net_doping = (doping_n - doping_p);
const double T = temperature;
const double naux = viennashe::physics::get_auxilary_concentration(T, viennashe::ELECTRON_TYPE_ID);
const double paux = viennashe::physics::get_auxilary_concentration(T, viennashe::HOLE_TYPE_ID);
double x = std::sqrt(net_doping * net_doping + 4.0 * naux * paux);
if ( net_doping >= 0.0 )
{
x = (x + net_doping) * 0.5 / naux;
return T * std::log(x) * viennashe::physics::constants::kB / viennashe::physics::constants::q;
}
else
{
x = (x - net_doping) * 0.5 / paux;
return -T * std::log(x) * viennashe::physics::constants::kB / viennashe::physics::constants::q;
}
}
/**
* @brief Consistently calculates the contact carrier concentrations for thermal bath contacts
* @param temperature The lattice temperature
* @param doping_n The donor doping
* @param doping_p The acceptor doping
* @param ctype The carrier type (electrons or holes)
* @return The carrier concentration for thermal bath contacts
*/
inline double contact_carrier_ohm(double temperature, double doping_n, double doping_p, viennashe::carrier_type_id ctype)
{
const double q = viennashe::physics::constants::q;
const double kbT = viennashe::physics::constants::kB * temperature;
const double phiB = viennashe::physics::built_in_potential(temperature, doping_n, doping_p);
const double band_edge = viennashe::physics::get_band_edge(ctype);
const double band_weight = viennashe::physics::get_band_weight(temperature, ctype);
const double polarity = (ctype == viennashe::ELECTRON_TYPE_ID) ? -1.0 : 1.0;
return band_weight * std::exp( polarity * ( band_edge - q * phiB ) / kbT ) ;
}
} //namespace physics
} //namespace viennashe
#endif
| viennashe/viennashe-dev | viennashe/physics/physics.hpp | C++ | mit | 6,952 |
# encoding: utf-8
# (c) 2011-2012 Martin Kozák (martinkozak@martinkozak.net)
require "ruby-version"
require "hash-utils/object"
##
# File extension.
# @since 0.11.0
#
class File
if not self.respond_to? :write
if Ruby::Version < [1, 9, 3]
##
# Writes data to file and closes it in single call.
#
# @note Data were written in binary mode since +0.11.1+,
# but since +0.19.0+, they are written non-binary again.
# Binary writing is implemented via {File#binwrite}.
# @note Since Ruby 1.9.3 replaced by STL native version.
#
# @param [String] filepath path to file
# @param [String] data data for write
# @return [Integer] length of really written data
# @since 0.11.0
#
def self.write(filepath, data = "")
len = nil
File.open(filepath, "w") do |io|
len = io.write(data)
end
return len
end
end
end
if not self.respond_to? :binwrite
if Ruby::Version < [1, 9, 3]
##
# Writes binary data to file and closes it
# in single call.
#
# @note Since Ruby 1.9.3 replaced by STL native version.
#
# @param [String] filepath path to file
# @param [String] data data for write
# @return [Integer] length of really written data
# @since 0.19.0
#
def self.binwrite(filepath, data = "")
len = nil
File.open(filepath, "wb") do |io|
len = io.write(data)
end
return len
end
end
end
##
# Creates file with zero size and closes it. (In fact, +touch+ is
# usually used for it.)
#
# @param [String] file filepath path for create
# @since 0.11.0
#
if not self.respond_to? :touch
def self.touch(filepath)
File.open(filepath, "wb").close()
end
end
##
# Alias for #close.
# @since 2.0.0
#
if not self.__hash_utils_instance_respond_to? :close!
alias :close! :close
end
end
| martinkozak/hash-utils | lib/hash-utils/file.rb | Ruby | mit | 2,414 |
---
layout: post
title: Java 的垃圾回收机制
category: java技术
published: true
---
## 1\. 分代
虚拟机中的共划分为三个代:年轻代(Young Generation)、年老点(Old Generation)和持久代(Permanent Generation)。其中持久代主要存放的是Java类的类信息,与垃圾收集要收集的Java对象关系不大。年轻代和年老代的划分是对垃圾收集影响比较大的。
### 年轻代:
所有新生成的对象首先都是放在年轻代的。年轻代的目标就是尽可能快速的收集掉那些生命周期短的对象。年轻代分三个区。一个Eden区,两个 Survivor区(一般而言)。大部分对象在Eden区中生成。当Eden区满时,还存活的对象将被复制到Survivor区(两个中的一个),当这个 Survivor区满时,此区的存活对象将被复制到另外一个Survivor区,当这个Survivor去也满了的时候,从第一个Survivor区复制过来的并且此时还存活的对象,将被复制“年老区(Tenured)”。需要注意,Survivor的两个区是对称的,没先后关系,所以同一个区中可能同时存在从Eden复制过来对象,和从前一个Survivor复制过来的对象,而复制到年老区的只有从第一个Survivor去过来的对象。而且,Survivor区总有一个是空的。同时,根据程序需要,Survivor区是可以配置为多个的(多于两个),这样可以增加对象在年轻代中的存在时间,减少被放到年老代的可能。
### 年老代:
在年轻代中经历了N次垃圾回收后仍然存活的对象,就会被放到年老代中。因此,可以认为年老代中存放的都是一些生命周期较长的对象。
### 持久代:
用于存放静态文件,如今Java类、方法等。持久代对垃圾回收没有显著影响,但是有些应用可能动态生成或者调用一些class,例如Hibernate 等,在这种时候需要设置一个比较大的持久代空间来存放这些运行过程中新增的类。持久代大小通过-XX:MaxPermSize=<N>进行设置。
<img src="/assets/img/post_img/javagc.jpg" />
## 2\.什么情况下触发垃圾回收:
由于对象进行了分代处理,因此垃圾回收区域、时间也不一样。GC有两种类型:Scavenge GC和Full GC。
### Scavenge GC
一般情况下,当新对象生成,并且在Eden申请空间失败时,就会触发Scavenge GC,对Eden区域进行GC,清除非存活对象,并且把尚且存活的对象移动到Survivor区。然后整理Survivor的两个区。这种方式的GC是对年轻代的Eden区进行,不会影响到年老代。因为大部分对象都是从Eden区开始的,同时Eden区不会分配的很大,所以Eden区的GC会频繁进行。因而,一般在这里需要使用速度快、效率高的算法,使Eden去能尽快空闲出来。
### Full GC
对整个堆进行整理,包括Young、Tenured和Perm。Full GC因为需要对整个对进行回收,所以比Scavenge GC要慢,因此应该尽可能减少Full GC的次数。在对JVM调优的过程中,很大一部分工作就是对于FullGC的调节。有如下原因可能导致Full GC:
* 年老代(Tenured)被写满
* 持久代(Perm)被写满
* System.gc()被显示调用
* 上一次GC之后Heap的各域分配策略动态变化
## 3\. 补充
以上所说的分代回收机制其实说的是Java的堆内部的划分结构以及对各部分结构触发垃圾回收的时机,那么当垃圾回收被触发时,真正的垃圾回收的方法是什么呢?有如下两种(一下内容参考自 Thinking in Java)
###a\. 标记-清扫(mark-and-sweep)
标记-清扫方式是从堆栈和静态存储去出发,遍历所有引用,找出所有存活对象。每当找到一个存活对象,会给该对象一个标记,当所有对象被标记完以后,清理工作开始,被标记的对象不会被清理,没被标记的对象将被释放。这种方法清理完以后,堆空间是不连续的,有可能会产生许多内存碎片。
###b\. 停止-复制(stop-and-copy)
停止-复制会先暂停程序的运行,然后将存活的对象复制到一个新堆,新堆的对象是连续紧凑排列的。这种方法的好处是可以杜绝内存碎片,坏处也显而易见,就是浪费内存空间,另外内存复制也会耗费效率。而且有可能实际上垃圾并不多的时候,使用这种方法就会比标记-清扫效果要差
那么,实际上Java虚拟机的垃圾清理是这两种方式的协同工作的,JVM会监视垃圾回收效果,如果垃圾较少,而垃圾回收效率低,则会切换到“标记-清扫”模式,相反如果使用“标记-清扫”导致堆空间出现过多的碎片,则会切换到“停止-复制”。这就是JVM的“自适应”技术。
最后,给Java的垃圾回收冠以一个名号 -- “分代的,自适应的,标记-清扫,停止-复制”式垃圾回收
| micx/micx.github.com | _posts/2014-12-06-java-GC.md | Markdown | mit | 4,993 |
html, body {
height: 100%;
width: 100%;
background-color: black;
}
.jumbotron#main {
padding-top: 0em;
margin-top: 0em;
padding-bottom: 0em;
margin-bottom: 0em;
height: 100%;
width: 100%;
background-color: black;
}
#logo {
width: 40%;
}
#search {
width: 30%;
margin: 0 auto;
float: none;
}
#footer {
margin-top: 2em;
}
.description {
color: white;
}
.link {
color: green;
}
.link:hover {
color: green;
text-decoration: none;
}
@media only screen and (max-device-width: 480px) {
#search {
width: 100%;
}
.jumbotron#main {
padding-top: 3em;
}
#logo {
width: 100%;
}
} | rukmal/SpotifyInstant | style.css | CSS | mit | 606 |
# Filename: filter.py
"""
LendingClub2 Filter Module
"""
# Standard libraries
import collections
from abc import abstractmethod
from abc import ABC
# lendingclub2
from lendingclub2.error import LCError
# pylint: disable=too-few-public-methods
class BorrowerTrait(ABC):
"""
Abstract base class to define borrowers of interest
"""
@abstractmethod
def matches(self, borrower):
"""
Check if borrower has the trait
:param borrower: instance of :py:class:`~lendingclub2.loan.Borrower`.
:returns: boolean
"""
return True
class BorrowerEmployedTrait(BorrowerTrait):
"""
Check if borrower is employed
"""
def matches(self, borrower):
"""
Check if borrower has the trait
:param borrower: instance of :py:class:`~lendingclub2.loan.Borrower`.
:returns: boolean
"""
return borrower.employed
class Filter(ABC):
"""
Abstract base class for filtering the loan
"""
@abstractmethod
def meet_requirement(self, loan):
"""
Check if the loan is meeting the filter requirement
:param loan: instance of :py:class:`~lendingclub2.loan.Loan`.
:returns: boolean
"""
return True
class FilterByApproved(Filter):
"""
Filter by if the loan is already approved
"""
def meet_requirement(self, loan):
"""
Check if the loan is meeting the filter requirement
:param loan: instance of :py:class:`~lendingclub2.loan.Loan`.
:returns: boolean
"""
return loan.approved
class FilterByBorrowerTraits(Filter):
"""
Filter to have borrower matching specific traits
"""
# pylint: disable=super-init-not-called
def __init__(self, traits):
"""
Constructor
:param traits: instance of
:py:class:`~lendingclub2.filter.BorrowerTrait`
or iterable of instance of
:py:class:`~lendingclub2.filter.BorrowerTrait`.
"""
if isinstance(traits, collections.abc.Iterable):
self._specs = traits
elif isinstance(traits, BorrowerTrait):
self._specs = (traits, )
else:
fstr = "invalid traits type for {}".format(self.__class__.__name__)
raise LCError(fstr)
# pylint: enable=super-init-not-called
def meet_requirement(self, loan):
"""
Check if the loan is meeting the filter requirement
:param loan: instance of :py:class:`~lendingclub2.loan.Loan`.
:returns: boolean
"""
for spec in self._specs:
if not spec.matches(loan.borrower):
return False
return True
class FilterByFunded(Filter):
"""
Filter by percentage funded
"""
# pylint: disable=super-init-not-called
def __init__(self, percentage):
"""
Constructor.
:param percentage: float (between 0 and 100 inclusive)
"""
if percentage < 0.0 or percentage > 100.0:
fstr = "percentage needs to be between 0 and 100 (inclusive)"
raise LCError(fstr)
self._percentage = percentage
# pylint: enable=super-init-not-called
def meet_requirement(self, loan):
"""
The loan would have to be at least the percentage value to meet the
requirement.
:param loan: instance of :py:class:`~lendingclub2.loan.Loan`.
:returns: boolean
"""
return loan.percent_funded >= self._percentage
class FilterByGrade(Filter):
"""
Filter by grade
"""
# pylint: disable=super-init-not-called
def __init__(self, grades=None):
"""
Constructor
:param grades: iterable of string (default: None, example: ('A', 'B'))
"""
self._grades = grades
# pylint: enable=super-init-not-called
def meet_requirement(self, loan):
"""
Check if the loan is meeting the filter requirement
:param loan: instance of :py:class:`~lendingclub2.loan.Loan`.
:returns: boolean
"""
if self._grades and loan.grade in self._grades:
return True
return False
class FilterByTerm(Filter):
"""
Filter by term
"""
# pylint: disable=super-init-not-called
def __init__(self, value=36, min_val=None, max_val=None):
"""
Constructor. To filter by a specific value, set value to a number.
To filter by a range, set value to None, and set min_val and max_val
to integers.
:param value: int - exact term value (default: 36)
:param min_val: int - minimum term value (inclusive) (default: None)
:param max_val: int - maximum term value (inclusive) (default: None)
"""
if value is not None and (min_val is not None or max_val is not None):
fstr = "value and min_val, max_val are mutually exclusive"
details = "value: {}".format(value)
if min_val is not None:
details += ", min_val: {}".format(min_val)
if max_val is not None:
details += ", max_val: {}".format(max_val)
raise LCError(fstr, details=details)
if min_val is not None and max_val is not None:
if max_val > min_val:
fstr = "max_val cannot be greater than min_val"
raise LCError(fstr)
elif value is None and (min_val is None or max_val is None):
fstr = "invalid specification on the values"
hint = "either value or min_val + max_val combo should be specified"
raise LCError(fstr, hint=hint)
self._value = value
self._min_value = min_val
self._max_value = max_val
# pylint: enable=super-init-not-called
def meet_requirement(self, loan):
"""
Check if the loan is meeting the filter requirement
:param loan: instance of :py:class:`~lendingclub2.loan.Loan`.
:returns: boolean
"""
if self._value is not None:
return loan.term == self._value
return self._min_value <= loan.term <= self._max_value
# pylint: enable=too-few-public-methods
| ahartoto/lendingclub2 | lendingclub2/filter.py | Python | mit | 6,246 |
using System;
using System.Collections.Generic;
using System.Linq;
namespace Psi.Compiler.Grammar
{
public abstract class AstType
{
}
public sealed class LiteralType : AstType
{
public static readonly LiteralType Void = new LiteralType();
public static readonly LiteralType Unknown = new LiteralType();
/*
public LiteralType(PsiType type)
{
this.Type = type;
}
public override PsiType CreateIntermediate() => this.Type;
public PsiType Type { get; }
public override string ToString() => this.Type.ToString();
*/
}
public sealed class NamedTypeLiteral : AstType
{
public NamedTypeLiteral(CompoundName name)
{
if (name == null) throw new ArgumentNullException(nameof(name));
this.Name = name;
}
public CompoundName Name { get; }
public override string ToString() => this.Name.ToString();
}
public sealed class FunctionTypeLiteral : AstType
{
public FunctionTypeLiteral(IEnumerable<Parameter> parameters, AstType returnType)
{
this.Parameters = parameters.ToArray();
this.ReturnType = returnType;
}
public IReadOnlyList<Parameter> Parameters { get; }
public AstType ReturnType { get; }
public override string ToString() => string.Format("fn({0}) -> {1}", string.Join(", ", Parameters), ReturnType);
}
public sealed class Parameter
{
public Parameter(ParameterFlags prefix, string name, AstType type, Expression value)
{
this.Prefix = prefix;
this.Name = name.NotNull();
this.Type = type;
this.Value = value;
}
public string Name { get; }
public AstType Type { get; }
public Expression Value { get; }
public ParameterFlags Prefix { get; }
public override string ToString() => string.Format("{0} {1} : {2} = {3}", Prefix, Name, Type, Value);
}
public sealed class EnumTypeLiteral : AstType
{
public EnumTypeLiteral(IEnumerable<string> items)
{
this.Items = items.ToArray();
if (this.Items.Distinct().Count() != this.Items.Count)
throw new InvalidOperationException("Enums allow no duplicates!");
}
public IReadOnlyList<string> Items { get; }
public override string ToString() => string.Format("enum({0})", string.Join(", ", Items));
}
public sealed class TypedEnumTypeLiteral : AstType
{
public TypedEnumTypeLiteral(AstType type, IEnumerable<Declaration> items)
{
this.Type = type.NotNull();
this.Items = items.NotNull().ToArray();
if (this.Items.Any(i => !i.IsField || i.IsConst || i.IsExported || i.Type != PsiParser.Undefined))
throw new InvalidOperationException();
}
public AstType Type { get; }
public IReadOnlyList<Declaration> Items { get; }
public override string ToString() => string.Format("enum<{0}>({1})", Type, string.Join(", ", Items));
}
public sealed class ReferenceTypeLiteral : AstType
{
public ReferenceTypeLiteral(AstType objectType)
{
this.ObjectType = objectType.NotNull();
}
public AstType ObjectType { get; }
public override string ToString() => string.Format("ref<{0}>", ObjectType);
}
public sealed class ArrayTypeLiteral : AstType
{
public ArrayTypeLiteral(AstType objectType, int dimensions)
{
if (dimensions <= 0)
throw new ArgumentOutOfRangeException(nameof(dimensions));
this.Dimensions = dimensions;
this.ElementType = objectType.NotNull();
}
public AstType ElementType { get; }
public int Dimensions { get; }
public override string ToString() => string.Format("array<{0},{1}>", ElementType, Dimensions);
}
public sealed class RecordTypeLiteral : AstType
{
public RecordTypeLiteral(IEnumerable<Declaration> fields)
{
this.Fields = fields.ToArray();
}
public IReadOnlyList<Declaration> Fields { get; }
public override string ToString() => string.Format("record({0})", string.Join(", ", Fields));
}
}
| MasterQ32/psi | psicc/Grammar/AST/Types.cs | C# | mit | 3,989 |
import _plotly_utils.basevalidators
class XValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="x", parent_name="splom.marker.colorbar", **kwargs):
super(XValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_type=kwargs.pop("edit_type", "colorbars"),
max=kwargs.pop("max", 3),
min=kwargs.pop("min", -2),
**kwargs
)
| plotly/plotly.py | packages/python/plotly/plotly/validators/splom/marker/colorbar/_x.py | Python | mit | 474 |
/**
* Module dependencies.
*/
var express = require('express');
var http = require('http');
var path = require('path');
var handlebars = require('express3-handlebars');
var index = require('./routes/index');
var project = require('./routes/project');
var palette = require('./routes/palette');
// Example route
// var user = require('./routes/user');
var app = express();
// all environments
app.set('port', process.env.PORT || 3000);
app.set('views', path.join(__dirname, 'views'));
app.engine('handlebars', handlebars());
app.set('view engine', 'handlebars');
app.use(express.favicon());
app.use(express.logger('dev'));
app.use(express.json());
app.use(express.urlencoded());
app.use(express.methodOverride());
app.use(express.cookieParser('Intro HCI secret key'));
app.use(express.session());
app.use(app.router);
app.use(express.static(path.join(__dirname, 'public')));
// development only
if ('development' == app.get('env')) {
app.use(express.errorHandler());
}
// Add routes here
app.get('/', index.view);
app.get('/project/:id', project.projectInfo);
app.get('/palette', palette.randomPalette);
// Example route
// app.get('/users', user.list);
http.createServer(app).listen(app.get('port'), function(){
console.log('Express server listening on port ' + app.get('port'));
});
| ryanjhill/lab6 | app.js | JavaScript | mit | 1,298 |
//
// CMAutoCompletTableViewCell.h
// I_NScreen
//
// Created by 조백근 on 2015. 10. 1..
// Copyright © 2015년 STVN. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef void(^AutoCompletCloseEvent)(NSIndexPath* indexPath);
@interface CMAutoCompletTableViewCell : UITableViewCell
@property (nonatomic, strong) NSIndexPath* indexPath;
@property (nonatomic, copy) AutoCompletCloseEvent autoCompletCloseEvent;
- (void)setTitle:(NSString*)title;
@end
| LambertPark/I_NScreen | I_NScreen/I_NScreen/Classes/_Menu/_Search/_Cell/CMAutoCompletTableViewCell.h | C | mit | 465 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>compcert: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.7.1+2 / compcert - 3.7+8.12~coq_platform</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
compcert
<small>
3.7+8.12~coq_platform
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2021-11-14 19:55:30 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-11-14 19:55:30 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
camlp5 7.14 Preprocessor-pretty-printer of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 1 Virtual package relying on perl
coq 8.7.1+2 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.09.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.09.1 Official release 4.09.1
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
authors: "Xavier Leroy <xavier.leroy@inria.fr>"
maintainer: "Jacques-Henri Jourdan <jacques-Henri.jourdan@normalesup.org>"
homepage: "http://compcert.inria.fr/"
dev-repo: "git+https://github.com/AbsInt/CompCert.git"
bug-reports: "https://github.com/AbsInt/CompCert/issues"
license: "INRIA Non-Commercial License Agreement"
version: "3.7"
build: [
["./configure"
"ia32-linux" {os = "linux"}
"ia32-macosx" {os = "macos"}
"ia32-cygwin" {os = "cygwin"}
"ia32-cygwin" {os = "win32"}
"-bindir" "%{bin}%"
"-libdir" "%{lib}%/compcert"
"-install-coqdev"
"-clightgen"
"-coqdevdir" "%{lib}%/coq/user-contrib/compcert"
"-ignore-coq-version"]
[make "-j%{jobs}%" {ocaml:version >= "4.06"}]
]
patches: [
"0001-Install-compcert.config-file-along-the-Coq-developme.patch"
"0002-Dual-license-aarch64-Archi.v-Cbuiltins.ml-extraction.patch"
"0003-Update-the-list-of-dual-licensed-files.patch"
"0004-Use-Coq-platform-supplied-Flocq.patch"
"0005-Import-ListNotations-explicitly.patch"
"0006-Coq-MenhirLib-explicit-import-ListNotations-354.patch"
"0007-Use-ocamlfind-to-find-menhirLib.patch"
"0008-Use-platform-supplied-menhirlib-as-suggested-by-jhjo.patch"
"0009-Don-t-build-MenhirLib-platform-version-is-used.patch"
]
extra-files: [
["0001-Install-compcert.config-file-along-the-Coq-developme.patch" "sha256=62e36964ed3d06a213caea8639be51641c25df3c4ea384e01ce57d015de698d3"]
["0002-Dual-license-aarch64-Archi.v-Cbuiltins.ml-extraction.patch" "sha256=1af58e827aa24be60e115878b9f70f1bf715f83bb1b91da8e2a9d749f4195d29"]
["0003-Update-the-list-of-dual-licensed-files.patch" "sha256=bf91c7d3e2177620296838658cafbeffdd50d8d1ef56649b56a35644410e1337"]
["0004-Use-Coq-platform-supplied-Flocq.patch" "sha256=83261a1fae459c319c0288a543787d3abcadaa2cccb1c34543c9784fe645f942"]
["0005-Import-ListNotations-explicitly.patch" "sha256=c4f29203e8dcaa17c76543ad77dabefdb555588567d4f6055cd53e19a9c81081"]
["0006-Coq-MenhirLib-explicit-import-ListNotations-354.patch" "sha256=3b7f59d4736d36878bbe3c0fed80e7db1ae75b9c8a5a9c90a57df2c1a4f4ae78"]
["0007-Use-ocamlfind-to-find-menhirLib.patch" "sha256=df3f103977fa02bd339f6a8537da6bd4eaf1baa54c9675508e3bd16dbe11464e"]
["0008-Use-platform-supplied-menhirlib-as-suggested-by-jhjo.patch" "sha256=bcd2eb6eafb5a71fd0ee8ecf6f1b100b06723c636adb0ef2f915fa0ac3585c64"]
["0009-Don-t-build-MenhirLib-platform-version-is-used.patch" "sha256=77835a85124eb1e8afefdcaf9eaa5beab64ed0fea22fceab78b7fd550778c857"]
]
install: [
[make "install"]
]
depends: [
"coq" {>= "8.12" & < "8.13"}
"coq-flocq" {>= "3.2.1"}
"coq-menhirlib" {>= "20190626" & <= "20210310" }
"menhir" {>= "20190626" & <= "20210310" }
"ocaml" {>= "4.05.0"}
]
synopsis: "The CompCert C compiler (using coq-platform supplied version of Flocq)"
tags: [
"category:Computer Science/Semantics and Compilation/Compilation"
"category:Computer Science/Semantics and Compilation/Semantics"
"keyword:C"
"keyword:compiler"
"logpath:compcert"
"date:2020-04-29"
]
url {
src: "https://github.com/AbsInt/CompCert/archive/v3.7.tar.gz"
checksum: "sha256=ceee1b2ed6c2576cb66eb7a0f2669dcf85e65c0fc68385f0781b0ca4edb87eb0"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-compcert.3.7+8.12~coq_platform coq.8.7.1+2</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.7.1+2).
The following dependencies couldn't be met:
- coq-compcert -> coq >= 8.12
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-compcert.3.7+8.12~coq_platform</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
| coq-bench/coq-bench.github.io | clean/Linux-x86_64-4.09.1-2.0.6/released/8.7.1+2/compcert/3.7+8.12~coq_platform.html | HTML | mit | 9,764 |
var model = require('../model');
// ROUTES
exports.saveAvailabilityChange = function(req, res) {
console.log('hi im here')
function afterSave(err){
if(err) {
console.log(err)
res.send(500)
}
else {
backURL = req.header('Referer') || '/';
res.redirect(backURL);
}
}
if(req.query.optionsRadios == 'available') {
var curr_user = req.session.user
req.session.user.isAvailable = true
model.User.update({
"email":req.session.user.email
},
{
"isAvailable":true
}).exec(afterSave)
}
else {
var curr_user = req.session.user
req.session.user.isAvailable = false
model.User.update({
"email":req.session.user.email
},
{
"isAvailable":false
}).exec(afterSave)
}
}
exports.viewEditIntervieweeProfile = function(req, res) {
function afterFind(err){
if(err) {
console.log(err)
res.send(500)
}
else {
model.User.find({"email":req.session.user.email}).exec(
function(err,users){
if (err) {
console.log(err)
res.send(500)
}
else {
var found = users[0]
req.session.user = found;
res.render('interviewee/editIntervieweeProfile', req.session.user);
}
}
)
}
}
if (req.query.email){ // form submit
/* fname or firstname?? */
model.User.update({"email":req.session.user.email},
{
"firstname":req.query.fname,
"lastname":req.query.lname,
"email":req.query.email,
"education":req.query.education,
"occupation":req.query.occupation,
"location":req.query.location
}).exec(afterFind);
}
else
afterFind(null)
}
exports.viewEditInterviewerProfile = function(req, res) {
function afterFind(err){
if(err) {
console.log(err)
res.send(500)
}
else {
model.User.find({"email":req.session.user.email}).exec(
function(err,users){
if (err) {
console.log(err)
res.send(500)
}
else {
var found = users[0]
req.session.user = found;
res.render('interviewer/editInterviewerProfile', req.session.user);
}
}
)
}
}
if (req.query.email){ // form submit
/* fname or firstname?? */
model.User.update({"email":req.session.user.email},
{
"firstname":req.query.fname,
"lastname":req.query.lname,
"email":req.query.email,
"education":req.query.education,
"occupation":req.query.occupation,
"location":req.query.location,
"company":req.query.company
}).exec(afterFind);
}
else
afterFind(null)
}
exports.view = function(req, res){
if (req.query.invalid)
res.render('prelogin/index', {
'invalid': req.query.invalid
})
else
res.render('prelogin/index');
};
exports.viewIntervieweeAreasToImprove = function(req, res){
function afterFind(err){
if(err) {
console.log(err)
res.send(500)
}
else {
model.User.find({"email":req.session.user.email}).exec(
function(err,users){
if (err) {
console.log(err)
res.send(500)
}
else {
var found = users[0]
req.session.user = found;
console.log(req.session.user.isAlternate)
res.render('interviewee/intervieweeAreasToImprove', req.session.user);
}
}
)
}
}
if (req.query.improvements){ // form submit
model.User.update({"email":req.session.user.email},
{"improvements":req.query.improvements}).exec(afterFind);
}
else
afterFind(null)
};
exports.viewIntervieweeFeedback = function(req, res){
model.User.find({"email":req.session.user.email}).exec(renderFeedbacks);
function renderFeedbacks(err, users) {
var user = users[0]
console.log(user.feedback)
res.render('interviewee/intervieweeFeedback', {
'feedbacks': user.feedback,
'isAvailable':req.session.user.isAvailable
});
}
};
exports.viewInterviewerFeedback = function(req, res){
model.User.find({"email":req.session.user.email}).exec(renderFeedbacks);
function renderFeedbacks(err, users) {
var user = users[0]
console.log(user.feedback)
res.render('interviewer/interviewerFeedback', {
'feedbacks': user.feedback,
'isAvailable':req.session.user.isAvailable
});
}
};
exports.viewIntervieweeSkills = function(req, res){
console.log('Skills + isAvailable:' + req.session.user.isAvailable)
function afterFind(err){
if(err) {
console.log(err)
res.send(500)
}
else {
model.User.find({"email":req.session.user.email}).exec(
function(err,users){
if (err) {
console.log(err)
res.send(500)
}
else {
var curr_user = users[0]
req.session.user = curr_user;
res.render('interviewee/intervieweeSkills',req.session.user);
}
}
)
}
}
if (req.query.programmingLang){ // form submit
model.User.update({
"email":req.session.user.email
},
{
"programmingLang":req.query.programmingLang,
"softSkills":req.query.softSkills,
"frameworks":req.query.frameworks
})
.exec(afterFind);
}
else
afterFind(null)
};
exports.dosurveyInterviewee = function(req, res) {
model.User.find({
"email": req.query.email
}).exec(function(err, users){
if (err) {
console.log(err);
res.send(500)
}
else {
if (users.length == 0){
var random = Math.random()
var isAlternate = true //(random > 0.5), chose alternate version
var newUser = model.User({
"firstname": req.query.fname,
"lastname": req.query.lname,
"email": req.query.email,
"password": req.query.password,
"ghangout": req.query.ghangout,
"interviewer": false,
"education": req.query.education,
"occupation": req.query.occupation,
"location": req.query.location,
"programmingLang": "For example: Java, C++, Python",
"softSkills": "For example: Good communication skills, Experience managing teams",
"frameworks": "For example: DJango, MongoDB, Google AppEngine",
"improvements": "For example: practicing more technical questions, learning to clearly express ideas",
"isAlternate": isAlternate,
"isAvailable": true
});
console.log(newUser)
newUser.save(function(err){
if (err) {
console.log(err)
res.send(500)
}
else {
req.session.user = newUser
res.render('interviewee/intervieweeSurvey',newUser);
}
});
}
else {
console.log('Associated email address already used.')
res.send(500)
}
}
});
}
exports.viewInterviewerAboutMe = function(req, res){
function afterFind(err){
if(err) {
console.log(err)
res.send(500)
}
else {
model.User.find({"email":req.session.user.email}).exec(
function(err,users){
if (err) {
console.log(err)
res.send(500)
}
else {
var found = users[0]
req.session.user = found;
res.render('interviewer/interviewerAboutMe', req.session.user);
}
}
)
}
}
if (req.query.mission){ // form submit
model.User.update({"email":req.session.user.email},
{"mission":req.query.mission,"hobbies":req.query.hobbies}).exec(afterFind);
}
else
afterFind(null)
};
exports.viewInterviewerPastExp = function(req, res){
function afterFind(err){
if(err) {
console.log(err)
res.send(500)
}
else {
model.User.find({
"email":req.session.user.email
}).exec(function(err,users){
if (err) {
console.log(err)
res.send(500)
}
else {
var found = users[0]
req.session.user = found;
res.render('interviewer/interviewerPastExp', req.session.user);
}
})
}
}
if (req.query.description1){ // form submit
model.User.update({
"email":req.session.user.email
},
{
"description1":req.query.description1,
"description2":req.query.description2
}).exec(afterFind);
}
else
afterFind(null)
};
exports.dosurveyInterviewer = function(req, res) {
model.User.find({
"email": req.query.email
}).exec(function(err, users){
if (err)
console.log(err);
else {
if (users.length == 0){
var randnum = Math.random()
var isAlternate = true; // (randnum > 0.5) chose alternate version
var newUser = model.User({
"firstname": req.query.fname,
"lastname": req.query.lname,
"email": req.query.email,
"password": req.query.password,
"ghangout": req.query.ghangout,
"interviewer": true,
"education": req.query.education,
"occupation": req.query.occupation,
"location": req.query.location,
"company": req.query.company,
"mission": "Tell us more about yourself.",
"hobbies": "What are your hobbies?",
"description1": "What did you do? Where did you work?",
"description2": "What did you do? Where did you work?",
"isAlternate": isAlternate,
"isAvailable": true
});
console.log(isAlternate)
newUser.save(function(err){
if (err) {
console.log(err)
res.send(500)
}
else {
req.session.user = newUser
res.render('interviewer/interviewerSurvey',newUser);
}
});
}
else {
console.log('Associated email address already used.')
res.send(500)
}
}
});
};
exports.viewLogin = function(req, res){
res.render('prelogin/login');
};
exports.viewMatchForInterviewer = function(req, res){
// get occupation
console.log(req.session)
if (req.session.user)
occupation = req.session.user.occupation
else
occupation = ''
// find users with matching occupation
// eventually create req.session.set and store people already viewed
// only allow non-viewed people into matching_occupation_users
// also allow match page to let you know when you have exhausted all options
matching_occupation_users = []
model.User.find({"occupation":occupation,"interviewer":false}).exec(afterFind);
function afterFind(err,users){
if(err) {
console.log(err)
res.send(500)
}
else {
for (i = 0; i < users.length; i++){
matching_occupation_users.push(users[i]);
};
// select a random person
num_matching = matching_occupation_users.length
rand_index = Math.floor(Math.random() * num_matching)
matched_user = matching_occupation_users[rand_index]
var curr_user = req.session.user
res.render('matchForInterviewer', {
'match': matched_user,
'curr_user': curr_user
});
}
};
};
exports.viewMatchForInterviewee = function(req, res){
// get occupation
console.log(req.session)
if (req.session.user)
occupation = req.session.user.occupation
else
occupation = ''
// find users with matching occupation
// eventually create req.session.set and store people already viewed
// only allow non-viewed people into matching_occupation_users
// also allow match page to let you know when you have exhausted all options
matching_occupation_users = []
model.User.find({"occupation":occupation,"interviewer":true}).exec(afterFind);
function afterFind(err,users){
if(err) {
console.log(err)
res.send(500)
}
else {
for (i = 0; i < users.length; i++){
matching_occupation_users.push(users[i]);
};
// select a random person
num_matching = matching_occupation_users.length
rand_index = Math.floor(Math.random() * num_matching)
matched_user = matching_occupation_users[rand_index]
var curr_user = req.session.user
res.render('matchForInterviewee', {
'match': matched_user,
'curr_user': curr_user,
'isAvailable':req.session.user.isAvailable
});
}
};
};
exports.kickoff = function(req, res) {
var curr_user = req.session.user
res.render('startInterview', {
'match':req.params.match,
'curr_user': curr_user,
'isAvailable':req.session.user.isAvailable
});
};
exports.kickoffWithInterviewee = function(req, res){
res.render('interviewee/intervieweeSkills', req.session.user);
};
exports.viewUnimplemented = function(req, res){
res.render('unimplemented');
};
exports.logout = function(req, res){
req.session.destroy(function(err){
if (err) console.log(err)
console.log('cleared session')
res.redirect('/');
})
};
exports.viewSignup = function(req, res){
res.render('prelogin/signup');
};
exports.viewInterviewerProfile = function(req, res) {
// this route is only called after session is set
res.render('interviewer/interviewerProfile', req.session.user);
};
exports.viewInterviewerProfileAlter = function(req,res){
res.render('interviewer/interviewerProfileAlter',req.session.user);
}
exports.viewIntervieweeProfileAlter = function(req,res){
res.render('interviewee/intervieweeProfileAlter',req.session.user);
}
exports.viewIntervieweeProfile = function(req, res) {
if (req.session && req.session.user){
console.log(req.session.user.isAlternate)
if (req.query.persontype) { // means came from signup surveys
console.log('came from signup')
if (req.query.persontype == "interviewee") {// interviewee
console.log('interviewee')
// update user obj in db
model.User.update({
'_id': req.session.user._id
},
{
'occupation': req.query.occupation,
'education': req.query.education,
'location': req.query.location
}).exec(function(err){
if (err) {
console.log(err)
res.send(500)
}
else {
model.User.find({
'_id': req.session.user._id
}).exec(function(err, users){
if (err) {
console.log(err)
res.send(500)
}
else {
var user = users[0]
req.session.user = user
res.redirect('intervieweeProfile/alternate');
}
})
}
})
}
else {// interviewer
console.log('interviewer')
model.User.update({'_id': req.session.user._id},
{
'occupation': req.query.occupation,
'education': req.query.education,
'location': req.query.location,
'company':req.query.company,
}).exec(function(err){
if (err) {
console.log(err)
res.send(500)
}
else {
model.User.find({
'_id': req.session.user._id
}).exec(function(err, users){
if (err) {
console.log(err)
res.send(500)
}
else {
var user = users[0]
req.session.user = user
res.redirect('interviewerProfile/alternate');
}
})
}
});
}
}
else { // just returning to the page
if (req.session.user.interviewer){
res.redirect('interviewerProfile/alternate');
}
else {
res.redirect('intervieweeProfile/alternate');
}
}
}
else if (req.query && req.query.uname){ // after login
console.log('came from login')
console.log('email:', req.query.uname)
console.log('password:', req.query.password)
model.User.find({
"email": req.query.uname,
"password": req.query.password
}).exec(afterFind);
function afterFind(err, users){
if (err) {
console.log(err)
res.send(500)
}
else if (users.length > 0){
var user = users[0]
console.log(user);
console.log(user.password);
console.log(user.isAlternate)
req.session.user = user
if (user.interviewer){
res.redirect('interviewerProfile/alternate');
}
else {
console.log('I AM HERE')
res.redirect('intervieweeProfile/alternate');
}
}
else
res.redirect('/?invalid=1')
}
}
else
res.redirect('/?invalid=1');
}
exports.postFeedback = function(req,res){
function afterUpdate(err){
if(err) {
console.log(err)
res.send(500)
}
else {
res.render('feedback', {
'match':req.params.match,
'curr_user':curr_user,
'isAvailable':req.session.user.isAvailable
});
}
}
if(req.query.feedback){// form submit
console.log("I came here! Pay attention!")
var curr_user = req.session.user
model.User.update({"email":req.params.match},
{ $push: {"feedback":{"text":req.query.feedback,"by":curr_user.firstname}}
}).exec(afterUpdate);
}
else
afterUpdate(null);
}
exports.viewInterviewerPastExp = function(req, res){
function afterFind(err){
if(err) {
console.log(err)
res.send(500)
}
else {
model.User.find({
"email":req.session.user.email
}).exec(function(err,users){
if (err) {
console.log(err)
res.send(500)
}
else {
var found = users[0]
req.session.user = found;
res.render('interviewer/interviewerPastExp', req.session.user);
}
})
}
}
if (req.query.description1){ // form submit
model.User.update({
"email":req.session.user.email
},
{
"description1":req.query.description1,
"description2":req.query.description2
}).exec(afterFind);
}
else
afterFind(null)
};
| govindad/interviewroulette | routes/routes.js | JavaScript | mit | 16,653 |
---
layout: post
title: "使用Java结合PhantomJS去加载需要滑动到底部的网站"
date: 2017-07-20
category: Java
tag: PhantomJS
---
## 背景
有一些网站,滑动条往下滑动的时候页面才加载或者再次获取数据
## 使用PhantomJS来实现自动加载,以www.toutiao.com为例
### 安装phantomjs
把phantomjs放在工程phantomjs文件夹下
### maven需要依赖的包
```xml
<dependency>
<groupId>com.github.detro</groupId>
<artifactId>phantomjsdriver</artifactId>
<version>1.2.0</version>
</dependency>
```
### Java代码
```java
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.phantomjs.PhantomJSDriver;
import org.openqa.selenium.phantomjs.PhantomJSDriverService;
import org.openqa.selenium.remote.DesiredCapabilities;
import java.io.File;
import java.util.concurrent.TimeUnit;
/**
* 测试PhantomJS框架函数
*/
public class PhantomJST {
public static void main(String[] args) throws Exception{
String currDir = System.getProperty("user.dir");
String driverPath = currDir + File.separator + "phantomjs/phantomjs";
DesiredCapabilities capabilities = DesiredCapabilities.phantomjs();
capabilities.setCapability(PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY, driverPath);
PhantomJSDriverService service = PhantomJSDriverService.createDefaultService(capabilities);
WebDriver webDriver = new PhantomJSDriver(service, capabilities);
webDriver.manage().deleteAllCookies();
webDriver.manage().timeouts().pageLoadTimeout(5, TimeUnit.SECONDS);
webDriver.manage().timeouts().setScriptTimeout(5, TimeUnit.SECONDS);
webDriver.get("http://www.toutiao.com");
JavascriptExecutor jse = (JavascriptExecutor) webDriver;
Long position = (Long)jse.executeScript("return window.scrollY;");
System.out.println(webDriver.getPageSource());
System.out.println("***" + position + "***");
System.out.println("------------------------------------------");
jse.executeScript("window.scrollTo(0, document.body.scrollHeight);");
position = (Long)jse.executeScript("return window.scrollY;");
Thread.sleep(3000);
System.out.println(webDriver.getPageSource());
System.out.println("***" + position + "***");
System.out.println("------------------------------------------");
jse.executeScript("window.scrollTo(0, document.body.scrollHeight);");
position = (Long)jse.executeScript("return window.scrollY;");
Thread.sleep(3000);
System.out.println(webDriver.getPageSource());
System.out.println("***" + position + "***");
System.out.println("------------------------------------------");
webDriver.quit();
}
}
```
| zhaomengit/zhaomengit.github.io | _posts/2017-07-20-使用Java结合PhantomJS去加载需要滑动到底部的网站.md | Markdown | mit | 2,895 |
<?php
/**
* Created by PhpStorm.
* User: Stefan
* Date: 30-08-2017
* Time: 08:06
*/
/**
* Lab 1 : assignment 12
*/
// pass valid/invalid emails
$email = "mail@example.com";
if (filter_var($email, FILTER_VALIDATE_EMAIL))
{
echo '"' . $email . '" = Valid'."\n";
}
else
{
echo '"' . $email . '" = Invalid'."\n";
}
?> | WebDev-7th-sem/phpTraining | exercises/week35/lab1/012/index.php | PHP | mit | 323 |
package html2data_test
import (
"bufio"
"fmt"
"log"
"os"
"github.com/msoap/html2data"
)
func ExampleFromURL() {
doc := html2data.FromURL("http://example.com")
if doc.Err != nil {
log.Fatal(doc.Err)
}
// or with config
doc = html2data.FromURL("http://example.com", html2data.URLCfg{UA: "userAgent", TimeOut: 10, DontDetectCharset: false})
if doc.Err != nil {
log.Fatal(doc.Err)
}
}
func ExampleFromFile() {
doc := html2data.FromFile("file_name.html")
if doc.Err != nil {
log.Fatal(doc.Err)
}
}
func ExampleFromReader() {
doc := html2data.FromReader(bufio.NewReader(os.Stdin))
if doc.Err != nil {
log.Fatal(doc.Err)
}
}
func ExampleDoc_GetDataSingle() {
// get title
title, err := html2data.FromFile("cmd/html2data/test.html").GetDataSingle("title")
if err != nil {
log.Fatal(err)
}
fmt.Println("Title is:", title)
// Output: Title is: Title
}
func ExampleDoc_GetData() {
texts, _ := html2data.FromURL("http://example.com").GetData(map[string]string{"headers": "h1", "links": "a:attr(href)"})
// get all H1 headers:
if textOne, ok := texts["headers"]; ok {
for _, text := range textOne {
fmt.Println(text)
}
}
// get all urls from links
if links, ok := texts["links"]; ok {
for _, text := range links {
fmt.Println(text)
}
}
}
func ExampleDoc_GetDataFirst() {
texts, err := html2data.FromURL("http://example.com").GetDataFirst(map[string]string{"header": "h1", "first_link": "a:attr(href)"})
if err != nil {
log.Fatal(err)
}
// get H1 header:
fmt.Println("header: ", texts["header"])
// get URL in first link:
fmt.Println("first link: ", texts["first_link"])
}
func ExampleDoc_GetDataNested() {
texts, _ := html2data.FromFile("test.html").GetDataNested("div.article", map[string]string{"headers": "h1", "links": "a:attr(href)"})
for _, article := range texts {
// get all H1 headers inside each <div class="article">:
if textOne, ok := article["headers"]; ok {
for _, text := range textOne {
fmt.Println(text)
}
}
// get all urls from links inside each <div class="article">
if links, ok := article["links"]; ok {
for _, text := range links {
fmt.Println(text)
}
}
}
}
func ExampleDoc_GetDataNestedFirst() {
texts, err := html2data.FromFile("cmd/html2data/test.html").GetDataNestedFirst("div.block", map[string]string{"header": "h1", "link": "a:attr(href)", "sp": "span"})
if err != nil {
log.Fatal(err)
}
fmt.Println("")
for _, block := range texts {
// get first H1 header
fmt.Printf("header - %s\n", block["header"])
// get first link
fmt.Printf("first URL - %s\n", block["link"])
// get not exists span
fmt.Printf("span - '%s'\n", block["span"])
}
// Output:
// header - Head1.1
// first URL - http://url1
// span - ''
// header - Head2.1
// first URL - http://url2
// span - ''
}
func Example() {
doc := html2data.FromURL("http://example.com")
// or with config
// doc := FromURL("http://example.com", URLCfg{UA: "userAgent", TimeOut: 10, DontDetectCharset: true})
if doc.Err != nil {
log.Fatal(doc.Err)
}
// get title
title, _ := doc.GetDataSingle("title")
fmt.Println("Title is:", title)
title, _ = doc.GetDataSingle("title", html2data.Cfg{DontTrimSpaces: true})
fmt.Println("Title as is, with spaces:", title)
texts, _ := doc.GetData(map[string]string{"h1": "h1", "links": "a:attr(href)"})
// get all H1 headers:
if textOne, ok := texts["h1"]; ok {
for _, text := range textOne {
fmt.Println(text)
}
}
// get all urls from links
if links, ok := texts["links"]; ok {
for _, text := range links {
fmt.Println(text)
}
}
}
| msoap/html2data | example_test.go | GO | mit | 3,605 |
System.register(['core-js', './map-change-records', './collection-observation'], function (_export) {
var core, getChangeRecords, ModifyCollectionObserver, _classCallCheck, _inherits, mapProto, ModifyMapObserver;
_export('getMapObserver', getMapObserver);
function getMapObserver(taskQueue, map) {
return ModifyMapObserver.create(taskQueue, map);
}
return {
setters: [function (_coreJs) {
core = _coreJs['default'];
}, function (_mapChangeRecords) {
getChangeRecords = _mapChangeRecords.getChangeRecords;
}, function (_collectionObservation) {
ModifyCollectionObserver = _collectionObservation.ModifyCollectionObserver;
}],
execute: function () {
'use strict';
_classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };
_inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
mapProto = Map.prototype;
ModifyMapObserver = (function (_ModifyCollectionObserver) {
function ModifyMapObserver(taskQueue, map) {
_classCallCheck(this, ModifyMapObserver);
_ModifyCollectionObserver.call(this, taskQueue, map);
}
_inherits(ModifyMapObserver, _ModifyCollectionObserver);
ModifyMapObserver.create = function create(taskQueue, map) {
var observer = new ModifyMapObserver(taskQueue, map);
map.set = function () {
var oldValue = map.get(arguments[0]);
var type = oldValue ? 'update' : 'add';
var methodCallResult = mapProto.set.apply(map, arguments);
observer.addChangeRecord({
type: type,
object: map,
key: arguments[0],
oldValue: oldValue
});
return methodCallResult;
};
map['delete'] = function () {
var oldValue = map.get(arguments[0]);
var methodCallResult = mapProto['delete'].apply(map, arguments);
observer.addChangeRecord({
type: 'delete',
object: map,
key: arguments[0],
oldValue: oldValue
});
return methodCallResult;
};
map.clear = function () {
var methodCallResult = mapProto.clear.apply(map, arguments);
observer.addChangeRecord({
type: 'clear',
object: map
});
return methodCallResult;
};
return observer;
};
return ModifyMapObserver;
})(ModifyCollectionObserver);
}
};
}); | martingust/martingust.github.io | jspm_packages/github/aurelia/binding@0.6.1/map-observation.js | JavaScript | mit | 3,025 |
import { Component, OnInit } from '@angular/core';
import { MdDialogRef } from '@angular/material';
import { NavigationEnd, Router } from '@angular/router';
@Component({
moduleId: module.id,
selector: 'app-survey',
templateUrl: '/templates/shared/survey'
})
export class SurveyComponent implements OnInit {
constructor(
public dialogRef: MdDialogRef<SurveyComponent>,
private _router: Router
) { }
ngOnInit(): void {
this._router.events.subscribe((event: any) => {
if (!(event instanceof NavigationEnd)) return;
this.dialogRef.close();
});
}
onSubmit() {
this.dialogRef.close();
}
} | maximegelinas-cegepsth/GEC-strawberry-sass | StrawberrySass/src/StrawberrySass/UI/Shared/App/Common/Surveys/SurveyComponent.ts | TypeScript | mit | 691 |
#AIS QuickBase Ruby Gem
[](http://badge.fury.io/rb/advantage_quickbase)
This gem is designed to be a concise, clear and maintainable collection of common Quickbase API calls used in ruby development. It implements a subset of the total Quickbase API.
##Example
```ruby
require 'quickbase'
# Create a new API connection
qb_api = AdvantageQuickbase::API.new( domain, username, password, app_token, ticket, user_token )
# Load all of the Books in our table
query_options = { query: "{6.EX.'Book'}", clist: [7] }
books = qb_api.do_query( 'books_db_id', query_options )
puts books.inspect
# => [ {"7" => "Lord of the Flies"}, {"7" => "The Giver"} ]
```
##API Documentation
###New Connection
```ruby
qb_api = Advantage::QuickbaseAPI.new( domain, username, password, app_token, ticket, user_token )
```
###Find
**find(db\_id, record\_id, query\_options)** => **[json] record**
`query_options` expects a hash containing any (or none) of the following options:
* `clist` - a list (Array or period-separated string) of fields to return
* `fmt` - defaults to "structured"; use `fmt: ''` to set api responses to unstructured
```ruby
#Load the record that has a Record ID 8 from the books table
book = qb_api.find( 'books_db_id', 8, clist: [3, 7] )
puts book.inspect
# => {"3" => "8", "7" =>"The Giver"}
```
###Get DB Var
**get\_db\_var( app_id, variable_name )** => **[string] Variable Value**
```ruby
value = qb_api.get_db_var( 'abcd1234', 'test' )
````
###Set DB Var
**set\_db\_var( app_id, variable_name, value=nil )** => **[bool] Success?**
```ruby
qb_api.set_db_var( 'abcd1234', 'test', 'value' )
````
###Do Query Count
**do\_query\_count( db_id, query=nil )** => **[int] Record Count**
```ruby
today = Date.today.strftime( '%Y-%m-%d' )
num_records = qb_api.do_query_count( 'abcd1234', "{1.EX.'#{today}'}" )
````
###Do Query
**do\_query( db\_id, query\_options )** => **[json] records**
`query_options` expects a hash containing any (or none) of the following options:
* `query` - typical Quickbase query string. ex: `"{3.EX.'123'}"`
* `qid` - report or query id to load (should not be used with `query` or `qname`)
* `qname` - report or query name to load (should not be used with `query` or `qid`)
* `clist` - a list (Array or period-separated string) of fields to return
* `slist` - a list (Array or period-separated string) of fields to sort by
* `fmt` - defaults to "structured"; use `fmt: ''` to set api responses to unstructured
* `options` - string of additional options. ex: `"num-200.skp-#{records_processed}"`
```ruby
records = qb_api.do_query( 'bdjwmnj33', query: "{3.EX.'123'}", clist: [3, 6, 10] )
```
###Add Record
**add\_record( db\_id, new\_data )** => **[int] New Record Id**
```ruby
new_data = { 6 => 'Book', 7 => 'My New Title', 8 => 'John Smith'}
new_record_id = qb_api.add_record( 'abcd1234', new_data )
````
###Edit Record
**edit\_record( db\_id, record\_id, new\_data )** => **[bool] Success?**
```ruby
new_data = { 7 => 'My Second Title', 8 => 'John Smith'}
call_successful = qb_api.edit_record( 'abcd1234', 136, new_data )
````
###Delete Record
**delete\_record( db\_id, record\_id )** => **[bool] Success?**
```ruby
call_successful = qb_api.delete_record( 'abcd1234', 136 )
````
###Purge Records
**purge\_records( db\_id, options )** => **[int] Records Deleted**
`options` expects a hash containing any of the following options:
* `query` - typical Quickbase query string. ex: `"{3.EX.'123'}"`
* `qid` - report or query id to load (should not be used with `query` or `qname`)
* `qname` - report or query name to load (should not be used with `query` or `qid`)
```ruby
records_deleted = qb_api.purge_records( 'abcd1234', {qid: 6} )
````
###Get Schema
Get the complete schema of the whole quickbase app
**get_schema( db_id )**
```ruby
app_schema = qb_api.get_schema( 'abcd1234' )
````
###Import From CSV
**import\_from\_csv( db\_id, data, column\_field\_ids )** => **[json] New Record Ids**
```ruby
new_data = [
['Book', 'Lord of the Flies', 'William Golding'],
['Book', 'A Tale of Two Cities', 'Charles Dickens'],
['Book', 'Animal Farm', 'George Orwell']
]
record_ids = qb_api.import_from_csv( 'abcd1234', new_data, [6, 7, 8] )
````
###Create App Token
Create an app token that gives you access to that Quickbase app
**create\_app\_token(db\_id, description, page\_token)**
* `db_id` - database id
* `description` - description of what the token is for
* `page_token` - token hidden in the page DOM
```ruby
app_token = qb_api.create_app_token( 'abcd1234', 'Access all the books in the database', 'TugHxxkil9t6Kdebac' )
````
| AdvantageIntegratedSolutions/Quickbase-Gem | README.md | Markdown | mit | 4,660 |
<?php
require_once(TOOLKIT . '/class.datasource.php');
require_once(TOOLKIT . '/class.entrymanager.php');
require_once(EXTENSIONS . '/elasticsearch/lib/class.elasticsearch.php');
Class datasourceelasticsuggest extends Datasource{
public $dsParamROOTELEMENT = 'elasticsearch-suggest';
public function __construct(&$parent, $env=NULL, $process_params=true){
parent::__construct($parent, $env, $process_params);
}
public function about(){
return array(
'name' => 'ElasticSearch: Suggest'
);
}
public function grab(&$param_pool=NULL){
$config = (object)Symphony::Configuration()->get('elasticsearch');
// build an object of runtime parameters
$params = (object)array(
'keywords' => isset($_GET['keywords']) ? trim($_GET['keywords']) : '',
'per-page' => isset($_GET['per-page']) ? $_GET['per-page'] : $config->{'per-page'},
'sections' => isset($_GET['sections']) ? array_map('trim', explode(',', $_GET['sections'])) : NULL,
'default-sections' => !empty($config->{'default-sections'}) ? explode(',', $config->{'default-sections'}) : NULL,
'language' => (isset($_GET['language']) && !empty($_GET['language'])) ? array_map('trim', explode(',', $_GET['language'])) : NULL,
'default-language' => !empty($config->{'default-language'}) ? explode(',', $config->{'default-language'}) : NULL
);
$params->keywords = ElasticSearch::filterKeywords($params->keywords);
if(empty($params->keywords)) return;
// add trailing wildcard if it's not already there
if(end(str_split($params->keywords)) !== '*') $params->keywords = $params->keywords . '*';
// if no language passed but there are defaults, use the defaults
if($params->{'language'} === NULL && count($params->{'default-language'})) {
$params->{'language'} = $params->{'default-language'};
}
ElasticSearch::init();
$query_querystring = new Elastica_Query_QueryString();
$query_querystring->setDefaultOperator('AND');
$query_querystring->setQueryString($params->keywords);
if($params->{'language'}) {
$fields = array();
foreach($params->{'language'} as $language) {
$fields[] = '*_' . $language . '.symphony_fulltext';
}
$query_querystring->setFields($fields);
} else {
$query_querystring->setFields(array('*.symphony_fulltext'));
}
$query = new Elastica_Query($query_querystring);
// returns loads. let's say we search for "romeo" and there are hundreds of lines that contain
// romeo but also the play title "romeo and juliet", the first 10 or 20 results might just be script lines
// containing "romeo", so the play title will not be included. so return a big chunk of hits to give a
// better chance of more different terms being in the result. a tradeoff of speed/hackiness over usefulness.
$query->setLimit(1000);
$search = new Elastica_Search(ElasticSearch::getClient());
$search->addIndex(ElasticSearch::getIndex());
$filter = new Elastica_Filter_Terms('_type');
// build an array of all valid section handles that have mappings
$all_mapped_sections = array();
$section_full_names = array();
foreach(ElasticSearch::getAllTypes() as $type) {
if(count($params->{'default-sections'}) > 0 && !in_array($type->section->get('handle'), $params->{'default-sections'})) continue;
$all_mapped_sections[] = $type->section->get('handle');
// cache an array of section names indexed by their handles, quick lookup later
$section_full_names[$type->section->get('handle')] = $type->section->get('name');
}
$sections = array();
// no specified sections were sent in the params, so default to all available sections
if($params->sections === NULL) {
$sections = $all_mapped_sections;
}
// otherwise filter out any specified sections that we don't have mappings for, in case
// a user has made a typo or someone is tampering with the URL params
else {
foreach($params->sections as $handle) {
if(!in_array($handle, $all_mapped_sections)) continue;
$sections[] = $handle;
}
}
//$autocomplete_fields = array();
$highlights = array();
foreach($sections as $section) {
$filter->addTerm($section);
$mapping = json_decode(ElasticSearch::getTypeByHandle($section)->mapping_json, FALSE);
// find fields that have symphony_highlight
foreach($mapping->{$section}->properties as $field => $properties) {
if(!$properties->fields->symphony_autocomplete) continue;
//$autocomplete_fields[] = $field;
$highlights[] = array($field => (object)array());
}
}
//$autocomplete_fields = array_unique($autocomplete_fields);
$query->setFilter($filter);
$query->setHighlight(array(
'fields' => $highlights,
// encode any HTML attributes or entities, ensures valid XML
'encoder' => 'html',
// number of characters of each fragment returned
'fragment_size' => 100,
// how many fragments allowed per field
'number_of_fragments' => 3,
// custom highlighting tags
'pre_tags' => array('<strong>'),
'post_tags' => array('</strong>')
));
// run the entry search
$entries_result = $search->search($query);
$xml = new XMLElement($this->dsParamROOTELEMENT, NULL, array(
'took' => $entries_result->getResponse()->getEngineTime() . 'ms'
));
$words = array();
foreach($entries_result->getResults() as $data) {
foreach($data->getHighlights() as $field => $highlight) {
foreach($highlight as $html) {
$words[] = $html;
}
}
}
$words = array_unique($words);
$xml_words = new XMLElement('words');
foreach($words as $word) {
$raw = General::sanitize(strip_tags($word));
$highlighted = General::sanitize($word);
$xml_word = new XMLElement('word');
$xml_word->appendChild(new XMLElement('raw', $raw));
$xml_word->appendChild(new XMLElement('highlighted', $highlighted));
$xml_words->appendChild($xml_word);
}
$xml->appendChild($xml_words);
return $xml;
}
}
| churchdeploy/churchdeploy | extensions/elasticsearch/data-sources/data.elasticsuggest.php | PHP | mit | 6,073 |
<span class="mobile btn-mobile-menu">
<i class="icon icon-list btn-mobile-menu__icon"></i>
<i class="icon icon-x-circle btn-mobile-close__icon hidden"></i>
</span>
<header class="panel-cover" style="background-image: url({{ "images/cover.jpg" | prepend: site.baseurl }})">
<div class="panel-main">
<div class="panel-main__inner panel-inverted">
<div class="panel-main__content">
<a href="{{ site.baseurl }}" title="link to home of {{ site.title }}">
<img src="{{ "images/profile.jpg" | prepend: site.baseurl }}" class="user-image" alt="My Profile Photo">
<h1 class="panel-cover__title panel-title">{{ site.title }}</h1>
</a>
<hr class="panel-cover__divider">
<p class="panel-cover__description">{{ site.description }}</p>
<hr class="panel-cover__divider panel-cover__divider--secondary">
<div class="navigation-wrapper">
<nav class="cover-navigation cover-navigation--primary">
<ul class="navigation">
<li class="navigation__item"><a href="{{ site.baseurl }}#blog" title="link to {{ site.title }} blog" class="blog-button">Blog</a></li>
</ul>
</nav>
<nav class="cover-navigation cover-navigation--primary">
<ul class="navigation">
<li class="navigation__item"><a href="{{ site.baseurl }}tags" title="link to {{ site.title }} tags" class="blog-button">Tags</a></li>
</ul>
</nav>
<nav class="cover-navigation navigation--social">
<ul class="navigation">
{% if site.author.twitter_username %}
<!-- Twitter -->
<li class="navigation__item navigation--social">
<a href="http://twitter.com/{{ site.author.twitter_username }}" title="@{{ site.author.twitter_username }} on Twitter" target="_blank">
<i class="icon icon-social-twitter"></i>
<span class="label">Twitter</span>
</a>
</li>
{% endif %}
{% if site.author.lastfm_username %}
<!-- Facebook -->
<li class="navigation__item">
<a href="http://last.fm/{{ site.author.lastfm_username }}" title="{{ site.author.lastfm_username }} on Last.fm" target="_blank">
<i class="icon icon-social-lastfm"></i>
<span class="label">Last.fm</span>
</a>
</li>
{% endif %}
{% if site.author.spotify_username %}
<!-- Facebook -->
<li class="navigation__item">
<a href="http://spotify.com/{{ site.author.spotify_username }}" title="{{ site.author.spotify_username }} on Spotify" target="_blank">
<i class="icon icon-social-spotify"></i>
<span class="label">Spotify</span>
</a>
</li>
{% endif %}
{% if site.author.flickr_username %}
<!-- Facebook -->
<li class="navigation__item">
<a href="http://flickr.com/photos/{{ site.author.flickr_username }}" title="{{ site.author.flickr_username }} on Flickr" target="_blank">
<i class="icon icon-social-flickr"></i>
<span class="label">Flickr</span>
</a>
</li>
{% endif %}
{% if site.author.linkedin_username %}
<!-- LinkedIn -->
<li class="navigation__item">
<a href="https://www.linkedin.com/in/{{ site.author.linkedin_username }}" title="{{ site.author.linkedin_username }} on LinkedIn" target="_blank">
<i class="icon icon-social-linkedin"></i>
<span class="label">LinkedIn</span>
</a>
</li>
{% endif %}
{% if site.author.github_username %}
<!-- GitHub -->
<li class="navigation__item">
<a href="https://www.github.com/{{ site.author.github_username }}" title="{{ site.author.github_username }} on GitHub" target="_blank">
<i class="icon icon-social-github"></i>
<span class="label">GitHub</span>
</a>
</li>
{% endif %}
{% if site.author.email %}
<!-- Email -->
<li class="navigation__item">
<a href="mailto:{{ site.author.email }}" title="Email {{ site.author.email }}" target="_blank">
<i class="icon icon-mail"></i>
<span class="label">Email</span>
</a>
</li>
{% endif %}
<!-- RSS -->
<li class="navigation__item">
<a href="{{ "feed.xml" | prepend: site.baseurl }}" title="Subscribe" target="_blank">
<i class="icon icon-rss"></i>
<span class="label">RSS</span>
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="panel-cover--overlay"></div>
</div>
</header>
| jamesdmorgan/jamesdmorgan.github.io | _includes/header.html | HTML | mit | 5,161 |
var BoardVo = require(_path.src + "/vo/BoardVo.js");
var BoardDao = require(_path.src + "/dao/BoardDao.js");
var RoleDao = require(_path.src + "/dao/RoleDao.js");
module.exports.board = function($, el, param, req, next)
{
var template = this.getTemplate($, el);
BoardDao.getBoard(param.id, function(board)
{
$(el).html(template(board));
next();
});
};
module.exports.boardList = function($, el, param, req, next)
{
var vo = new BoardVo();
if(req.session.user != null)
{
vo.signinUserId = req.session.user.id;
vo.signinUserLevel = req.session.user.level;
}
var template = this.getTemplate($, el);
BoardDao.getBoardList(vo, function(boardList)
{
RoleDao.getRoleList(function(roleList)
{
$(el).html(template({boardList : boardList, roleList : roleList}));
next();
});
});
}; | tonite31/Imboard | src/module/BoardModule.js | JavaScript | mit | 807 |
<div class="col-md-9" style="float:right;background-color:#000;">
<!-- Top part of the slider -->
<div class="row">
<div class="col-md-12">
<h1><?php echo $promotion_detail[0]['promotion_title'] ?></h1>
<p>
<span>เผยแพร่เมื่อ </span>
<span><?php echo $promotion_detail[0]['promotion_date'] ?></span>
</p>
<img class="img-responsive" src="<?php echo base_url() ?>image/promotion/<?php echo $promotion_detail[0]['promotion_image'] ?>"/>
<span></span><?php echo $promotion_detail[0]['promotion_detail'] ?></span>
</div>
</div>
</div>
| WorkerCamp/iCarStyle | application/views/widget/promotion-detail.php | PHP | mit | 617 |
package closure
import (
"fmt"
)
func wrapper() func() int {
x := 0
increment := func() int {
x++ //x is enclosed in inner block scope to reduce the scope of x being used at block level only. Hence the closure
return x
}
return increment
}
func bye() {
fmt.Println("good bye")
}
func IncrementTest() {
defer bye() //defer keyword is used to defer(delay till function exit) when this func ends. Handy when file needs to be closed e.g : defer.fileclose
incrementer := wrapper()
fmt.Println(incrementer())
fmt.Println(incrementer())
}
| ashkrishan/golangTest | test1/closure/wrap.go | GO | mit | 551 |
<!DOCTYPE html>
<html>
<head>
<title>simple_chrome_server example</title>
</head>
<body>
<div id="webview">
<webview id="foo" style="width:640px; height:480px"></webview>
</div>
<script type="application/dart" src="index.dart"></script>
</body>
</html>
| damondouglas/chrome_server.dart | example/index.html | HTML | mit | 260 |
//
// CDDTopScrollView.h
// BaseProject
//
// Created by 曹冬冬 on 2017/4/6.
// Copyright © 2017年 曹冬冬. All rights reserved.
//
#import <UIKit/UIKit.h>
@class CDDTopScrollView;
@protocol CDDTopScrollViewDelegate <NSObject>
- (void)topScrollView:(CDDTopScrollView *)topScrollView didSelectTitleAtIndex:(NSInteger)index;
@end
@interface CDDTopScrollView : UIScrollView
/** Delegate */
@property (nonatomic, weak) id<CDDTopScrollViewDelegate> delegate_TS;
/**
* 对象方法创建
*
* @param frame frame
* @param delegate delegate
* @param childVcTitle 子控制器标题数组
* @param isScaleText 是否开启文字缩放功能;默认不开启
*/
- (instancetype)initWithFrame:(CGRect)frame delegate:(id<CDDTopScrollViewDelegate>)delegate childVcTitle:(NSArray *)childVcTitle isScaleText:(BOOL)isScaleText;
/**
* 类方法创建
*
* @param frame frame
* @param delegate delegate
* @param childVcTitle 子控制器标题数组
* @param isScaleText 是否开启文字缩放功能;默认不开启
*/
+ (instancetype)segmentedControlWithFrame:(CGRect)frame delegate:(id<CDDTopScrollViewDelegate>)delegate childVcTitle:(NSArray *)childVcTitle isScaleText:(BOOL)isScaleText;
- (void)changeThePositionOfTheSelectedBtnWithScrollView:(UIScrollView *)scrollView;
@end
| CDDApple/CDDBaseProject | BaseProject/BaseProject/Expand(拓展)/Library(库)/Custom/CDDScrollView/CDDTopScrollView.h | C | mit | 1,367 |
---
date: 2016-09-17T00:00:00Z
mac_app_desc: Make and install a set of icons for an iOS, Mac or Apple Watch app in
just 3 steps.
mac_app_image: /icons/IconBuilder128.png
mac_app_name: Icon Builder
tags:
- icons
- mac
title: How much work does Icon Builder save you?
---
[Icon Builder][1] is a Mac app that takes a single image file and creates all
the different image sizes that you need to make a set of icons for your app:
Mac, iPhone, iPad, iOS Universal or Apple Watch.
Version 4, released 16 September 2016 is available through the [Mac App
Store][2].
## What's New in Version 4:
* Added support for iMessage apps and Sticker Pack apps.
* Added support for creating Mac .icns files.
* Better removal of alpha channel for Apple Watch icons.
* Clearer usage instructions in ReadMe files.
* iTunes Artwork folders will no longer be over-written with the latest image
files.
* Supports macOS Sierra and Xcode 8
![Icon Builder][3]
While working on version 4 and accommodating all these new icon sets (and
wishing I had the time to re-write the app in Swift...), I counted up all the
icon files that Icon Builder makes for each app type:
| App Type | Number of Icons |
| :---------------------------------------- | --------------: |
| Mac | 10 |
| iPhone | 8 |
| iPhone supporting pre iOS 7 | 11 |
| iPad | 9 |
| iPad supporting pre iOS 7 | 13 |
| iOS Universal | 14 |
| iOS Universal supporting pre iOS 7 | 20 |
| Apple Watch (also requires iOS app icons) | 8 |
| Sticker Pack app | 11 |
| iMessages app | 14 |
| iMessages app Messages extension | 9 |
So as you can see, Icon Builder is doing a lot of work for you. It also names
all the icon files using the expected format, stores them in an concept folder,
creates the JSON file that identifies them all to Xcode and optionally installs
them in your Xcode project automatically. That’s a lot of value for dragging in
an icon and clicking a button!
So next time your designer sends you the twentieth tweaked icon for the day,
don't get mad. Just drop it into Icon Builder and sit back while it does all the
work. (No need to tell the designer that...)
[1]: /icon-builder/
[2]: https://itunes.apple.com/app/icon-builder/id552293482
[3]: /images/IconBuilder.png
| trozware/trozware.github.io | content/post/2016/how-much-work-does-icon-builder-save-you.md | Markdown | mit | 2,645 |
export type FormItem = {
label?: string;
type: 'string';
default: string | null;
hidden?: boolean;
multiline?: boolean;
} | {
label?: string;
type: 'number';
default: number | null;
hidden?: boolean;
step?: number;
} | {
label?: string;
type: 'boolean';
default: boolean | null;
hidden?: boolean;
} | {
label?: string;
type: 'enum';
default: string | null;
hidden?: boolean;
enum: string[];
} | {
label?: string;
type: 'array';
default: unknown[] | null;
hidden?: boolean;
};
export type Form = Record<string, FormItem>;
| syuilo/Misskey | src/client/scripts/form.ts | TypeScript | mit | 545 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.