answer
stringlengths
15
1.25M
# -*- coding: utf-8 -*- Imports # Standard Library # Third-Party import matplotlib.pyplot as pyplot # Package / Application from .core import rc_to_radius def radius_plot(rcd_list, die_xy, center_rc): """ Plots up data by radius """ # rc_to_radius x_data = [] y_data = [] for rcd in rcd_list: x_data.append(rc_to_radius((rcd[0], rcd[1]), die_xy, center_rc)) y_data.append(rcd[2]) pyplot.figure() pyplot.plot(x_data, y_data, 'bo') pyplot.xlabel("Radius") pyplot.ylabel("Value") pyplot.show() def main(): """ Runs only when module is called directly. Runs a quick sanity check on some of the functions in this module. """ import random die_xy = (2.43, 3.3) center_rc = (24, 31.5) fake_rcd_list = [] for row in range(30): for col in range(54): value = (random.normalvariate(10, 5) + rc_to_radius((row, col), die_xy, center_rc)) fake_rcd_list.append([row, col, value]) radius_plot(fake_rcd_list, die_xy, center_rc) # random.gauss() if __name__ == "__main__": main()
uid: SolidEdgePart.PartDocument.<API key> summary: This method&nbsp;will turn ON reflective plane command which is similar to checked box at ribbon bar of Inspect Tab in Solid Edge UI. remarks:
<?php function mk_news_loop($atts, $current) { global $post; extract($atts); global $mk_options; $grid_width = $mk_options['grid_width']; $content_width = $mk_options['content_width']; $post_style = get_post_meta($post->ID, '_news_post_style', true); $terms = get_the_terms(get_the_id(), 'news_category'); $terms_slug = array(); $terms_name = array(); if (is_array($terms)) { foreach ($terms as $term) { $terms_slug[] = $term->slug; $terms_name[] = $term->name; } } switch ($post_style) { case 'full-with-image': if ($layout == 'full') { $image_width = round($grid_width - 55); } else { $image_width = round((($content_width / 100) * $grid_width) - 66); } break; case 'full-without-image': if ($layout == 'full') { $image_width = round($grid_width - 66); } else { $image_width = round((($content_width / 100) * $grid_width) - 66); } break; case 'half-with-image': $image_width = 537; break; case 'half-without-image': $image_width = 537; break; case 'fourth-with-image': $image_width = 262; break; case '<API key>': $image_width = 262; default: } $output = '<article id="' . get_the_ID() . '" style="height:' . ($image_height + 2) . 'px" class="mk-news-item news-'.$item_id.' mk-isotop-item news-' . $post_style . '">'; switch ($post_style) { case 'full-with-image': $image_src_array = <API key>(<API key>(), 'full', true); $image_src = bfi_thumb($image_src_array[0], array( 'width' => $image_width, 'height' => $image_height )); if (has_post_thumbnail()) { $output .= '<img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . <API key>($image_src, $image_width, $image_height) . '" itemprop="image" />'; } $output .= '<span class="news-date">' . get_the_date() . '</span>'; $output .= '<div class="news-meta-wrapper">'; $output .= '<div class="news-categories"><span>' . implode(' ', $terms_name) . '</span></div>'; $output .= '<div class="clearboth"></div>'; $output .= '<div class="news-the-title"><span><a href="' . get_permalink() . '">' . get_the_title() . '</a></span></div>'; $output .= '</div>'; break; case 'full-without-image': $output .= '<div class="news-meta-wrapper">'; $output .= '<div class="news-categories"><span>' . implode(' ', $terms_name) . '</span></div>'; $output .= '<div class="clearboth"></div>'; $output .= '<div class="news-the-title"><span><a href="' . get_permalink() . '">' . get_the_title() . '</a></span></div>'; $output .= '<span class="news-date">' . get_the_date() . '</span>'; $output .= '</div>'; $output .= '<div class="the-excerpt"><p>' . get_the_excerpt() . '</p></div>'; $output .= '<a href="' . get_permalink() . '" class="mk-read-more">' . __('Read more', 'mk_framework') . '<i class="<API key>"></i></a>'; break; case 'half-with-image': $image_src_array = <API key>(<API key>(), 'full', true); $image_src = bfi_thumb($image_src_array[0], array( 'width' => $image_width, 'height' => $image_height )); if (has_post_thumbnail()) { $output .= '<img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . <API key>($image_src, $image_width, $image_height) . '" itemprop="image" />'; } $output .= '<span class="news-date">' . get_the_date() . '</span>'; $output .= '<div class="news-meta-wrapper">'; $output .= '<div class="news-categories"><span>' . implode(' ', $terms_name) . '</span></div>'; $output .= '<div class="clearboth"></div>'; $output .= '<div class="news-the-title"><span><a href="' . get_permalink() . '">' . get_the_title() . '</a></span></div>'; $output .= '</div>'; break; case 'half-without-image': $output .= '<div class="news-meta-wrapper">'; $output .= '<div class="news-categories"><span>' . implode(' ', $terms_name) . '</span></div>'; $output .= '<div class="clearboth"></div>'; $output .= '<div class="news-the-title"><span><a href="' . get_permalink() . '">' . get_the_title() . '</a></span></div>'; $output .= '<span class="news-date">' . get_the_date() . '</span>'; $output .= '<div class="clearboth"></div>'; $output .= '</div>'; $output .= '<div class="the-excerpt"><p>' . get_the_excerpt() . '</p></div>'; $output .= '<a href="' . get_permalink() . '" class="mk-read-more">' . __('Read more', 'mk_framework') . '<i class="<API key>"></i></a>'; break; case 'fourth-with-image': $image_src_array = <API key>(<API key>(), 'full', true); $image_src = bfi_thumb($image_src_array[0], array( 'width' => $image_width, 'height' => $image_height )); if (has_post_thumbnail()) { $output .= '<img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . <API key>($image_src, $image_width, $image_height) . '" itemprop="image" />'; } $output .= '<span class="news-date">' . get_the_date() . '</span>'; $output .= '<div class="news-meta-wrapper">'; $output .= '<div class="news-categories"><span>' . implode(' ', $terms_name) . '</span></div>'; $output .= '<div class="clearboth"></div>'; $output .= '<div class="news-the-title"><span><a href="' . get_permalink() . '">' . get_the_title() . '</a></span></div>'; $output .= '</div>'; break; case '<API key>': $output .= '<div class="news-meta-wrapper">'; $output .= '<div class="news-categories"><span>' . implode(' ', $terms_name) . '</span></div>'; $output .= '<div class="clearboth"></div>'; $output .= '<div class="news-the-title"><span><a href="' . get_permalink() . '">' . get_the_title() . '</a></span></div>'; $output .= '<span class="news-date">' . get_the_date() . '</span>'; $output .= '</div>'; $output .= '<div class="the-excerpt"><p>' . get_the_excerpt() . '</p></div>'; $output .= '<a href="' . get_permalink() . '" class="mk-read-more">' . __('Read more', 'mk_framework') . '<i class="<API key>"></i></a>'; default: } $output .= '</article>'; return $output; }
package com.bruxelas.controllers; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.fasterxml.jackson.databind.ObjectMapper; @RestController @RequestMapping("/") public class DashRestController { private static final Logger logger = LoggerFactory.getLogger(DashRestController.class); @RequestMapping(produces=MediaType.<API key>) public ResponseEntity<String> get(){ logger.info( "get()..." ); ResponseEntity<String> responseEntity = null; try { String welcome = "Welcome Bruxelas Project 1.0.20170327"; HttpHeaders responseHeaders = new HttpHeaders(); String usuariosJson = new ObjectMapper().writeValueAsString(welcome); responseEntity = new ResponseEntity<String>(usuariosJson, responseHeaders, HttpStatus.OK); } catch (Exception e) { logger.error(e.getMessage()); return ResponseEntity.status(HttpStatus.<API key>).body(e.getMessage()); } return responseEntity; } }
<html><body> <h4>Windows 10 x64 (18363.657)</h4><br> <h2>_MMCLONE_HEADER</h2> <font face="arial"> +0x000 NumberOfPtes : Uint8B<br> +0x008 <API key> : Uint8B<br> +0x010 ClonePtes : Ptr64 <a href="./_MMCLONE_BLOCK.html">_MMCLONE_BLOCK</a><br> +0x018 Partition : Ptr64 <a href="./_MI_PARTITION.html">_MI_PARTITION</a><br> </font></body></html>
{% extends "base.html" %} {% load staticfiles %} {% block title %}The City of Chicago sells vacant residential lots for $1 through the Large Lot Program.{% endblock %} {% block extra_css %} <style id="map-styles"> #parcels { polygon-fill: #6ac682; polygon-opacity: 0.7; line-color: #389250; line-width: 0.5; line-opacity: 1; } </style> <style id="map-styles-sold"> #sold_parcels { polygon-fill: #A1285D; polygon-opacity: 0.7; line-color: #680D35; line-width: 0.5; line-opacity: 1; } </style> <style id="map-styles-applied"> #applied_parcels { polygon-fill: #bf5b2c; polygon-opacity: 0.7; line-color: #bf452c; line-width: 0.5; line-opacity: 1; } </style> {% endblock %} {% block content %} <div class='col-md-12'> <br /> <div class='row'> <div class='col-md-12'> <h3>The City of Chicago sells vacant residential lots for <strong>$1</strong> through the Large Lot Program.</h3> </div> </div> <hr> <div class='row'> {% if sold_count %} <div class='col-md-3 text-center'> <div class="panel panel-default panel-counter"> <div class="panel-heading lead">Total lots sold</div> <div class="panel-body"> <strong><span class="counter">{{sold_count}}</span></span></strong> </div> </div> </div> {% endif %} <div class='col-md-9'> {% if current_count is None or sold_count is None %} <div class='alert alert-info'><p class='lead'>We currently cannot load the correct lot counts! Please try again momentarily.</p></div> {% endif %} {% if application_active %} <p class='lead'>There are currently <strong>{% if current_count is not None %}{{current_count}}{% endif %}</strong> lots available to buy. Applications will be accepted through <strong>{{ end_date }}</strong>. We have received <strong>{{ application_count }} applications</strong> so far this round. <a href="{% url 'apply' %}" >Apply for up to two lots &raquo;</a></p> <p class='lead'>You can also explore the map below to learn about sold and available lots.</p> <p><a href="{% url 'apply' %}" class='btn btn-success'>Apply now &raquo;</a></p> {% else %} <h3><strong>For information on the next Large Lots application round, please check back in early 2019.</strong></h3> <p class='lead'>Explore the map below of lots sold, available, and under review.</p> {% endif %} </div> </div> <br> <div class="row"> <div class="col-md-12"> <p> <form class='form-inline hidden-print' id='lot-form'> <div class="form-group"> <input class='form-control input' id='search_address' placeholder='Enter your address' type='text' /> <button class='btn btn-primary btn-sm' id='search'><i class="fa fa-search" aria-hidden="true"></i> Search</button> <a href="{% url 'home' %}" class='btn btn-default btn-sm'><i class="fa fa-repeat" aria-hidden="true"></i> Reset</a> </div> <div class="form-group"> <label class='checkbox-inline'> <input id="sold" data-type='sold' class="toggle-parcels checkbox" type="checkbox" checked=true /> <span class="label label-sold">Sold</span> </label> <label class='checkbox-inline'> <input id="current" data-type='current' class="toggle-parcels checkbox" type="checkbox" checked=true /> <span class="label label-current">Available</span> </label> <label class='checkbox-inline'> <input id="applied" data-type='applied' class="toggle-parcels checkbox" type="checkbox" checked=true /> <span class="label label-applied"> {% if application_active %}<span class='hidden-xs'>Applications</span> Received {% else %}<span>Sale Pending</span>{% endif %} </span> </label> </div> </form> </p> </div> </div> <div class='row'> <div class='col-md-8'> <div id='map'></div> </div> <div class='col-md-4'> <div class='well' id='lot-info'> <p>To get started:</p> <ol> <li>Enter your address</li> <li>View lots near you</li> {% if application_active %} <li>Filter for <span class="badge badge-purple">sold</span> lots, currently <span class="badge badge-green">available</span> lots, and lots that have <span class="badge badge-orange">received applications</span></li> {% else %} <li>Filter for <span class="badge badge-purple">sold</span> lots, lots <span class="badge badge-green">available</span> in the most recent program, and lots with a <span class="badge badge-orange">sale pending</span></li> {% endif %} <li>Click on a lot for details</li> </ol> </div> </div> </div> </div> <!-- Modal --> <div class="modal fade" id="modalGeocode" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-body"> <p><strong id='addr_search_modal'></strong> is not in the Large Lots program area. Please try again.</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">OK, thanks</button> </div> </div> </div> </div> {% endblock %} {% block extra_js %} <script type="infowindow/html" id="infowindow_template"> <div class="cartodb-popup"> <a href="#close" class="<API key> close">x</a> <div class="<API key>"> <div class="<API key>"> <h4>{{content.data.street_number}} {{content.data.street_dir}} {{content.data.street_name}} {{content.data.street_type}}</h4> <p>PIN: {{content.data.pin14}}<br /> Zoned: {{content.data.<API key>}}<br /> Sq Ft: {{content.data.sq_ft}}<br /> Alderman: (Ward {{content.data.ward}})</p> </div> </div> <div class="<API key>"></div> </div> </script> <script type="text/javascript" src="https://maps.google.com/maps/api/js?libraries=places&v=3.32&key=<Google Api>"></script> <script src="{% static 'js/lib/jquery.address.js' %}"></script> <script src="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/cartodb.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/waypoints/2.0.3/waypoints.min.js"></script> <script src="{% static 'js/lib/jquery.counterup.min.js' %}"></script> <script src="{% static 'js/lib/leaflet.label.js' %}" type="text/javascript"></script> <script src="{% static 'js/lib/leaflet-google.js' %}" ></script> <script src="{% static 'js/largelots_mapmaker.js' %}"></script> <script> var pins_under_review = "{{pins_under_review|safe}}".replace('{', '').replace('}', ''); var pins_sold = "{{pins_sold|safe}}".replace('{', '').replace('}', ''); $(function() { // The main SQL clause finds pins available in the most recent LargeLots cycle. // The extra layers find: pins sold in previous cycles + pins sold in most recent cycle and pins under review. var init_params = { map_centroid: [41.7872, -87.6345], defaultZoom: 11, cartodb_table: '{{ cartodb_table }}', mainWhere: " where pin_nbr not in (" + pins_sold + ") and pin_nbr not in (" + pins_under_review + ")", overlayName: "<API key> WHERE community = '{{ boundaries }}'", fields: 'pin, pin_nbr, street_name, street_direction, street_type, ward, square_feet, zone_class, community', extra_sublayers: [ { sql: "(select cartodb_id, the_geom, <API key>, pin, pin_nbr, street_name, street_direction, street_type, ward::int, community from all_sold_lots) UNION ALL (select cartodb_id, the_geom, <API key>, pin, pin_nbr, street_name, street_direction, street_type, ward::int, community from {{ cartodb_table }} where pin_nbr in (" + pins_sold + "))", cartocss: $('#map-styles-sold').html().trim(), interactivity: 'pin, pin_nbr, street_name, street_direction, street_type, ward, community', }, { sql: "select * from {{ cartodb_table }} where pin_nbr in (" + pins_under_review + ")", cartocss: $('#map-styles-applied').html().trim(), interactivity: 'pin, pin_nbr, street_name, street_direction, street_type, ward, square_feet, zone_class, community', }] } LargeLots.getOneParcel = function(pin_nbr){ if (LargeLots.lastClickedLayer){ LargeLots.map.removeLayer(LargeLots.lastClickedLayer); } var sql = new cartodb.SQL({user: 'datamade', format: 'geojson'}); // Query both Carto layers: current and sold. sql.execute('select * from ' + LargeLots.cartodb_table + ' where pin_nbr=' + pin_nbr + '::VARCHAR') .done(function(data){ if (typeof data.features[0] != 'undefined') { LargeLots.createParcelShape(data); } }).error(function(e){console.log(e)}); sql.execute('select * from ' + 'all_sold_lots' + ' where pin_nbr=' + pin_nbr + '::VARCHAR') .done(function(data){ if (typeof data.features[0] != 'undefined') { LargeLots.createParcelShape(data); } }).error(function(e){console.log(e)}); window.location.hash = 'browse'; }; LargeLots.createParcelInfo = function(props) { var address = LargeLots.formatAddress(props); var pin_formatted = LargeLots.formatPin(props.pin_nbr); var info = "<div class='row'><div class='col-xs-6 col-md-12'>\ <table class='table table-bordered table-condensed'><tbody>\ <tr><td>Address</td><td>" + address + "</td></tr>\ <tr><td>PIN</td><td>" + pin_formatted + " (<a target='_blank' href='http: info += "<tr><td>Community</td><td>" + props.community + "</td></tr>"; info += "<tr><td>Ward</td><td>" + props.ward + "</td></tr>"; if (props.zone_class){ info += "<tr><td>Zoned</td><td> Residential (<a href='http://secondcityzoning.org/zone/" + props.zone_class + "' target='_blank'>" + props.zone_class + "</a>)</td></tr>"; } if (props.square_feet){ info += "<tr><td>Sq ft</td><td>" + LargeLots.addCommas(Math.floor(props.square_feet)) + "</td></tr>"; } // Add colorful status labels if ((props.status == 'sold') || (pins_sold.indexOf(props.pin_nbr) >= 0)) { info += "<tr><td>Status</td><td><span class='badge badge-purple'>Sold</span></td></tr>"; } else { if (pins_under_review.indexOf(props.pin_nbr) >= 0) { if ('{{application_active}}' == 'True') { status = 'Application received' } else { status = 'Sale Pending' } info += "<tr><td>Status</td><td><span class='badge badge-orange'>" + status + "</span></td></tr>"; } else { info += "<tr><td>Status</td><td><span class='badge badge-green'>Available</span></td></tr>"; } } info += "</tbody></table></div><div class='col-xs-6 col-md-12'>\ <img class='img-responsive img-thumbnail' src='https://pic.datamade.us/" + props.pin_nbr + ".jpg' /></div></div>"; return info }; LargeLots.initialize(init_params); jQuery(document).ready(function($) { $('.counter').counterUp({ delay: 5, time: 1000 }); }); }); var autocomplete = new google.maps.places.Autocomplete(document.getElementById('search_address')); $("#search").on("click", LargeLots.addressSearch); $("#search_address").on("keydown", function(e){ if(e.keyCode == 13){ LargeLots.addressSearch(e); } }); $("#print-page").on("click", function(){ window.print(); }); </script> {% endblock %}
package kale.sharelogin.qq; import java.util.LinkedHashMap; import android.app.Activity; import android.content.Context; import android.support.annotation.NonNull; import com.tencent.connect.common.Constants; import com.tencent.tauth.IUiListener; import com.tencent.tauth.UiError; import org.json.JSONObject; import kale.sharelogin.LoginListener; import kale.sharelogin.OAuthUserInfo; import kale.sharelogin.ShareLoginLib; import kale.sharelogin.utils.IBaseListener; import kale.sharelogin.utils.UserInfoHelper; /** * @author Kale * @date 2018/9/11 */ class LoginHelper { static void parseLoginResp(Activity activity, Object object, @NonNull LoginListener listener) { JSONObject jsonObject = ((JSONObject) object); try { String token = jsonObject.getString(Constants.PARAM_ACCESS_TOKEN); String openId = jsonObject.getString(Constants.PARAM_OPEN_ID); String expires = jsonObject.getString(Constants.PARAM_EXPIRES_IN); listener.onReceiveToken(token, openId, Long.valueOf(expires), object.toString()); getUserInfo(activity.<API key>(), token, openId, listener); } catch (Exception e) { e.printStackTrace(); } } static void getUserInfo(Context context, final String accessToken, final String userId, LoginListener listener) { LinkedHashMap<String, Object> params = new LinkedHashMap<>(); params.put("access_token", accessToken); params.put("openid", userId); params.put("oauth_consumer_key", ShareLoginLib.getValue(QQPlatform.KEY_APP_ID)); params.put("format", "json"); UserInfoHelper.getUserInfo(context, "https://graph.qq.com/user/get_simple_userinfo", params, listener, jsonObj -> { OAuthUserInfo userInfo = new OAuthUserInfo(); userInfo.nickName = jsonObj.getString("nickname"); userInfo.sex = jsonObj.getString("gender"); userInfo.headImgUrl = jsonObj.getString("figureurl_qq_1"); userInfo.userId = userId; return userInfo; }); } abstract static class AbsUiListener implements IUiListener { private IBaseListener listener; AbsUiListener(IBaseListener listener) { this.listener = listener; } @Override public void onCancel() { listener.onCancel(); } /** * 110201 * 110405 * 110404appId * 110401 * 110407 * 110406 * 100044sign * 110500 * 110501 * 110502 * 110503token * 110504 */ @Override public void onError(UiError resp) { listener.onError("code:" + resp.errorCode + ", message:" + resp.errorMessage + ", detail:" + resp.errorDetail); } } }
# EPi.Libraries.<API key> [![Build status](https: [![GitHub version](https: [![Platform](https: [![Platform](https: ## Parts [Core functionality](EPi.Libraries.<API key>.Core/readme.md) [Mvc4 implementation](EPi.Libraries.<API key>.Mvc4/readme.md) [WebApi implementation](EPi.Libraries.<API key>.WebApi/readme.md)
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: <API key>("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("KnxRadio")] [assembly: AssemblyTrademark("")] // 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("<API key>")]
require File.expand_path('../boot', __FILE__) require "rails" # Pick the frameworks you want: require "active_model/railtie" require "active_job/railtie" require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" require "action_view/railtie" require "sprockets/railtie" # require "rails/test_unit/railtie" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module Livequizz class Application < Rails::Application config.i18n.<API key> = true config.generators do |generate| generate.helper false generate.javascript_engine false generate.request_specs false generate.routing_specs false generate.stylesheets false generate.test_framework :rspec generate.view_specs false end config.action_controller.<API key> = :raise
<!DOCTYPE HTML> <html> <head> <title>Tribe Test Suite</title> <link rel="stylesheet" href="Libraries/qunit.css" type="text/css" media="screen"> <script type="text/javascript" src="Libraries/json2.js"></script> <script type="text/javascript" src="Libraries/jquery-1.9.1.js"></script> <script type="text/javascript" src="Libraries/knockout-2.3.0.debug.js"></script> <script type="text/javascript" src="Libraries/knockout.validation.js"></script> <script type="text/javascript" src="Libraries/qunit.js"></script> <script type="text/javascript" src="Libraries/sinon.js"></script> <script type="text/javascript" src="Libraries/jquery.mockjax.js"></script> <script type="text/javascript" src="Libraries/Tribe.debug.js"></script> <script type="text/javascript" src="Libraries/Tribe.Forms.debug.js"></script> <script type="text/javascript" src="Build/tests.js"></script> </head> <body> <div id="qunit"></div> <div id="qunit-fixture"></div> </body> </html>
package domino.scala_osgi_metatype.adapters import org.osgi.service.metatype.{<API key> => <API key>, AttributeDefinition => <API key>} import domino.scala_osgi_metatype.interfaces.{<API key>, <API key>, <API key>} /** * Provides the given Scala object class definition as an OSGi-compliant object class definition. * * @constructor Creates an adapter for the given definition. * @param delegate Scala object class definition */ class <API key>(delegate: <API key>) extends <API key> { def <API key>(filter: Int): Array[<API key>] = { import <API key>._ val list = filter match { case REQUIRED => delegate.<API key> case OPTIONAL => delegate.<API key> case ALL => delegate.<API key> ++ delegate.<API key> } if (list.isEmpty) { null } else { list.map { case ed: <API key>[_] => new <API key>(ed) case ld: <API key>[_] => new <API key>(ld) }.toArray } } def getDescription = delegate.description def getIcon(size: Int) = delegate.getIcon(size).orNull def getID = delegate.id def getName = delegate.name }
#encoding:utf-8 require 'rest-client' class EventsController < <API key> def index @events = Event.includes(:user) end def show @event = Event.find(params[:id]) @participants = @event.participants.includes(:user) @comments = @event.comments.includes(:user) #@goods_amount = Foodie::Participant.where if signed_in? @plus_menu = [{name: t(:new_comment), path: <API key>(@event)}, {name: t(:new_participant), path: <API key>(@event)} ] if @participants.where(:user_id => current_user.id).size>0 @again = '' else @again = '' end end end def new @event = Event.new end def create @event = Event.new(event_params) @event.user = current_user uploaded_io = params[:file] if !uploaded_io.blank? extension = uploaded_io.original_filename.split('.') filename = "#{Time.now.strftime('%Y%m%d%H%M%S')}.#{extension[-1]}" filepath = "#{PIC_PATH}/events/#{filename}" File.open(filepath, 'wb') do |file| file.write(uploaded_io.read) end # event_params.merge!(:pic_url=>"/events/#{filename}") @event.pic_url = "/events/#{filename}" end # return render :text=> event_params if @event.save post_url = "http: # openids = User.plunk(:weixin_openid) openids = ["<API key>", "<API key>"] msgtype = "text" content = "#{@event.title}, " data_hash = { openids: openids, content: content, data: {msgtype: msgtype} } data_json = data_hash.to_json res_data_json = RestClient.post post_url, data_hash redirect_to event_url(@event), notice: '!' else render :new end end def edit @event = Event.find(params[:id]) end def update uploaded_io = params[:file] if !uploaded_io.blank? extension = uploaded_io.original_filename.split('.') filename = "#{Time.now.strftime('%Y%m%d%H%M%S')}.#{extension[-1]}" filepath = "#{PIC_PATH}/events/#{filename}" File.open(filepath, 'wb') do |file| file.write(uploaded_io.read) end event_params.merge!(:pic_url=>"/events/#{filename}") end @event = Event.find(params[:id]) if @event.update(event_params) redirect_to event_url(@event), notice: '' else render :edit end end def destroy @event = Event.find(params[:id]) @event.delete respond_to do |format| format.js end end private def set_event @event = event.find(params[:id]) end def event_params params.require(:event).permit(:title, :body,:end_time,:start_time,:event_type, :pic_url,:limited_people,:goods_big_than,:goods_small_than,:name,:mobile,:goods_unit,:price,:pic_url) end end
using System; using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Web; using Microsoft.WindowsAzure; namespace Hoardr.DeltaJob { public class AppSettings { public string <API key> { get; set; } public string <API key> { get; set; } public string DropboxApiSecret { get; set; } public string DropboxAccessToken { get; set; } public string <API key> { get; set; } public AppSettings() { <API key> = <API key>.GetSetting("azure:<API key>"); <API key> = <API key>.GetSetting("azure:InstrumentationKey"); DropboxApi<API key>.GetSetting("dropbox:ApiSecret"); DropboxAccess<API key>.GetSetting("dropbox:AccessToken"); <API key> = <API key>.GetSetting("dropbox:ApiBaseAddress"); } } }
@extends('layouts.app') @section('content') <div> <p> <a href="{{ url('admin/author/addnewauthor') }}" class="btn btn-primary">Add Author</a> </p> @if (count($authors) > 0) <div class="panel panel-primary"> <div class="panel-heading"> Authors </div> <div class="panel-body"> <table class="table table-bordered table-striped"> <thead> <th>Name</th> <th>Address</th> <th>City</th> <th>State</th> <th>Zip</th> <th>Email ID</th> <th>Phone</th> <th></th> </thead> <tbody> @for ($i = 0; $i < count($authors); $i++) <tr> <td>{{$authors[$i]['authorname']}}</td> <td>{{$authors[$i]['address']}}</td> <td>{{$authors[$i]['city']}}</td> <td>{{$authors[$i]['state']}}</td> <td>{{$authors[$i]['zip']}}</td> <td>{{$authors[$i]['email_id']}}</td> <td>{{$authors[$i]['phone']}}</td> <td> <ul class="list-inline list-unstyled"> <li> <a href="{{ url('admin/author/editauthor/'. $authors[$i]['id'])}}" class="btn btn-xs btn-link " title="Edit the author"> <i class="glyphicon glyphicon-edit"></i> </a> </li> <li> <form action="{{ url('admin/author/deleteauthor/') }}" method="POST"> {!! csrf_field() !!} <!-- {!! method_field('DELETE') !!} --> <input value="{{$authors[$i]['id']}}" name="authorId" type="hidden"> <button type="submit" class="btn btn-xs btn-link" title="Delete the author"> <i class="glyphicon glyphicon-remove"></i> </button> </form> </li> </ul> </td> </tr> @endfor </tbody> </table> </div> </div> @endif </div> @endsection
<!doctype html> <html> <head> <title>Bar Chart</title> <script src="js/ jquery-3.1.0.min.js"></script> <script src="js/Chart.min.js"></script> <style> canvas { -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; } </style> </head> <body> <div id="container" style="width: 75%;"> <canvas id="canvas"></canvas> </div> <button id="randomizeData">Randomize Data</button> <button id="addDataset">Add Dataset</button> <button id="removeDataset">Remove Dataset</button> <button id="addData">Add Data</button> <button id="removeData">Remove Data</button> <script> var MONTHS = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; var randomScalingFactor = function() { return (Math.random() > 0.5 ? 1.0 : -1.0) * Math.round(Math.random() * 100); }; var randomColorFactor = function() { return Math.round(Math.random() * 255); }; var randomColor = function() { return 'rgba(' + randomColorFactor() + ',' + randomColorFactor() + ',' + randomColorFactor() + ',.7)'; }; var barChartData = { labels: ["January", "February", "March", "April", "May", "June", "July"], datasets: [{ label: 'Dataset 1', backgroundColor: "rgba(220,220,220,0.5)", data: [randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor()] }, { hidden: true, label: 'Dataset 2', backgroundColor: "rgba(151,187,205,0.5)", data: [randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor()] }, { label: 'Dataset 3', backgroundColor: "rgba(151,187,205,0.5)", data: [randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor()] }] }; window.onload = function() { var ctx = document.getElementById("canvas").getContext("2d"); window.myBar = new Chart(ctx, { type: 'bar', data: barChartData, options: { // Elements options apply to all of the options unless overridden in a dataset // In this case, we are setting the border of each bar to be 2px wide and green elements: { rectangle: { borderWidth: 2, borderColor: 'rgb(0, 255, 0)', borderSkipped: 'bottom' } }, responsive: true, legend: { position: 'top', }, title: { display: true, text: 'Chart.js Bar Chart' } } }); }; $('#randomizeData').click(function() { var zero = Math.random() < 0.2 ? true : false; $.each(barChartData.datasets, function(i, dataset) { dataset.backgroundColor = randomColor(); dataset.data = dataset.data.map(function() { return zero ? 0.0 : randomScalingFactor(); }); }); window.myBar.update(); }); $('#addDataset').click(function() { var newDataset = { label: 'Dataset ' + barChartData.datasets.length, backgroundColor: randomColor(), data: [] }; for (var index = 0; index < barChartData.labels.length; ++index) { newDataset.data.push(randomScalingFactor()); } barChartData.datasets.push(newDataset); window.myBar.update(); }); $('#addData').click(function() { if (barChartData.datasets.length > 0) { var month = MONTHS[barChartData.labels.length % MONTHS.length]; barChartData.labels.push(month); for (var index = 0; index < barChartData.datasets.length; ++index) { //window.myBar.addData(randomScalingFactor(), index); barChartData.datasets[index].data.push(randomScalingFactor()); } window.myBar.update(); } }); $('#removeDataset').click(function() { barChartData.datasets.splice(0, 1); window.myBar.update(); }); $('#removeData').click(function() { barChartData.labels.splice(-1, 1); // remove the label first barChartData.datasets.forEach(function(dataset, datasetIndex) { dataset.data.pop(); }); window.myBar.update(); }); </script> </body> </html>
using Newtonsoft.Json; namespace NBAStatistics.Models.Models.Json { public class Resultset { [JsonProperty("name")] public string Name { get; set; } [JsonProperty("headers")] public string[] Headers { get; set; } [JsonProperty("rowset")] public object[][] RowSet { get; set; } } }
package com.brightdairy.personal.brightdairy; import android.app.Application; import com.brightdairy.personal.brightdairy.utils.GlobalConstants; import com.facebook.stetho.Stetho; public class MyApplication extends Application { @Override public void onCreate() { super.onCreate(); GlobalConstants.APPLICATION_CONTEXT = this; Stetho.<API key>(this); } }
<?xml version="1.0" ?><!DOCTYPE TS><TS language="de_AT" version="2.0"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Catchcoin Core</source> <translation type="unfinished"/> </message> <message> <location line="+39"/> <source>&lt;b&gt;Catchcoin Core&lt;/b&gt; version</source> <translation type="unfinished"/> </message> <message> <location line="+57"/> <source> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http: This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http: <translation type="unfinished"/> </message> <message> <location filename="../utilitydialog.cpp" line="+29"/> <source>Copyright</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The Catchcoin Core developers</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+30"/> <source>Double-click to edit address or label</source> <translation>Doppelklickn zan Editian vo Adress und Titl</translation> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation>Eazeig a neiche Adress</translation> </message> <message> <location line="+3"/> <source>&amp;New</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Copy the currently selected address to the system clipboard</source> <translation>Kopia di ausgwöhte Adress in&apos; Puffa</translation> </message> <message> <location line="+3"/> <source>&amp;Copy</source> <translation type="unfinished"/> </message> <message> <location line="+52"/> <source>C&amp;lose</source> <translation type="unfinished"/> </message> <message> <location filename="../addressbookpage.cpp" line="+74"/> <source>&amp;Copy Address</source> <translation>Adress &amp;Kopian</translation> </message> <message> <location filename="../forms/addressbookpage.ui" line="-41"/> <source>Delete the currently selected address from the list</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="-27"/> <source>&amp;Delete</source> <translation>&amp;Leschn</translation> </message> <message> <location filename="../addressbookpage.cpp" line="-30"/> <source>Choose the address to send coins to</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Choose the address to receive coins with</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>C&amp;hoose</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Sending addresses</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Receiving addresses</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>These are your Catchcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>These are your Catchcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Copy &amp;Label</source> <translation>&amp;Titl Kopian</translation> </message> <message> <location line="+1"/> <source>&amp;Edit</source> <translation>&amp;Ändan</translation> </message> <message> <location line="+194"/> <source>Export Address List</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Beistrich &apos;trennte Weate (*.csv)</translation> </message> <message> <location line="+13"/> <source>Exporting Failed</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>There was an error trying to save the address list to %1.</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+168"/> <source>Label</source> <translation>Titl</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Adress</translation> </message> <message> <location line="+36"/> <source>(no label)</source> <translation>nixda</translation> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation><API key></translation> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation>Gib dei Geheimwuat ei</translation> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation>Gib a neix Geheimwuat ei</translation> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation>Und des gleiche noamoi</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="+40"/> <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source> <translation>A neix Geheimwuat fias Beasl vagebn.&lt;br/&gt;Vawend dabei entweda &lt;b&gt;10 (oda mea) zufölliche Zeichn&lt;/b&gt; (oiso Buchstobn, Ziffan, Sondazeichn), oda &lt;b&gt;ocht (oda mea) gaunze Weata&lt;/b&gt;.</translation> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation>Vaschlissl &apos;s Beasl</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation>Dafia muasst dei Beasl mitm Geheimwuat aufspean.</translation> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation>Beasl aufspean</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation>Dafia musst des Beasl mitm Geheimwuat entschlissln.</translation> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation>Beasl entschlissln</translation> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation>Geheimwuat ändan</translation> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation>Gib des oite und des neiche Geheimwuat fias Beasl ei.</translation> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation><API key> bschtätign</translation> </message> <message> <location line="+1"/> <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR CATCHCOINS&lt;/b&gt;!</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+100"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation type="unfinished"/> </message> <message> <location line="-130"/> <location line="+58"/> <source>Wallet encrypted</source> <translation>Beasl is vaschlisslt</translation> </message> <message> <location line="-56"/> <source>Catchcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your catchcoins from being stolen by malware infecting your computer.</source> <translation>Catchcoin wiad si jetz vatschüssn um de Vaschlisselung obzschliaßn. Denk draun, doss di söbst de Vaschlisselung ned vua an Maleur schitzn kau, waunnst amoi a Ungeziefa (schadsoftware: viren, trojaner) auf dein Rechna host (oda losst).</translation> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+42"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation>Vaschlisselung vom Beasl is föhgschlogn</translation> </message> <message> <location line="-54"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation>Vaschlisselung vom Beasl is wegn an inteanen Föhla föhgschlogn. Bleede Gschicht. Jetz is&apos; immano unvaschlisslt.</translation> </message> <message> <location line="+7"/> <location line="+48"/> <source>The supplied passphrases do not match.</source> <translation>howined gsogd: &lt;b&gt;des gleiche&lt;b/&gt; noamoi?</translation> </message> <message> <location line="-37"/> <source>Wallet unlock failed</source> <translation>Beasl aufspean is föhgschlogn</translation> </message> <message> <location line="+1"/> <location line="+11"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation>Des Geheimwuat fias Beasl-Entschlissln woa owa sowos vo foisch.</translation> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation><API key> is föhgschlogn</translation> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation type="unfinished"/> </message> </context> <context> <name>CatchcoinGUI</name> <message> <location filename="../catchcoingui.cpp" line="+295"/> <source>Sign &amp;message...</source> <translation>A Mödung untaschreim...</translation> </message> <message> <location line="+335"/> <source>Synchronizing with network...</source> <translation>Obgleichn midm Netz...</translation> </message> <message> <location line="-407"/> <source>&amp;Overview</source> <translation>&amp;Iwasicht</translation> </message> <message> <location line="-137"/> <source>Node</source> <translation type="unfinished"/> </message> <message> <location line="+138"/> <source>Show general overview of wallet</source> <translation>Zeig de Gesaumt-Iwasicht iwa&apos;s Beasl</translation> </message> <message> <location line="+20"/> <source>&amp;Transactions</source> <translation>&amp;Iwaweisungen</translation> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation>Oite Iwaweisungen tscheckn</translation> </message> <message> <location line="+17"/> <source>E&amp;xit</source> <translation>&amp;baba</translation> </message> <message> <location line="+1"/> <source>Quit application</source> <translation>Baba und foi ned!</translation> </message> <message> <location line="+7"/> <source>Show information about Catchcoin</source> <translation>Zeig Infoamationen iwa Catchcoin</translation> </message> <message> <location line="+3"/> <location line="+2"/> <source>About &amp;Qt</source> <translation>Iwa &amp;Qt</translation> </message> <message> <location line="+2"/> <source>Show information about Qt</source> <translation>Zeig Infoamationen iwa Qt</translation> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation>&amp;Eistöllungen...</translation> </message> <message> <location line="+9"/> <source>&amp;Encrypt Wallet...</source> <translation>&apos;s &amp;Beasl vaschlissln...</translation> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation>&amp;Sicharungskopie vom Beasl mochn...</translation> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation>&amp;Geheimwuat ändan...</translation> </message> <message> <location line="+10"/> <source>&amp;Sending addresses...</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Receiving addresses...</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Open &amp;URI...</source> <translation type="unfinished"/> </message> <message> <location line="+325"/> <source>Importing blocks from disk...</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Reindexing blocks on disk...</source> <translation type="unfinished"/> </message> <message> <location line="-405"/> <source>Send coins to a Catchcoin address</source> <translation>Schick Zasta aun a Catchcoin Adress</translation> </message> <message> <location line="+49"/> <source>Modify configuration options for Catchcoin</source> <translation>Ända de Eistöllungen fia Catchcoin</translation> </message> <message> <location line="+12"/> <source>Backup wallet to another location</source> <translation>Moch a Sichaheitskopie woaundas hin</translation> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation>Des Geheimwuat fia <API key> ändan</translation> </message> <message> <location line="+6"/> <source>&amp;Debug window</source> <translation>&amp;Debug Fensta</translation> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation>Debug und Diagnose Konsole öffnen</translation> </message> <message> <location line="-4"/> <source>&amp;Verify message...</source> <translation>&amp;Untaschrift tscheckn...</translation> </message> <message> <location line="+430"/> <source>Catchcoin</source> <translation>Catchcoin</translation> </message> <message> <location line="-643"/> <source>Wallet</source> <translation>Beasl</translation> </message> <message> <location line="+146"/> <source>&amp;Send</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Receive</source> <translation type="unfinished"/> </message> <message> <location line="+46"/> <location line="+2"/> <source>&amp;Show / Hide</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show or hide the main Window</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Encrypt the private keys that belong to your wallet</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Sign messages with your Catchcoin addresses to prove you own them</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Verify messages to ensure they were signed with specified Catchcoin addresses</source> <translation type="unfinished"/> </message> <message> <location line="+48"/> <source>&amp;File</source> <translation>&amp;Datei</translation> </message> <message> <location line="+14"/> <source>&amp;Settings</source> <translation>&amp;Eistöllungen</translation> </message> <message> <location line="+9"/> <source>&amp;Help</source> <translation>&amp;Hüfe</translation> </message> <message> <location line="+15"/> <source>Tabs toolbar</source> <translation>Karteireita Werkzeigleistn</translation> </message> <message> <location line="-284"/> <location line="+376"/> <source>[testnet]</source> <translation>[testnetz]</translation> </message> <message> <location line="-401"/> <source>Catchcoin Core</source> <translation type="unfinished"/> </message> <message> <location line="+163"/> <source>Request payments (generates QR codes and catchcoin: URIs)</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <location line="+2"/> <source>&amp;About Catchcoin Core</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Show the list of used sending addresses and labels</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Show the list of used receiving addresses and labels</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Open a catchcoin: URI or payment request</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Command-line options</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show the Catchcoin Core help message to get a list with possible Catchcoin command-line options</source> <translation type="unfinished"/> </message> <message> <location line="+159"/> <location line="+5"/> <source>Catchcoin client</source> <translation>Catchcoin Klient</translation> </message> <message numerus="yes"> <location line="+142"/> <source>%n active connection(s) to Catchcoin network</source> <translation><numerusform>%n aktive Vabindung zum Netz</numerusform><numerusform>%n aktive Vabindungen zum Netz</numerusform></translation> </message> <message> <location line="+22"/> <source>No block source available...</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Processed %1 of %2 (estimated) blocks of transaction history.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Processed %1 blocks of transaction history.</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+23"/> <source>%n hour(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n week(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>%1 behind</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>Last received block was generated %1 ago.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Transactions after this will not yet be visible.</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Error</source> <translation>Föhla</translation> </message> <message> <location line="+3"/> <source>Warning</source> <translation>Pass auf</translation> </message> <message> <location line="+3"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="-85"/> <source>Up to date</source> <translation>Aktuö</translation> </message> <message> <location line="+34"/> <source>Catching up...</source> <translation>Aufhoin...</translation> </message> <message> <location line="+130"/> <source>Sent transaction</source> <translation>Iwaweisung oogschickt</translation> </message> <message> <location line="+0"/> <source>Incoming transaction</source> <translation>Iwaweisung aun dii</translation> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation>Waunn: %1 Wiavü: %2 Wos: %3 Wohin: %4 </translation> </message> <message> <location line="+69"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation>&apos;s Beasl is &lt;b&gt;vaschlisslt&lt;/b&gt; und deazeit grod &lt;b&gt;aufgschpeat&lt;/b&gt;</translation> </message> <message> <location line="+8"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source> <translation>&apos;s Beasl is &lt;b&gt;vaschlisslt&lt;/b&gt; und deazeit grod &lt;b&gt;zuagschpeat&lt;/b&gt;</translation> </message> <message> <location filename="../catchcoin.cpp" line="+438"/> <source>A fatal error occurred. Catchcoin can no longer continue safely and will quit.</source> <translation type="unfinished"/> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+119"/> <source>Network Alert</source> <translation>Netz Alarm</translation> </message> </context> <context> <name>CoinControlDialog</name> <message> <location filename="../forms/coincontroldialog.ui" line="+14"/> <source>Coin Control Address Selection</source> <translation type="unfinished"/> </message> <message> <location line="+34"/> <source>Quantity:</source> <translation>Quantität:</translation> </message> <message> <location line="+29"/> <source>Bytes:</source> <translation type="unfinished"/> </message> <message> <location line="+45"/> <source>Amount:</source> <translation>Betrog:</translation> </message> <message> <location line="+29"/> <source>Priority:</source> <translation type="unfinished"/> </message> <message> <location line="+45"/> <source>Fee:</source> <translation>Gebühr:</translation> </message> <message> <location line="+32"/> <source>Low Output:</source> <translation type="unfinished"/> </message> <message> <location line="+48"/> <source>After Fee:</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>Change:</source> <translation type="unfinished"/> </message> <message> <location line="+63"/> <source>(un)select all</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Tree mode</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>List mode</source> <translation type="unfinished"/> </message> <message> <location line="+52"/> <source>Amount</source> <translation>Betrog</translation> </message> <message> <location line="+10"/> <source>Address</source> <translation>Adress</translation> </message> <message> <location line="+5"/> <source>Date</source> <translation>Waunn</translation> </message> <message> <location line="+5"/> <source>Confirmations</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Confirmed</source> <translation>Bschtätigt</translation> </message> <message> <location line="+5"/> <source>Priority</source> <translation type="unfinished"/> </message> <message> <location filename="../coincontroldialog.cpp" line="+42"/> <source>Copy address</source> <translation>Adress in&apos; Puffa kopian</translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>Titl in&apos; Puffa kopian</translation> </message> <message> <location line="+1"/> <location line="+26"/> <source>Copy amount</source> <translation>Betrog in&apos; Puffa kopian</translation> </message> <message> <location line="-25"/> <source>Copy transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Lock unspent</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Unlock unspent</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>Copy quantity</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Copy fee</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy after fee</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy bytes</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy priority</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy low output</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy change</source> <translation type="unfinished"/> </message> <message> <location line="+323"/> <source>highest</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>higher</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>high</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>medium-high</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>medium</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>low-medium</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>low</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>lower</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>lowest</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>(%1 locked)</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>none</source> <translation type="unfinished"/> </message> <message> <location line="+140"/> <source>Dust</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>yes</source> <translation>ja</translation> </message> <message> <location line="+0"/> <source>no</source> <translation>nein</translation> </message> <message> <location line="+10"/> <source>This label turns red, if the transaction size is greater than 1000 bytes.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+5"/> <source>This means a fee of at least %1 per kB is required.</source> <translation type="unfinished"/> </message> <message> <location line="-4"/> <source>Can vary +/- 1 byte per input.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Transactions with higher priority are more likely to get included into a block.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>This label turns red, if any recipient receives an amount smaller than %1.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+4"/> <source>This means a fee of at least %1 is required.</source> <translation type="unfinished"/> </message> <message> <location line="-3"/> <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>This label turns red, if the change is smaller than %1.</source> <translation type="unfinished"/> </message> <message> <location line="+43"/> <location line="+66"/> <source>(no label)</source> <translation>nixda</translation> </message> <message> <location line="-9"/> <source>change from %1 (%2)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>(change)</source> <translation type="unfinished"/> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation>Adress ändan</translation> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation>&amp;Titl</translation> </message> <message> <location line="+10"/> <source>The label associated with this address list entry</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>The address associated with this address list entry. This can only be modified for sending addresses.</source> <translation type="unfinished"/> </message> <message> <location line="-10"/> <source>&amp;Address</source> <translation>&amp;Adress</translation> </message> <message> <location filename="../editaddressdialog.cpp" line="+28"/> <source>New receiving address</source> <translation>Neiche Empfaungsadress</translation> </message> <message> <location line="+4"/> <source>New sending address</source> <translation>Neiche Züü-Adress</translation> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation>Empfaungs-Adress ändan</translation> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation>Züü-Adress ändan</translation> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation>De eingebene Adress &quot;%1&quot; gibts eh scho im Adressbiachl.</translation> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid Catchcoin address.</source> <translation>De eingebane Adress &quot;%1&quot; is a Kas.</translation> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation>&apos;s Aufspean vom Beasl is föhgschlogn.</translation> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation>Neicha Schlissl hod ned eazeigt weadn kennan.</translation> </message> </context> <context> <name>FreespaceChecker</name> <message> <location filename="../intro.cpp" line="+65"/> <source>A new data directory will be created.</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>name</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Directory already exists. Add %1 if you intend to create a new directory here.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Path already exists, and is not a directory.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Cannot create data directory here.</source> <translation type="unfinished"/> </message> </context> <context> <name>HelpMessageDialog</name> <message> <location filename="../forms/helpmessagedialog.ui" line="+19"/> <source>Catchcoin Core - Command-line options</source> <translation type="unfinished"/> </message> <message> <location filename="../utilitydialog.cpp" line="+38"/> <source>Catchcoin Core</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>version</source> <translation>veasion</translation> </message> <message> <location line="+2"/> <source>Usage:</source> <translation>Vawendung:</translation> </message> <message> <location line="+1"/> <source>command-line options</source> <translation><API key></translation> </message> <message> <location line="+4"/> <source>UI options</source> <translation>UI Optionen</translation> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation>de Sproch, am Bestn &quot;de_AT&quot; (sunsta: de Standard-Sproch auf dera Maschin)</translation> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation>Mid minimiatn Fensta startn</translation> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation>Zeig a <API key> beim Starten (waunn ned aundas aungebm: 1)</translation> </message> <message> <location line="+1"/> <source>Choose data directory on startup (default: 0)</source> <translation type="unfinished"/> </message> </context> <context> <name>Intro</name> <message> <location filename="../forms/intro.ui" line="+14"/> <source>Welcome</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Welcome to Catchcoin Core.</source> <translation type="unfinished"/> </message> <message> <location line="+26"/> <source>As this is the first time the program is launched, you can choose where Catchcoin Core will store its data.</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Catchcoin Core will download and store a copy of the Catchcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Use the default data directory</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Use a custom data directory:</source> <translation type="unfinished"/> </message> <message> <location filename="../intro.cpp" line="+85"/> <source>Catchcoin</source> <translation>Catchcoin</translation> </message> <message> <location line="+1"/> <source>Error: Specified data directory &quot;%1&quot; can not be created.</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Error</source> <translation>Föhla</translation> </message> <message> <location line="+9"/> <source>GB of free space available</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>(of %1GB needed)</source> <translation type="unfinished"/> </message> </context> <context> <name>OpenURIDialog</name> <message> <location filename="../forms/openuridialog.ui" line="+14"/> <source>Open URI</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Open payment request from URI or file</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>URI:</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Select payment request file</source> <translation type="unfinished"/> </message> <message> <location filename="../openuridialog.cpp" line="+47"/> <source>Select payment request file to open</source> <translation type="unfinished"/> </message> </context> <context> <name>OptionsDialog</name> <message> <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation>Eistöllungen</translation> </message> <message> <location line="+13"/> <source>&amp;Main</source> <translation>&amp;Masta</translation> </message> <message> <location line="+6"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation>Iwaweisungs-Gebührn zoin</translation> </message> <message> <location line="+31"/> <source>Automatically start Catchcoin after logging in to the system.</source> <translation>Catchcoin automatisch nochm Einloggn starten.</translation> </message> <message> <location line="+3"/> <source>&amp;Start Catchcoin on system login</source> <translation>Catchcoin beim System-Einloggen starten</translation> </message> <message> <location line="+9"/> <source>Size of &amp;database cache</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Set database cache size in megabytes (default: 25)</source> <translation>Zwischnspeichagreß fia de Datenbank in megabeits (sunsta: 25)</translation> </message> <message> <location line="+13"/> <source>MB</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Number of script &amp;verification threads</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Set the number of script verification threads (up to 16, 0 = auto, &lt;0 = leave that many cores free, default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+58"/> <source>Connect to the Catchcoin network through a SOCKS proxy.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy (default proxy):</source> <translation type="unfinished"/> </message> <message> <location line="+34"/> <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source> <translation type="unfinished"/> </message> <message> <location line="+224"/> <source>Active command-line options that override above options:</source> <translation type="unfinished"/> </message> <message> <location line="+43"/> <source>Reset all client options to default.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Reset Options</source> <translation type="unfinished"/> </message> <message> <location line="-323"/> <source>&amp;Network</source> <translation>&amp;Netzwerk</translation> </message> <message> <location line="+6"/> <source>Automatically open the Catchcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation>Automatisch den Router fia &apos;n Catchcoin port eistölln. Des geht nur, waunn da Router UPnP kaunn und waunns des durtn aa eigschoitn is.</translation> </message> <message> <location line="+3"/> <source>Map port using &amp;UPnP</source> <translation>Port mit UPnP zuweisen</translation> </message> <message> <location line="+19"/> <source>Proxy &amp;IP:</source> <translation>Proxy &amp;IP:</translation> </message> <message> <location line="+32"/> <source>&amp;Port:</source> <translation>&amp;Port:</translation> </message> <message> <location line="+25"/> <source>Port of the proxy (e.g. 9050)</source> <translation>Port vom Proxy (z.B. 9050)</translation> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation>SOCKS &amp;Version:</translation> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation>SOCKS version vom Proxy (e.g. 5)</translation> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation>&amp;Fensta</translation> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation>Zeig nur &apos;s Tray-Büderl, waunns Fensta minimiat wird.</translation> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation>Minimier in&apos; Tray stott in&apos; Taskbar</translation> </message> <message> <location line="+7"/> <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source> <translation>Waunns Fensta gschlossn wiad, moch kaan Exitus, sondan minimier di afoch nua. Zum wiaklichn Beendn muass ma daunn im Menü auf &quot;baba und foi ned&quot; klickn.</translation> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation>Minimian stott Schliaßn</translation> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation>&amp;Anzeige</translation> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation>Sproch fias UI:</translation> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting Catchcoin.</source> <translation>De UI Sproch kaunn do gsetzt weadn. Auswiakn tuat si des owa eascht beim nächsten Start.</translation> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation>&amp;Weat-Einheit, in dea Beträge zeigt weadn:</translation> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation>Wöh de standard Unta-Einheit aus, mit der Beträge im UI und beim Vaschickn zeigt weadn.</translation> </message> <message> <location line="+9"/> <source>Whether to show Catchcoin addresses in the transaction list or not.</source> <translation>Ob Catchcoin Adressn in da Iwaweisungslistn zeigt weadn soin, oda ned.</translation> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation>Zeig Adressn in a Iwaweisungslistn</translation> </message> <message> <location line="+7"/> <source>Whether to show coin control features or not.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Display coin &amp;control features (experts only)</source> <translation type="unfinished"/> </message> <message> <location line="+136"/> <source>&amp;OK</source> <translation>&amp;Passt!</translation> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation>&amp;Na Ned!</translation> </message> <message> <location filename="../optionsdialog.cpp" line="+67"/> <source>default</source> <translation>sunsta</translation> </message> <message> <location line="+57"/> <source>none</source> <translation type="unfinished"/> </message> <message> <location line="+75"/> <source>Confirm options reset</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+29"/> <source>Client restart required to activate changes.</source> <translation type="unfinished"/> </message> <message> <location line="-29"/> <source>Client will be shutdown, do you want to proceed?</source> <translation type="unfinished"/> </message> <message> <location line="+33"/> <source>This change would require a client restart.</source> <translation type="unfinished"/> </message> <message> <location line="+34"/> <source>The supplied proxy address is invalid.</source> <translation>De aungebane Proxy-Adress is a Kas.</translation> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation>Foamulaa</translation> </message> <message> <location line="+50"/> <location line="+231"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Catchcoin network after a connection is established, but this process has not completed yet.</source> <translation>De aunzeigtn Datn san meglichaweis ned aktuö. Dei Beasl gleicht si automatisch mitm Netz au, soboid a Vabindung aufrecht is, owa soweit samma no ned.</translation> </message> <message> <location line="-155"/> <source>Unconfirmed:</source> <translation>Gerüchteweis:</translation> </message> <message> <location line="-83"/> <source>Wallet</source> <translation>Beasl</translation> </message> <message> <location line="+51"/> <source>Confirmed:</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Your current spendable balance</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Immature:</source> <translation>Unreif:</translation> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation>Gschiafta Betrog, dea no ned reif is</translation> </message> <message> <location line="+16"/> <source>Total:</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Your current total balance</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation>&lt;b&gt;unlängste Iwaweisungen&lt;/b&gt;</translation> </message> <message> <location filename="../overviewpage.cpp" line="+120"/> <location line="+1"/> <source>out of sync</source> <translation>nimma atkuö</translation> </message> </context> <context> <name>PaymentServer</name> <message> <location filename="../paymentserver.cpp" line="+403"/> <location line="+13"/> <source>URI handling</source> <translation>URI Behaundlung</translation> </message> <message> <location line="+1"/> <source>URI can not be parsed! This can be caused by an invalid Catchcoin address or malformed URI parameters.</source> <translation>De URI is a Kas! Meglichaweis is de Catchcoin Adress foisch, oda hoit sunst wos vamuakst.</translation> </message> <message> <location line="+96"/> <source>Requested payment amount of %1 is too small (considered dust).</source> <translation type="unfinished"/> </message> <message> <location line="-221"/> <location line="+212"/> <location line="+13"/> <location line="+95"/> <location line="+18"/> <location line="+16"/> <source>Payment request error</source> <translation type="unfinished"/> </message> <message> <location line="-353"/> <source>Cannot start catchcoin: click-to-pay handler</source> <translation type="unfinished"/> </message> <message> <location line="+58"/> <source>Net manager warning</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source> <translation type="unfinished"/> </message> <message> <location line="+52"/> <source>Payment request fetch URL is invalid: %1</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Payment request file handling</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source> <translation type="unfinished"/> </message> <message> <location line="+73"/> <source>Unverified payment requests to custom payment scripts are unsupported.</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <source>Refund from %1</source> <translation type="unfinished"/> </message> <message> <location line="+43"/> <source>Error communicating with %1: %2</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>Payment request can not be parsed or processed!</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Bad response from server %1</source> <translation type="unfinished"/> </message> <message> <location line="+33"/> <source>Payment acknowledged</source> <translation type="unfinished"/> </message> <message> <location line="-11"/> <source>Network request error</source> <translation type="unfinished"/> </message> </context> <context> <name>QObject</name> <message> <location filename="../catchcoin.cpp" line="+71"/> <location line="+11"/> <source>Catchcoin</source> <translation>Catchcoin</translation> </message> <message> <location line="+1"/> <source>Error: Specified data directory &quot;%1&quot; does not exist.</source> <translation type="unfinished"/> </message> <message> <location line="-12"/> <source>Error: Invalid combination of -regtest and -testnet.</source> <translation type="unfinished"/> </message> </context> <context> <name>QRImageWidget</name> <message> <location filename="../<API key>.cpp" line="+36"/> <source>&amp;Save Image...</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Copy Image</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>Save QR Code</source> <translation>QR-Büderl speichan</translation> </message> <message> <location line="+0"/> <source>PNG Image (*.png)</source> <translation type="unfinished"/> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation>Klient Namen</translation> </message> <message> <location line="+10"/> <location line="+23"/> <location line="+26"/> <location line="+23"/> <location line="+23"/> <location line="+36"/> <location line="+23"/> <location line="+36"/> <location line="+23"/> <location line="+23"/> <location filename="../rpcconsole.cpp" line="+359"/> <source>N/A</source> <translation>Nix</translation> </message> <message> <location line="-223"/> <source>Client version</source> <translation>Klient Veasion</translation> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation>&amp;Information</translation> </message> <message> <location line="-10"/> <source>Debug window</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>General</source> <translation type="unfinished"/> </message> <message> <location line="+53"/> <source>Using OpenSSL version</source> <translation>Vawend OpenSSL in a Version</translation> </message> <message> <location line="+49"/> <source>Startup time</source> <translation>Startzeit</translation> </message> <message> <location line="+29"/> <source>Network</source> <translation>Netz</translation> </message> <message> <location line="+7"/> <source>Name</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Number of connections</source> <translation>Aunzoi von Vabindungen</translation> </message> <message> <location line="+29"/> <source>Block chain</source> <translation>Block-Kettn</translation> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation>Anzoi da Blöck</translation> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation>Gschätzte Aunzoi da Blöck insgesaumt</translation> </message> <message> <location line="+23"/> <source>Last block time</source> <translation>Zeit vom letztn Block</translation> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation>&amp;Lodn</translation> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation>&amp;Konsole</translation> </message> <message> <location line="+72"/> <source>&amp;Network Traffic</source> <translation type="unfinished"/> </message> <message> <location line="+52"/> <source>&amp;Clear</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Totals</source> <translation type="unfinished"/> </message> <message> <location line="+64"/> <source>In:</source> <translation>In:</translation> </message> <message> <location line="+80"/> <source>Out:</source> <translation type="unfinished"/> </message> <message> <location line="-521"/> <source>Build date</source> <translation><API key></translation> </message> <message> <location line="+206"/> <source>Debug log file</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Open the Catchcoin debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation type="unfinished"/> </message> <message> <location line="+76"/> <source>Clear console</source> <translation>Konsole leermochn</translation> </message> <message> <location filename="../rpcconsole.cpp" line="-30"/> <source>Welcome to the Catchcoin RPC console.</source> <translation>Heazlich willkomman zua Catchcoin RPC Konsole.</translation> </message> <message> <location line="+1"/> <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source> <translation>Vawend de Rauf- und Runta Tastn um bisherige Kommandos zruckzhoin, oder druck Strg-L zum Leschn.</translation> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation>Gib &lt;b&gt;help&lt;/b&gt; ein fiara Iwasicht iwa olle Kommandos.</translation> </message> <message> <location line="+122"/> <source>%1 B</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1 KB</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1 MB</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1 GB</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>%1 m</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>%1 h</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1 h %2 m</source> <translation type="unfinished"/> </message> </context> <context> <name>ReceiveCoinsDialog</name> <message> <location filename="../forms/receivecoinsdialog.ui" line="+83"/> <source>&amp;Amount:</source> <translation type="unfinished"/> </message> <message> <location line="-13"/> <source>&amp;Label:</source> <translation>&amp;Titl:</translation> </message> <message> <location line="-34"/> <source>&amp;Message:</source> <translation type="unfinished"/> </message> <message> <location line="-17"/> <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>R&amp;euse an existing receiving address (not recommended)</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>An optional label to associate with the new receiving address</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Catchcoin network.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source> <translation type="unfinished"/> </message> <message> <location line="+39"/> <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Clear all fields of the form.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Clear</source> <translation type="unfinished"/> </message> <message> <location line="+36"/> <source>&amp;Request payment</source> <translation type="unfinished"/> </message> <message> <location line="+47"/> <source>Requested payments</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Show the selected request (does the same as double clicking an entry)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Show</source> <translation>Zeig</translation> </message> <message> <location line="+11"/> <source>Remove the selected entries from the list</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Remove</source> <translation type="unfinished"/> </message> </context> <context> <name><API key></name> <message> <location filename="../forms/<API key>.ui" line="+29"/> <source>QR Code</source> <translation type="unfinished"/> </message> <message> <location line="+46"/> <source>Copy &amp;URI</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Copy &amp;Address</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Save Image...</source> <translation type="unfinished"/> </message> <message> <location filename="../<API key>.cpp" line="+56"/> <source>Request payment to %1</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Payment information</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>URI</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Address</source> <translation>Adress</translation> </message> <message> <location line="+2"/> <source>Amount</source> <translation>Betrog</translation> </message> <message> <location line="+2"/> <source>Label</source> <translation>Titl</translation> </message> <message> <location line="+2"/> <source>Message</source> <translation>Mödung</translation> </message> <message> <location line="+10"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation>De URI is z&apos;laung. Tua hoit ned goa sovü fasln. </translation> </message> <message> <location line="+5"/> <source>Error encoding URI into QR Code.</source> <translation>Föhla beim Eazeign vo an QR-Büderl fia de URI.</translation> </message> </context> <context> <name><API key></name> <message> <location filename="../<API key>.cpp" line="+24"/> <source>Date</source> <translation>Waunn</translation> </message> <message> <location line="+0"/> <source>Label</source> <translation>Titl</translation> </message> <message> <location line="+0"/> <source>Message</source> <translation>Mödung</translation> </message> <message> <location line="+0"/> <source>Amount</source> <translation>Betrog</translation> </message> <message> <location line="+38"/> <source>(no label)</source> <translation>nixda</translation> </message> <message> <location line="+9"/> <source>(no message)</source> <translation type="unfinished"/> </message> </context> <context> <name>SendCoinsDialog</name> <message> <location filename="../forms/sendcoinsdialog.ui" line="+14"/> <location filename="../sendcoinsdialog.cpp" line="+381"/> <location line="+80"/> <source>Send Coins</source> <translation>Vaschick Zasta</translation> </message> <message> <location line="+76"/> <source>Coin Control Features</source> <translation type="unfinished"/> </message> <message> <location line="+20"/> <source>Inputs...</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>automatically selected</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Insufficient funds!</source> <translation type="unfinished"/> </message> <message> <location line="+89"/> <source>Quantity:</source> <translation>Quantität:</translation> </message> <message> <location line="+35"/> <source>Bytes:</source> <translation type="unfinished"/> </message> <message> <location line="+48"/> <source>Amount:</source> <translation>Betrog:</translation> </message> <message> <location line="+32"/> <source>Priority:</source> <translation type="unfinished"/> </message> <message> <location line="+48"/> <source>Fee:</source> <translation>Gebühr:</translation> </message> <message> <location line="+32"/> <source>Low Output:</source> <translation type="unfinished"/> </message> <message> <location line="+48"/> <source>After Fee:</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>Change:</source> <translation type="unfinished"/> </message> <message> <location line="+44"/> <source>If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Custom change address</source> <translation type="unfinished"/> </message> <message> <location line="+115"/> <source>Send to multiple recipients at once</source> <translation>Vaschick Zasta glei aun mehrare auf aamoi</translation> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation type="unfinished"/> </message> <message> <location line="+20"/> <source>Clear all fields of the form.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation>&amp;Ois Leschn</translation> </message> <message> <location line="+22"/> <source>Balance:</source> <translation>Kontostaund:</translation> </message> <message> <location line="+41"/> <source>Confirm the send action</source> <translation>Bschtätige de Iwaweisung</translation> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation type="unfinished"/> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-228"/> <source>Confirm send coins</source> <translation>Iwaweisung bschtätign</translation> </message> <message> <location line="-74"/> <location line="+5"/> <location line="+5"/> <location line="+4"/> <source>%1 to %2</source> <translation type="unfinished"/> </message> <message> <location line="-136"/> <source>Enter a Catchcoin address (e.g. <API key>)</source> <translation>Gib a Catchcoin-Adress ei (sowos wia: <API key>)</translation> </message> <message> <location line="+15"/> <source>Copy quantity</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation>Betrog in&apos; Puffa kopian</translation> </message> <message> <location line="+1"/> <source>Copy fee</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy after fee</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy bytes</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy priority</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy low output</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy change</source> <translation type="unfinished"/> </message> <message> <location line="+170"/> <source>Total Amount %1 (= %2)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>or</source> <translation>oder</translation> </message> <message> <location line="+202"/> <source>The recipient address is not valid, please recheck.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>The amount to pay must be larger than 0.</source> <translation>Waunnst nix vaschickn wüst, daunn loss&apos; hoit bleibm.</translation> </message> <message> <location line="+3"/> <source>The amount exceeds your balance.</source> <translation>Des is mea ois wost host.</translation> </message> <message> <location line="+3"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation>Ois zsamm und de Spesn vo %1 dazua is mea ois wost host.</translation> </message> <message> <location line="+3"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation>A doppete Adress gfundn. (A jede Adress derfs immanua amoi in ana Iwaweisung gebm)</translation> </message> <message> <location line="+3"/> <source>Transaction creation failed!</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> <message> <location line="+112"/> <source>Warning: Invalid Catchcoin address</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>(no label)</source> <translation>nixda</translation> </message> <message> <location line="-11"/> <source>Warning: Unknown change address</source> <translation type="unfinished"/> </message> <message> <location line="-366"/> <source>Are you sure you want to send?</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>added as transaction fee</source> <translation type="unfinished"/> </message> <message> <location line="+170"/> <source>Payment request expired</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Invalid payment address %1</source> <translation type="unfinished"/> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+131"/> <location line="+521"/> <location line="+536"/> <source>A&amp;mount:</source> <translation>&amp;Betrog:</translation> </message> <message> <location line="-1152"/> <source>Pay &amp;To:</source> <translation>wo&amp;hin:</translation> </message> <message> <location line="+18"/> <source>The address to send the payment to (e.g. <API key>)</source> <translation type="unfinished"/> </message> <message> <location filename="../sendcoinsentry.cpp" line="+30"/> <source>Enter a label for this address to add it to your address book</source> <translation>Gib an Titl fia de neiche Adress</translation> </message> <message> <location filename="../forms/sendcoinsentry.ui" line="+57"/> <source>&amp;Label:</source> <translation>&amp;Titl:</translation> </message> <message> <location line="-50"/> <source>Choose previously used address</source> <translation type="unfinished"/> </message> <message> <location line="-40"/> <source>This is a normal payment.</source> <translation type="unfinished"/> </message> <message> <location line="+50"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="+7"/> <source>Paste address from clipboard</source> <translation>Eifügn da Adress ausm Puffa</translation> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation>Alt+P</translation> </message> <message> <location line="+7"/> <location line="+524"/> <location line="+536"/> <source>Remove this entry</source> <translation type="unfinished"/> </message> <message> <location line="-1008"/> <source>Message:</source> <translation>Mödung:</translation> </message> <message> <location line="+10"/> <source>A message that was attached to the Catchcoin URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Catchcoin network.</source> <translation type="unfinished"/> </message> <message> <location line="+958"/> <source>This is a verified payment request.</source> <translation type="unfinished"/> </message> <message> <location line="-991"/> <source>Enter a label for this address to add it to the list of used addresses</source> <translation type="unfinished"/> </message> <message> <location line="+459"/> <source>This is an unverified payment request.</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <location line="+532"/> <source>Pay To:</source> <translation type="unfinished"/> </message> <message> <location line="-498"/> <location line="+536"/> <source>Memo:</source> <translation type="unfinished"/> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a Catchcoin address (e.g. <API key>)</source> <translation>Gib a Catchcoin-Adress ei (sowos wia: <API key>)</translation> </message> </context> <context> <name>ShutdownWindow</name> <message> <location filename="../utilitydialog.cpp" line="+48"/> <source>Catchcoin Core is shutting down...</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Do not shut down the computer until this window disappears.</source> <translation type="unfinished"/> </message> </context> <context> <name><API key></name> <message> <location filename="../forms/<API key>.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>&amp;Sign Message</source> <translation>Mödung &amp;untaschreim</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>Duachs Untaschreim vo ana Mödung mit deina Adress stöllst kloa, dass du den Schlissl dazua host. Pass owa auf, dassd ned glei ois untaschreibsd wos da iangdana hinhoit, weu sunst kennts leicht passian, dassd vasehentlich kwasi an Blanko-Scheck untaschreibst. Untaschreib nua konkrete Mödungen denenst aa wiakli zuastimmst.</translation> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. <API key>)</source> <translation>De Adress mit dera&apos;st untaschreibst (z.B. <API key>)</translation> </message> <message> <location line="+10"/> <location line="+213"/> <source>Choose previously used address</source> <translation type="unfinished"/> </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>Eifügn da Adress ausm Puffa</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>Gib de Mödung ei, de&apos;st untaschreibm wüst</translation> </message> <message> <location line="+7"/> <source>Signature</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Copy the current signature to the system clipboard</source> <translation>De Untaschrift in den Puffa kopian</translation> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this Catchcoin address</source> <translation>Untaschreib de Mödung, damid kloa is, dass de Adress dia gheat</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Reset all sign message fields</source> <translation>Olle Föda zrucksetzn</translation> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation>&amp;Ois Leschn</translation> </message> <message> <location line="-87"/> <source>&amp;Verify Message</source> <translation>&amp;Untaschrift tscheckn</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>Gib de Untaschrifts-Adress, de Mödung und de Untaschrift ei. De Mödung muass auf Punkt und Beistrich (und Leerzeichn, Tabulatorn, Zeulnumbrüch, usw) gaunz genau des gleiche sein, wos untaschriem wuan is. Pass auf, dassd ned mea in de Mödung eineliest, ois wos wiakli drinsteht, sunst kenntast leicht auf an Schmäh einefoin.</translation> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. <API key>)</source> <translation>De Adress, mit dera untaschriem wuan is (z.B. <API key>)</translation> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified Catchcoin address</source> <translation>Tscheck, doss de Mödung a wiakli mit da aungebanan Adress untaschriem wuan is</translation> </message> <message> <location line="+3"/> <source>Verify &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Reset all verify message fields</source> <translation>Olle Föda zrucksetzn</translation> </message> <message> <location filename="../<API key>.cpp" line="+29"/> <location line="+3"/> <source>Enter a Catchcoin address (e.g. <API key>)</source> <translation>Gib a Catchcoin-Adress ei (sowos wia: <API key>)</translation> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation>Klick auf &quot;Mödung untaschreim&quot; zum Untaschreim</translation> </message> <message> <location line="+3"/> <source>Enter Catchcoin signature</source> <translation>Gib de Untaschrift ei</translation> </message> <message> <location line="+84"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation>De eingebane Adress is a Kas.</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>Tscheck dassd Adress richtig is, und prowias noamoi.</translation> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation>De eingebene Adress gheat zu kaan Schlissl.</translation> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation>Zu dera Adress howi kaan Schlissl gspeichat.</translation> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation>&apos;s Untaschreim is föhgschlogn.</translation> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation>Mödung is untaschriem.</translation> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation>De Untaschrift woara Kas.</translation> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation>Tscheck dassd Untaschrift richtig is, und prowias noamoi.</translation> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation>De Untaschrift passt ned zu dera Mödung.</translation> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation>Iwaprifung da Untaschrift is föhgschlogn.</translation> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation>De Untaschrift hod zua Mödung passt.</translation> </message> </context> <context> <name>SplashScreen</name> <message> <location filename="../splashscreen.cpp" line="+28"/> <source>Catchcoin Core</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>The Catchcoin Core developers</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>[testnet]</source> <translation>[testnet]</translation> </message> </context> <context> <name>TrafficGraphWidget</name> <message> <location filename="../trafficgraphwidget.cpp" line="+79"/> <source>KB/s</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+28"/> <source>Open until %1</source> <translation>Offn bis %1</translation> </message> <message> <location line="+6"/> <source>%1/offline</source> <translation>%1/koa netz</translation> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation>%1/unbschtätigt</translation> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation>%1 Bschtätigungan</translation> </message> <message> <location line="+18"/> <source>Status</source> <translation>Zuastaund</translation> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation><numerusform>, iwa %n Knotn vateult</numerusform><numerusform>, iwa %n Knotn vateult</numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation>Waunn</translation> </message> <message> <location line="+7"/> <source>Source</source> <translation>Kwöön</translation> </message> <message> <location line="+0"/> <source>Generated</source> <translation>Gschiaft</translation> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation>Vo</translation> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation>Aun</translation> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation>eigane Adress</translation> </message> <message> <location line="-2"/> <source>label</source> <translation>Titl</translation> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+53"/> <source>Credit</source> <translation>eahoitena Betrog</translation> </message> <message numerus="yes"> <location line="-125"/> <source>matures in %n more block(s)</source> <translation><numerusform>eascht noch %n Block vawendboa</numerusform><numerusform>eascht noch %n Bleckn vawendboa</numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation>ned aungnumman</translation> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+53"/> <source>Debit</source> <translation>ausgebana Betrog</translation> </message> <message> <location line="-62"/> <source>Transaction fee</source> <translation>Iwaweisungsgebüa</translation> </message> <message> <location line="+16"/> <source>Net amount</source> <translation>Untam Strich</translation> </message> <message> <location line="+6"/> <location line="+9"/> <source>Message</source> <translation>Mödung</translation> </message> <message> <location line="-7"/> <source>Comment</source> <translation>Bemeakung</translation> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation>Iwaweisungs Nr</translation> </message> <message> <location line="+18"/> <source>Merchant</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Debug information</source> <translation>Debug Infoamation</translation> </message> <message> <location line="+8"/> <source>Transaction</source> <translation>Iwaweisung</translation> </message> <message> <location line="+3"/> <source>Inputs</source> <translation>Eingobn</translation> </message> <message> <location line="+23"/> <source>Amount</source> <translation>Betrog</translation> </message> <message> <location line="+1"/> <source>true</source> <translation>woah</translation> </message> <message> <location line="+0"/> <source>false</source> <translation>foisch</translation> </message> <message> <location line="-232"/> <source>, has not been successfully broadcast yet</source> <translation>, is no ned eafoigreich oogschickt wuan.</translation> </message> <message numerus="yes"> <location line="-35"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+70"/> <source>unknown</source> <translation>unbekaunnt</translation> </message> </context> <context> <name><API key></name> <message> <location filename="../forms/<API key>.ui" line="+14"/> <source>Transaction details</source> <translation>Iwaweisungsdatn</translation> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation>Do sichst de Einzlheitn fo dera Iwaweisung</translation> </message> </context> <context> <name><API key></name> <message> <location filename="../<API key>.cpp" line="+234"/> <source>Date</source> <translation>Waunn</translation> </message> <message> <location line="+0"/> <source>Type</source> <translation>Oat</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Adress</translation> </message> <message> <location line="+0"/> <source>Amount</source> <translation>Betrog</translation> </message> <message> <location line="+59"/> <source>Immature (%1 confirmations, will be available after %2)</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+16"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+3"/> <source>Open until %1</source> <translation>Offn bis %1</translation> </message> <message> <location line="+3"/> <source>Offline (%1 confirmations)</source> <translation>Koa Netz (%1 Bschtätigungen)</translation> </message> <message> <location line="+3"/> <source>Unconfirmed (%1 of %2 confirmations)</source> <translation>unbschtätigt (nua %1 vo %2 Bschtätigungen)</translation> </message> <message> <location line="-22"/> <location line="+25"/> <source>Confirmed (%1 confirmations)</source> <translation>bschtätigt (%1 Bschtätigungen)</translation> </message> <message> <location line="-22"/> <source>This block was not received by any other nodes and will probably not be accepted!</source> <translation>Den Block kaunnst da in d&apos; Hoa schmian!</translation> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation>Eazeigt, owa ned aungnumman</translation> </message> <message> <location line="+62"/> <source>Received with</source> <translation>Empfaungen mid</translation> </message> <message> <location line="+2"/> <source>Received from</source> <translation>Empfaungen vo</translation> </message> <message> <location line="+3"/> <source>Sent to</source> <translation>gschickt aun</translation> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation>Aun di söbst</translation> </message> <message> <location line="+2"/> <source>Mined</source> <translation>gschiaft</translation> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation>(nix)</translation> </message> <message> <location line="+199"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation>Zuastaund da Iwaweisung. Fia de Aunzoi da Bschtätigungan foah mid da Maus driwa.</translation> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation>Waunn de Iwaweisung einakumman is.</translation> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation>Oat da Iwaweisung.</translation> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation>Züü-Adress da Iwaweisung.</translation> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation>Da Betrog, den wos&apos;d zoit oda kriagd host.</translation> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+57"/> <location line="+16"/> <source>All</source> <translation>Ois</translation> </message> <message> <location line="-15"/> <source>Today</source> <translation>Heit</translation> </message> <message> <location line="+1"/> <source>This week</source> <translation>de Wochn</translation> </message> <message> <location line="+1"/> <source>This month</source> <translation>den Monat</translation> </message> <message> <location line="+1"/> <source>Last month</source> <translation>letztn Monat</translation> </message> <message> <location line="+1"/> <source>This year</source> <translation>des Joa</translation> </message> <message> <location line="+1"/> <source>Range...</source> <translation>Bereich...</translation> </message> <message> <location line="+11"/> <source>Received with</source> <translation>Empfaungen mid</translation> </message> <message> <location line="+2"/> <source>Sent to</source> <translation>Gsendet aun</translation> </message> <message> <location line="+2"/> <source>To yourself</source> <translation>Aun di söbst</translation> </message> <message> <location line="+1"/> <source>Mined</source> <translation>Gschiaft</translation> </message> <message> <location line="+1"/> <source>Other</source> <translation>Aundare</translation> </message> <message> <location line="+6"/> <source>Enter address or label to search</source> <translation>Suach noch ana Adress oda an Titl</translation> </message> <message> <location line="+6"/> <source>Min amount</source> <translation>klaaansta Betrog</translation> </message> <message> <location line="+34"/> <source>Copy address</source> <translation>Adress in&apos; Puffa kopian</translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>Titl in&apos; Puffa kopian</translation> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation>Betrog in&apos; Puffa kopian</translation> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Edit label</source> <translation>Titl ändan</translation> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation>Zeig de Einzlheitn vo da Iwaweisung</translation> </message> <message> <location line="+142"/> <source>Export Transaction History</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Exporting Failed</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>There was an error trying to save the transaction history to %1.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Exporting Successful</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The transaction history was successfully saved to %1.</source> <translation type="unfinished"/> </message> <message> <location line="-22"/> <source>Comma separated file (*.csv)</source> <translation>Beistrich &apos;trennte Weate (*.csv)</translation> </message> <message> <location line="+9"/> <source>Confirmed</source> <translation>Bschtätigt</translation> </message> <message> <location line="+1"/> <source>Date</source> <translation>Waunn</translation> </message> <message> <location line="+1"/> <source>Type</source> <translation>Oat</translation> </message> <message> <location line="+1"/> <source>Label</source> <translation>Titl</translation> </message> <message> <location line="+1"/> <source>Address</source> <translation>Adress</translation> </message> <message> <location line="+1"/> <source>Amount</source> <translation>Betrog</translation> </message> <message> <location line="+1"/> <source>ID</source> <translation>Nr</translation> </message> <message> <location line="+107"/> <source>Range:</source> <translation>Bereich:</translation> </message> <message> <location line="+8"/> <source>to</source> <translation>bis</translation> </message> </context> <context> <name>WalletFrame</name> <message> <location filename="../walletframe.cpp" line="+26"/> <source>No wallet has been loaded.</source> <translation type="unfinished"/> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+245"/> <source>Send Coins</source> <translation>Vaschick Zasta</translation> </message> </context> <context> <name>WalletView</name> <message> <location filename="../walletview.cpp" line="+43"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"/> </message> <message> <location line="+181"/> <source>Backup Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Wallet Data (*.dat)</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Backup Failed</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>There was an error trying to save the wallet data to %1.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>The wallet data was successfully saved to %1.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Backup Successful</source> <translation type="unfinished"/> </message> </context> <context> <name>catchcoin-core</name> <message> <location filename="../catchcoinstrings.cpp" line="+221"/> <source>Usage:</source> <translation>Vawendung:</translation> </message> <message> <location line="-54"/> <source>List commands</source> <translation>Kommandos aunzeign</translation> </message> <message> <location line="-14"/> <source>Get help for a command</source> <translation>Hüfe fiara Kommando</translation> </message> <message> <location line="+26"/> <source>Options:</source> <translation>Eistöllungen:</translation> </message> <message> <location line="+22"/> <source>Specify configuration file (default: catchcoin.conf)</source> <translation>Gib de Konfigurationsdatei aun (sunsta: catchcoin.conf)</translation> </message> <message> <location line="+3"/> <source>Specify pid file (default: catchcoind.pid)</source> <translation>Datei, wo de Prozessnumma gspeichat wiad (sunsta: catchcoin.pid)</translation> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation>Vazeichnis fia de Datein</translation> </message> <message> <location line="-9"/> <source>Set database cache size in megabytes (default: 25)</source> <translation>Zwischnspeichagreß fia de Datenbank in megabeits (sunsta: 25)</translation> </message> <message> <location line="-26"/> <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source> <translation>Auf Vabindungen am &lt;port&gt; lauschn (sunsta: 8333 bzw. testnet: 18333)</translation> </message> <message> <location line="+5"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation>Hechstns &lt;n&gt; Vabindungen zu aundare Netz-Knotn aufrecht eahoitn (sunsta: 125)</translation> </message> <message> <location line="-51"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation>Vabind di mid an Netz-Knotn, owa frog nua noch aundare Knotn, danoch vapäulisia di wieda</translation> </message> <message> <location line="+84"/> <source>Specify your own public address</source> <translation>Gib dei eigene öffentliche Adress aun</translation> </message> <message> <location line="+5"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation>Geduidsfodnstärke gegniwa deppate Netz-Knotn (sunsta: 100)</translation> </message> <message> <location line="-148"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation>Waunn Geduidsfodn amoi grissn, daunn wia long bis wieda guat (sunsta: 86400)</translation> </message> <message> <location line="-36"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+34"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source> <translation type="unfinished"/> </message> <message> <location line="+45"/> <source>Accept command line and JSON-RPC commands</source> <translation>Hob a Uawaschl offn fia de Kommandozeuln und JSON-RPC Beföhle</translation> </message> <message> <location line="+80"/> <source>Run in the background as a daemon and accept commands</source> <translation>Ois Dämon im Hintagrund laafn und auf Beföhle lauschn</translation> </message> <message> <location line="+39"/> <source>Use the test network</source> <translation>Des Test-Netz vawenden</translation> </message> <message> <location line="-118"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation>Nimm Vabindungen vo aussn aun (waunn nix aungebn is, güt 1, aussa waunn -proxy oda -connect optionen aungebm san)</translation> </message> <message> <location line="-95"/> <source>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: rpcuser=catchcoinrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; for example: alertnotify=echo %%s | mail -s &quot;Catchcoin Alert&quot; admin@foo.com </source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Cannot obtain a lock on data directory %s. Catchcoin is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation>A programmal startn, waunn si a unbstätigte Iwaweisung ändat. (a %s wiad dabei duachn Iwaweisungs-Hash easetzt)</translation> </message> <message> <location line="+18"/> <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Catchcoin will not work properly.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <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 type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>&lt;category&gt; can be:</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Catchcoin Core Daemon</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Catchcoin RPC client version</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Block creation options:</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Connect only to the specified node(s)</source> <translation>Nur mit de aungebanen Netz-Knotn vabindn.</translation> </message> <message> <location line="+1"/> <source>Connect through SOCKS proxy</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Corrupted block database detected</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation>Find söbst de eigane IP-Adress (waunn nix aungebn is: 1, aussa mit -externalip oda waunns Lauschn oisagaunza oodraht is)</translation> </message> <message> <location line="+1"/> <source>Do not load the wallet and disable wallet RPC calls</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Do you want to rebuild the block database now?</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error initializing block database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error initializing wallet database environment %s!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading block database</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error opening block database</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error: Disk space is low!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error: Wallet locked, unable to create transaction!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error: system error: </source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation>Föhla beim Lauschn aufn port. Waunn des so gwoit is, dann gib de Option -listen=0 aun.</translation> </message> <message> <location line="+1"/> <source>Failed to read block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to read block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to sync block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write file info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write to coin database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write transaction index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write undo data</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Fee per kB to add to transactions you send</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Find peers using DNS lookup (default: 1 unless -connect)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Generate coins (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 288, 0 = all)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>How thorough the block verification is (0-4, default: 3)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>If &lt;category&gt; is not supplied, output all debugging information.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Incorrect or no genesis block found. Wrong datadir for network?</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Invalid -onion address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Not enough file descriptors available.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Prepend debug output with timestamp (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>RPC client options:</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Rebuild block chain index from current blk000??.dat files</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Send command to Catchcoin server</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Set maximum block size in bytes (default: %d)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Set the number of threads to service RPC calls (default: 4)</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Specify wallet file (within data directory)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Start Catchcoin server</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>This is intended for regression testing tools and app development.</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Usage (deprecated, use catchcoin-cli):</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Verifying blocks...</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Verifying wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Wait for RPC server to start</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Wallet %s resides outside data directory %s</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Wallet options:</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>You need to rebuild the database using -reindex to change -txindex</source> <translation type="unfinished"/> </message> <message> <location line="-79"/> <source>Imports blocks from external blk000??.dat file</source> <translation type="unfinished"/> </message> <message> <location line="-105"/> <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source> <translation>A programmal startn, waunn de Alarmglockn leitn, oda waunn de Block-Kettn oag vazweigt. (a %s wiad dabei duach a Nochricht easetzt)</translation> </message> <message> <location line="+14"/> <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Set the number of script verification threads (up to 16, 0 = auto, &lt;0 = leave that many cores free, default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+89"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Maintain a full transaction index (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Only accept block chain matching built-in checkpoints (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>SSL options: (see the Catchcoin Wiki for SSL setup instructions)</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation>Protokoi anstott in de Datei debug.log liawa direkt aussaschreibn</translation> </message> <message> <location line="+6"/> <source>Set minimum block size in bytes (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Signing transaction failed</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>System error: </source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Transaction amount too small</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction amounts must be positive</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction too large</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation>Vawend UPnP um den Lausch-Port zuzuweisn (sunsta: 0)</translation> </message> <message> <location line="+1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation>Vawend UPnP um den Lausch-Port zuzuweisn (wenn nix aungebm is: 1, wenns Lauschn eigschoitn is)</translation> </message> <message> <location line="+2"/> <source>Username for JSON-RPC connections</source> <translation>Benutza fia JSON-RPC Vabindungen</translation> </message> <message> <location line="+7"/> <source>Warning</source> <translation>Pass auf</translation> </message> <message> <location line="+2"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>version</source> <translation>veasion</translation> </message> <message> <location line="+1"/> <source>wallet.dat corrupt, salvage failed</source> <translation type="unfinished"/> </message> <message> <location line="-58"/> <source>Password for JSON-RPC connections</source> <translation>Geheimwuat fia JSON-RPC Vabindungen</translation> </message> <message> <location line="-70"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation>JSON-RPC Beföhle nua vo da aungebanen Netz-Adress ealaubn</translation> </message> <message> <location line="+80"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation>Beföhle zum Netz-Knotn mit da &lt;ip&gt;-Adress schickn (sunsta: 127.0.0.1)</translation> </message> <message> <location line="-132"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation>A programmal startn, waunn si wos am bestn Block ändat. (a %s wiad dabei duachn Block-Hash easetzt)</translation> </message> <message> <location line="+161"/> <source>Upgrade wallet to latest format</source> <translation>&apos;s Beasl ins neichaste Foamat bringan</translation> </message> <message> <location line="-24"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation>Schlisslvorratsgreß auf &lt;n&gt; setzn (sunsta: 100)</translation> </message> <message> <location line="-11"/> <source>Rescan the block chain for missing wallet transactions</source> <translation>De gaunze Block-kettn noch föhlende Iwaweisungen oosuachn</translation> </message> <message> <location line="+38"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation>Vawend OpenSSL (https) fia JSON-RPC Vabindungan</translation> </message> <message> <location line="-30"/> <source>Server certificate file (default: server.cert)</source> <translation>Söawa Zeatifikatsdatei (sunsta: server.cert)</translation> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation>Söawa Privatschlissl (sunsta: server.pem)</translation> </message> <message> <location line="+16"/> <source>This help message</source> <translation>Dea Hüfe-Text</translation> </message> <message> <location line="+7"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation>Kaun mi ned aun %s auf dera Maschin draunhängan (bind returned error %d, %s)</translation> </message> <message> <location line="-107"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation>Ealaub DNS nochfrogn fia -addnode, -seednode und -connect</translation> </message> <message> <location line="+60"/> <source>Loading addresses...</source> <translation>Adressbiachl lodn...</translation> </message> <message> <location line="-37"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation>Föhla beim Lodn vom Beasl: &apos;s Beasl is leida hinnich</translation> </message> <message> <location line="+1"/> <source>Error loading wallet.dat: Wallet requires newer version of Catchcoin</source> <translation>Föhla beim Lodn vom Beasl: fia des Beasl brauchst a neichare Catchcoin veasion</translation> </message> <message> <location line="+98"/> <source>Wallet needed to be rewritten: restart Catchcoin to complete</source> <translation>&apos;s Beasl hod neich gschriem weadn miassn: beend des Programmal und starts noamoi zum Featigmochn</translation> </message> <message> <location line="-100"/> <source>Error loading wallet.dat</source> <translation>Föhla beim Lodn vom Beasl (wallet.dat)</translation> </message> <message> <location line="+31"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation>Ungültige &quot;-proxy&quot; Adress: &apos;%s&apos;</translation> </message> <message> <location line="+56"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation>Des Netzwerk in -onlynet is a Kas: &apos;%s&apos;</translation> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation>De valongte -socks proxy version is ned bekaunnt: %i</translation> </message> <message> <location line="-101"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation>Kaunn de -bind Adressn ned auflösn: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation>Kaunn de -externalip Adressn ned auflösn: &apos;%s&apos;</translation> </message> <message> <location line="+48"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>Da Betrog fia -paytxfee=&lt;amount&gt; is a Kas: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Invalid amount</source> <translation>Ungültiga Betrog</translation> </message> <message> <location line="-6"/> <source>Insufficient funds</source> <translation>Sovü host goaned</translation> </message> <message> <location line="+10"/> <source>Loading block index...</source> <translation>Block index lodn...</translation> </message> <message> <location line="-62"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation>An Netz-Knotn aufnehman, und bei da Staungan hoitn</translation> </message> <message> <location line="-32"/> <source>Unable to bind to %s on this computer. Catchcoin is probably already running.</source> <translation>Konnt mi ned aun %s auf dera Maschin aunhängan. Meglichaweis rennt des Programmal scho.</translation> </message> <message> <location line="+95"/> <source>Loading wallet...</source> <translation>Beasl lodn...</translation> </message> <message> <location line="-56"/> <source>Cannot downgrade wallet</source> <translation>Zrucksteign geht nimma beim Beasl</translation> </message> <message> <location line="+3"/> <source>Cannot write default address</source> <translation>De Easotz Adress kaunn ned gschriem weadn</translation> </message> <message> <location line="+67"/> <source>Rescanning...</source> <translation>Noch-tscheckn...</translation> </message> <message> <location line="-58"/> <source>Done loading</source> <translation>Featig midm Lodn</translation> </message> <message> <location line="+85"/> <source>To use the %s option</source> <translation>Um de Option %s z&apos;vawendn</translation> </message> <message> <location line="-77"/> <source>Error</source> <translation>Föhla</translation> </message> <message> <location line="-35"/> <source>You must set rpcpassword=&lt;password&gt; in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions.</source> <translation>Du muasst rpcpassword=&lt;password&gt; in da Konfigurationsdatei: %s setzn. Waunns de Datei no ned gibt, daunn eazeigs so, dass&apos; ka aundara lesn kau.</translation> </message> </context> </TS>
<?php namespace Marfi\<API key>\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Marfi\<API key>\XMLHandlers\userXML; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Session; class <API key> extends Controller { public function indexAction(Request $request) { $session = $this->get('session'); $xmlUser = $session->get('userxml'); $filename = $_SERVER['DOCUMENT_ROOT'] . "xml/customerXML.xml"; $xmlFile = simplexml_load_file($filename); // echo var_dump($xmlFile); //->value = $xmlUser->getCustomerID(); $xmlFile->project_manager['uname'] = $this->get('security.context')->getToken()->getUser()->getUserName(); $xmlFile->customer_id['value'] = $xmlUser->getCustomerID(); // echo "<br><br> After customer_id change: " . var_dump($xmlFile); $xmlFile->customer_id->model['vendor']=$xmlUser->getVendor(); $xmlFile->customer_id->model['model']=$xmlUser->getModel(); $xmlFile->customer_id->model->sim_calls=$xmlUser->getSimCalls(); $xmlFile->customer_id->model->ports['number_of_ports']=$xmlUser->getNumberOfPorts(); foreach($xmlUser->getPortNamesArray() as $portname){ $port = $xmlFile->customer_id->model->ports->addChild('port'); $port['name'] = $portname; $port['type']=$xmlUser->getPortType($portname); $port['voice_enabled']=(($xmlUser->isPortEnabled($portname)) ? 'true': 'false'); $port['multipoint']=(($xmlUser->isPortMultipoint($portname)) ? 'true': 'false'); $port['PoBRI']=(($xmlUser->hasPortPoBRI($portname)) ? 'true': 'false'); if($xmlUser-><API key>($portname)) $port['backup_enabled']=(($xmlUser-><API key>($portname)) ? 'true': 'false'); else $port['backup_enabled']= 'false'; $single_number=$port->addChild('single_number'); // $single_number=$port->single_number; if($xmlUser->hasPortSingleNumber($portname)){ $single_number[0]['enabled']='true'; $single_number[0] = $xmlUser->getPortSingleNumber($portname); } else $single_number[0]['enabled']='false'; $gnr=$port->addChild('GNR'); if($xmlUser->hasPortGnr($portname)){ $gnr[0]['enabled'] = 'true'; $gnr[0]['root'] = (string)$xmlUser->getPortGnrRoot($portname); if($xmlUser->hasPortGnrDid($portname)){ $gnr[0]['DID'] = $xmlUser->getPortGnrDid($portname); $gnr[0]['extensiondigits'] = $xmlUser->getPortGnrExtension($portname); } } else $gnr[0]['enabled'] = 'false'; $incoming_prefix=$port->addChild('incoming_prefix'); if($xmlUser-><API key>($portname)){ $incoming_prefix[0]['enabled']='true'; if($xmlUser-><API key>($portname)){ $caller_prefix=$incoming_prefix[0]->addChild('caller_prefix'); $caller_prefix[0]['enabled']='true'; $caller_prefix[0]['type']=$xmlUser-><API key>($portname); $caller_prefix[0]=$xmlUser-><API key>($portname); } else $caller_prefix[0]['enabled']='false'; if($xmlUser-><API key>($portname)){ $called_prefix=$incoming_prefix->addChild('called_prefix'); $called_prefix[0]['enabled']='true'; $called_prefix[0]['type']=$xmlUser-><API key>($portname); $called_prefix[0]=$xmlUser-><API key>($portname); } else $called_prefix[0]['enabled']='false'; } else $incoming_prefix[0]['enabled']='false'; $outgoing_prefix=$port->addChild('outgoing_prefix'); if($xmlUser-><API key>($portname)){ $outgoing_prefix[0]['enabled']='true'; if($xmlUser-><API key>($portname)){ $caller_prefix=$outgoing_prefix[0]->addChild('caller_prefix'); $caller_prefix[0]['enabled']='true'; $caller_prefix[0]['type']=$xmlUser-><API key>($portname); $caller_prefix[0]=$xmlUser-><API key>($portname); } else $caller_prefix[0]['enabled']='false'; if($xmlUser-><API key>($portname)){ $called_prefix=$outgoing_prefix[0]->addChild('called_prefix'); $called_prefix[0]['enabled']='true'; $called_prefix[0]['type']=$xmlUser-><API key>($portname); $called_prefix[0]=$xmlUser-><API key>($portname); } else $called_prefix[0]['enabled']='false'; } else $outgoing_prefix[0]['enabled']='false'; } //fine foreach delle porte if($xmlUser->hasMultinumber()){ $xmlFile->customer_id->model->multinumbers['enable']='true'; $xmlFile->customer_id->model->multinumbers['how_many']=$xmlUser-><API key>(); for($i=0; $i < $xmlUser-><API key>(); $i++){ $multinumber = $xmlFile->customer_id->model->multinumbers->addChild('multinumber'); $counter=0; foreach ($xmlUser-><API key>($i) as $clivalue){ $multinumber->cli[$counter] = $clivalue; $counter++; } $ports=$multinumber->addChild('ports'); $ports['how_many']=count($xmlUser-><API key>($i)); $counter = 0; foreach ($xmlUser-><API key>($i) as $portname){ $ports->port[$counter] = $portname; $counter++; } } //end multinumber } else { //no multinumbers $xmlFile->customer_id->model->multinumbers['enable']='false'; $xmlFile->customer_id->model->multinumbers['how_many']='0'; } if($xmlUser->hasServices()){ $xmlFile->customer_id->model->services['enabled'] ='true'; $fax = $xmlFile->customer_id->model->services->fax; if($xmlUser->hasFax()){ $fax['enabled']='true'; $fax['number_of_cli']=$xmlUser->getHowManyCliHasFax(); $counter = 0; foreach ($xmlUser->getCliFaxArray() as $clivalue){ $fax->cli[$counter] = $clivalue; $counter++; } } else { $fax['enabled']='false'; $fax['number_of_cli']=0; } $pos = $xmlFile->customer_id->model->services->pos; if($xmlUser->hasPos()){ $pos['enabled']='true'; $pos['number_of_cli']=$xmlUser->getHowManyCliHasPos(); $counter = 0; foreach ($xmlUser->getCliPosArray() as $clivalue){ $cli = $pos->addChild('cli'); $pos->cli[$counter] = $clivalue; $counter++; } } else { $pos['enabled']='false'; $pos['number_of_cli']=0; } $clir = $xmlFile->customer_id->model->services->clir; if($xmlUser->hasClir()){ $clir['enabled']='true'; if($xmlUser->hasClirForAll()) $clir['number_of_cli']='all'; else{ $clir['number_of_cli']=$xmlUser-><API key>(); $counter = 0; foreach ($xmlUser->getCliClirArray() as $clivalue){ $clir->cli[$counter] = $clivalue; $counter++; } } } else { $clir['enabled']='false'; $clir['number_of_cli']=0; } } else { //no services $xmlFile->customer_id->model->services['enabled'] ='false'; } //Format XML to save indented tree rather than one line $dom = new \DOMDocument('1.0'); $dom->preserveWhiteSpace = false; $dom->formatOutput = true; $dom->loadXML($xmlFile->asXML()); $date = date("Ymd\_His"); $filename = $_SERVER['DOCUMENT_ROOT'] . "usersXML/" . $xmlUser->getCustomerID() . "_" . $xmlUser->getVendor() . $xmlUser->getModel() . "_" . $date .".xml"; if ($dom->save($filename)) echo "File has been saved in: " . $filename . "<br>"; else echo "ERROR, XML file not saved in: " .$filename. "!!"; echo "If you are using Firefox to display xml file in this browser page, right click and select \"View page source\" or \"View source\"<br>"; return new Response($dom->saveXML()); // return $this->render('<API key>:Default:xmlshow.html.twig', array('xmlfile'=>$dom->saveXML())); } } ?>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>lazy-pcf: 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.13.2 / lazy-pcf - 8.7.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> lazy-pcf <small> 8.7.0 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2022-02-23 23:46:31 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-02-23 23:46:31 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 conf-gmp 4 Virtual package relying on a GMP lib system installation coq 8.13.2 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.13.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.13.1 Official release 4.13.1 ocaml-config 2 OCaml Switch Configuration <API key> 1 Ensure that OCaml is compiled with no special options enabled ocamlfind 1.9.3 A library manager for OCaml zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/lazy-pcf&quot; license: &quot;Unknown&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/lazyPCF&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.7&quot; &amp; &lt; &quot;8.8~&quot;} ] tags: [ &quot;keyword: functional programming&quot; &quot;keyword: lazy evaluation&quot; &quot;keyword: operational semantics&quot; &quot;keyword: type soundness&quot; &quot;keyword: normal forms&quot; &quot;category: Computer Science/Lambda Calculi&quot; ] authors: [ &quot;Amy Felty&quot; &quot;Jill Seaman&quot; ] bug-reports: &quot;https://github.com/coq-contribs/lazy-pcf/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/lazy-pcf.git&quot; synopsis: &quot;Subject Reduction for Lazy-PCF&quot; description: &quot;&quot;&quot; http: An Operational Semantics of Lazy Evaluation and a Proof of Subject Reduction&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/lazy-pcf/archive/v8.7.0.tar.gz&quot; checksum: &quot;md5=<API key>&quot; } </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-lazy-pcf.8.7.0 coq.8.13.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.13.2). The following dependencies couldn&#39;t be met: - coq-lazy-pcf -&gt; coq &lt; 8.8~ -&gt; ocaml &lt; 4.10 base of this switch (use `--unlock-base&#39; 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-lazy-pcf.8.7.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: </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>
var books = require('../models/booksModels') //TODO: Send the right error messages exports.postBooks = function(req, res) { res.header("<API key>", "*") res.header("<API key>", "Origin, X-Requested-With, Content-Type, Accept") var newBook = new books(); newBook.department = req.body.department; newBook.courseNumber = req.body.courseNumber; newBook.bookTitle = req.body.title; newBook.email = req.body.email; newBook.condition = req.body.condition; newBook.price = req.body.price; newBook.save(function(err) { if(err) { res.statusCode = 404; res.send(err); } res.statusCode = 200; res.send("Book added successfully"); }) } //Returns all the books exports.getAllBooks = function(req, res) { res.header("<API key>", "*") res.header("<API key>", "Origin, X-Requested-With, Content-Type, Accept") books.find(function(err, book) { //TODO: Get to send the right error messages. if(err) { res.statusCode = 404; res.send(err); } else { res.statusCode = 200; res.send(book); } }) } //Returns a book by a certain course number /*exports.<API key> = function (req, res){ books.find({, function (err, book) { }); }*/ exports.putBooks = function(req, res) { } exports.deleteBooks = function(req, res) { } exports.findBook = function(req, res) { res.header("<API key>", "*") res.header("<API key>", "Origin, X-Requested-With, Content-Type, Accept") //Get the query string and parse it var queryString = req.param('search') console.log(queryString); book.textSearch(queryString, function(err, output) { if(err) { res.statusCode = 404; res.send(err); } //TODO: Get to send the right error messages res.statusCode = 200; res.send(output); }) }
/* global require, module */ var EmberApp = require('ember-cli/lib/broccoli/ember-app'), mergeTrees = require('<API key>'), pickFiles = require('<API key>'); var app = new EmberApp({ sassOptions: { includePaths: [ 'bower_components/foundation/scss' ] } }); // Use `app.import` to add additional libraries to the generated // output files. // If you need to use different assets in different // environments, specify an object as the first parameter. That // object's keys should be the environment name and the values // should be the asset to use in that environment. // If the library that you are including contains AMD or ES6 // modules that you would like to import into your application // please specify an object with the list of modules as keys // along with the exports of each module as its value. app.import('bower_components/openseadragon/built-openseadragon/openseadragon/openseadragon.js'); app.import('bower_components/xregexp/min/xregexp-min.js'); app.import('bower_components/foundation/js/foundation.js'); app.import('bower_components/<API key>/<API key>.js'); app.import('bower_components/ember-responsive/dist/ember-responsive.js'); app.import('bower_components/ember-data.model-fragments/dist/ember-data.model-fragments.js'); app.import('vendor/<API key>/<API key>.js'); app.import('bower_components/markdown-js/lib/markdown.js'); var analytics = pickFiles('vendor/analytics', { srcDir: '/', files: ['analytics.js'], destDir: 'assets' }); module.exports = mergeTrees([ app.toTree(), analytics ]);
// Import dependency. import axios from 'axios'; // Define service class that can be imported and used to hit different PUT endpoints. export default class PutService { constructor(url) { this.url = url; } putItem(body) { axios.put(this.url, body) .catch((error) => {console.log(error);}); } }
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "- <html xmlns="http: <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>gendyc</title> <link rel="stylesheet" type="text/css" href="csound.css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /> <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" /> <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" /> <link rel="prev" href="gendy.html" title="gendy" /> <link rel="next" href="gendyx.html" title="gendyx" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">gendyc</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="gendy.html">Prev</a> </td> <th width="60%" align="center">Orchestra Opcodes and Operators</th> <td width="20%" align="right"> <a accesskey="n" href="gendyx.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry"> <a id="gendyc"></a> <div class="titlepage"></div> <a id="IndexGendyc" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">gendyc</span> </h2> <p>gendyc — Dynamic stochastic approach to waveform synthesis using cubic interpolation. </p> </div> <div class="refsect1"> <a id="idm47161627033280"></a> <h2>Description</h2> <p> Implementation with cubic interpolation of the <span class="emphasis"><em>Génération Dynamique Stochastique</em></span> (GENDYN), a dynamic stochastic approach to waveform synthesis conceived by Iannis Xenakis. </p> </div> <div class="refsect1"> <a id="idm47161626988816"></a> <h2>Syntax</h2> <pre class="synopsis">ares <span class="command"><strong>gendyc</strong></span> kamp, kampdist, kdurdist, kadpar, kddpar, kminfreq, kmaxfreq, \ kampscl, kdurscl [, initcps] [, knum]</pre> <pre class="synopsis">kres <span class="command"><strong>gendyc</strong></span> kamp, kampdist, kdurdist, kadpar, kddpar, kminfreq, kmaxfreq, \ kampscl, kdurscl [, initcps] [, knum]</pre> </div> <div class="refsect1"> <a id="idm47161626985008"></a> <h2>Initialization</h2> <p> <span class="emphasis"><em>initcps</em></span> (optional, default=12) -- max number of control points. </p> </div> <div class="refsect1"> <a id="idm47161626983328"></a> <h2>Performance</h2> <p> <span class="emphasis"><em>kamp</em></span> -- amplitude. </p> <p> <span class="emphasis"><em>kampdist</em></span> -- choice of probability distribution for the next perturbation of the amplitude of a control point. The valid distributions are: </p> <div class="itemizedlist"> <ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"> <p>0 - LINEAR</p> </li> <li class="listitem"> <p>1 - CAUCHY</p> </li> <li class="listitem"> <p>2 - LOGIST</p> </li> <li class="listitem"> <p>3 - HYPERBCOS</p> </li> <li class="listitem"> <p>4 - ARCSINE</p> </li> <li class="listitem"> <p>5 - EXPON</p> </li> <li class="listitem"> <p>6 - SINUS (external k-rate signal)</p> </li> </ul> </div> <p> If <span class="emphasis"><em>kampdist</em></span>=6, the user can use an external k-rate signal through <span class="emphasis"><em>kadpar</em></span>. </p> <p> <span class="emphasis"><em>kdurdist</em></span> -- choice of distribution for the perturbation of the current inter control point duration. See <span class="emphasis"><em>kampdist</em></span> for the valid distributions. If <span class="emphasis"><em>kdurdist</em></span>=6, the user can use an external k-rate signal through <span class="emphasis"><em>kddpar</em></span>. </p> <p> <span class="emphasis"><em>kadpar</em></span> -- parameter for the <span class="emphasis"><em>kampdist</em></span> distribution. Should be in the range of 0.0001 to 1. </p> <p> <span class="emphasis"><em>kddpar</em></span> -- parameter for the <span class="emphasis"><em>kdurdist</em></span> distribution. Should be in the range of 0.0001 to 1. </p> <p> <span class="emphasis"><em>kminfreq</em></span> -- minimum allowed frequency of oscillation. </p> <p> <span class="emphasis"><em>kmaxfreq</em></span> -- maximum allowed frequency of oscillation. </p> <p> <span class="emphasis"><em>kampscl</em></span> -- multiplier for the distribution's delta value for amplitude (1.0 is full range). </p> <p> <span class="emphasis"><em>kdurscl</em></span> -- multiplier for the distribution's delta value for duration. </p> <p> <span class="emphasis"><em>knum</em></span> (optional, default=<span class="emphasis"><em>initcps</em></span>) -- current number of utilized control points. </p> <p> The waveform is generated by <span class="emphasis"><em>knum</em></span> - 1 segments and is repeated in the time. The vertexes (control points) are moved according to a stochastic action and they are limited within the boundaries of a mirror formed by an amplitude barrier and a time barrier. </p> </div> <div class="refsect1"> <a id="idm47161626964576"></a> <h2>Examples</h2> <p> Here is an example of the gendyc opcode. It uses the file <a class="ulink" href="examples/gendyc.csd" target="_top"><em class="citetitle">gendyc.csd</em></a>. </p> <div class="example"> <a id="idm47161626962720"></a> <p class="title"> <strong>Example 369. Example of the gendyc opcode.</strong> </p> <div class="example-contents"> <p>See the sections <a class="link" href="UsingRealTime.html" title="Real-Time Audio"><em class="citetitle">Real-time Audio</em></a> and <a class="link" href="CommandFlags.html" title="Csound command line"><em class="citetitle">Command Line Flags</em></a> for more information on using command line flags.</p> <div class="refsect1"> <a id="idm47161483640160"></a> <pre class="programlisting"> <span class="csdtag">&lt;CsoundSynthesizer&gt;</span> <span class="csdtag">&lt;CsOptions&gt;</span> <span class="comment">; Select audio/midi flags here according to platform</span> -odac <span class="comment">;;;realtime audio out</span> <span class="comment">;-iadc ;;;uncomment -iadc if realtime audio input is needed too</span> <span class="comment">; For Non-realtime ouput leave only the line below:</span> <span class="comment">; -o oscil.wav -W ;;; for file output any platform</span> <span class="csdtag">&lt;/CsOptions&gt;</span> <span class="csdtag">&lt;CsInstruments&gt;</span> <span class="ohdr">sr</span> <span class="op">=</span> 44100 <span class="ohdr">ksmps</span> <span class="op">=</span> 32 <span class="ohdr">nchnls</span> <span class="op">=</span> 2 <span class="ohdr">0dbfs</span> <span class="op">=</span> 1 <span class="oblock">instr</span> 1 aout <span class="opc">gendyc</span> 0.5, 1, 1, 1, 1, 220, 440, 0.5, 0.5 <span class="opc">outs</span> aout, aout <span class="oblock">endin</span> <span class="csdtag">&lt;/CsInstruments&gt;</span> <span class="csdtag">&lt;CsScore&gt;</span> <span class="stamnt">i</span>1 0 10 <span class="stamnt">e</span> <span class="csdtag">&lt;/CsScore&gt;</span> <span class="csdtag">&lt;/CsoundSynthesizer&gt;</span> </pre> </div> </div> </div> <p><br class="example-break" /> </p> </div> <div class="refsect1"> <a id="idm47161626958432"></a> <h2>References</h2> <p> </p> <div class="orderedlist"> <ol class="orderedlist" type="1"> <li class="listitem"> <p> Formalized Music (1992, Stuyvesant, NY: Pendragon Press), pp. 246 - 254, 289 - 322. </p> </li> </ol> </div> <p> </p> </div> <div class="refsect1"> <a id="idm47161626955488"></a> <h2>See Also</h2> <p> <a class="link" href="gendy.html" title="gendy"><em class="citetitle">gendy</em></a> <a class="link" href="gendyx.html" title="gendyx"><em class="citetitle">gendyx</em></a> </p> </div> <div class="refsect1"> <a id="idm47161626952448"></a> <h2>Credits</h2> <p> </p> <table border="0" summary="Simple list" class="simplelist"> <tr> <td>Based on Nick Collins's Gendy1 and Bhob Rainey's Gendy4 (SuperCollider)</td> </tr> <tr> <td>Author: Tito Latini</td> </tr> <tr> <td>January 2012</td> </tr> </table> <p> </p> <p>New in Csound version 5.16</p> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="gendy.html">Prev</a> </td> <td width="20%" align="center"> <a accesskey="u" href="OpcodesTop.html">Up</a> </td> <td width="40%" align="right"> <a accesskey="n" href="gendyx.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">gendy </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> gendyx</td> </tr> </table> </div> </body> </html>
<?php namespace Seboettg\CiteProc\Rendering\Date; use Exception; use Seboettg\CiteProc\CiteProc; use Seboettg\CiteProc\Exception\CiteProcException; use Seboettg\CiteProc\Exception\<API key>; use Seboettg\CiteProc\Rendering\Date\DateRange\DateRangeRenderer; use Seboettg\CiteProc\Styles\AffixesTrait; use Seboettg\CiteProc\Styles\DisplayTrait; use Seboettg\CiteProc\Styles\FormattingTrait; use Seboettg\CiteProc\Styles\TextCaseTrait; use Seboettg\CiteProc\Util; use Seboettg\Collection\ArrayList; use SimpleXMLElement; class Date { use AffixesTrait, DisplayTrait, FormattingTrait, TextCaseTrait; // bitmask: ymd const <API key> = 0; // 000 const <API key> = 1; // 001 const <API key> = 2; // 010 const <API key> = 3; // 011 const <API key> = 4; // 100 const <API key> = 5; // 101 const <API key> = 6; // 110 const <API key> = 7; // 111 private static $<API key> = [ 'numeric', 'text' ]; /** * @var ArrayList */ private $dateParts; /** * @var string */ private $form = ""; /** * @var string */ private $variable = ""; /** * @var string */ private $datePartsAttribute = ""; /** * Date constructor. * @param SimpleXMLElement $node * @throws <API key> */ public function __construct(SimpleXMLElement $node) { $this->dateParts = new ArrayList(); /** @var SimpleXMLElement $attribute */ foreach ($node->attributes() as $attribute) { switch ($attribute->getName()) { case 'form': $this->form = (string) $attribute; break; case 'variable': $this->variable = (string) $attribute; break; case 'date-parts': $this->datePartsAttribute = (string) $attribute; } } /** @var SimpleXMLElement $child */ foreach ($node->children() as $child) { if ($child->getName() === "date-part") { $datePartName = (string) $child->attributes()["name"]; $this->dateParts->set($this->form . "-" . $datePartName, Util\Factory::create($child)); } } $this-><API key>($node); $this-><API key>($node); $this-><API key>($node); $this-><API key>($node); } /** * @param $data * @return string * @throws <API key> * @throws Exception */ public function render($data) { $ret = ""; $var = null; if (isset($data->{$this->variable})) { $var = $data->{$this->variable}; } else { return ""; } try { $this-><API key>($data, $var); } catch (CiteProcException $e) { if (isset($data->{$this->variable}->{'raw'}) && !preg_match("/(\p{L}+)\s?([\-\–&,])\s?(\p{L}+)/u", $data->{$this->variable}->{'raw'})) { return $this->addAffixes($this->format($this->applyTextCase($data->{$this->variable}->{'raw'}))); } else { if (isset($data->{$this->variable}->{'string-literal'})) { return $this->addAffixes( $this->format($this->applyTextCase($data->{$this->variable}->{'string-literal'})) ); } } } $form = $this->form; $dateParts = !empty($this->datePartsAttribute) ? explode("-", $this->datePartsAttribute) : []; $this-><API key>($dateParts, $form); // No date-parts in date-part attribute defined, take into account that the defined date-part children will // be used. if (empty($this->datePartsAttribute) && $this->dateParts->count() > 0) { /** @var DatePart $part */ foreach ($this->dateParts as $part) { $dateParts[] = $part->getName(); } } if ($this->dateParts->count() > 0) { if (!isset($var->{'date-parts'})) { // ignore empty date-parts return ""; } if (count($data->{$this->variable}->{'date-parts'}) === 1) { $data_ = $this->createDateTime($data->{$this->variable}->{'date-parts'}); $ret .= $this-><API key>($dateParts, $data_); } elseif (count($var->{'date-parts'}) === 2) { //date range $data_ = $this->createDateTime($var->{'date-parts'}); $from = $data_[0]; $to = $data_[1]; $interval = $to->diff($from); $delimiter = ""; $toRender = 0; if ($interval->y > 0 && in_array('year', $dateParts)) { $toRender |= self::<API key>; $delimiter = $this->dateParts->get($this->form."-year")->getRangeDelimiter(); } if ($interval->m > 0 && $from->getMonth() - $to->getMonth() !== 0 && in_array('month', $dateParts)) { $toRender |= self::<API key>; $delimiter = $this->dateParts->get($this->form."-month")->getRangeDelimiter(); } if ($interval->d > 0 && $from->getDay() - $to->getDay() !== 0 && in_array('day', $dateParts)) { $toRender |= self::<API key>; $delimiter = $this->dateParts->get($this->form."-day")->getRangeDelimiter(); } if ($toRender === self::<API key>) { $ret .= $this-><API key>($dateParts, $data_); } else { $ret .= $this->renderDateRange($toRender, $from, $to, $delimiter); } } if (isset($var->raw) && preg_match("/(\p{L}+)\s?([\-\–&,])\s?(\p{L}+)/u", $var->raw, $matches)) { return $matches[1].$matches[2].$matches[3]; } } elseif (!empty($this->datePartsAttribute)) { // fallback: // When there are no dateParts children, but date-parts attribute in date // render numeric $data = $this->createDateTime($var->{'date-parts'}); $ret = $this->renderNumeric($data[0]); } return !empty($ret) ? $this->addAffixes($this->format($this->applyTextCase($ret))) : ""; } /** * @param array $dates * @return array * @throws Exception */ private function createDateTime($dates) { $data = []; foreach ($dates as $date) { $date = $this->cleanDate($date); if ($date[0] < 1000) { $dateTime = new DateTime(0, 0, 0); $dateTime->setDay(0)->setMonth(0)->setYear(0); $data[] = $dateTime; } $dateTime = new DateTime( $date[0], array_key_exists(1, $date) ? $date[1] : 1, array_key_exists(2, $date) ? $date[2] : 1 ); if (!array_key_exists(1, $date)) { $dateTime->setMonth(0); } if (!array_key_exists(2, $date)) { $dateTime->setDay(0); } $data[] = $dateTime; } return $data; } /** * @param int $toRender * @param DateTime $from * @param DateTime $to * @param $delimiter * @return string */ private function renderDateRange($toRender, DateTime $from, DateTime $to, $delimiter) { $datePartRenderer = DateRangeRenderer::factory($this, $toRender); return $datePartRenderer->parseDateRange($this->dateParts, $from, $to, $delimiter); } /** * @param string $format * @return bool */ private function <API key>($format) { $dateXml = CiteProc::getContext()->getLocale()->getDateXml(); return !empty($dateXml[$format]); } /** * @param string $format * @return array */ private function <API key>($format) { $ret = []; // date parts from locales $dateFromLocale_ = CiteProc::getContext()->getLocale()->getDateXml(); $dateFromLocale = $dateFromLocale_[$format]; // no custom date parts within the date element (this)? if (!empty($dateFromLocale)) { $dateForm = array_filter( is_array($dateFromLocale) ? $dateFromLocale : [$dateFromLocale], function ($element) use ($format) { /** @var SimpleXMLElement $element */ $dateForm = (string) $element->attributes()["form"]; return $dateForm === $format; } ); //has dateForm from locale children (date-part elements)? $localeDate = array_pop($dateForm); if ($localeDate instanceof SimpleXMLElement && $localeDate->count() > 0) { foreach ($localeDate as $child) { $ret[] = $child; } } } return $ret; } /** * @return string */ public function getVariable() { return $this->variable; } /** * @param $data * @param $var * @throws CiteProcException */ private function <API key>($data, $var) { if (!isset($data->{$this->variable}->{'date-parts'}) || empty($data->{$this->variable}->{'date-parts'})) { if (isset($data->{$this->variable}->raw) && !empty($data->{$this->variable}->raw)) { // try to parse date parts from "raw" attribute $var->{'date-parts'} = Util\DateHelper::parseDateParts($data->{$this->variable}); } else { throw new CiteProcException("No valid date format"); } } } /** * @param $dateParts * @param string $form * @throws <API key> */ private function <API key>($dateParts, $form) { if ($this->dateParts->count() < 1 && in_array($form, self::$<API key>)) { if ($this-><API key>($form)) { $<API key> = $this-><API key>($form); array_filter($<API key>, function (SimpleXMLElement $item) use ($dateParts) { return in_array($item["name"], $dateParts); }); foreach ($<API key> as $datePartNode) { $datePart = $datePartNode["name"]; $this->dateParts->set("$form-$datePart", Util\Factory::create($datePartNode)); } } else { //otherwise create default date parts foreach ($dateParts as $datePart) { $this->dateParts->add( "$form-$datePart", new DatePart( new SimpleXMLElement('<date-part name="'.$datePart.'" form="'.$form.'" />') ) ); } } } } private function renderNumeric(DateTime $date) { return $date->renderNumeric(); } public function getForm() { return $this->form; } private function cleanDate($date) { $ret = []; foreach ($date as $key => $datePart) { $ret[$key] = Util\NumberHelper::extractNumber(Util\StringHelper::removeBrackets($datePart)); } return $ret; } /** * @param array $dateParts * @param array $data_ * @return string */ private function <API key>(array $dateParts, array $data_) { $result = []; /** @var DatePart $datePart */ foreach ($this->dateParts as $key => $datePart) { /** @noinspection <API key> */ list($f, $p) = explode("-", $key); if (in_array($p, $dateParts)) { $result[] = $datePart->render($data_[0], $this); } } $result = array_filter($result); $glue = $this-><API key>() ? "" : " "; $return = implode($glue, $result); return trim($return); } /** * @return bool */ private function <API key>() { $result = $this->dateParts->filter(function (DatePart $datePart) { return $datePart->renderSuffix() !== "" || $datePart->renderPrefix() !== ""; }); return $result->count() > 0; } }
FROM rainu/browser-base:16.04 MAINTAINER rainu <rainu@raysha.de> ENV DEBIAN_FRONTEND noninteractive #install Flash RUN echo "deb http://archive.canonical.com/ubuntu xenial partner" >> /etc/apt/sources.list &&\ apt-get update &&\ apt-get -y install \ adobe-flashplugin\ libgl1-mesa-dri\ libgl1-mesa-glx\ libexif-dev\ libv4l-0 &&\ apt-get clean &&\
<?php /* box.twig */ class <API key> extends Twig_Template { public function __construct(Twig_Environment $env) { parent::__construct($env); $this->parent = false; $this->blocks = array( ); } protected function doDisplay(array $context, array $blocks = array()) { // line 1 echo "<div class=\"wpml-accordion wpml-wc-accordion\"> \t<h4 class=\"handle\"><span>"; // line 2 echo twig_escape_filter($this->env, $this->getAttribute((isset($context["strings"]) ? $context["strings"] : null), "title", array()), "html", null, true); echo "</span></h4> \t<div class=\"inside\"> \t\t<input type=\"hidden\" name=\"<API key>\" value=\""; // line 5 echo twig_escape_filter($this->env, $this->getAttribute((isset($context["nonces"]) ? $context["nonces"] : null), "<API key>", array())); echo "\"> \t\t<input type=\"hidden\" name=\"<API key>\" value=\""; // line 6 echo twig_escape_filter($this->env, (isset($context["wc_chunk_size"]) ? $context["wc_chunk_size"] : null)); echo "\"> \t\t<div class=\"wpml-wc-messages\"> \t\t\t"; // line 9 $context['_parent'] = $context; $context['_seq'] = <API key>($this->getAttribute((isset($context["strings"]) ? $context["strings"] : null), "messages", array())); foreach ($context['_seq'] as $context["_key"] => $context["message"]) { // line 10 echo "\t\t\t\t<p>"; echo twig_escape_filter($this->env, $context["message"], "html", null, true); echo "</p> \t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['message'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 12 echo "\t\t</div> \t\t<div class=\"wpml-wc-buttons\"> \t\t\t<p> \t\t\t\t<a class=\"button-primary\" href=\""; // line 15 echo twig_escape_filter($this->env, $this->getAttribute((isset($context["strings"]) ? $context["strings"] : null), "openDialogButtonURL", array()), "html", null, true); echo "\" title=\""; echo twig_escape_filter($this->env, $this->getAttribute((isset($context["strings"]) ? $context["strings"] : null), "openDialogButton", array())); echo "\"> \t\t\t\t\t"; // line 16 echo twig_escape_filter($this->env, $this->getAttribute((isset($context["strings"]) ? $context["strings"] : null), "openDialogButton", array()), "html", null, true); echo " \t\t\t\t</a> \t\t\t</p> \t\t\t<p class=\"call-to-action\"> \t\t\t\t"; // line 21 echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute((isset($context["strings"]) ? $context["strings"] : null), "callToAction", array()), "Text", array()), "html", null, true); echo " <a href=\""; echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute((isset($context["strings"]) ? $context["strings"] : null), "callToAction", array()), "linkURL", array()), "html", null, true); echo "\" target=\"_blank\" title=\""; echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute((isset($context["strings"]) ? $context["strings"] : null), "callToAction", array()), "linkText", array())); echo "\">"; echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute((isset($context["strings"]) ? $context["strings"] : null), "callToAction", array()), "linkText", array()), "html", null, true); echo "</a>. \t\t\t</p> \t\t</div> \t\t"; // line 24 $this->loadTemplate("dialog.twig", "box.twig", 24)->display(array_merge($context, (isset($context["dialog"]) ? $context["dialog"] : null))); // line 25 echo "\t</div> </div>"; } public function getTemplateName() { return "box.twig"; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 84 => 25, 82 => 24, 70 => 21, 62 => 16, 56 => 15, 51 => 12, 42 => 10, 38 => 9, 32 => 6, 28 => 5, 22 => 2, 19 => 1,); } } /* <div class="wpml-accordion wpml-wc-accordion">*/ /* <h4 class="handle"><span>{{ strings.title }}</span></h4>*/ /* <div class="inside">*/ /* <input type="hidden" name="<API key>" value="{{ nonces.<API key>|e }}">*/ /* <input type="hidden" name="<API key>" value="{{ wc_chunk_size|e }}">*/ /* <div class="wpml-wc-messages">*/ /* {% for message in strings.messages %}*/ /* <p>{{ message }}</p>*/ /* {% endfor %}*/ /* </div>*/ /* <div class="wpml-wc-buttons">*/ /* <a class="button-primary" href="{{ strings.openDialogButtonURL }}" title="{{ strings.openDialogButton|e }}">*/ /* {{ strings.openDialogButton }}*/ /* <p class="call-to-action">*/ /* {{ strings.callToAction.Text }} <a href="{{ strings.callToAction.linkURL }}" target="_blank" title="{{ strings.callToAction.linkText|e }}">{{ strings.callToAction.linkText }}</a>.*/ /* </div>*/ /* {% include 'dialog.twig' with dialog %}*/ /* </div>*/ /* </div>*/
// Notifications.h // Josh Wright // @BendyTree // June 4, 2013 // Use this however you want. #import <Foundation/Foundation.h> #import "PubSub.h" /* DECLARE YOUR PubSub Notifications HERE */ // ie. PubSub(nicknameChanged, NSString) // ie. PubSub(ageChanged, NSNumber)
#include <boost/assign/list_of.hpp> // for 'map_list_of()' #include <boost/foreach.hpp> #include "checkpoints.h" #include "main.h" #include "uint256.h" namespace Checkpoints { typedef std::map<int, uint256> MapCheckpoints; // What makes a good checkpoint block? // + Is surrounded by blocks with reasonable timestamps // (no blocks before with a timestamp after, none after with // timestamp before) // + Contains no strange transactions static MapCheckpoints mapCheckpoints = boost::assign::map_list_of // Yo dawg, this is the secret. Checkpoint 0 hash == Genesis block hash. ( 0, uint256("<API key>")) ; bool CheckBlock(int nHeight, const uint256& hash) { if (fTestNet) return true; // Testnet has no checkpoints MapCheckpoints::const_iterator i = mapCheckpoints.find(nHeight); if (i == mapCheckpoints.end()) return true; return hash == i->second; } int <API key>() { if (fTestNet) return 0; return mapCheckpoints.rbegin()->first; } CBlockIndex* GetLastCheckpoint(const std::map<uint256, CBlockIndex*>& mapBlockIndex) { if (fTestNet) return NULL; <API key>(const MapCheckpoints::value_type& i, mapCheckpoints) { const uint256& hash = i.second; std::map<uint256, CBlockIndex*>::const_iterator t = mapBlockIndex.find(hash); if (t != mapBlockIndex.end()) return t->second; } return NULL; } }
# Change Log All notable changes to this project will be documented in this file. ## 6.0.0-rc.1 **Note 1**: RxSwift 6 and above has a minimum deployment target of iOS 9 and targets Swift 5.1 (Xcode 11) and above **Note 2**: Starting with RxSwift 6.x, RxSwift will no longer follow Swift versioning. Meaning, RxSwift can possibly move to v6, v7 or v8 while Swift itself is still in 5.x. * Minimum Swift version is now 5.1. #2077 * Minimum deployment target is iOS 9. * Remove scoped imports in favor of library evolution. #2103 * `Reactive` now uses `@dynamicMemberLookup` to provide automatic binders for most properties. #2110 * Add `ReplayRelay`. #2109 * `Binder` is now part of RxSwift itself, instead of RxCocoa only. #2110 * Add `<API key>` conformance to `SharedSequence`. #2019 * Add `onDisposed` closure argument to `subscribe` on `Maybe`, `Completable` and `Single`. #1977 * Add `Driver.drive()` and `Signal.emit()` for multiple observers/relays. #1962 * Added `defaultValue` to `sample` to be returned when no new events occur between sampler ticks. #1457 * Change return type of `<API key>` Reactive Extension. * Fix a linking issue when swizzling observer methods. #2209 * New `decode(type:decoder:)` operator for `Observable<Data>`. ## Unreleased * Add KVO observation with Key Path. * Add `<API key>(at:)` for Key Paths. * Fix `DelegateProxy` call to `layoutIfNeeded` for an object without a window. #2076 * Add `ControlEvent` wrappers to `UIApplication` Notifications. #2116 * `SharingScheduler.mock(scheduler:action:)` can use throwing function for `action`. #2150 * Add `interlocked: Bool = false` parameter to `<API key>.sleep`. * Make `NSTextView` not weak for Swift 5.2 and up. * Add `WKWebView` navigation delegate reactive extensions. #2144 **Note**: We no longer guarantee support for Xcode 10.x. Maintaining these is counter-intuitive as they're over a year old and are ridden with bugs. * Remove UIWebView Reactive Extensions due to [Apple's hard deprecation, starting April 2020](https://developer.apple.com/news/?id=12232019b). #2062 * Support Mac Catalyst. #2062 * Fix [`<API key>` imports for Linux](https://github.com/apple/<API key>/blob/<SHA1-like>/Docs/ReleaseNotes_Swift5.md#<API key>). * Add compactMap to SharedSequence, Single and Maybe. #1978 * Add UITextField.isSecureTextEntry binder. #1968 * Remove "custom" Result in favor of Foundation.Result. #2006 * Fix compilation error in SharedSequence.createUnsafe. #2014 * Reverts Carthage integration from using static to dynamic libraries. #1960 RxSwift 5 is a _mostly_ source-compatible release targeting the Swift 5 compiler. **Xcode 10.2 is the minimum supported version (or Swift 5 on Linux).** If you're using Xcode 10.1 and below, please use [RxSwift 4.5](https://github.com/ReactiveX/RxSwift/releases/tag/4.5.0). * Relays have been moved to a separate framework - RxRelay, and can be used without RxCocoa. #1924 * `TimeInterval` has been deprecated in favor of `<API key>`. For example - `throttle(1.2)` would change to `throttle(.milliseconds(1200))`, while `throttle(3)` would change to `throttle(.seconds(3))`. #1472 * `Variable` is now entirely deprecated. #1922 * `do` now provides additional "_after_" closures. For example, `do(onNext:)` and `do(afterNext:)`. #1898 * `bind(to:)` now supports multiple observers (e.g. `bind(to: observer1, observer2)`). #1702 * Changes the return type of `ObservableType.toArray` to `Single`. #1923 * Adds `compactMap`. #1925 * Deprecate `Completable.merge` in favor of `Completable.zip`. #1929 #1931 * RxSwift can be built as a Static Library using Carthage 0.33 and up. #1940 Anomalies * `SubjectType.SubjectObserverType` has been renamed to `SubjectType.Observer`. #1950 * The `S` associated type has been renamed to `Subject` where applicable. #1950 * The `S` generic constraint on `SharedSequence` has been renamed to `SharingStrategy`. #1951 * The `E` associated type on `<API key>` and `ObserverType` have been renamed to `Element`. #1945 * The `C` and `S` associated types have been renamed to `Collection` and `Sequence` accordingly. #1949 * Renamed `ElementType` associatedtype to `Element`. #1945 * Renamed `TraitType` associatedtype to `Trait`. #1945 * Make `RxMutableBox` supported on Linux in Swift 5. #1917 * Fix incorrect assignment to `Thread.threadDictionary` on Linux. #1912 * `combineLatest` of an empty array now completes immediately. #1879 * Add `resultsSelector` missing closure labels for some overloads of `combineLatest` & `zip`. * Compatibility with Xcode 10.2. * Adds missing `UISearchBar.setDelegate()`. * Adds `UIView.rx.backgroundColor` Binder. #1888 Anomalies * Fix multiple disposes on <API key>. #1892 * Fix `DelegateProxy` main thread validation. #1882 * Bring back the `first` operator to `ObservableType`. #1886 * Adds `takeUntil(_ behavior:predicate:)`. # Anomalies * Fixes problems with RxAtomic and TSan. #1853 * Fixes problem with passing 0 count to `Observable.range`. #1870 * Fixes Swift 5.0 warnings. #1859 * Fixes problem with RxCocoa and `DISABLE_SWIZZLING` flag. #1805 * Internal cleanups: * Unused code deletions. * Adds SwiftLint. * Removes legacy Swift 3.0 conditional compilation flags. **This release introduces a new framework `RxAtomic` that enables using C11 atomic primitives in RxSwift as a replacement for deprecated `OSAtomic*` functions.** **Carthage users will probably need to include this framework manually.** * Updates deprecated `OSAtomic*` primitives to use C11 atomic primitives. * Adds `Event`, `SingleEvent`, `MaybeEvent` and `Recorded` conditional conformance to `Equatable` where their `Element` is equatable on `RXTest` for clients that are using Swift >= 4.1. * Adds `string` to `NSTextView`. * Consolidates per platform frameworks to multi-platform frameworks. * Xcode 10.1 compatible. # Anomalies * Fixes problem with canceling events scheduled on serial scheduler through `observeOn` operator. #1778 * Fixes problem with `UISearchBar.text` property not triggering update when cancel button is tapped. #1714 * Updates watchos minimum target to 3.0. #1752 # Anomalies * Fixes issues with CocoaPods and Swift 4.2 version. * Compatibility with Xcode 10.0 * Adds new `insert` extension to collect and add multiple disposables to `DisposeBag`. * Removes string interpolation warning * Adds `scan(into:accumulator:)`. * Adds `queuePriority` parameter (defaults to `.normal`) to `<API key>`. * Performance enhancement reduces Bag dispatch inline code size by 12%. * Adds `<API key>` hook to allow custom subscription callstacks to be generated. * Remove usage of `Variable` from Playground, Example projects and Tests. * Add `<API key>` to `XCTest+Rx`. # Anomalies * Fix build issues on new arm64_32 architecture (watchOS 5). * Adds Smart Key Path subscripting to create a binder for property of object. * Adds `UICollectionView` extensions: * `prefetchItems` * <API key> * Adds `UITableView` extensions: * `prefetchRows` * `<API key>` * Fixes various spelling mistakes and missing parameters. * Adds `<API key>`: * `titleForSegment(at:)` * `imageForSegment(at:)` * Adds `Maybe.ifEmpty(default:)` operator. * Adds `Maybe.ifEmpty(switchTo:)` operator. * Adds `Maybe.<API key>(_:)` operator. * Add `Single.flatMapMaybe(_:)` operator. * Add `Single.flatMapCompletable(_:)` operator. * Add `Single.zip(_:)` operator. * Add `Single.<API key>(_:)` operator. * Add `Single.asMaybe(_:)` operator. * Add `Single.asCompletable(_:)` operator. * Use `editingEvents` argument in `<API key>`. # Anomalies * Lower macOS Deployment Target to 10.9 * Deprecates `UISegmentedControl.enabled(forSegmentAt:)` in favor of `UISegmentedControl.enabledForSegment(at:)`. * Adds deprecation warner. # Anomalies * Fixes ambiguity issue with `Single.do(onNext:onError:onSubscribe:onSubscribed:onDispose:)` and `Single.do(onSuccess:onError:onSubscribe:onSubscribed:onDispose:)`. # Anomalies * Fixes compilation issue with Xcode 9.1. * Deprecates `Single.do(onNext:onError:onSubscribe:onSubscribed:onDispose:)` in favor of `Single.do(onSuccess:onError:onSubscribe:onSubscribed:onDispose:)`. * Adds `Recorded<Event<T>>` array factory method in **RxTest**. #1531 * Replaces global functions `next`, `error`, `completed` with `Recorded.next`, `Recorded.error`, `Recorded.completed` in **RxTest**. #1510 * Removes `AnyObject` constraint from `Delegate` parameter on `DelegateProxy`. #1442 * Adds `ObservableType.bind(to:)` overloads for `PublishRelay` and `BehaviorRelay`. * Adds `ControlEvent.asSignal()`. * Adds `UISegmentedControl.rx.enabled(forSegmentAt:)` extension. * Adds `UIStepper.rx.stepValue` extension. * Adds error handling Hook to `Single`, `Maybe` and `Completable`. #1532 * Adds `<API key>` to improve performance of `DEBUG` configuration. # Anomalies * Changes return value of blocking version of `single` operator from `E?` to `E`. #1525 * Removes deprecation attribute from `asSharedSequence`. * Adds global Hooks and implements error handling hook. * Deprecates `asSharedSequence` extensions on `ObservableType`. * Publicly exposes `controlProperty`. # Anomalies * Changes `Observable` extensions to `ObservableType` extensions. * Changes `<API key>` `UITableView` extension argument to `<API key>`. * Changes access modifier of `DelegateProxy.<API key>` to `open`. * Deprecates `image(transitionType:)` in favor of `image`. * Changes return type of `ignoreElements` to `Completable`. #1436 * Removes warning of sequence completion from `Binder`. #1431 * Deprecates `Variable` in favor of `BehaviorRelay`. * Adds `attributedText` to `UITextField`. #1249 * Adds `attributedText` to `UITextView`. #1249 * Deprecates `<API key>` and `shareReplay` in favor of `share(replay:scope:)`. #1430 * Changes `publish`, `replay`, `replayAll` to clear state in case of sequence termination to be more consistent with other Rx implementations and enable retries. #1430 * Replaces `share` with default implementation of `share(replay:scope:)`. #1430 * Adds `HasDelegate` and `HasDataSource` protocols. * Updates package version to v4 format. #1418 # Anomalies * Adds deprecated warnings to API parts that were missing it. #1427 * Improves memory handling in `<API key>`. #1428 * Removes pre-release identifier from bundle version to enable `TestFlight` submissions. #1424 * Removes code coverage to enable `TestFlight` submissions. #1423 * Fixes Xcode warnings. #1421 * Adds `materialize()` operator for RxBlocking's `BlockingObservable`. #1383 * Adds `first` operator to `ObservableType`. * Deprecates `UIBindingObserver` in favor of `Binder`. #1411 * Adds another specialization of `SharedSequence` called `Signal`. * Refactors `DelegateProxy` to be type safe. * Changes nested `SharedSequence` strategy to use inner sharing strategy for result. # Anomalies * Call `<API key>(…)` as an optional method. #1406 * Fixed issue with `NSControl.rx.value` regarding multiple observers. #1399 * Removes useless extensions from `PrimitiveSequence`. #1248 * Merge of `3.6.1` changes. * Adds `UIScrollView.willEndDragging` extension. #1365 * Adds `enumerated` operator (deprecates `skipWhileWithIndex`, `takeWhileWithIndex`, `flatMapWithIndex`, `mapWithIndex`). # Anomalies * Fixes gesture recognizer extensions crash. #1382 * Adds `onSubscribed` parameter to `SharedSequence` extensions. * Swift 4.0 compatibility * Changes delegate proxy to use plugin architecture. # Anomalies * Fixes public interface leakage of `<API key>`. #1164 # Anomalies * Fixes compilation issue with Xcode 9b3. #1341 * Fixes issues with `andThen` operator. #1347 * Improves locking behavior of `merge` and `switch` operators. #1344 * Adds `timeout` operator to `PrimitiveSequence` (`Single`, `Maybe`, `Observable`) * Adds `delay` operator to `SharedSequence`. * Adds `andThen` operator to `Completeable`. * Adds `concat` operator to `Completeable`. * Adds `<API key>` * Adds `UIPickerView` extensions: * `modelSelected` * `itemTitles` * `<API key>` * `items` * Adds `UITableView` extensions: * `modelDeleted` * Adds `UICollectionView` extensions: * `itemHighlighted` * `itemUnhighlighted` * `willDisplayCell` * `<API key>` * `<API key>` * `<API key>` * Adds `UIScrollView` extensions: * `<API key>` * `willBeginDragging` * `willBeginZooming` * `didEndZooming` # Anomalies * Fixes deadlock anomaly in `<API key>`. #1323 * Removes duplicated events swallowing in `NSControl` on macOS. * Adds `from` operator on "SharedSequence" * Adds `concat` operator on "Completable" * Adds `merge` operator on "Completable" * Adds `using` operator on "PrimitiveSequence" * Adds `concatMap` operator. * Adds `share(replay:scope:)` operator. * Adds `multicast(makeSubject:)` operator. * Adds `UIButton.image(for:)` extension. * Adds `UIButton.backgroundImage(for:)` extension. * fixes typos # Anomalies * Improves reentrancy and synchronization checks. * Issues with `share()` and `shareReplay(_:)`. #1111 * `.share()` inconsistent in behavior. #1242 * Fixes issues with `Driver` sometimes sending initial element async. #1253 * Adds `<API key>` delegate proxy and extensions: * `willShow` * `didShow` * Deprecates `TestScheduler.start(_:create:)` in favor of `TestScheduler.start(disposed:create:)`. * Deprecates `TestScheduler.start(_:subscribed:disposed:create:)` in favor of `TestScheduler.start(created:subscribed:disposed:create:)`. # Anomalies * Fixes observable sequence completion in case of empty arrays for `combineLatest` and `zip`. #1205 * Fixes array version of `merge` operator completing immediately in case one of the observable sequences is empty. #1221 * Adds RxTest to SPM. #1215 * Adds tuple version of operator `SharedSequence.zip` (collection). * Adds tuple version of operator `SharedSequence.zip`. * Adds tuple version of operator `SharedSequence.combineLatest` (collection). * Adds tuple version of operator `SharedSequence.combineLatest`. * Adds missing `trimOutput` parameter to `SharedSequence.debug`. * Makes `<API key>` subclass of `<API key>`. * Xcode 8.3.1 / Swift 3.1 compatibility. * Add subscription closures for Single, Maybe and Completable (`onSuccess`, `onError`, `onCompleted`). * Rename Units as Traits and update the documentation for Single, Completable & Maybe. * Deprecates `bindTo` in favor of `bind(to:)`. * Adds [`materialize`](http://reactivex.io/documentation/operators/<API key>.html) operator * Adds [`dematerialize`](http://reactivex.io/documentation/operators/<API key>.html) operator * Adds `latest` parameter to `SharedSequence.throttle` operator. * Adds `debug` operator to `PrimitiveSequence`. # Anomalies * Fixes problem with `UICollectionView` data source caching and disposal logic. #1154 # Anomalies * Fixes misspelled `Completeable` to `Completable`. #1134 * Adds `Single`, `Maybe`, `Completable` traits inspired by RxJava (operators): * `create` * `deferred` * `just` * `error` * `never` * `delaySubscription` * `delay` * `do` * `filter` * `map` * `flatMap` * `observeOn` * `subscribeOn` * `catchError` * `retry` * `retryWhen` * `zip` * Adds `asSingle()` operator on `ObservableType`. * Adds `asMaybe()` operator on `ObservableType`. * Adds `asCompletable()` operator on `ObservableType`. * Adds variadic `combineLatest` and `zip` overloads without result selector (defaults to tuple). * Adds array `combineLatest` and `zip` overloads with result selector (defaults to array of elements) * Adds optimized synchronous `merge` operator to observable sequence (variadic, array, collection). #579 * Adds optimized synchronous `merge` operator to shared sequence (variadic, array, collection). * Adds `AsyncSubject` implementation. * Adds `XCTAssertEqual` overloads to `RxTest`. * Adds `countDownDuration` to `UIDatePicker`. * Adds `attributedTitle(for:)` to `UIButton`. * Adds `onSubscribed` to `do` operator. * Adds `<API key>` to `UIView`. # Anomalies * Improves DelegateProxy `responds(to:)` selector logic to only respond to used selectors. #1081, #1087 * Deprecates `from()` in favor of `from(optional:)` to avoid issues with implicit conversions to optional. * Fixes thread sanitizer reporting issues with `merge` operator. #1063 * Calls `<API key>.invalidateLayout()` after `reloadData()` as a workaround for iOS 10 bug. * Changes `UICollectionView.rx.<API key>` context parameter type to `<API key>` * Adds `groupBy` operator * Adds `ifEmpty(switchTo:)` operator * Adds [`ifEmpty(default:)`]((http://reactivex.io/documentation/operators/defaultifempty.html)) operator * Adds `Disposable` extension `disposed(by:)` equivalent to `addDisposableTo` that is meant to replace it in future 4.0 version. * Consolidates atomic operations on Linux and Darwin platform. * Adds DEBUG mode concurrent asserts for `Variable` and `Observable.create`. * Adds DEBUG mode concurrent asserts for `Sink`. * Small performance optimizations for subjects. * Adaptations for Xcode 8.3 beta. * Adds `numberOfPages` to `UIPageControl`. * Adds additional resources cleanup unit tests for cases where operators are used without `DisposeBag`s. * Chroes: * Adds `final` keyword wherever applicable. * Remove unnecessary `import Foundation` statements. * Examples cleanup. # Anomalies * Improves behavior of `<API key>` by making sure that events emitted after disconnect are ignored even in case of fast reconnect. * Fixes a couple of operators that were not cleaning up resources on terminal events when used without `DisposeBag`s. * Fixes delegate proxy interaction with subclassing of `UISearchController`. * Fixes delegate proxy interaction with subclassing of `NSTextStorage`. * Fixes delegate proxy interaction with subclassing of `UIWebView`. * Fixes delegate proxy interaction with subclassing of `UIPickerView`. * Adds `changed` property to `ControlProperty` that returns `ControlEvent` of user generated changes. * `textField.text.changed.map { "User changed text to \($0)" }` * Adds optional overloads for `from` operator. `let num: Int? = 3; let sequence = Observable.from(num)` * Improves `UIBindingObserver` by tolerating binding from non main dispatch queue. In case binding is attempted from non main dispatch queue it will be automagically dispathed async to main queue. * Makes control property naming consistent for `UIDatePicker`, `UISearchBar`, `UISegmentedControl`, `UISwitch`, `UITextField`, `UITextView` (`value` property + value alias name). * Adds missing extension to `UIScrollView`. * `didScroll` * `didZoom` * `didEndDecelerating` * `didEndDragging` * `didScrollToTop` * Renames `refreshing` to `isRefreshing`. * adds `UIWebView` extensions: * `didStartLoad` * `didFinishLoad` * `didFailLoad` * Adds `UITabBarController` extensions * `<API key>` * `willEndCustomizing` * `didEndCustomizing` * `didSelect` * Adds `UIBarButtonItem` extensions * `title` * Performance optimizations * Improves data source behavior by clearing data source proxy when forwarding delegate is `nil`. # Anomalies * Fixes anomaly caused by `UITableView` invalid state caching of previous data source even after the change. Binding of reactive data source now triggers `layoutIfNeeded` that invalidates that internal cached state. * Fixes issue with race in `<API key>`. #995 # Anomalies * Fixes RxCocoa problems on macOS (`TextInput` now uses `NSTextInputClient`) * Hides accidentally exposed `BagKey` structure. * Makes `notification` extension `name` parameter optional. * Prefixes boolean properties with `is` and makes `String?` properties consistent. * `rx.hidden` -> `rx.isHidden` * `rx.enabled` -> `rx.isEnabled` also ... * since `rx.text` has now type `String?` to be consistent with UIKit, in case `String` is needed there is `rx.text.orEmpty` that has `String` type. * Renames `title(controlState:)` on `UIButton` to `title(for:)`. * All data structures are now internal (`Bag`, `Queue`, `PriorityQueue` ...) * Improves performance of `Bag`. * Polishes RxCocoa `URLSession` extensions * `JSON` -> `json` * return type is `Any` instead of `AnyObject` * replaces response tuple parameters, now it's `(HTTPResponse, Data)` * removes name hiding for `request` parameter * Migrates `Driver` and `NSNotification` tests to `Linux`. * Removes RxTest from OSX + SPM integration until usable XCTest support on OSX. * Renames `ObserverType.map` to `OberverType.mapObserver` because of possible ambigutites with subjects. * Improves dispatch queue detection logic and replaces concept of threads in favor of dispatch queues (solves a lot of problems on Linux environment). * Replaces `<API key>.model(_:)` with `<API key>.model(at:)` * Renames `OSX` to `macOS` across the project. # Anomalies * Fixes wrong casing in `#import "include/_RXObjCRuntime.h"` (was creating issues for people with case sensitive file system). #949 * Fixes issues with locking strategy for subjects. #936 * Fixes code example in comments of <API key> that didn't compile. #947 * Adds `.swift-version` to help package managers to detect Swift 3 version. * Renames `RxTests` library to `RxTest` because of problems with Swift Package Manager. * Adds Swift Package Manager support * Adds Linux support * Replaces `AnyObserver` with `UIBindingObserver` in public interface. * Renames `resourceCount` to `Resources.total`. * Makes `rx.text` type consistent with UIKit `String?` type. swift textField.rx.text // <- now has type `ControlProperty<String?>` textField.rx.text.orEmpty // <- now has type `ControlProperty<String>` * Adds optional overloads for `bindTo` and `drive`. Now the following works: swift let text: Observable<String> = Observable.just("") // Previously `map { $0 }` was needed because of mismatch betweeen sequence `String` type and `String?` type // on binding `rx.text` observer. text.bindTo(label.rx.text) .disposed(by: disposeBag) let text = Driver.just("") text.drive(label.rx.text) .disposed(by: disposeBag) * Adds trim output parameter to `debug` operator. #930 * Renames `NSDate` to `Date` everywhere. * Renames scheduler init param `<API key>` to `qos` and removes custom enum wrapper. * Adds setter to `rx` property to enable mutation of base object. * Subscription disposables now only create strong references to sinks until being disposed or sequence terminates. #573 * Introduces `SharedSequence` and makes `Driver` just a specialization of `SharedSequence`. That means `Driver` is now just one specific `SharedSequence` and it is now possible to easily create new concepts that have another compile time guarantees in a couple of lines of code. E.g. choosing a background scheduler on which elements are delivered, or choosing `share` as a sharing strategy instead of `<API key>`. * Moves `Reactive` struct and `ReactiveCompatible` from `RxCocoa` to `RxSwift` to enable third party consumers to remove `RxCocoa` dependency. * Add `rx.` extensions on Types. * Moves `<API key>` and `CLLocationManager` out of `RxCocoa` to `RxExample` project because of App Store submissions issues on iOS 10. * Adds `sentMessage` got its equivalent sequence `methodInvoked` that produces elements after method is invoked (vs before method is invoked). * Deprecates `observe` method on `DelegateProxy` in favor of `sentMessage`. * Adds simetric `methodInvoked` method on `DelegateProxy` that enables observing after method is invoked. * Moves all delegate extensions from using `sentMessage` to using `methodInvoked` (that fixes some problem with editing data sources) * Fixes problem with `<API key>` source enabling editing of table view cells (swipe on delete) even if there weren't any observers or `forwardToDelegate` wasn't implementing `<API key>.tableView(_:commit:forRowAt:)`. #907 * Makes `DelegateProxy` open. #884 * Deprecates extensions that were polluting Swift collection namespaces and moves them to static functions on `Observable` * `Observable.combineLatest` * `Observable.zip` * `Observable.concat` * `Observable.catchError` (sequence version) * `Observable.amb` * Deprecates extensions that were polluting Swift collection namespaces and moves them to static functions on `Driver` * `Driver.combineLatest` * `Driver.zip` * `Driver.concat` * `Driver.catchError` (sequence version) * `Driver.amb` * Update Getting Started document, section on creating an observable that performs work to Swift 3.0. * Removes stale installation instructions. * Adapts to new Swift 3.0 syntax. * Corrects `throttle` operator behavior to be more consistent with other platforms. Adds `latest` flag that controls should latest element be emitted after dueTime. * Adds `delay` operator. * Adds `UISearchBar` extensions: * `<API key>` * `<API key>` * `textDidBeginEditing` * `textDidEndEditing` * Moves `CLLocationManager` and `<API key>` extensions from RxCocoa to RxExample project. #874 * Adds matrix CI builds. ==== # Features * Modernizes API to be more consistent with Swift 3.0 API Design Guidelines * Replaces `rx_*` prefix with `rx.*` extensions. (Inspired by `.lazy` collections API). We've tried annotate deprecated APIs with `@available(*, deprecated, renamed: "new method")` but trivial replacements aren't annotated. * `rx_text` -> `rx.text` * `rx_tap` -> `rx.tap` * `rx_date` -> `rx.date` * ... * Deprecates `subscribeNext`, `subscribeError`, `subscribeCompleted` in favor of `subscribe(onNext:onError:onCompleted:onDisposed)` (The downsides of old extensions were inconsistencies with Swift API guidelines. They also weren't expressing that calling them actually performes additional subscriptions and thus potentially additional work beside just registering observers). * Deprecates `doOnNext`, `doOnCompleted`, `doOnError` in favor of `do(onNext:onCompleted:onError:onSubscribe:onDisposed:)` * Adds `onSubscribe` and `onDisposed` to `do` operator. * Adds namespace for immutable disposables called `Disposables` * Deprecates `AnonymousDisposable` in favor of `Disposables.create(with:)` * Deprecates `NopDisposable` in favor of `Disposables.create()` * Deprecates `BinaryDisposable` in favor of `Disposables.create(_:_:)` * Deprecates `toObservable` in favor of `Observable.from()`. * Replaces old javascript automation tests with Swift UI Tests. * ... # Anomalies * There is a problem using `UISwitch` extensions because it seems that a bug exists in UIKit that causes all `UISwitch` instances to leak. https://github.com/ReactiveX/RxSwift/issues/842 # Features * Adds Swift 2.3 compatibility. * Adds `UIViewController.rx_title` extension. * Adds `UIScrollView.rx_scrollEnabled` extension. * Resolve static analysis issues relating to non-use of an assigned value, and potential null dereferences in RxCocoa's Objective-C classes. * Changes `forwardDelegate` property type on `DelegateProxy` from `assign` to `weak`. * Simplifies UITable/CollectionView data source generic parameters. * Adds simple usage examples to UITable/CollectionView data source extensions. * Documents UITable/CollectionView data source extensions memory management and adds unit tests to cover that documentation. * Adds `.jazzy.yml` * Adds `UITabBar` extensions and delegate proxy wrapper * rx_didSelectItem * <API key> * <API key> * <API key> * <API key> * Adds `UIPickerView` delegate proxy and extensions: * rx_itemSelected * Adds `UIAlertAction.rx_enabled` extension. * Adds `UIButton.rx_title(controlState: UIControlState = .Normal)` extension. * Adds `UIPageControl.rx_currentPage` extension. * Adds `hasObservers` property to `*Subject`. # Anomalies * Fixes problem with UITable/CollectionView releasing of data sources when result subscription disposable wasn't retained. * Fixes all Xcode analyzer warnings # Features * Exposes `<API key>`. * Adds `proxyForObject` as protocol extension and deprecates global function version. * Improves `<API key>` assert messaging. * Improves gesture recognizer extensions to use typed gesture recognizers in `rx_event`. * Adds `RxTextInput` protocol to enable creating reactive extensions for `UITextInput/NSTextInput`. * Adds `rx_willDisplayCell` and `<API key>` extensions to `UITableView`. * Improves playgrounds. # Anomalies * Fixes in documentation. * Turns off Bitcode for `RxTests` CocoaPods integration. * Fixes `UITextField.rx_text` and `UITextView.rx_text` integrations to be more robust when used with two way binding. * Fixes two way binding example code so it now properly handles IME used in Asian cultures and adds explanations how to properly perform two way bindings. https://github.com/ReactiveX/RxSwift/issues/649 * Removes `<API key>` from control extensions. https://github.com/ReactiveX/RxSwift/issues/626 # Features * adds `Driver.drive` with `Variable` parameter. * exposes `<API key>` * adds `<API key>` to `UISearchBar`. * adds `<API key>` to `UISearchBar`. * adds `UISearchController` extensions: * `rx_didDismiss` * `rx_didPresent` * `rx_present` * `rx_willDismiss` * `rx_willPresent` # Anomalies * Fixes anomaly with `multicast` disposing subscription. * Small grammar fixes in code. * Fixes in documentation. # Features * Xcode 7.3 / Swift 2.2 support # Features * Adds `rx_badgeValue` to `UITabBarItem`. * Adds `rx_progress` to `UIProgresView`. * Adds `<API key>` to `UISearchBar`. * Adds `asyncInstance` to `MainScheduler`. * Makes `name` parmeter optional for `rx_notification` extension. * Adds `UnitTests.md`. * Adds `Tips.md`. * Updates playground inline documentation with running instructions. * Synchronizes copy of `RxDataSources` source files inside example project to `0.6` release. # Anomalies * Fixes anomaly with synchronization in disposable setter of `<API key>`. * Improves `DelegateProxy` memory management. * Fixes anomaly during two way binding of `UITextView` text value. * Improves `single` operator so it handles reentrancy better. # Public Interface anomalies * Fixes problem with `timer` operator. Changes return type from `Observable<Int64>` to `Observable<T>`. This could potentially cause code breakage, but it was an API anomaly. * Curried functions were marked deprecated so they were replaced in `UITableView` and `UICollectionView` extensions with equivalent lambdas. This shouldn't break anyone's code, but it is a change in public interface. This is example of those changes: swift - public func <API key><S : Sequence, O : ObservableType where O.E == S> (source: O) (cellFactory: (UITableView, Int, S.Iterator.Element) -> UITableViewCell) -> Disposable + public func <API key><S : Sequence, O : ObservableType where O.E == S> (source: O) -> (cellFactory: (UITableView, Int, S.Iterator.Element) -> UITableViewCell) -> Disposable * Fixes anomaly in `CLLocationManager` extensions swift - public var <API key>: RxSwift.Observable<NSError> { get } + public var <API key>: RxSwift.Observable<NSError?> { get } # Features * Adds `UIBindingObserver`. * Adds `doOnNext` convenience operator (also added to `Driver`). * Adds `doOnError` convenience operator. * Adds `doOnCompleted` convenience operator (also added to `Driver`). * Adds `skip`, `startWith` to `Driver`. * Adds `rx_active` extension to `NSLayoutConstraint`. * Adds `rx_refreshing` extension to `UIRefreshControl`. * Adds `interval` and `timer` to `Driver`. * Adds `<API key>` to `UITableView` extensions. * Adds `<API key>` to `UIApplication`. * Adds `rx_selected` to `UIControl`. # Anomalies * Fixes anomaly with registering multiple observers to `UIBarButtonItem`. * Fixes anomaly with blocking operators possibly over-stopping the `RunLoop`. # Features * Adds `<API key>` delegate wrappers. * Adds `<API key>` that enables third party data sources to use existing `rx_modelSelected`/`rx_modelDeselected` wrappers. * Adds `rx_modelDeselected` to `UITableView` * Adds `rx_itemDeselected` to `UITableView` * Adds `rx_modelDeselected` to `UICollectionView` * Adds `rx_itemDeselected` to `UICollectionView` * Adds `rx_state` to `NSButton` * Adds `rx_enabled` to `NSControl` * Adds `<API key>` usage example to Example app. # Anomalies * Removes usage of `OSSpinLock`s from all `Darwin` platforms because of problems with inversion of priority on iOS. [Original thread on swift mailing list is here](https://lists.swift.org/pipermail/swift-dev/<API key>/000321.html) * Reduces verbose output from `RxCocoa` project in debug mode. `TRACE_RESOURCES` is now also treated as a verbosity level setting. It is possible to get old output by using `TRACE_RESOURCES` with verbosity level `>= 2`. [ * Fixes anomaly with logging of HTTP body of requests in `RxCocoa` project. # Features * Changes package names to `io.rx.[library]` * Packages data sources from `<API key>` into it's own repository [RxDataSources](https://github.com/RxSwiftCommunity/RxDataSources) under `RxSwiftCommunity`. * Removes deprecated APIs. # Anomalies * Replaces hacky code that solved anomaly caused by interaction between autocorrect and text controls notification mechanism with proper solution. #333 # Features * Adds generic `public func rx_sentMessage(selector: Selector) -> Observable<[AnyObject]>` that enables observing of messages sent to any object. (This is enabled if DISABLE_SWIZZLING isn't set). * use cases like `cell.rx_sentMessage("prepareForReuse")` are now supported. * Linux support (proof of concept, but single threaded mode works) * more info in [Documentation/Linux.md](https://github.com/ReactiveX/RxSwift/blob/master/Documentation/Linux.md) * Initial support for `Swift Package Manager` * works on `Linux` (`RxSwift`, `RxBlocking`, `RxTests`) * doesn't work on OSX because it can't compile `RxCocoa` and `RxTests` (because of inclusion of `XCTest` extensions), but OSX has two other package managers and manual method. * Project content is linked to `Sources` automagically using custom tool * more info in [Documentation/Linux.md](https://github.com/ReactiveX/RxSwift/blob/master/Documentation/Linux.md) * Adds `<API key>` to `RxSwift` * Adds `HistoricalScheduler` to `RxSwift` * Improves performance of virtual schedulers using priority queue. * Adds new `RxTests` library to enable testing of custom Rx operators. This library contains everything needed to write unit tests in the following way: swift func testMap() { let scheduler = TestScheduler(initialClock: 0) let xs = scheduler.createHotObservable([ next(150, 1), next(210, 0), next(220, 1), next(230, 2), next(240, 4), completed(300) ]) let res = scheduler.start { xs.map { $0 * 2 } } let correctEvents = [ next(210, 0 * 2), next(220, 1 * 2), next(230, 2 * 2), next(240, 4 * 2), completed(300) ] let <API key> = [ Subscription(200, 300) ] XCTAssertEqual(res.events, correctEvents) XCTAssertEqual(xs.subscriptions, <API key>) } * Adds test project for `RxExample-iOS` that demonstrates how to easily write marble tests using `RxTests` project. swift let ( usernameEvents, passwordEvents, <API key>, loginTapEvents, <API key>, <API key> ) = ( scheduler.parseEventsAndTimes("e scheduler.parseEventsAndTimes("<API key> scheduler.parseEventsAndTimes("<API key>-", values: stringValues).first!, scheduler.parseEventsAndTimes(" scheduler.parseEventsAndTimes("<API key> scheduler.parseEventsAndTimes("<API key>---", values: booleans).first! ) * Adds example app for GitHub signup example that shows the same example written with and without `Driver`. * Documents idea behind units and `Driver` in `Units.md`. * Example of table view with editing is polished to use more functional approach. * Adds `deferred` to `Driver` unit. * Removes implicitly unwrapped optionals from `CLLocationManager` extensions. * Removes implicitly unwrapped optionals from `NSURLSession` extensions. * Polishes the `debug` operator format. * Adds optional `cellType` parameter to Table/Collection view `<API key>` method. * Polish for calculator example in `RxExample` app. * Documents and adds unit tests for tail recursive optimizations of `concat` operator. * Moves `Event` equality operator to `RxTests` project. * Adds `seealso` references to `reactivex.io`. * Polishes headers in source files and adds tests to enforce standard header format. * Adds `driveOnScheduler` to enable scheduler mocking for `Driver` during unit tests. * Adds assertions to `drive*` family of functions that makes sure they are always called from main thread. * Refactoring and polishing of internal ObjC runtime interception architecture. # Deprecated * Changes `<API key>`, generic argument is now type of elements in observable sequence and not type of underlying subject. (BREAKING CHANGE) * Removes `RxBox` and `RxMutable` box from public interface. (BREAKING CHANGE) * `SchedulerType` now isn't parametrized on `Time` and `TimeInterval`. * Deprecates `Variable` implementing `ObservableType` in favor of `asObservable()`. * Now variable also sends `.Completed` to observable sequence returned from `asObservable` when deallocated. If you were (mis)using variable to return single value Variable(1).map { x in ... } you can just use `just` operator Observable.just(1).map { x in ... } * Deprecates free functions in favor of `Observable` factory methods, and deprecates versions of operators with hidden external parameters (scheduler, count) in favor of ones with explicit parameter names. E.g. `Observable.just(1)` instead of `just(1)` `Observable.empty()` instead of `empty()` `Observable.error()` instead of `failWith()` `Observable.of(1, 2, 3)` instead of `sequenceOf(1, 2, 3)` `.debounce(0.2, scheduler: MainScheduler.sharedInstance)` instead of `.debounce(0.2, MainScheduler.sharedInstance)` `Observable.range(start:0, count: 10)` instead of `range(0, 10)` `Observable.generate(initialState: 0, condition: { $0 < 10 }) { $0 + 1 }` instead of `generate(0, condition: { $0 < 10 }) { $0 + 1 }` `Observable<Int>.interval(1, scheduler: MainScheduler.sharedInstance)` instead of `interval(1, MainScheduler.sharedInstance)` If you want to continue using free functions form, you can define your free function aliases for `Observable` factory methods (basically copy deprecated methods). * Deprecates `UIAlertView` extensions. * These extensions could be stored locally if needed. * Deprecates `UIActionSheet` extensions. * These extensions could be stored locally if needed. * Deprecates `rx_controlEvents` in favor of `rx_controlEvent`. * Deprecates `MainScheduler.sharedInstance` in favor of `MainScheduler.instance` * Deprecates `<API key>.sharedInstance` in favor of `<API key>.instance` * Deprecates factory methods from `Drive` in favor of `Driver` factory methods. * Deprecates `sampleLatest` in favor of `withLatestFrom`. * Deprecates `ScopedDisposable` and `scopedDispose()` in favor of `DisposeBag`. # Fixed * Improves and documents resource leak code in `RxExample`. * Replaces `unowned` reference with `weak` references in `RxCocoa` project. * Fixes `debug` operator not using `__FILE__` and `__LINE__` properly. * Fixes anomaly with `timeout` operator. * Fixes problem with spell-checker and `UIText*` losing focus. # Updated * Adds `ignoreElements` operator. * Adds `timeout` operator (2 overloads). * Adds `<API key>` operator. * Changes `Driver` to internally use `<API key>` for subscription sharing instead of `shareReplay(1)`. * Adds `flatMapFirst` to `Driver` unit. * Adds `replayAll` operator. * Adds `createUnbounded` factory method to `ReplaySubject`. * Adds optional type hints to `empty`, `failWith` and `never` (`empty(Int)` now works and means empty observable sequence of `Int`s). * Adds `rx_hidden` to `UIView`. * Adds `rx_alpha` to `UIView`. * Adds `rx_attributedText` to `UILabel`. * Adds `rx_animating` to `<API key>`. * Adds `rx_constant` to `NSLayoutConstraint`. * Removes implicitly unwrapped optional from `NSURLSession.rx_response`. * Exposes `<API key>`, `<API key>` on `UITableView`/`UICollectionView`. * Exposes `<API key>` on `UITextView`. * Exposes `<API key>` on `UIScrollView`. * Exposes `<API key>`. * Exposes `<API key>`. * Exposes `<API key>`. * Exposes `<API key>`. * Exposes `<API key>`. * Deprecates `proxyForObject` in favor of `proxyForObject<P : DelegateProxyType>(type: P.Type, _ object: AnyObject) -> P`. * Deprecates `rx_modelSelected<T>()` in favor of `rx_modelSelected<T>(modelType: T.Type)`. * Adds `func bindTo(variable: Variable<E>) -> Disposable` extension to `ObservableType`. * Exposes `ControlEvent` init. * Exposes `ControlProperty` init. * Refactoring of example app * Divides examples into sections * Adds really simple examples of how to do simple calculated bindings with vanilla Rx. * Adds really simple examples of table view extensions (sectioned and non sectioned version). * Refactoring of `GitHub sign in example` to use MVVM paradigm. # Fixed * Fixes documentation for `flatMapFirst` * Fixes problem with delegate proxies not detecting all delegate methods in delegate proxy hierarchy. # Updated * Improves KVO mechanism. * Type of observed object is now first argument `view.rx_observe(CGRect.self, "frame")` * Support for observing ObjC bridged enums and `RawRepresentable` protocol * Support for easier extending of KVO using `KVORepresentable` protocol * Deprecates KVO extensions that don't accept type as first argument in favor of ones that do. * Adds `flatMapLatest` (also added to `Driver` unit). * Adds `flatMapFirst` operator (also added to `Driver` unit). * Adds `retryWhen` operator. * Adds `window` operator. * Adds `single` operator. * Adds `single` (blocking version) operator. * Adds `rx_primaryAction` on `UIButton` for `tvOS`. * Transforms error types in `RxSwift`/`RxCocoa` projects from `NSError`s to Swift enum types. * `RxError` * `RxCocoaError` * `RxCocoaURLError` * ... * `NSURLSession` extensions now return `Observable<(NSData!, NSHTTPURLResponse)>` instead of `Observable<(NSData!, NSURLResponse!)>`. * Optimizes consecutive map operators. For example `map(validate1).map(validate2).map(parse)` is now internally optimized to one `map` operator. * Adds overloads for `just`, `sequenceOf`, `toObservable` that accept scheduler. * Deprecates `asObservable` extension of `Sequence` in favor of `toObservable`. * Adds `toObservable` extension to `Array`. * Improves table view animated data source example. * Polishing of `<API key>` * `<API key>` operator * `<API key>` extension * Makes blocking operators run current thread's runloop while blocking and thus disabling deadlocks. # Fixed * Fixes example with `Variable` in playgrounds so it less confusing regarding memory management. * Fixes `UIImageView` extensions to use `UIImage?` instead of `UIImage!`. * Fixes improper usage of `<API key>` and replaces it with `<API key>`. # Updated * Optimizations. System now performs significantly fewer allocations and is several times faster then 2.0.0-beta.1 * Makes `AnonymousObservable` private in favor of `create` method. * Adds `toArray` operator (non blocking version). * Adds `withLatestFrom` operator, and also extends `Driver` with that operation. * Adds `elementAt` operator (non blocking version). * Adds `takeLast` operator. * Improves `RxExample` app. Adds retries example when network becomes available again. * Adds composite extensions to `Bag` (`on`, `disposeAllIn`). * Renames mistyped extension on `ObserverType` from `onComplete` to `onCompleted`. # Fixed * Fixes minimal platform version in OSX version of library to 10.9 # Updated * Adds `Driver` unit. This unit uses Swift compiler to prove certain properties about observable sequences. Specifically * that fallback error handling is put in place * results are observed on main thread * work is performed only when there is a need (at least one subscriber) * computation results are shared between different observers (replay latest element) * Renames `ObserverOf` to `AnyObserver`. * Adds new interface `<API key>`. * Adds `BlockingObservable` to `RxBlocking` and makes it more consistent with `RxJava`. * Renames `func subscribe(next:error:completed:disposed:)` to `func subscribe(onNext:onError:onCompleted:onDisposed:)` * Adds concat convenience method `public func concat<O : <API key> where O.E == E>(second: O) -> RxSwift.Observable<Self.E>` * Adds `skipUntil` operator. * Adds `takeWhile` operator. * Renames `takeWhile` indexed version to `takeWhileWithIndex` * Adds `skipWhile` operator. * Adds `skipWhileWithIndex` operator. * Adds `using` operator. * Renames `func doOn(next:error:completed:)` to `func doOn(onNext:onError:onCompleted:)`. * Makes `<API key>` private. * Makes `<API key>` private. * Adds `<API key>`. * Adds overflow error so now in case of overflow, operators will return `RxErrorCode.Overflow`. * Adds `rx_modelAtIndexPath` to `UITableView` and `UICollectionView`. * Adds `var <API key>: ControlEvent<(context:<API key>:)>` to `UITableView` and `UICollectionView` * Makes `resultSelector` argument in `combineLatest` explicit `func combineLatest<O1, O2, R>(source1: O1, _ source2: O2, resultSelector: (O1.E, O2.E) throws -> R) -> RxSwift.Observable<R>`. * Makes `resultSelector` argument in `zip` explicit `func combineLatest<O1, O2, R>(source1: O1, _ source2: O2, resultSelector: (O1.E, O2.E) throws -> R) -> RxSwift.Observable<R>`. * Adds activity indicator example in `RxExample` app. * Adds two way binding example in `RxExample` app. * many other small features # Fixed * Problem with xcodebuild 7.0.1 treating tvOS shared schemes as osx schemes. # Updated * Adds `tvOS` support * Adds `watchOS` support * Adds auto loading example to example app * Restores old `Variable` behavior. Variable doesn't send anything on dealloc. * Adds performance tests target. * Adds more detailed resource tracing during unit tests (important for further optimizations). * Adds `UIStepper` extensions. * Adds `UIBarButtonItem` enabled property wrapper. * Adds response data to userInfo of error for `rx_response` extensions of `NSURLSession`. * Adds `onNext`, `onError` and `onCompleted` convenience methods to `ObserverType`. # Fixed * Fixes problem on some systems with unregistering `<API key>` from current thread. * Fixes retry parameter naming (`maxAttemptCount`). * Fixes a lot of unit test warnings. * Removes embedding of Swift library with built frameworks. # Updated * Renames `ImmediateScheduler` protocol to `<API key>` * Renames `Scheduler` protocol to `SchedulerType` * Adds `<API key>` * Adds `generate` operator * Cleanup of dead observer code. * Removes `SpinLock`s in disposables in favor of more performant `<API key>`. * Adds `buffer` operator (version with time and count). * Adds `range` operator. * Adds `repeat` operator. # Updated * Renames `ScopedDispose` to `ScopedDisposable` * Deprecates `observeSingleOn` in favor of `observeOn` * Adds inline documentation * Renames `from` to `asObservable` extension method on `Sequence` * Renames `<API key>` in favor of `<API key>` * Deprecates `catchErrorToResult`, the preferred way is to use Swift `do/try/catch` mechanism. * Deprecates `RxResult`, the preferred way is to use Swift `do/try/catch` mechanism. * Deprecates `sendNext` on `Variable` in favor of just using `value` setter. * Renames `rx_searchText` to `rx_text` on `UISearchBar+Rx`. * Changes parameter type for `rx_imageAnimated` to be transitionType (kCATransitionFade, kCATransitionMoveIn, ...). # Fixed * Problem in RxExample with missing `observeOn` for images. # Updated * Removes deprecated APIs * Adds `ObservableType` * Moved from using `>-` operator to protocol extensions * Change from `disposeBag.addDisposable` to `disposable.addDisposableTo` * Changes in RxCocoa extensions to enable fluent style * Rename of `do*` to `doOn*` * Deprecates `returnElement` in favor of `just` * Deprecates `aggregate` in favor of `reduce` * Deprecates `variable` in favor of `shareReplay(1)` (to be consistent with RxJS version) * Method `next` on `Variable` in favor of `sendNext` # Fixed # Updated * Adds Calculator example app * Performance improvements for Queue # Fixed * Crash in `<API key>`. [
using System; using System.Collections.Generic; using System.Text; using System.Drawing; using System.Windows.Forms; using System.IO; using ESRI.ArcGIS.Geodatabase; using ESRI.ArcGIS.esriSystem; namespace ArcGISCompare { internal static class MiscProcs { internal static String TrimText(string OrigText, Font f, Size ProposedSize) { Size TheSize = TextRenderer.MeasureText(OrigText, f); String TheShortString = OrigText; String DerivedString = OrigText.Substring(0, 3); String PathString = TheShortString.Substring(2); try { while (TheSize.Width >= ProposedSize.Width) { PathString = PathString.Substring(1); if (PathString.Contains("\\")) { PathString = PathString.Substring(PathString.IndexOf("\\") + 1); TheShortString = DerivedString + "..." + PathString; } TheSize = TextRenderer.MeasureText(TheShortString, f); } } catch { } return TheShortString; } internal static Boolean <API key>(String DatabaseFullPath) { Boolean bAns = false; ADOX.Catalog cat = new ADOX.Catalog(); try { string theConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + DatabaseFullPath; cat.Create(theConnection); bAns = true; } catch (System.Runtime.InteropServices.COMException ex) { MessageBox.Show(ex.Message); bAns = false; } cat = null; return bAns; } internal static void addtoLog(string logText, TextBox theTBox) { theTBox.Text = theTBox.Text + logText + " " + DateTime.Now.ToString() + " \r\n"; } internal static String buildNONSDSName(String inName, esriWorkspaceType theWSType) { switch (theWSType) { case esriWorkspaceType.<API key>: return "NONATT_" + inName; break; case esriWorkspaceType.<API key>: if (inName.Length <= 23) return "NONATT_" + inName; else { inName = inName.Substring(30 - inName.Length, inName.Length * 2 - 30); return "NONATT_" + inName; } break; case esriWorkspaceType.<API key>: if (inName.Length <= 23) return "NONATT_" + inName; else { inName = inName.Substring(30 - inName.Length, inName.Length * 2 - 30); return "NONATT_" + inName; } break; default: return inName; break; } } internal static ESRI.ArcGIS.Geodatabase.esriFieldType BuildDataType(String theType, int theLength) { esriFieldType theRetValue = esriFieldType.esriFieldTypeString; String lngtString; theType = theType.ToLower(); try { if (theType.StartsWith("string")) { lngtString = theType.Substring(7, theType.Length - 8); theLength = (int)Convert.ToInt32(lngtString); } else { switch (theType.ToLower()) { case "integer": theRetValue = esriFieldType.<API key>; break; case "single": theRetValue = esriFieldType.esriFieldTypeSingle; break; case "double": theRetValue = esriFieldType.esriFieldTypeDouble; break; case "guid": theRetValue = esriFieldType.esriFieldTypeGUID; break; case "smallInteger": theRetValue = esriFieldType.<API key>; break; case "date": theRetValue = esriFieldType.esriFieldTypeDate; break; } } } catch { theRetValue = esriFieldType.esriFieldTypeString; } return theRetValue; } internal static String UnBuildDataType(esriFieldType theType, int theLength) { String retVal = ""; switch (theType) { case esriFieldType.esriFieldTypeGUID: retVal = "GUID"; break; case esriFieldType.<API key>: retVal = "Integer"; break; case esriFieldType.<API key>: retVal = "SmallInteger"; break; case esriFieldType.esriFieldTypeSingle: retVal = "Single"; break; case esriFieldType.esriFieldTypeDouble: retVal = "Double"; break; case esriFieldType.esriFieldTypeString: retVal = "String(" + theLength.ToString() + ")"; break; case esriFieldType.esriFieldTypeDate: retVal = "DateTime"; break; } return retVal; } internal static String fileNameONLY(String fullName) { FileInfo theF = new FileInfo(fullName); return theF.Name; } internal static int getTransformNumber(esriFieldType srcDT, esriFieldType destDT) { switch (destDT) { case esriFieldType.esriFieldTypeString: switch (srcDT) { case esriFieldType.<API key>: return 13; break; case esriFieldType.esriFieldTypeSingle: return 12; break; case esriFieldType.esriFieldTypeDouble: return 10; break; case esriFieldType.esriFieldTypeString: return 0; break; case esriFieldType.esriFieldTypeDate: return 14; break; default: return -1; break; } case esriFieldType.<API key>: switch (srcDT) { case esriFieldType.esriFieldTypeSingle: return 4; break; case esriFieldType.esriFieldTypeDouble: return 5; break; case esriFieldType.esriFieldTypeString: return 6; break; case esriFieldType.esriFieldTypeDate: return 7; break; case esriFieldType.<API key>: return 0; break; default: return -1; break; } break; case esriFieldType.esriFieldTypeDouble: switch (srcDT) { case esriFieldType.<API key>: return 1; break; case esriFieldType.<API key>: return 3; break; case esriFieldType.esriFieldTypeString: return 2; break; case esriFieldType.esriFieldTypeSingle: return 0; break; case esriFieldType.esriFieldTypeDouble: return 0; break; default: return -1; break; } break; case esriFieldType.esriFieldTypeGUID: switch (srcDT) { case esriFieldType.esriFieldTypeString: return 16; break; case esriFieldType.esriFieldTypeGUID: return 0; break; default: return -1; break; } default: return -1; break; } } internal static String getGeomTransform(int geomTran) { switch (geomTran) { case 1: case 2: return "Polygon to Point"; break; case 3: return "Point to Polygon"; break; case 4: return "Polyline to Point"; break; default: return "Undefined"; break; } } internal static Boolean NoLocks(IClass theLockClass) { Boolean Result = false; ISchemaLock theLock; ISchemaLockInfo oneLock; IEnumSchemaLockInfo allLocks; try { theLock = (ISchemaLock)theLockClass; theLock.<API key>(out allLocks); allLocks.Reset(); oneLock = allLocks.Next(); oneLock = allLocks.Next(); if (oneLock != null) Result = false; else { Result = true; } if (Result) { theLock.ChangeSchemaLock(esriSchemaLock.<API key>); } } catch { Result = false; } return Result; } internal static Boolean FreeLocks(IClass theLockClass) { Boolean Result = false; ISchemaLock theLock; try { theLock = (ISchemaLock)theLockClass; theLock.ChangeSchemaLock(esriSchemaLock.<API key>); Result = true; } catch { Result = false; } return Result; } internal static Boolean canDoRelates() { Boolean Result = false; IAoInitialize theInit; ILicenseInformation theLicense; theInit = new AoInitializeClass(); theLicense = (ILicenseInformation)theInit; String theProduct = theLicense.<API key>(theInit.InitializedProduct()); if (theProduct == "<API key>" || theProduct == "<API key>") return true; return Result; } } }
namespace <API key>.Services.Data.Contracts { using System.Linq; using Models; public interface ICommunitiesService : IService { IQueryable<Community> All(); IQueryable<Community> ByCurrentUser(); int Add(string Name, string Description = null); } }
# -*- coding: UTF-8 -*- # import os # import django # os.environ.setdefault("<API key>", "interface_platform.settings") # django.setup() from django.test import TestCase from testdata import CreateTestData from django.contrib.auth.models import User from account.models import Account from ..management.<API key> import <API key> from ..models import Project, ITStatement, ITBody, Variable class ITRunnerTestCase(TestCase): def setUp(self): # POST11.24 data = CreateTestData() user = data.create_account("Tom2", "123456", "124584120@163.com") account = Account.objects.get(user=user) project = data.create_project("2", account) host = data.create_host("super.qiye.yixin.im", "106.2.124.114", project, "HOST", account, account) itstatement = data.create_itstatement("Admin Cookie", "HTTPS", "POST", "/checkLogin?", project, account, host, account) itbody1 = data.create_itbody("account", 3, "Text", "numen_dev@163.com", it=itstatement, body_type=0) itbody2 = data.create_itbody("password", 3, "Text", "Admin123", it=itstatement, body_type=0) test_body = data.create_itbody("code", 3, "Int", "200", it=itstatement, body_type=1) itstatement = data.create_itstatement("2", "HTTPS", "POST", "/checkLogin?", project, account, host, account) def <API key>(self): itstatement = ITStatement.objects.get(name="Admin Cookie") # interfacerunner = InterfaceRunner(itstatement.id).runner() <API key> = <API key>(itstatement.id) <API key>.runner() print <API key>.get_cookie()
require "nodes/node_parent" require "nodes/node_assignment" require "nodes/node_loop" require "nodes/node_start" require "gen/jsvisitor" class Parser attr_reader :lookahead def initialize(lexer) @lexer = lexer end def test_tokens while @token = @lexer.input_token p @token break if @token.is_a?TTerminate end end # Parsing method for the start production def parse_start consume_token case lookahead when TIdentifier, TLoop then @node_start = NodeStart.new parse_p @node_start match TTerminate else parse_error end # Evaluate AST after the syntax is good traverse_ast end def parse_p parent_node case lookahead when TIdentifier then @node_assignment = NodeAssignment.new @node_assignment.lvalue = lookahead SymbolTable.add_id lookahead parent_node << @node_assignment # Assignment node match TIdentifier parse_a parse_x parent_node when TLoop then @node_loop = NodeLoop.new parent_node << @node_loop # Loop node match TLoop to = lookahead semantic_error "loop variable must be defined" unless SymbolTable.get_id(to) @node_loop.to = to match TIdentifier match TDo parse_p @node_loop match TEnd parse_x parent_node else parse_error end end # As x can evaluate to Epsilon... def parse_x parent_node case lookahead when TSemicolon then # ... besides the case that it is not Epsilon ... match TSemicolon parse_p parent_node parse_x parent_node when TTerminate, TEnd, TSemicolon then # ... predict for the follow set. # Epsilon production else # Error - the current lookahead is neither in.. # 1. FIRST(x) # 2. FOLLOW(x) if Epsilon in FIRST(x) parse_error end end def parse_a case lookahead when TColon then match TColon parse_b else parse_error end end def parse_b case lookahead when TEq then match TEq parse_c else parse_error end end def parse_c case lookahead when TIdentifier SymbolTable.<API key> lookahead @node_assignment.op1 = lookahead match TIdentifier parse_d when TNumber @node_assignment.rvalue = lookahead # Short assignment match TNumber else parse_error end end def parse_d case lookahead when TBinOp then @node_assignment.op = lookahead # Operand match TBinOp @node_assignment.op2 = lookahead match TNumber else parse_error end end private # Checks if the current token is an instance of <which_class>. If this is not the case # the programm terminates as an syntacial error occured. Reads the next token after the # check was successful. def match(which_class) if lookahead.is_a?(which_class) #p "Is: #{lookahead.class}, Expected: #{which_class}" else p "Syntaxfehler! Is: #{lookahead.class} Expected: #{which_class}" exit end consume_token end # Returns the next token from the scanner def consume_token @lookahead = @lexer.input_token @lookahead end def parse_error p "Syntax error: #{lookahead.class}" exit end def semantic_error(message) p "Semantic error: #{message}" exit end def traverse_ast visitor = JSVisitor.new @node_start.accept visitor visitor.run end end
<div class="widget widget-cup-control"> @if ($cups and sizeof($cups) > 0) <ul class="list-unstyled"> @foreach ($cups as $cup) <li> <h4><a href="{{ url('cups/'.$cup->id.'/'.$cup->slug) }}" title="{{ $cup->title }}">{{ $cup->title }}</a></h4> <p class="infos"> {!! HTML::fontIcon('crosshairs') !!} {{ $cup->players_per_team.'on'.$cup->players_per_team }} {{ trans('app.mode') }}, {!! HTML::fontIcon('calendar') !!} {{ $cup->start_at }}, {!! HTML::fontIcon('clock') !!} {{ $cup->start_at->format('H:i') }} </p> </li> @endforeach </ul> @else {{ trans('cups::in_no_cups') }} <a href="{{ url('cups') }}">{{ trans('cups::join_a_cup') }}</a> @endif @if (user()) <hr> <a href="{{ url('cups/teams/overview/'.user()->id) }}">{!! HTML::fontIcon('wrench') !!} {{ trans('cups::my_teams') }}</a> @endif </div>
angular .module('app.directives') .directive('wps', wps) ; /* @ngInject */ function wps($mdBottomSheet, TemplateUrls) { return { scope: { race: '=', track: '=' }, replace: true, restrict: 'E', templateUrl: TemplateUrls.WPS, controller: controller }; /* @ngInject */ function controller($scope) { $scope.onWpsClick = onWpsClick; function onWpsClick(ev) { ev.preventDefault(); ev.stopPropagation(); $mdBottomSheet.show({ templateUrl: TemplateUrls.WPS_BOTTOM_SHEET, scope: $scope.$new(true) }); } } }
module Bookland class ISBN < EAN PREFIXES = [%w(9 7 8), %w(9 7 9)] def valid? PREFIXES.include?(digits[0, 3]) && super end end end
#ifndef IPR1_UTILITY_H #define IPR1_UTILITY_H #include <cstdio> #include <cstdint> // prints string as hex static void phex(uint8_t* str) { uint8_t len = 16; unsigned char i; for (i = 0; i < len; ++i) printf("%.2x", str[i]); printf("\n"); } template <class T,class U> void set_bit(T* target,const U src,const int from,const int to){ *target ^= (-((src & (1ULL << from)) != 0) ^ *target) & (1ULL << to); } template <class T> void cycle_shift_left(T* target, const T src,const int size, int count){ for(int i = 0;i<count;i++) { set_bit(target, src, size - count + i, i); } for(int i = 0;i<size-count;i++){ set_bit(target,src,i,i+count); } } template <class T,class U> void permutation(T *target, const U src, const int* map, int length){ for(int i = 0; i<length; i++){ set_bit(target,src,map[i]-1,i); } } template <class T,class U> void substitution(T *target, const U src, const int blockSize, const int newBlockSize, const int blockCount, const int columns, const int *map,bool linear = false){ for(int i = 0; i < blockCount; i++) { int subblock = 0; int substituted = 0; //split block for(int j = 0; j<blockSize; j++) { set_bit(&subblock, src, i * blockSize + j, j); } if(linear){ substituted = map[i*columns+subblock]; }else { uint32_t y = 0; uint32_t x = 0; //get y set_bit(&y, subblock, 0, 0); set_bit(&y, subblock, blockSize - 1, 1); //get x for (int j = 1, k = 0; j < (blockSize - 2); j++, k++) { set_bit(&x, subblock, j, k); } substituted = map[i*64+y*columns+x]; } //join block for(int j = 0; j<newBlockSize; j++){ set_bit(target, substituted, j,i*newBlockSize + j); } } } template <class T> void print_bits(T x,int size = 0){ int numbits = size == 0 ? (8*sizeof(T)) : size; while(--numbits >= 0) printf(numbits%8 == 0 ? "%c ":"%c", (x & ((T)1<<numbits)) ? '1' : '0'); printf("\n"); } /* pseudo random number generator with 128 bit internal state... probably not suited for cryptographical usage */ typedef struct { uint32_t a; uint32_t b; uint32_t c; uint32_t d; } prng_t; static prng_t prng_ctx; static uint32_t prng_rotate(uint32_t x, uint32_t k) { return (x << k) | (x >> (32 - k)); } static uint32_t prng_next() { uint32_t e = prng_ctx.a - prng_rotate(prng_ctx.b, 27); prng_ctx.a = prng_ctx.b ^ prng_rotate(prng_ctx.c, 17); prng_ctx.b = prng_ctx.c + prng_ctx.d; prng_ctx.c = prng_ctx.d + e; prng_ctx.d = e + prng_ctx.a; return prng_ctx.d; } static void prng_init(uint32_t seed) { uint32_t i; prng_ctx.a = 0xf1ea5eed; prng_ctx.b = prng_ctx.c = prng_ctx.d = seed; for (i = 0; i < 31; ++i) { (void) prng_next(); } } #endif //IPR1_UTILITY_H
using System; using System.Collections.Generic; using System.Text; namespace Nucleo.Windows.Actions { public class SelectionAction : IAction { #region " Constants " public const string DefaultActionName = "Selection"; #endregion #region " Properties " public string ActionName { get { return DefaultActionName; } } #endregion #region " Constructors " internal SelectionAction() { } #endregion } }
// models/Friend.js module.exports = function(mongoose) { var Schema = mongoose.Schema; var FriendSchema = new Schema({ id_usuario_a : String, id_usuario_b : String }); return mongoose.model('Friend', FriendSchema); }
var gulp = require('gulp'); var sass = require('gulp-sass'); var sourcemaps = require('gulp-sourcemaps'); var concat = require('gulp-concat'); var plumber = require('gulp-plumber'); var autoprefixer = require('gulp-autoprefixer'); var paths = { css: { src: './ngMain/static/css/src/', dist: './ngMain/static/css/dist/', libs:'./ngMain/static/css/libs/' }, js: { src: 'ngMain/static/js/src/', dist: 'ngMain/static/js/dist/', libs: 'ngMain/static/js/libs/' } }; gulp.task('sass', function () { return gulp.src(paths.css.src+'**/*.scss') .pipe(plumber()) .pipe(sass()) .pipe(autoprefixer({ browers: ['last 2 versions'], cascade: false })) .pipe(gulp.dest(paths.css.dist)); }); gulp.task('js', function () { return gulp.src(paths.js.src+'**/*.js') .pipe(sourcemaps.init()) .pipe(concat('pjlong.js')) .pipe(sourcemaps.write()) .pipe(gulp.dest(paths.js.dist)); }); gulp.task('watch', function () { gulp.watch(paths.css.src+'**/*.scss', ['sass']); gulp.watch(paths.js.src+'**/*.js', ['js']); }); gulp.task('default', ['sass', 'js']);
# Changelog ## 1.4.7 * Update security protocol to use TLS 1.2 * Remove catalog file ## 1.4.6 * Update `HelpInfoUri` to point to the latest content ## 1.4.5 * Bug fix for deadlock when getting parameters in an event ## 1.4.4 * Bug fix when installing modules from private feeds ## 1.4.3 * Another bug fix when registering repositories with PowerShellGet ## 1.4.2 * Bug fix for passing credentials from PowerShellGet when registering repositories ## 1.4.1 * Bug fix for using credential provider installed in Visual Studio * Allow credential persistance for registering private repositories and finding or installing packages from those repositories ## 1.3.2 * Enable bootstrap on PSCore * Bug fix to run on .NET Core 3.0 ## 1.3.1 Targets net452 and netstandard2.0 instead of net451, netcoreapp2.0, and netstandard1.6 ## Previous releases are not included in this Changelog
module.exports = { lifecycle: { initialize: { listen: [ ], emit: [ ] } }, poolDefaults: { min: 1, max: 16 } }
QUnit.test( "Issue #114 - run createKernelMap the second time", function() { const gpu = new GPU(); const A = [1, 2, 3, 4, 5]; const B = [1, 2, 3, 4, 5]; function add(a,b){ return a + b; } const kernels = gpu.createKernelMap([add],function(a, b){ return a[this.thread.x] + b[this.thread.x]; }).setOutput([5]); const E = kernels(A, B).result; const F = kernels(A, B).result; const G = kernels(A, B).result; QUnit.assert.deepEqual(QUnit.extend([], E), [2, 4, 6, 8, 10]); QUnit.assert.deepEqual(QUnit.extend([], F), [2, 4, 6, 8, 10]); QUnit.assert.deepEqual(QUnit.extend([], G), [2, 4, 6, 8, 10]); });
<?php declare(strict_types=1); namespace Valkyrja\Auth\Constants; /** * Constant UserField. * * @author Melech Mizrachi */ final class UserField { public const USERNAME = 'username'; public const PASSWORD = 'password'; public const EMAIL = 'email'; public const RESET_TOKEN = 'reset_token'; public const LOGIN_ATTEMPTS = 'login_attempts'; public const IS_LOCKED = 'is_locked'; public const IS_VERIFIED = 'is_verified'; }
// of this software and associated documentation files (the "Software"), to // deal in the Software without restriction, including without limitation the // sell copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // all copies or substantial portions of the Software. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #include "console/console.h" #include "graphics/dgl.h" #include "gui/guiCanvas.h" #include "gui/buttons/guiCheckBoxCtrl.h" #include "console/consoleTypes.h" IMPLEMENT_CONOBJECT(GuiCheckBoxCtrl); GuiCheckBoxCtrl::GuiCheckBoxCtrl() { mBounds.extent.set(140, 30); mStateOn = false; mIndent = 0; mButtonType = ButtonTypeCheck; mUseInactiveState = false; } void GuiCheckBoxCtrl::initPersistFields() { Parent::initPersistFields(); addField("useInactiveState", TypeBool, Offset(mUseInactiveState, GuiCheckBoxCtrl)); } bool GuiCheckBoxCtrl::onWake() { if(!Parent::onWake()) return false; // make sure there is a bitmap array for this control type // if it is declared as such in the control mProfile-><API key>(); return true; } void GuiCheckBoxCtrl::onMouseDown(const GuiEvent& event) { if (!mUseInactiveState) return Parent::onMouseDown(event); if (mProfile->mCanKeyFocus) setFirstResponder(); //if (mProfile->mSoundButtonDown) //AUDIOHANDLE handle = alxCreateSource(mProfile->mSoundButtonDown); //alxPlay(handle); //lock the mouse mouseLock(); mDepressed = true; //update setUpdate(); } void GuiCheckBoxCtrl::onMouseUp(const GuiEvent& event) { if (!mUseInactiveState) return Parent::onMouseUp(event); mouseUnlock(); setUpdate(); //if we released the mouse within this control, perform the action if (mDepressed) onAction(); mDepressed = false; } void GuiCheckBoxCtrl::onAction() { if (!mUseInactiveState) return Parent::onAction(); if(mButtonType == ButtonTypeCheck) { if (!mActive) { mActive = true; mStateOn = true; } else if (mStateOn) mStateOn = false; else if (!mStateOn) mActive = false; // Update the console variable: if ( mConsoleVariable[0] ) Con::setBoolVariable( mConsoleVariable, mStateOn ); // Execute the console command (if any) if( mConsoleCommand[0] ) Con::evaluate( mConsoleCommand, false ); } setUpdate(); // Provide and onClick script callback. if( isMethod("onClick") ) Con::executef( this, 2, "onClick" ); } void GuiCheckBoxCtrl::onRender(Point2I offset, const RectI &updateRect) { ColorI backColor = mActive ? mProfile->mFillColor : mProfile->mFillColorNA; ColorI fontColor = mMouseOver ? mProfile->mFontColorHL : mProfile->mFontColor; ColorI insideBorderColor = isFirstResponder() ? mProfile->mBorderColorHL : mProfile->mBorderColor; // just draw the check box and the text: S32 xOffset = 0; <API key>(); if(mProfile->mBitmapArrayRects.size() >= 4) { // if size >= 4 then the inactive state images should be present S32 index = mStateOn; if(!mActive) index = 4; // inactive state images are indexes 4 and 5. else if(mDepressed) index += 2; xOffset = mProfile->mBitmapArrayRects[0].extent.x + 2 + mIndent; S32 y = (mBounds.extent.y - mProfile->mBitmapArrayRects[0].extent.y) / 2; dglDrawBitmapSR(mProfile->mTextureHandle, offset + Point2I(mIndent, y), mProfile->mBitmapArrayRects[index]); } if(mButtonText[0] != '\0') { <API key>( fontColor ); renderJustifiedText(Point2I(offset.x + xOffset, offset.y), Point2I(mBounds.extent.x - mBounds.extent.y, mBounds.extent.y), mButtonText); } //render the children renderChildControls(offset, updateRect); } ConsoleMethod(GuiCheckBoxCtrl, setStateOn, void, 3, 3, "(state) Sets the control as active and updates siblings of the same group." "@param state This argument may be a boolean value or an integer." "state < 0: Parent::setStateOn(false), obj::setActive(false)\n" "state == 0 (or false): Parent::setStateOn(false), obj::setActive(true)\n" "state > 0 (or true): Parent::setStateOn(true), obj::setActive(true)") { if (dStricmp(argv[2], "true") == 0) object->setStateOn(1); else if (dStricmp(argv[2], "false") == 0) object->setStateOn(0); else object->setStateOn(dAtoi(argv[2])); } void GuiCheckBoxCtrl::setStateOn(S32 state) { if (mUseInactiveState) { if (state < 0) { setActive(false); Parent::setStateOn(false); } else if (state == 0) { setActive(true); Parent::setStateOn(false); } else if (state > 0) { setActive(true); Parent::setStateOn(true); } } else Parent::setStateOn((bool)state); } const char* GuiCheckBoxCtrl::getScriptValue() { if (mUseInactiveState) { if (isActive()) if (mStateOn) return "1"; else return "0"; else return "-1"; } else return Parent::getScriptValue(); } // EOF //
<!DOCTYPE HTML PUBLIC "- <!--NewPage <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_19) on Fri Oct 29 16:39:57 MSD 2010 --> <TITLE> Uses of Class org.apache.poi.hslf.model.Slide (POI API Documentation) </TITLE> <META NAME="date" CONTENT="2010-10-29"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.apache.poi.hslf.model.Slide (POI API Documentation)"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <A NAME="navbar_top"></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../org/apache/poi/hslf/model/Slide.html" title="class in org.apache.poi.hslf.model"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?org/apache/poi/hslf/model/\class-useSlide.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="Slide.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <! if(window==top) { document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } </SCRIPT> <NOSCRIPT> <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <HR> <CENTER> <H2> <B>Uses of Class<br>org.apache.poi.hslf.model.Slide</B></H2> </CENTER> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Packages that use <A HREF="../../../../../../org/apache/poi/hslf/model/Slide.html" title="class in org.apache.poi.hslf.model">Slide</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#org.apache.poi.hslf.usermodel"><B>org.apache.poi.hslf.usermodel</B></A></TD> <TD>&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <A NAME="org.apache.poi.hslf.usermodel"></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Uses of <A HREF="../../../../../../org/apache/poi/hslf/model/Slide.html" title="class in org.apache.poi.hslf.model">Slide</A> in <A HREF="../../../../../../org/apache/poi/hslf/usermodel/package-summary.html">org.apache.poi.hslf.usermodel</A></FONT></TH> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="<API key>"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/apache/poi/hslf/usermodel/package-summary.html">org.apache.poi.hslf.usermodel</A> that return <A HREF="../../../../../../org/apache/poi/hslf/model/Slide.html" title="class in org.apache.poi.hslf.model">Slide</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../../org/apache/poi/hslf/model/Slide.html" title="class in org.apache.poi.hslf.model">Slide</A></CODE></FONT></TD> <TD><CODE><B>SlideShow.</B><B><A HREF="../../../../../../org/apache/poi/hslf/usermodel/SlideShow.html#createSlide()">createSlide</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a blank <code>Slide</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../../org/apache/poi/hslf/model/Slide.html" title="class in org.apache.poi.hslf.model">Slide</A>[]</CODE></FONT></TD> <TD><CODE><B>SlideShow.</B><B><A HREF="../../../../../../org/apache/poi/hslf/usermodel/SlideShow.html#getSlides()">getSlides</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an array of all the normal Slides found in the slideshow</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../../org/apache/poi/hslf/model/Slide.html" title="class in org.apache.poi.hslf.model">Slide</A></CODE></FONT></TD> <TD><CODE><B>SlideShow.</B><B><A HREF="../../../../../../org/apache/poi/hslf/usermodel/SlideShow.html#removeSlide(int)">removeSlide</A></B>(int&nbsp;index)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the slide at the given index (0-based).</TD> </TR> </TABLE> &nbsp; <P> <HR> <A NAME="navbar_bottom"></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="<API key>"></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../org/apache/poi/hslf/model/Slide.html" title="class in org.apache.poi.hslf.model"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?org/apache/poi/hslf/model/\class-useSlide.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="Slide.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <! if(window==top) { document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } </SCRIPT> <NOSCRIPT> <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <HR> <i>Copyright 2010 The Apache Software Foundation or its licensors, as applicable.</i> </BODY> </HTML>
<?php namespace Cacic\CommonBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * <API key> */ class <API key> { /** * @var integer */ private $<API key>; /** * @var \DateTime */ private $dtHrInclusao; /** * @var \Cacic\CommonBundle\Entity\ComputadorColeta */ private $idComputadorColeta; /** * @var string */ private $<API key>; /** * @var \Cacic\CommonBundle\Entity\ComputadorColeta */ private $computadorColeta; /** * @var \Cacic\CommonBundle\Entity\Computador */ private $computador; /** * @var \Cacic\CommonBundle\Entity\ClassProperty */ private $classProperty; /** * Get <API key> * * @return integer */ public function <API key>() { return $this-><API key>; } /** * Set dtHrInclusao * * @param \DateTime $dtHrInclusao * @return <API key> */ public function setDtHrInclusao($dtHrInclusao) { $this->dtHrInclusao = $dtHrInclusao; return $this; } /** * Get dtHrInclusao * * @return \DateTime */ public function getDtHrInclusao() { return $this->dtHrInclusao; } /** * Set <API key> * * @param string $<API key> * @return <API key> */ public function <API key>($<API key>) { $this-><API key> = $<API key>; return $this; } /** * Get <API key> * * @return string */ public function <API key>() { return $this-><API key>; } /** * Set computadorColeta * * @param \Cacic\CommonBundle\Entity\ComputadorColeta $computadorColeta * @return <API key> */ public function setComputadorColeta(\Cacic\CommonBundle\Entity\ComputadorColeta $computadorColeta = null) { $this->computadorColeta = $computadorColeta; return $this; } /** * Get computadorColeta * * @return \Cacic\CommonBundle\Entity\ComputadorColeta */ public function getComputadorColeta() { return $this->computadorColeta; } /** * Set computador * * @param \Cacic\CommonBundle\Entity\Computador $computador * @return <API key> */ public function setComputador(\Cacic\CommonBundle\Entity\Computador $computador = null) { $this->computador = $computador; return $this; } /** * Get computador * * @return \Cacic\CommonBundle\Entity\Computador */ public function getComputador() { return $this->computador; } /** * Set classProperty * * @param \Cacic\CommonBundle\Entity\ClassProperty $classProperty * @return <API key> */ public function setClassProperty(\Cacic\CommonBundle\Entity\ClassProperty $classProperty = null) { $this->classProperty = $classProperty; return $this; } /** * Get classProperty * * @return \Cacic\CommonBundle\Entity\ClassProperty */ public function getClassProperty() { return $this->classProperty; } }
package com.jgb.designpatterns.decorator.decorators.impl; import com.jgb.designpatterns.decorator.Pizza; import com.jgb.designpatterns.decorator.decorators.PizzaDecorator; public class Ham extends PizzaDecorator { private final Pizza pizza; public Ham(Pizza pizza) { this.pizza = pizza; } @Override public String getDesc() { return pizza.getDesc() + ", Ham (18.12)"; } @Override public double getPrice() { return pizza.getPrice() + 18.12; } }
"use strict"; /* tslint:disable:no-unused-variable */ var testing_1 = require("@angular/core/testing"); var forms_1 = require("@angular/forms"); var <API key> = require("ng2-bootstrap-modal"); var dist_1 = require("<API key>/dist"); var router_1 = require("@angular/router"); var goal_1 = require("../../models/goal"); var <API key> = require("./goals-list-page.component"); var <API key> = require("./goals-list-page.service"); var subgoal_1 = require("../../models/subgoal"); describe('<API key>', function () { var component; var fixture; var redirectedUrl; var notificationSuccess; var mockData; var dialogCallback; var mockSubgoal = new subgoal_1.Subgoal(); mockSubgoal._id = 'test_subgoal_id'; mockSubgoal.goalId = 'test_goal_id'; mockSubgoal.description = '<API key>'; var mockGoal = new goal_1.Goal(); mockGoal._id = 'test_goal_id'; mockGoal.description = '<API key>'; mockGoal.subgoals = [mockSubgoal]; var <API key> = (function () { function <API key>() { } <API key>.prototype.deleteGoal = function () { return Promise.resolve(); }; <API key>.prototype.getGoals = function () { return Promise.resolve([]); }; return <API key>; }()); var MockActivatedRoute = (function () { function MockActivatedRoute() { this.snapshot = { data: { goals: { data: [mockGoal] } } }; } return MockActivatedRoute; }()); var MockRouter = (function () { function MockRouter() { } MockRouter.prototype.navigate = function (url) { redirectedUrl = url[0]; }; return MockRouter; }()); var MockDialogService = (function () { function MockDialogService() { } MockDialogService.prototype.addDialog = function (component, data) { expect(data.title).toBe('Delete Goal'); expect(data.cancelText).toBe('Cancel'); expect(data.message).toBe('Are you sure you want to delete this goal?'); data.confirmFunction().then(function () { dialogCallback(mockData); }); return { subscribe: function (cb) { dialogCallback = cb; } }; }; return MockDialogService; }()); var <API key> = (function () { function <API key>() { } <API key>.prototype.success = function () { notificationSuccess = true; }; return <API key>; }()); beforeEach(testing_1.async(function () { testing_1.TestBed.<API key>({ imports: [forms_1.FormsModule, router_1.RouterModule], declarations: [<API key>.<API key>], providers: [ { provide: router_1.ActivatedRoute, useClass: MockActivatedRoute }, { provide: router_1.Router, useClass: MockRouter }, { provide: <API key>.DialogService, useClass: MockDialogService }, { provide: dist_1.<API key>, useClass: <API key> } ] }).overrideComponent(<API key>.<API key>, { set: { providers: [{ provide: <API key>.<API key>, useClass: <API key> }] } }) .compileComponents(); })); beforeEach(function () { redirectedUrl = null; notificationSuccess = null; mockData = null; fixture = testing_1.TestBed.createComponent(<API key>.<API key>); component = fixture.componentInstance; fixture.detectChanges(); }); it('should test ngOnInit', function () { component.ngOnInit(); expect(component.goals.length).toBe(1); }); it('should test addNewGoal', function () { component.addNewGoal('test'); expect(redirectedUrl).toBe('/goals/test'); }); it('should test getProgressClass', function () { component.ngOnInit(); expect(component.getProgressClass(0)).toBeNull(); component.goals[0].progress = 50; expect(component.getProgressClass(0)).toBe('in-progress'); component.goals[0].progress = 100; expect(component.getProgressClass(0)).toBe('complete'); }); it('should test removeGoal', testing_1.fakeAsync(function () { mockData = { data: [] }; component.ngOnInit(); expect(component.goals.length).toBe(1); component.removeGoal(0); testing_1.tick(); expect(component.goals.length).toBe(0); })); });
#ifndef ABSTRACT_DATA_H #define ABSTRACT_DATA_H #include <stdio.h> #include <string> #include <measure/Inds.h> #include <measure/Measure.h> #include "../memory/Transients.h" #include "../utils/ToString.h" #include "DividedRange.h" using namespace std; namespace openworld { template <class TBase, class TNumeric, class TLogical> class AbstractData { public: // Overloaded Operators virtual TLogical& operator>=(const TNumeric& two) const = 0; virtual TLogical& operator>=(TBase two) const = 0; virtual TLogical& operator>(TBase two) const = 0; virtual TLogical& operator<=(const TNumeric& two) const = 0; virtual TLogical& operator<=(TBase two) const = 0; virtual TLogical& operator<(TBase two) const = 0; virtual TNumeric& operator*(const TNumeric& two) const = 0; virtual TNumeric& operator/(const TNumeric& two) const = 0; virtual TNumeric& dividedBy(const TNumeric& two, const TNumeric& divby0) const = 0; virtual TNumeric& operator+(const TNumeric& two) const = 0; virtual TNumeric& operator-(const TNumeric& two) const = 0; virtual TNumeric& operator+(TBase two) const = 0; virtual TNumeric& operator-(TBase two) const = 0; virtual TNumeric& operator*(TBase two) const = 0; //virtual TNumeric& operator/(TBase denom) const = 0; <- what if TBase is bool, doesn't match with /double virtual TNumeric& operator+=(const TNumeric& two) = 0; virtual TNumeric& operator*=(const TLogical& two) = 0; virtual TNumeric& operator/=(const TNumeric& two) = 0; /*virtual TNumeric& operator+=(TBase add) = 0; <- what if TBase is bool, doesn't match with .. double virtual TNumeric& operator-=(TBase diff) = 0; virtual TNumeric& operator*=(TBase mult) = 0; virtual TNumeric& operator/=(TBase denom) = 0;*/ }; template <class T> class <API key> { public: virtual <API key><T>* clone() = 0; virtual DividedRange getTimes() = 0; virtual T& operator[](Measure tt) = 0; }; } #endif
package com.zephir.highlight; import com.intellij.openapi.editor.colors.TextAttributesKey; import com.intellij.openapi.fileTypes.SyntaxHighlighter; import com.intellij.openapi.options.colors.<API key>; import com.intellij.openapi.options.colors.ColorDescriptor; import com.intellij.openapi.options.colors.ColorSettingsPage; import com.zephir.ZephirIcons; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import javax.swing.*; import java.util.Map; public class <API key> implements ColorSettingsPage { @Nullable @Override public Icon getIcon() { return ZephirIcons.ZEPHIR; } @NotNull @Override public SyntaxHighlighter getHighlighter() { return new <API key>(); } @NotNull @Override public String getDemoText() { return "namespace Zephir;\n" + "\n" + "class Foo extends Bar implements Baz\n" + "{\n" + " const FOO_BAR = 30 * 24 * 60;\n" + "\n" + " /**\n" + " * @var int\n" + " */\n" + " public num;\n" + "\n" + " /**\n" + " * @var string\n" + " */\n" + " static private str;\n" + "\n" + " public function __construct(int num, string str, array arr)\n" + " {\n" + " var abc;\n" + " if fetch abc, arr[str] {\n" + " let this->num = abc;\n" + " } elseif isset arr[num] {\n" + " let self::str = str;\n" + " }\n" + " }\n" + "}"; } @Nullable @Override public Map<String, TextAttributesKey> <API key>() { return null; } @NotNull @Override public <API key>[] <API key>() { return new <API key>[]{ new <API key>("Keyword", <API key>.KEYWORD), new <API key>("Identifier", <API key>.IDENTIFIER), new <API key>("Comment", <API key>.LINE_COMMENT), new <API key>("DocBlock", <API key>.DOC_COMMENT), new <API key>("String", <API key>.STRING), new <API key>("Number", <API key>.NUMBER), new <API key>("Operator", <API key>.OPERATOR), new <API key>("Variable type", <API key>.ATTRIBUTE), }; } @NotNull @Override public ColorDescriptor[] getColorDescriptors() { return ColorDescriptor.EMPTY_ARRAY; } @NotNull @Override public String getDisplayName() { return "Zephir"; } }
// Type definitions for ag-grid v4.1.5 import { ICellRenderer, ICellRendererFunc } from "./cellRenderers/iCellRenderer"; export declare class CellRendererFactory { static ANIMATE_SLIDE: string; static ANIMATE_SHOW_CHANGE: string; static GROUP: string; private gridOptionsWrapper; private <API key>; private expressionService; private eventService; private cellRendererMap; private init(); addCellRenderer(key: string, cellRenderer: { new (): ICellRenderer; } | ICellRendererFunc): void; getCellRenderer(key: string): { new (): ICellRenderer; } | ICellRendererFunc; }
package geco.pojo; import java.util.HashSet; import java.util.Iterator; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.Table; import geco.vo.Deadline; import geco.vo.Ivo; import geco.vo.Suspended; @Entity @Table(name="tblSuspended") public class TblSuspended implements Itbl{ @Id @GeneratedValue(strategy=GenerationType.AUTO) @Column(name="idSuspended") private int idSuspended; @Column(name="paid") private boolean paid; @Column(name="customer") private boolean customer; @Column(name="supplier") private boolean supplier; @Column(name="amount") private double amount; @ManyToOne @JoinColumn(name = "idHead") private TblHead head; @OneToMany(fetch= FetchType.LAZY,mappedBy = "suspended",cascade = CascadeType.ALL) private Set<TblDeadline> deadlines; public Set<TblDeadline> getDeadlines() { return deadlines; } public void setDeadlines(Set<TblDeadline> deadlines) { this.deadlines = deadlines; } public int getIdSuspended() { return idSuspended; } public void setIdSuspended(int idSuspended) { this.idSuspended = idSuspended; } public boolean isPaid() { return paid; } public void setPaid(boolean paid) { this.paid = paid; } public boolean isCustomer() { return customer; } public void setCustomer(boolean customer) { this.customer = customer; } public boolean isSupplier() { return supplier; } public void setSupplier(boolean supplier) { this.supplier = supplier; } public double getAmount() { return amount; } public void setAmount(double amount) { this.amount = amount; } public TblHead getHead() { return head; } public void setHead(TblHead head) { this.head = head; } public void convertToTable(Ivo obj){ Suspended s = (Suspended)obj; this.amount = s.getAmount(); this.customer = s.isCustomer(); this.idSuspended = s.getIdSuspended(); this.paid = s.isPaid(); this.supplier = s.isSupplier(); if (s.getHead() != null){ this.head = new TblHead(); this.head.convertToTable(s.getHead()); } if (s.getDeadlines() != null){ this.deadlines = new HashSet<TblDeadline>(); for (Iterator<Deadline> it = s.getDeadlines().iterator();it.hasNext();){ Deadline d = it.next(); TblDeadline dt = new TblDeadline(); dt.convertToTable(d); dt.setSuspended(this); this.deadlines.add(dt); } } } }
{{ define "main" }} <div class="taxonomy"> <ul class="taxonomy-list"> {{ $data := .Data }} {{ range $key, $value := .Data.Terms }} <li class="taxonomy-list-item"> <a href="/{{ $data.Plural }}/{{ $key | urlize }}">{{ $key }}</a><span>({{ len $value }})</span> </li> {{ end }} </ul> </div> {{ end }}
#ifndef AMGCL_IO_MM_HPP #define AMGCL_IO_MM_HPP /** * \file amgcl/io/mm.hpp * \author Denis Demidov <dennis.demidov@gmail.com> * \brief Readers for Matrix Market sparse matrices and dense vectors. */ #include <vector> #include <string> #include <fstream> #include <sstream> #include <numeric> #include <type_traits> #include <tuple> #include <amgcl/util.hpp> #include <amgcl/backend/interface.hpp> #include <amgcl/value_type/interface.hpp> #include <amgcl/detail/sort_row.hpp> namespace amgcl { namespace io { Matrix market reader. class mm_reader { public: Open the file by name mm_reader(const std::string &fname) : f(fname.c_str()) { precondition(f, "Failed to open file \"" + fname + "\""); // Read banner. std::string line; precondition(std::getline(f, line), format_error()); std::istringstream is(line); std::string banner, mtx, coord, dtype, storage; precondition( is >> banner >> mtx >> coord >> dtype >> storage, format_error()); precondition(banner == "%%MatrixMarket", format_error("no banner")); precondition(mtx == "matrix", format_error("not a matrix")); if (storage == "general") { _symmetric = false; } else if (storage == "symmetric") { _symmetric = true; } else { precondition(false, "unsupported storage type"); } if (coord == "coordinate") { _sparse = true; } else if (coord == "array") { _sparse = false; } else { precondition(false, format_error("unsupported coordinate type")); } if (dtype == "real") { _complex = false; _integer = false; } else if (dtype == "complex") { _complex = true; _integer = false; } else if (dtype == "integer") { _complex = false; _integer = true; } else { precondition(false, format_error("unsupported data type")); } // Skip comments. std::streampos pos; do { pos = f.tellg(); precondition(std::getline(f, line), format_error("unexpected eof")); } while (line[0] == '%'); // Get back to the first non-comment line. f.seekg(pos); // Read matrix size is.clear(); is.str(line); precondition(is >> nrows >> ncols, format_error()); } Matrix in the file is symmetric. bool is_symmetric() const { return _symmetric; } Matrix in the file is sparse. bool is_sparse() const { return _sparse; } Matrix in the file is complex-valued. bool is_complex() const { return _complex; } Matrix in the file is integer-valued. bool is_integer() const { return _integer; } Number of rows. size_t rows() const { return nrows; } Number of rows. size_t cols() const { return ncols; } Read sparse matrix from the file. template <typename Idx, typename Val> std::tuple<size_t, size_t> operator()( std::vector<Idx> &ptr, std::vector<Idx> &col, std::vector<Val> &val, ptrdiff_t row_beg = -1, ptrdiff_t row_end = -1 ) { precondition(_sparse, format_error("not a sparse matrix")); precondition(amgcl::is_complex<Val>::value == _complex, _complex ? "attempt to read complex values into real vector" : "attempt to read real values into complex vector" ); precondition(std::is_integral<Val>::value == _integer, _integer ? "attempt to read integer values into real vector" : "attempt to read real values into integer vector" ); // Read sizes ptrdiff_t n, m; size_t nnz; std::string line; std::istringstream is; { precondition(std::getline(f, line), format_error("unexpected eof")); is.clear(); is.str(line); precondition(is >> n >> m >> nnz, format_error()); } if (row_beg < 0) row_beg = 0; if (row_end < 0) row_end = n; precondition(row_beg >= 0 && row_end <= n, "Wrong subset of rows is requested"); ptrdiff_t _nnz = _symmetric ? 2 * nnz : nnz; if (row_beg != 0 || row_end != n) _nnz *= 1.2 * (row_end - row_beg) / n; std::vector<Idx> _row; _row.reserve(_nnz); std::vector<Idx> _col; _col.reserve(_nnz); std::vector<Val> _val; _val.reserve(_nnz); ptrdiff_t chunk = row_end - row_beg; ptr.resize(chunk + 1); std::fill(ptr.begin(), ptr.end(), 0); for(size_t k = 0; k < nnz; ++k) { precondition(std::getline(f, line), format_error("unexpected eof")); is.clear(); is.str(line); Idx i, j; Val v; precondition(is >> i >> j, format_error()); i -= 1; j -= 1; v = read_value<Val>(is); if (row_beg <= i && i < row_end) { ++ptr[i - row_beg + 1]; _row.push_back(i - row_beg); _col.push_back(j); _val.push_back(v); } if (_symmetric && i != j && row_beg <= j && j < row_end) { ++ptr[j - row_beg + 1]; _row.push_back(j - row_beg); _col.push_back(i); _val.push_back(v); } } std::partial_sum(ptr.begin(), ptr.end(), ptr.begin()); col.resize(ptr.back()); val.resize(ptr.back()); for(size_t k = 0, e = val.size(); k < e; ++k) { Idx i = _row[k]; Idx j = _col[k]; Val v = _val[k]; Idx head = ptr[i]++; col[head] = j; val[head] = v; } std::rotate(ptr.begin(), ptr.end() - 1, ptr.end()); ptr.front() = 0; #pragma omp parallel for for(ptrdiff_t i = 0; i < chunk; ++i) { Idx beg = ptr[i]; Idx end = ptr[i+1]; amgcl::detail::sort_row(&col[0] + beg, &val[0] + beg, end - beg); } return std::make_tuple(chunk, m); } Read dense array from the file. template <typename Val> std::tuple<size_t, size_t> operator()( std::vector<Val> &val, ptrdiff_t row_beg = -1, ptrdiff_t row_end = -1 ) { precondition(!_sparse, format_error("not a dense array")); precondition(amgcl::is_complex<Val>::value == _complex, _complex ? "attempt to read complex values into real vector" : "attempt to read real values into complex vector" ); precondition(std::is_integral<Val>::value == _integer, _integer ? "attempt to read integer values into real vector" : "attempt to read real values into integer vector" ); // Read sizes ptrdiff_t n, m; std::string line; std::istringstream is; { precondition(std::getline(f, line), format_error("unexpected eof")); is.clear(); is.str(line); precondition(is >> n >> m, format_error()); } if (row_beg < 0) row_beg = 0; if (row_end < 0) row_end = n; precondition(row_beg >= 0 && row_end <= n, "Wrong subset of rows is requested"); val.resize((row_end - row_beg) * m); for(ptrdiff_t j = 0; j < m; ++j) { for(ptrdiff_t i = 0; i < n; ++i) { precondition(std::getline(f, line), format_error("unexpected eof")); if (row_beg <= i && i < row_end) { is.clear(); is.str(line); val[(i - row_beg) * m + j] = read_value<Val>(is); } } } return std::make_tuple(row_end - row_beg, m); } private: std::ifstream f; bool _sparse; bool _symmetric; bool _complex; bool _integer; size_t nrows, ncols; std::string format_error(const std::string &msg = "") const { std::string err_string = "MatrixMarket format error"; if (!msg.empty()) err_string += " (" + msg + ")"; return err_string; } template <typename T> typename std::enable_if<amgcl::is_complex<T>::value, T>::type read_value(std::istream &s) { typename math::scalar_of<T>::type x,y; precondition(s >> x >> y, format_error()); return T(x,y); } template <typename T> typename std::enable_if<!amgcl::is_complex<T>::value, T>::type read_value(std::istream &s) { T x; if (std::is_same<T, char>::value) { // Special case: // We want to read 8bit integers from MatrixMarket, not chars. int i; precondition(s >> i, format_error()); x = static_cast<char>(i); } else { precondition(s >> x, format_error()); } return x; } }; namespace detail { template <typename Val> typename std::enable_if<is_complex<Val>::value, std::ostream&>::type write_value(std::ostream &s, Val v) { return s << std::real(v) << " " << std::imag(v); } template <typename Val> typename std::enable_if<!is_complex<Val>::value, std::ostream&>::type write_value(std::ostream &s, Val v) { return s << v; } } // namespace detail Write dense array in Matrix Market format. template <typename Val> void mm_write( const std::string &fname, const Val *data, size_t rows, size_t cols = 1 ) { std::ofstream f(fname.c_str()); precondition(f, "Failed to open file \"" + fname + "\" for writing"); // Banner f << "%%MatrixMarket matrix array "; if (is_complex<Val>::value) { f << "complex "; } else if(std::is_integral<Val>::value) { f << "integer "; } else { f << "real "; } f << "general\n"; // Sizes f << rows << " " << cols << "\n"; // Data for(size_t j = 0; j < cols; ++j) { for(size_t i = 0; i < rows; ++i) { detail::write_value(f, data[i * cols + j]) << "\n"; } } } Write sparse matrix in Matrix Market format. template <class Matrix> void mm_write(const std::string &fname, const Matrix &A) { typedef typename backend::value_type<Matrix>::type Val; const size_t rows = backend::rows(A); const size_t cols = backend::cols(A); const size_t nnz = backend::nonzeros(A); std::ofstream f(fname.c_str()); precondition(f, "Failed to open file \"" + fname + "\" for writing"); // Banner f << "%%MatrixMarket matrix coordinate "; if (is_complex<Val>::value) { f << "complex "; } else if(std::is_integral<Val>::value) { f << "integer "; } else { f << "real "; } f << "general\n"; // Sizes f << rows << " " << cols << " " << nnz << "\n"; // Data for(size_t i = 0; i < rows; ++i) { for(auto a = backend::row_begin(A, i); a; ++a) { f << i + 1 << " " << a.col() + 1 << " "; detail::write_value(f, a.value()) << "\n"; } } } } // namespace io } // namespace amgcl #endif
<!DOCTYPE html> <meta charset="utf-8" /> <title>WebSocket Test</title> <script language="javascript" type="text/javascript"> var wsUri = "ws://localhost:8085/ws"; var websocket, output, stopbtn; function init() { output = document.getElementById("output"); stopbtn = document.getElementById("stop"); stopbtn.onclick = function(evt) { console.log("stopping"); websocket.close(); } testWebSocket(); } function testWebSocket() { websocket = new WebSocket(wsUri); websocket.onopen = function(evt) { onOpen(evt) }; websocket.onclose = function(evt) { onClose(evt) }; websocket.onmessage = function(evt) { onMessage(evt) }; websocket.onerror = function(evt) { onError(evt) }; } function onOpen(evt) { writeToScreen("CONNECTED"); //doSend('{"op":"blocks_sub"}'); doSend('{"op":"unconfirmed_sub"}'); //doSend('{"op":"addr_sub", "addr":""}'); } function onClose(evt) { writeToScreen("DISCONNECTED"); } function onMessage(evt) { writeToScreen('<span style="color: blue;">RESPONSE:</span>' + JSON.stringify(JSON.parse(evt.data), null, 2)); // gives nicer fmt output } function onError(evt) { if (evt.data) { writeToScreen('<span style="color: red;">ERROR:</span> ' + JSON.stringify(JSON.parse(evt.data), null, 2)); } } function doSend(message) { writeToScreen("SENT: " + message); websocket.send(message); } function writeToScreen(message) { var pre = document.createElement("pre"); pre.style.wordWrap = "break-word"; pre.innerHTML = message; output.appendChild(pre); } window.addEventListener("load", init, false); </script> <h2>WebSocket Test</h2> <button id="stop">Stop It!</button> <div id="output"></div>
var <API key> = function() { this.Extends = GridListMediator; this.initialize = function(viewComponent) { this.parent(<API key>.ID,viewComponent); this.onListClick = this.onListClick.bindWithEvent(this); this.onLineClick = this.onLineClick.bindWithEvent(this); this.onKeyDown = this.onKeyDown.bindWithEvent(this); //this.onKeyPress = this.onKeyPress.bindWithEvent(this); this.onEscape = this.onEscape.bindWithEvent(this); this.onSpace = this.onSpace.bindWithEvent(this); this.onEnter = this.onEnter.bindWithEvent(this); this.onHome = this.onHome.bindWithEvent(this); this.onPrevious = this.onPrevious.bindWithEvent(this); this.onUp = this.onUp.bindWithEvent(this); this.onDown = this.onDown.bindWithEvent(this); this.onNext = this.onNext.bindWithEvent(this); this.onEnd = this.onEnd.bindWithEvent(this); var list = this.getViewComponent(); list.addEvent(SjamayeeFacade.OLIST_CLICK, this.onListClick); list.addEvent(SjamayeeFacade.OLIST_LINE_CLICK, this.onLineClick); list.addEvent(SjamayeeFacade.OLIST_KEYDOWN, this.onKeyDown); //list.addEvent(SjamayeeFacade.OLIST_KEYPRESS, this.onKeyPress); list.addEvent(SjamayeeFacade.OLIST_ESCAPE, this.onEscape); list.addEvent(SjamayeeFacade.OLIST_SPACE, this.onSpace); list.addEvent(SjamayeeFacade.OLIST_ENTER, this.onEnter); list.addEvent(SjamayeeFacade.OLIST_HOME, this.onHome); //list.addEvent(SjamayeeFacade.LIST_HOME, this.onHome); list.addEvent(SjamayeeFacade.OLIST_PREVIOUS, this.onPrevious); list.addEvent(SjamayeeFacade.OLIST_UP, this.onUp); list.addEvent(SjamayeeFacade.OLIST_DOWN, this.onDown); list.addEvent(SjamayeeFacade.OLIST_NEXT, this.onNext); list.addEvent(SjamayeeFacade.OLIST_END, this.onEnd); //list.addEvent(SjamayeeFacade.LIST_END, this.onEnd); }; this.onListClick = function() { if (this.isData() === true) { this.sendNotification(SjamayeeFacade.OLIST_DATA_CLICK); } if (this.isModel() === true) { this.sendNotification(SjamayeeFacade.OLIST_MODEL_CLICK); } }; this.onLineClick = function(evt) { if (this.isData() === true) { this.sendNotification(SjamayeeFacade.<API key>, evt); } if (this.isModel() === true) { this.sendNotification(SjamayeeFacade.<API key>, evt); } }; //this.onKeyPress = function() { this.sendNotification(SjamayeeFacade.OLIST_KEYPRESS); }; this.onEscape = function() { if (this.isData() === true) { this.sendNotification(SjamayeeFacade.OLIST_DATA_ESCAPE); } if (this.isModel() === true) { this.sendNotification(SjamayeeFacade.OLIST_MODEL_ESCAPE); } }; this.onSpace = function() { if (this.isData() === true) { this.sendNotification(SjamayeeFacade.OLIST_DATA_SPACE); } if (this.isModel() === true) { this.sendNotification(SjamayeeFacade.OLIST_MODEL_SPACE); } }; this.onEnter = function() { if (this.isData() === true) { this.sendNotification(SjamayeeFacade.OLIST_DATA_ENTER); } if (this.isModel() === true) { this.sendNotification(SjamayeeFacade.OLIST_MODEL_ENTER); } }; this.onHome = function() { if (this.isData() === true) { this.sendNotification(SjamayeeFacade.OLIST_DATA_HOME); } if (this.isModel() === true) { this.sendNotification(SjamayeeFacade.OLIST_MODEL_HOME); } }; this.onPrevious = function() { if (this.isData() === true) { this.sendNotification(SjamayeeFacade.OLIST_DATA_PREVIOUS); } if (this.isModel() === true) { this.sendNotification(SjamayeeFacade.<API key>); } }; this.onUp = function() { if (this.isData() === true) { this.sendNotification(SjamayeeFacade.OLIST_DATA_UP); } if (this.isModel() === true) { this.sendNotification(SjamayeeFacade.OLIST_MODEL_UP); } }; this.onDown = function() { if (this.isData() === true) { this.sendNotification(SjamayeeFacade.OLIST_DATA_DOWN); } if (this.isModel() === true) { this.sendNotification(SjamayeeFacade.OLIST_MODEL_DOWN); } }; this.onNext = function() { if (this.isData() === true) { this.sendNotification(SjamayeeFacade.OLIST_DATA_NEXT); } if (this.isModel() === true) { this.sendNotification(SjamayeeFacade.OLIST_MODEL_NEXT); } }; this.onEnd = function() { if (this.isData() === true) { this.sendNotification(SjamayeeFacade.OLIST_DATA_END); } if (this.isModel() === true) { this.sendNotification(SjamayeeFacade.OLIST_MODEL_END); } }; this.onKeyDown = function(leftRight, subEvent) { //alert("<API key>/onKeyDown - leftRight: "+leftRight+" subEvent: "+subEvent); if (leftRight != ObjectsListLeft.ID) { return; } var list = this.getViewComponent(); switch (subEvent) { case SjamayeeFacade.ESCAPE: list.fireEvent(SjamayeeFacade.OLIST_ESCAPE, this.onEscape); break; case SjamayeeFacade.SPACE: list.fireEvent(SjamayeeFacade.OLIST_SPACE, this.onSpace); break; case SjamayeeFacade.ENTER: list.fireEvent(SjamayeeFacade.OLIST_ENTER, this.onEnter); break; case SjamayeeFacade.HOME: list.fireEvent(SjamayeeFacade.OLIST_HOME, this.onHome); break; case SjamayeeFacade.PREVIOUS: list.fireEvent(SjamayeeFacade.OLIST_PREVIOUS, this.onPrevious); break; case SjamayeeFacade.UP: list.fireEvent(SjamayeeFacade.OLIST_UP, this.onUp); break; case SjamayeeFacade.DOWN: list.fireEvent(SjamayeeFacade.OLIST_DOWN, this.onDown); break; case SjamayeeFacade.NEXT: list.fireEvent(SjamayeeFacade.OLIST_NEXT, this.onNext); break; case SjamayeeFacade.END: list.fireEvent(SjamayeeFacade.OLIST_END, this.onEnd); break; } }; }; <API key> = new Class(new <API key>()); <API key>.ID = "<API key>";
package com.dgex.offspring.providers.dgex; import java.io.IOException; import java.net.<API key>; import java.net.URL; import java.util.ArrayList; import java.util.List; import org.apache.log4j.Logger; import com.dgex.offspring.dataprovider.service.<API key>; import com.dgex.offspring.providers.service.Currencies; import com.dgex.offspring.providers.service.ICurrencyPair; import com.dgex.offspring.providers.service.IRate; import com.dgex.offspring.providers.service.IRateSink; import com.dgex.offspring.providers.service.Rate; import com.dgex.offspring.providers.service.RateProvider; public class <API key> extends RateProvider { private static <API key> instance = null; public static <API key> getInstance() { if (instance == null) instance = new <API key>(); return instance; } private static Logger logger = Logger .getLogger(<API key>.class); private static final String url = "https://dgex.com/API/nxtprice.txt"; private final List<IRate> rates = new ArrayList<IRate>(); private static final ICurrencyPair[] supportedPairs = { Currencies.BTC .getPair(Currencies.NXT) }; @Override protected void doRun() { try { String data = get(new URL(url)); double price = Double.parseDouble(data); long timestamp = 0l; rates.clear(); IRate rate = new Rate(Currencies.BTC, Currencies.NXT, timestamp, price, 0); rates.add(rate); for (Object sink : sinks) { ((IRateSink) sink).addRate(rate); } } catch (<API key> e) { logger.error("Mallformed URL " + url, e); } catch (<API key> e) { logger.error("<API key> " + url, e); } catch (IOException e) { logger.error("IOException " + url, e); } } @Override public String getLabel() { return "DGEX.com"; } @Override public String toString() { return "<API key>"; } @Override public long <API key>() { return 10 * 1000; } @Override public ICurrencyPair[] getSupportedPairs() { return supportedPairs; } @Override public List<IRate> doGetRates(ICurrencyPair pair) { return rates; } }
using System; using System.Collections.Generic; using Android.Content; using Android.Runtime; using Android.Util; using Android.Widget; using Android.Graphics; namespace AnyPay { [Register("org.AnyPay.app.AnyPay.AnyPay.PaymentMethodRow")] class PaymentMethodRow : LinearLayout { private Context context; private RelativeLayout CardContainer; private ImageView CardImage; private TextView CardShortName; private TextView CardHolderName; private TextView CardAccountNumber; protected BitmapCache bitmapCache; public PaymentMethodRow(Context context, BitmapCache bitmapCache) : base(context) { this.context = context; this.bitmapCache = bitmapCache; InitializeView(); } public PaymentMethodRow(Context context) : base(context) { InitializeView(); } public PaymentMethodRow(Context context, IAttributeSet attrs) : base(context, attrs) { this.context = context; InitializeView(); } public PaymentMethodRow(Context context, IAttributeSet attrs, int defStyle) : base(context, attrs, defStyle) { this.context = context; InitializeView(); } public PaymentMethodRow(Context context, IAttributeSet attrs, int defStyle, int defStyleRes) : base(context, attrs, defStyle, defStyleRes) { this.context = context; InitializeView(); } public PaymentMethodRow(IntPtr handle, JniHandleOwnership owner) : base(handle, owner) { InitializeView(); } private void InitializeView() { Inflate(context, Resource.Layout.PaymentMethodRow, this); CardContainer = FindViewById<RelativeLayout>(Resource.Id.CardContainer); CardImage = FindViewById<ImageView>(Resource.Id.CardImage); CardShortName = FindViewById<TextView>(Resource.Id.CardShortName); CardHolderName = FindViewById<TextView>(Resource.Id.CardHolderName); CardAccountNumber = FindViewById<TextView>(Resource.Id.CardAccountNumber); CardContainer.ClipToOutline = true; } public void UpdateViewData(PaymentMethod data) { CardShortName.Text = data.ShortName; CardHolderName.Text = data.AccountHolder; CardAccountNumber.Text = data.<API key>; <API key> imageResource = <API key>(data.PaymentMethodType); if (bitmapCache != null) CardImage.SetImageBitmap(bitmapCache.GetBitmap(imageResource.GraphicResource)); else CardImage.SetImageResource(imageResource.GraphicResource); Color textColor = Color.ParseColor(imageResource.TextColor); CardShortName.SetTextColor(textColor); CardHolderName.SetTextColor(textColor); CardAccountNumber.SetTextColor(textColor); } private class <API key> { public int GraphicResource; public string TextColor; /* could also hold position of texts etc */ } private static IDictionary<string, <API key>> cardImages = new Dictionary<string, <API key>> { {"visa", new <API key> { GraphicResource = Resource.Drawable.visa_base_xxhdpi, TextColor = "#ff222222" }}, {"mastercard", new <API key> { GraphicResource = Resource.Drawable.<API key>, TextColor = "#ffeeeeee" }} }; private static <API key>[] defaultCardImages = new <API key>[] { new <API key> { GraphicResource = Resource.Drawable.acf_ncc_red_xxhdpi, TextColor = "#ff000000" }, new <API key> { GraphicResource = Resource.Drawable.<API key>, TextColor = "#ff000000" }, new <API key> { GraphicResource = Resource.Drawable.acf_ncc_blue_xxhdpi, TextColor = "#ff000000" } }; private <API key> <API key>(string name) { <API key> resource; if (!cardImages.TryGetValue(name, out resource)) { int idx_max = defaultCardImages.Length - 1; int idx = name.GetHashCode() % idx_max; if (idx < 0) idx += idx_max; resource = defaultCardImages[idx]; } return resource; } } }
(function() { beforeEach(function() { this.id = _.uniqueId('test-'); return this.DOMElement = d3.select(document.body).append('div').classed('test-dom-container', true).classed("" + this.id, true).node(); }); afterEach(function() { var testReport, <API key>; <API key> = document.<API key>('test'); testReport = <API key>[<API key>.length - 1]; if (!testReport) { return; } return testReport.appendChild(this.DOMElement); }); }).call(this);
using System; //### Problem 07. One system to any other
#include "mainwindow.h" #include "ui_mainwindow.h" #include <QFileDialog> #include <QMessageBox> #include <QProxyStyle> #include <QShortcut> #include <QMimeData> #include <cassert> #include "configdialog.h" MainWindow::MainWindow(ConfigService *configService, QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow), mConfigService(configService), mFileService(0), mProcessor(new Processor(configService, this)), mCurrentFile(QString()), mCurrentPath(QString()) { setAcceptDrops(true); ui->setupUi(this); ui->actionOpen->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_O)); ui->actionQuit->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); ui->consoleDockWidget->setVisible(false); QProxyStyle s; ui->upButton->setIcon(s.standardIcon(QStyle::SP_ArrowUp)); mModel = new FileObjectModel(); mDirModel = new <API key>(); mDirModel->setSourceModel(mModel); mDirModel->setFilterKeyColumn(3); mDirModel-><API key>("true"); ui->dirTree->setModel(mDirModel); for(int i = 1; i < 4; i++) { ui->dirTree->hideColumn(i); } ui->fileList->setModel(mModel); connect(ui->upButton, SIGNAL(pressed()), this, SLOT(goUp())); for(ConfigObject *obj : mConfigService->configs()) { ui->configComboBox->addItem(obj->name()); } ui->configComboBox->setCurrentIndex(mConfigService->selectedIndex()); connect(ui-><API key>, SIGNAL(pressed()), this, SLOT(openConfigDialog())); connect(ui->configComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(<API key>(int))); connect(ui->fileList, SIGNAL(activated(QModelIndex)), this, SLOT(fileActivated(QModelIndex))); connect(ui->dirTree->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(folderSelected(QModelIndex))); connect(ui->actionOpen, SIGNAL(triggered()), this, SLOT(openFileDialog())); connect(ui->actionQuit, SIGNAL(triggered()), this, SLOT(close())); ui->fileList->setDragEnabled(true); ui->fileList->setAcceptDrops(true); connect(mProcessor, SIGNAL(programOutput(QString)), this, SLOT(consoleOutput(QString))); connect(mProcessor, SIGNAL(errorHappened(QString)), this, SLOT(error(QString))); } MainWindow::~MainWindow() { delete mDirModel; delete mModel; delete mFileService; delete mProcessor; delete ui; } void MainWindow::openFileDialog() { if(!mConfigService->selectedConfig()) { QMessageBox::critical(this, "No vpk.exe path set", "Invalid configuration; no vpk.exe path present. " "please make sure you have created a valid configuration."); return; } QString filePath = QFileDialog::getOpenFileName(this, "Open VPK package", QApplication::applicationDirPath(), "VPK file (*.vpk)"); if(filePath.isEmpty()) { return; } openVPK(filePath); } void MainWindow::openConfigDialog() { ConfigDialog dialog(mConfigService, this); dialog.exec(); ui->configComboBox->clear(); for(ConfigObject *obj : mConfigService->configs()) { ui->configComboBox->addItem(obj->name()); } ui->configComboBox->setCurrentIndex(mConfigService->selectedIndex()); } void MainWindow::<API key>(int index) { mConfigService->setSelectedIndex(index); } void MainWindow::consoleOutput(QString output) { ui->consoleText->appendPlainText(output); } void MainWindow::error(QString output) { QPalette p = ui->consoleText->palette(); p.setColor(QPalette::Text, Qt::red); ui->consoleText->setPalette(p); ui->consoleText->appendPlainText(output); ui->consoleDockWidget->show(); } void MainWindow::goUp() { if(!mFileService) { return; } QModelIndex curIdx = ui->fileList->rootIndex(); QModelIndex idx = curIdx.parent(); if(idx.isValid()) { openDir(idx); } } void MainWindow::dragEnterEvent(QDragEnterEvent *event) { event-><API key>(); } void MainWindow::dragMoveEvent(QDragMoveEvent *event) { event-><API key>(); } void MainWindow::dropEvent(QDropEvent *event) { const QMimeData *mData = event->mimeData(); if(!mData->hasUrls()) { return; } QString fileName = mData->urls().last().toLocalFile(); if(QFileInfo(fileName).suffix() != "vpk") { return; } openVPK(fileName); } void MainWindow::closeEvent(QCloseEvent *event) { mConfigService->save(); } void MainWindow::fileActivated(QModelIndex index) { FileObject *obj = (FileObject*)index.internalPointer(); if(obj->isDirectory()) { openDir(index); } } void MainWindow::folderSelected(QModelIndex index) { QModelIndex idx = mDirModel->mapToSource(index); openDir(idx); } void MainWindow::openVPK(QString path) { QList<FileObject*> fileList; mProcessor->getFiles(path, &fileList); FileService *service = new FileService(&fileList); mModel->setFileService(service); if(mFileService) { delete mFileService; } mFileService = service; QModelIndex rIdx = mModel->index(0, 0, QModelIndex()); openDir(rIdx); mCurrentFile = path; mCurrentPath = QString(); } void MainWindow::openDir(QModelIndex index) { QModelIndex dirIdx = mDirModel->mapFromSource(index); ui->dirTree->selectionModel()->setCurrentIndex(dirIdx, QItemSelectionModel::ClearAndSelect); ui->fileList->setRootIndex(index); }
package dashboards import ( "fmt" "time" ) // <API key> represents a set of filters to be // used when querying New Relic dashboards. type <API key> struct { Category string `url:"filter[category],omitempty"` CreatedAfter *time.Time `url:"filter[created_after],omitempty"` CreatedBefore *time.Time `url:"filter[created_before],omitempty"` Page int `url:"page,omitempty"` PerPage int `url:"per_page,omitempty"` Sort string `url:"sort,omitempty"` Title string `url:"filter[title],omitempty"` UpdatedAfter *time.Time `url:"filter[updated_after],omitempty"` UpdatedBefore *time.Time `url:"filter[updated_before],omitempty"` } // ListDashboards is used to retrieve New Relic dashboards. func (d *Dashboards) ListDashboards(params *<API key>) ([]*Dashboard, error) { dashboard := []*Dashboard{} nextURL := d.config.Region().RestURL("dashboards.json") for nextURL != "" { response := dashboardsResponse{} resp, err := d.client.Get(nextURL, &params, &response) if err != nil { return nil, err } dashboard = append(dashboard, response.Dashboards...) paging := d.pager.Parse(resp) nextURL = paging.Next } return dashboard, nil } // GetDashboard is used to retrieve a single New Relic dashboard. func (d *Dashboards) GetDashboard(dashboardID int) (*Dashboard, error) { response := dashboardResponse{} url := fmt.Sprintf("/dashboards/%d.json", dashboardID) _, err := d.client.Get(d.config.Region().RestURL(url), nil, &response) if err != nil { return nil, err } return &response.Dashboard, nil } // CreateDashboard is used to create a New Relic dashboard. func (d *Dashboards) CreateDashboard(dashboard Dashboard) (*Dashboard, error) { response := dashboardResponse{} reqBody := dashboardRequest{ Dashboard: dashboard, } _, err := d.client.Post(d.config.Region().RestURL("dashboards.json"), nil, &reqBody, &response) if err != nil { return nil, err } return &response.Dashboard, nil } // UpdateDashboard is used to update a New Relic dashboard. func (d *Dashboards) UpdateDashboard(dashboard Dashboard) (*Dashboard, error) { response := dashboardResponse{} url := fmt.Sprintf("/dashboards/%d.json", dashboard.ID) reqBody := dashboardRequest{ Dashboard: dashboard, } _, err := d.client.Put(d.config.Region().RestURL(url), nil, &reqBody, &response) if err != nil { return nil, err } return &response.Dashboard, nil } // DeleteDashboard is used to delete a New Relic dashboard. func (d *Dashboards) DeleteDashboard(dashboardID int) (*Dashboard, error) { response := dashboardResponse{} url := fmt.Sprintf("/dashboards/%d.json", dashboardID) _, err := d.client.Delete(d.config.Region().RestURL(url), nil, &response) if err != nil { return nil, err } return &response.Dashboard, nil } type dashboardsResponse struct { Dashboards []*Dashboard `json:"dashboards,omitempty"` } type dashboardResponse struct { Dashboard Dashboard `json:"dashboard,omitempty"` } type dashboardRequest struct { Dashboard Dashboard `json:"dashboard"` }
var gulp = require('gulp'); // var plumber = require('gulp-plumber'); // var concat = require('gulp-concat'); // var uglify = require('gulp-uglify'); // var rename = require('gulp-rename'); // var connect = require('gulp-connect'); // var minifyCss = require('gulp-minify-css'); // var less = require('gulp-less'); // var imagemin = require('gulp-imagemin'); // var imageminJpegtran = require('imagemin-jpegtran'); // var pngquant = require('imagemin-pngquant'); // var notify = require('gulp-notify'); // // var clean = require('gulp-clean'); // // var babel = require('gulp-babel'); //es6 // var inject = require('gulp-inject'); // // var bowerFiles = require('main-bower-files'), // es = require('event-stream'); var $ = require('gulp-load-plugins')(); // gulp.task('script', function() { // gulp.src('./src/static/js/index.js') // .pipe(plumber()) // .pipe(gulp.dest('./dist/static/js/')); // gulp.task('script', function() { // gulp.src(['./src/static/js/index.js', './src/static/js/stark.js']) // .pipe(plumber()) // .pipe(gulp.dest('./dist/static/js/')); // gulp.task('script', function() { // var sources = gulp.src(['./src/static*.js', './src/static*.css'], { read: false }); // var cssFiles = gulp.src('./src/static*.css') // gulp.src('./src/static*.js', { read: false })
<reference path="../typings/modules/lodash/index.d.ts" /> /* * cqjs/src/domain.js */ 'use strict' import * as _ from 'lodash' import { CommandDef, ICommandDef, ICommandHandlerFunc } from './command' import { EventDef, IEventDef, IEventLoaderFunc } from './event' import { IKeyFunc, Random } from './keygen' import { IFunc, IFunc1, IFunc2 } from './utils' import { extend } from './utils' export interface IDomainConfig { keyFunc?: IKeyFunc, } export interface IDomainProps<TState> { uri: string, initialState: TState, config: IDomainConfig, } export interface <API key> {} export interface <API key> {} export interface <API key> {} export interface IDomainMeta<TState> { kind: 'DOMAIN_META' getUri: IFunc<string> getInitialState: IFunc<TState> getConfig: IFunc<IDomainConfig> } export function isDomainMeta<TState>(target: any): target is IDomainMeta<TState> { return (<IDomainMeta<TState>> target).kind === 'DOMAIN_META' } export type IEventDefMap<TState> = { [key: string]: IEventDef<TState, any> } export type ICommandDefMap<TState> = { [key: string]: ICommandDef<TState, any, any> } export class DomainMeta<TState> implements IDomainMeta<TState> { public kind: 'DOMAIN_META' private uri: string private initialState: TState private config: IDomainConfig constructor( uri: string, initialState: TState, config: IDomainConfig = { keyFunc: Random(10), } ) { this.uri = uri this.initialState = initialState this.config = config } public getUri(): string { return this.uri } public getInitialState(): TState { return _.cloneDeep(this.initialState) } public getConfig(): IDomainConfig { return _.cloneDeep(this.config) } } export type IEventDefFunc<TState> = <TEvent>( type: string, loader: IEventLoaderFunc<TState, TEvent> ) => IEventDef<TState, TEvent> export type ICommandDefFunc<TState> = <TCommand, TEvents>( type: string, handler: ICommandHandlerFunc<TState, TCommand, TEvents> ) => ICommandDef<TState, TCommand, TEvents> export function eventFunc<TState, TEvent>( uri: string ): IFunc2<string, IEventLoaderFunc<TState, TEvent>, IEventDef<TState, TEvent>> { return ( type: string, loader: IEventLoaderFunc<TState, TEvent> ): IEventDef<TState, TEvent> => new EventDef(uri, type, loader) } export function commandFunc<TState, TCommand, TEvents>( uri: string ): IFunc2<string, ICommandHandlerFunc<TState, TCommand, TEvents>, ICommandDef<TState, TCommand, TEvents>> { return ( type: string, handler: ICommandHandlerFunc<TState, TCommand, TEvents> ): ICommandDef<TState, TCommand, TEvents> => new CommandDef(uri, type, handler) } export function Domain<TState, TEventDefs extends IEventDefMap<TState>, TCommandDefs extends ICommandDefMap<TState>>( uri: string, initialState: TState, config: IDomainConfig, events: IFunc1<IEventDefFunc<TState>, TEventDefs>, commands: IFunc2<ICommandDefFunc<TState>, TEventDefs, TCommandDefs> ): { meta: IDomainMeta<TState>} & TEventDefs & TCommandDefs { const meta = new DomainMeta(uri, initialState) const eventDefs = events(eventFunc<TState, any>(uri)) const commandDefs = commands(commandFunc<TState, any, any>(uri), eventDefs) const messages = extend(eventDefs, commandDefs) return extend({ meta }, messages) } // export interface IDomain<TState, TEventDefs> { // kind: 'DOMAIN' // defs: TEventDefs, // getMeta: IFunc<IDomainMeta<TState>>, // getCommands: IFunc<Array<ICommandDef<TState, <API key>, <API key>>>>, // getEvents: IFunc<Array<IEventDef<TState, <API key>>>>, // command: <TCommand, TEvent>( // type: string, // handler: ICommandHandlerFunc<TState, TCommand, TEvent> // ) => ICommandDef<TState, TCommand, TEvent>, // event: <TEvent>( // type: string, // loader: IEventLoaderFunc<TState, TEvent> // ) => IEventDef<TState, TEvent> // const def = new EventDef(uri, type, loader) // this.events.push(def) // return def // export function Domain< // TState, // TEventDefs extends IEventDefMap<TState> // // meta: IDomainMeta<TState>, // defs: TEventDefs // ): TEventDefs { // return defs // export function isDomain<TState>(target: any): target is IDomain<TState> { // // {[key: string]: IEventDef<any> | ICommandDef<any> }` // export class Domain<TState, TEventDefs> implements IDomain<TState> { // public kind: 'DOMAIN' // private meta: IDomainMeta<TState> // private commands: Array<ICommandDef<TState, <API key>, <API key>>> = [] // private events: Array<IEventDef<TState, <API key>>> = [] // public defs: TEventDefs // constructor(uri: string, initialState: TState, defs: IFunc1<IDomain<TState, TEventDefs>, TEventDefs>) { // this.defs = defs(this) // // constructor(uri: string, initialState: TState, config: IDomainConfig = { // // keyFunc: Random(10), // // this.meta = new DomainMeta(uri, initialState, config) // // this.commands = [] // // this.events = [] // public getMeta(): IDomainMeta<TState> { // return this.meta // public getCommands(): Array<ICommandDef<TState, <API key>, <API key>>> { // return this.commands // public getEvents(): Array<IEventDef<TState, <API key>>> { // return this.events // public command<TCommand, TEvent>( // type: string, // handler: ICommandHandlerFunc<TState, TCommand, TEvent> // ): ICommandDef<TState, TCommand, TEvent> { // const def = new CommandDef(this.meta.getUri(), type, handler) // this.commands.push(def) // return def // public event<TEvent>( // type: string, // loader: IEventLoaderFunc<TState, TEvent> // ): IEventDef<TState, TEvent> { // const def = new EventDef(this.meta.getUri(), type, loader) // this.events.push(def) // return def
# Nested Zip File Expander for Blackboard & Zybook Zybooks stores students in a bunch of nested zips and it can be hard to work with. ZyExpander seeks to fix that problem by taking a nested zip file from Zybooks and organizing it into a better folder structure. This is pretty old, and the code isn't as nice as I'd like but it gets the job done. Example of ZyBook's native class storage structure: Lab1.zip Student1_First_Last.zip ==> lab1a.java ==> lab1b.java Student2_First_Last.zip ==> lab1a.java # Difficulties 1. Nested zips are annoying because even after they're expanded they remain in the directory, not only that but having to expand nested compressed files can get tedious. 2. The actual programs get put in outer directory rather than in a folder. They all retain the same file name and this makes differentiating between students hard. 3. This challenge gets even more difficult when a student only turns in a portion of the assignment as it isn't easy to see who did the whole assignment. # Solution We can **speed up and organize** this process using ZyExpander. No more duplicate file names or expanding nested zips, simply run ZyExpander all of the lab zip files and you're good to go! Zybooks *creates a backup* of the original lab zip file, and puts program files in a directory corresponding to the student's name. You can even specify a common output directory so you can organize students however you see fit whether it be by class, assignment, or assignment type, that way you don't have to sift through different directories for each assignment. ZyExpander speeds up your workflow and organizes your ZyBooks students. # Usage ## Basic Usage Simply run the file with your native python interpreter and supply a list of zipfiles to expand. Optionally you can specify an output directory to put the files into. By default ZyExpander will not overwrite any current directories that exist, but if you specify a directory that does not exist it will create it. usage: Python ZyExpander.py [-h] [-o O] zips [zips ...] Takes input zipfiles and expands them. positional arguments: zips zipfiles you want to process optional arguments: -h, --help show this help message and exit -o O option to specify an output directory
FactoryGirl.define do factory :field do association :parent name { Faker::Company.buzzword } end end
require "services" require "adapters" require "securerandom" require "gds_api_constants" class PublishingAdapter def save_draft(manual, republish: false, include_sections: true, include_links: true) save_manual(manual, republish: republish, include_links: include_links) if include_sections manual.sections.each do |section| save_section(section, manual, republish: republish, include_links: include_links) end end end def unpublish(manual) Services.publishing_api.unpublish(manual.id, type: "gone") manual.sections.each do |section| Services.publishing_api.unpublish(section.uuid, type: "gone") end end def publish(manual, republish: false) publish_manual(manual, republish: republish) manual.sections.each do |section| publish_section(section, republish: republish) end manual.removed_sections.each do |section| unpublish_section(section, manual, republish: republish) end end def discard(manual) manual.sections.each do |section| discard_section(section) end Services.publishing_api.discard_draft(manual.id) end def save_section(section, manual, republish: false, include_links: true) if section.needs_exporting? || republish save_section_links(section, manual) if include_links <API key>(section, manual, republish: republish) end end def redirect_section(section, to:) Services.publishing_api.put_content( SecureRandom.uuid, document_type: "redirect", schema_name: "redirect", publishing_app: GdsApiConstants::PublishingApi::PUBLISHING_APP, base_path: "/#{section.slug}", redirects: [ { path: "/#{section.slug}", type: GdsApiConstants::PublishingApi::EXACT_ROUTE_TYPE, destination: to, }, ], ) end def discard_section(section) Services.publishing_api.discard_draft(section.uuid) end private def organisation_for(manual) Adapters.organisations.find(manual.organisation_slug) end def save_manual(manual, republish:, include_links:) save_manual_links(manual) if include_links save_manual_content(manual, republish: republish) end def save_manual_links(manual) organisation = organisation_for(manual) Services.publishing_api.patch_links( manual.id, links: { organisations: [organisation.content_id], <API key>: [organisation.content_id], sections: manual.sections.map(&:uuid), }, ) end def save_manual_content(manual, republish: false) organisation = organisation_for(manual) update_type = case version_type(republish) || manual.version_type when :new, :major GdsApiConstants::PublishingApi::MAJOR_UPDATE_TYPE when :minor GdsApiConstants::PublishingApi::MINOR_UPDATE_TYPE when :republish GdsApiConstants::PublishingApi::<API key> else raise "Uknown version type: #{manual.version_type}" end base_path = "/#{manual.slug}" updates_path = [base_path, GdsApiConstants::PublishingApi::UPDATES_PATH_SUFFIX].join("/") attributes = { base_path: base_path, schema_name: GdsApiConstants::PublishingApi::MANUAL_SCHEMA_NAME, document_type: GdsApiConstants::PublishingApi::<API key>, title: manual.title, description: manual.summary, update_type: update_type, bulk_publishing: republish, publishing_app: GdsApiConstants::PublishingApi::PUBLISHING_APP, rendering_app: GdsApiConstants::PublishingApi::RENDERING_APP, routes: [ { path: base_path, type: GdsApiConstants::PublishingApi::EXACT_ROUTE_TYPE, }, { path: updates_path, type: GdsApiConstants::PublishingApi::EXACT_ROUTE_TYPE, }, ], details: { body: [ { content_type: "text/govspeak", content: manual.body, }, { content_type: "text/html", content: ManualPresenter.new(manual).body, }, ], <API key>: [ { title: GdsApiConstants::PublishingApi::<API key>, child_sections: manual.sections.map do |section| { title: section.title, description: section.summary, base_path: "/#{section.slug}", } end, }, ], change_notes: manual.publication_logs.map do |publication_log| { base_path: "/#{publication_log.slug}", title: publication_log.title, change_note: publication_log.change_note, published_at: publication_log.published_at, } end, organisations: [ { title: organisation.title, abbreviation: organisation.abbreviation || "", web_url: organisation.web_url, }, ], }, locale: GdsApiConstants::PublishingApi::EDITION_LOCALE, } latest_publication = manual.publication_logs.last if latest_publication attributes[:change_note] = "#{latest_publication.title} - #{latest_publication.change_note}" end if manual.<API key>.present? attributes[:first_published_at] = manual.<API key> if manual.<API key>? attributes[:public_updated_at] = manual.<API key> end end Services.publishing_api.put_content(manual.id, attributes) end def publish_manual(manual, republish:) Services.publishing_api.publish(manual.id, update_type(republish)) end def save_section_links(section, manual) organisation = organisation_for(manual) Services.publishing_api.patch_links( section.uuid, links: { organisations: [organisation.content_id], <API key>: [organisation.content_id], manual: [manual.id], }, ) end def <API key>(section, manual, republish: false) organisation = organisation_for(manual) update_type = case version_type(republish) || section.version_type when :new, :major GdsApiConstants::PublishingApi::MAJOR_UPDATE_TYPE when :minor GdsApiConstants::PublishingApi::MINOR_UPDATE_TYPE when :republish GdsApiConstants::PublishingApi::<API key> else raise "Unknown version type: #{section.version_type}" end attributes = { base_path: "/#{section.slug}", schema_name: GdsApiConstants::PublishingApi::SECTION_SCHEMA_NAME, document_type: GdsApiConstants::PublishingApi::<API key>, title: section.title, description: section.summary, update_type: update_type, bulk_publishing: republish, publishing_app: GdsApiConstants::PublishingApi::PUBLISHING_APP, rendering_app: GdsApiConstants::PublishingApi::RENDERING_APP, change_note: section.change_note, routes: [ { path: "/#{section.slug}", type: GdsApiConstants::PublishingApi::EXACT_ROUTE_TYPE, }, ], details: { body: [ { content_type: "text/govspeak", content: section.body, }, { content_type: "text/html", content: SectionPresenter.new(section).body, }, ], attachments: section.attachments.map do |attachment| { attachment_type: "file", id: SecureRandom.uuid, title: attachment.title, url: attachment.file_url, content_type: attachment.content_type, } end, manual: { base_path: "/#{manual.slug}", }, organisations: [ { title: organisation.title, abbreviation: organisation.abbreviation || "", web_url: organisation.web_url, }, ], visually_expanded: section.visually_expanded, }, locale: GdsApiConstants::PublishingApi::EDITION_LOCALE, } if manual.<API key>.present? attributes[:first_published_at] = manual.<API key> if manual.<API key>? attributes[:public_updated_at] = manual.<API key> end end Services.publishing_api.put_content(section.uuid, attributes) end def publish_section(section, republish:) if section.needs_exporting? || republish Services.publishing_api.publish(section.uuid, update_type(republish)) section.mark_as_exported! unless republish end end def unpublish_section(section, manual, republish:) if !section.withdrawn? || republish begin Services.publishing_api.unpublish(section.uuid, type: "redirect", alternative_path: "/#{manual.slug}", discard_drafts: true) section.<API key>! unless republish rescue GdsApi::HTTPNotFound Rails.logger.warn "Content item with section uuid #{section.uuid} not present in the publishing API" end end end def update_type(republish) republish ? GdsApiConstants::PublishingApi::<API key> : nil end def version_type(republish) republish ? :republish : nil end end
<script type="text/javascript"> window.location = "http://menegroth.github.io" </script> For now, links live on the homepage: [menegroth.github.io](http://menegroth.github.io) If you aren't redirected automatically, click the link above.
YUI.add('yui2-imageloader', function(Y) { var YAHOO = Y.YUI2; /** * The image loader is a framework to dynamically load images * according to certain triggers, enabling faster load times * and a more responsive UI. * * @module imageloader * @namespace YAHOO.util */ if (typeof(YAHOO.util.ImageLoader) == 'undefined') { YAHOO.util.ImageLoader = {}; } /** * A group for images. A group can have one time limit and a series of triggers. Thus the images belonging to this group must share these constraints. * @class YAHOO.util.ImageLoader.group * @requires YAHOO.util.Dom * @requires YAHOO.util.Event * @constructor * @param {String|HTMLElement} trigEl The HTML element id or reference to assign the trigger event to. Can be null for no trigger * @param {String} trigAct The type of event to assign to trigEl. Can be null for no trigger * @param {Number} timeout Timeout (time limit) length, in seconds. Can be undefined, or <= 0, for no time limit */ YAHOO.util.ImageLoader.group = function(trigEl, trigAct, timeout) { /** * Name for the group. Only used to identify the group in logging statements * @property name * @type String */ this.name = 'unnamed'; /** * Collection of images registered with this group * @property _imgObjs * @private * @type Object */ this._imgObjs = {}; /** * Timeout (time limit) length, in seconds * @property timeoutLen * @type Number */ this.timeoutLen = timeout; /** * Timeout object to keep a handle on the time limit * @property _timeout * @private * @type Object */ this._timeout = null; /** * Collection of triggers for this group. * Keeps track of each trigger's element, event, and <API key> "fetch" function * @property _triggers * @private * @type Array */ this._triggers = []; /** * Collection of custom-event triggers for this group. * Keeps track of each trigger's event object and <API key> "fetch" function * @property _customTriggers * @private * @type Array */ this._customTriggers = []; /** * Flag to check if images are above the fold. If foldConditional is true, the group will check each of its image locations at page load. If any part of the image is within the client viewport, the image is displayed immediately * @property foldConditional * @type Boolean */ this.foldConditional = false; /** * Class name that will identify images belonging to the group. This class name will be removed from each element in order to fetch images. * This class should have, in its CSS style definition, "background:none !important;" * @property className * @type String */ this.className = null; /** * HTML elements having the class name that is associated with this group * Elements are stored during the _foldCheck function and reused later during the fetch function. Gives a slight performance improvement when className and foldConditional are both used * @property _classImageEls * @private * @type Array */ this._classImageEls = null; // add a listener to set the time limit in the onload YAHOO.util.Event.addListener(window, 'load', this._onloadTasks, this, true); // add the trigger this.addTrigger(trigEl, trigAct); }; /** * Adds a trigger to the group. Call this with the same style as YAHOO.util.Event.addListener * @method addTrigger * @param {String|HTMLElement} trigEl The HTML element id or reference to assign the trigger event to * @param {String} trigAct The type of event to assign to trigEl */ YAHOO.util.ImageLoader.group.prototype.addTrigger = function(trigEl, trigAct) { if (! trigEl || ! trigAct) { return; } /* Need to wrap the fetch function. Event Util can't distinguish prototyped functions of different instantiations * Leads to this scenario: groupA and groupZ both have window-scroll triggers. groupZ also has a 2-sec timeout (groupA has no timeout). * groupZ's timeout fires; we remove the triggers. The removeListener call finds the first window-scroll event with Y.u.IL.p.fetch, which is groupA's. * groupA's trigger is removed and never fires, leaving images unfetched */ var wrappedFetch = function() { this.fetch(); }; this._triggers.push([trigEl, trigAct, wrappedFetch]); YAHOO.util.Event.addListener(trigEl, trigAct, wrappedFetch, this, true); }; /** * Adds a custom event trigger to the group. * @method addCustomTrigger * @param {Object} event A YAHOO.util.CustomEvent object */ YAHOO.util.ImageLoader.group.prototype.addCustomTrigger = function(event) { // make sure we're dealing with a CustomEvent object if (! event || ! event instanceof YAHOO.util.CustomEvent) { return; } // see comment in addTrigger() var wrappedFetch = function() { this.fetch(); }; this._customTriggers.push([event, wrappedFetch]); event.subscribe(wrappedFetch, this, true); }; /** * Setup to do in the window's onload * Initiates time limit for group; executes the fold check for the images * @method _onloadTasks * @private */ YAHOO.util.ImageLoader.group.prototype._onloadTasks = function() { if (this.timeoutLen && typeof(this.timeoutLen) == 'number' && this.timeoutLen > 0) { this._timeout = setTimeout(this._getFetchTimeout(), this.timeoutLen * 1000); } if (this.foldConditional) { this._foldCheck(); } }; /** * Returns the group's fetch method, with the proper closure, for use with setTimeout * @method _getFetchTimeout * @return {Function} group's fetch method * @private */ YAHOO.util.ImageLoader.group.prototype._getFetchTimeout = function() { var self = this; return function() { self.fetch(); }; }; /** * Registers a background image with the group * @method registerBgImage * @param {String} domId HTML DOM id of the image element * @param {String} url URL for the image * @return {Object} bgImgObj that was registered, for modifying any attributes in the object */ YAHOO.util.ImageLoader.group.prototype.registerBgImage = function(domId, url) { this._imgObjs[domId] = new YAHOO.util.ImageLoader.bgImgObj(domId, url); return this._imgObjs[domId]; }; /** * Registers a src image with the group * @method registerSrcImage * @param {String} domId HTML DOM id of the image element * @param {String} url URL for the image * @param {Int} width pixel width of the image - defaults to image's natural size * @param {Int} height pixel height of the image - defaults to image's natural size * @return {Object} srcImgObj that was registered, for modifying any attributes in the object */ YAHOO.util.ImageLoader.group.prototype.registerSrcImage = function(domId, url, width, height) { this._imgObjs[domId] = new YAHOO.util.ImageLoader.srcImgObj(domId, url, width, height); return this._imgObjs[domId]; }; /** * Registers an alpha-channel-type png background image with the group * @method registerPngBgImage * @param {String} domId HTML DOM id of the image element * @param {String} url URL for the image * @param {Object} ailProps The AlphaImageLoader properties to be set for the image * Valid properties are 'sizingMethod' and 'enabled' * @return {Object} pngBgImgObj that was registered, for modifying any attributes in the object */ YAHOO.util.ImageLoader.group.prototype.registerPngBgImage = function(domId, url, ailProps) { this._imgObjs[domId] = new YAHOO.util.ImageLoader.pngBgImgObj(domId, url, ailProps); return this._imgObjs[domId]; }; /** * Displays the images in the group * @method fetch */ YAHOO.util.ImageLoader.group.prototype.fetch = function() { clearTimeout(this._timeout); // remove all listeners for (var i=0, len = this._triggers.length; i < len; i++) { YAHOO.util.Event.removeListener(this._triggers[i][0], this._triggers[i][1], this._triggers[i][2]); } // remove custom event subscriptions for (var i=0, len = this._customTriggers.length; i < len; i++) { this._customTriggers[i][0].unsubscribe(this._customTriggers[i][1], this); } // fetch whatever we need to by className this._fetchByClass(); // fetch registered images for (var id in this._imgObjs) { if (YAHOO.lang.hasOwnProperty(this._imgObjs, id)) { this._imgObjs[id].fetch(); } } }; /** * Checks the position of each image in the group. If any part of the image is within the client viewport, shows the image immediately. * @method _foldCheck * @private */ YAHOO.util.ImageLoader.group.prototype._foldCheck = function() { var scrollTop = (document.compatMode != 'CSS1Compat') ? document.body.scrollTop : document.documentElement.scrollTop; var viewHeight = YAHOO.util.Dom.getViewportHeight(); var hLimit = scrollTop + viewHeight; var scrollLeft = (document.compatMode != 'CSS1Compat') ? document.body.scrollLeft : document.documentElement.scrollLeft; var viewWidth = YAHOO.util.Dom.getViewportWidth(); var wLimit = scrollLeft + viewWidth; for (var id in this._imgObjs) { if (YAHOO.lang.hasOwnProperty(this._imgObjs, id)) { var elPos = YAHOO.util.Dom.getXY(this._imgObjs[id].domId); if (elPos[1] < hLimit && elPos[0] < wLimit) { this._imgObjs[id].fetch(); } } } // and by class if (this.className) { this._classImageEls = YAHOO.util.Dom.<API key>(this.className); for (var i=0, len = this._classImageEls.length; i < len; i++) { var elPos = YAHOO.util.Dom.getXY(this._classImageEls[i]); if (elPos[1] < hLimit && elPos[0] < wLimit) { YAHOO.util.Dom.removeClass(this._classImageEls[i], this.className); } } } }; /** * Finds all elements in the Dom with the class name specified in the group. Removes the class from the element in order to let the style definitions trigger the image fetching * @method _fetchByClass * @private */ YAHOO.util.ImageLoader.group.prototype._fetchByClass = function() { if (! this.className) { return; } // this._classImageEls may have been set during _foldCheck if (this._classImageEls === null) { this._classImageEls = YAHOO.util.Dom.<API key>(this.className); } YAHOO.util.Dom.removeClass(this._classImageEls, this.className); }; /** * Base class for image objects to be registered with the groups * @class YAHOO.util.ImageLoader.imgObj * @constructor * @param {String} domId HTML DOM id of the image element * @param {String} url URL for the image */ YAHOO.util.ImageLoader.imgObj = function(domId, url) { /** * HTML DOM id of the image element * @property domId * @type String */ this.domId = domId; /** * URL for the image * @property url * @type String */ this.url = url; /** * Pixel width of the image. Will be set as a "width" attribute after the image is fetched. * Detaults to the natural width of the image. * Only appropriate with src images * @property width * @type Int */ this.width = null; /** * Pixel height of the image. Will be set as a "height" attribute after the image is fetched. * Detaults to the natural height of the image. * Only appropriate with src images * @property height * @type Int */ this.height = null; /** * Whether the style.visibility should be set to "visible" after the image is fetched. * Used when setting src images as visibility:hidden prior to image fetching * @property setVisible * @type Boolean */ this.setVisible = false; /** * Whether the image has already been fetched. In the case of a foldCondional group, keeps track for when the trigger is fired so images aren't fetched twice * @property _fetched * @type Boolean * @private */ this._fetched = false; }; /** * Displays the image; puts the URL into the DOM * @method fetch */ YAHOO.util.ImageLoader.imgObj.prototype.fetch = function() { if (this._fetched) { return; } var el = document.getElementById(this.domId); if (! el) { return; } this._applyUrl(el); if (this.setVisible) { el.style.visibility = 'visible'; } if (this.width) { el.width = this.width; } if (this.height) { el.height = this.height; } this._fetched = true; }; /** * Inserts the image URL into the DOM so that the image is displayed. * Must be overridden by child class * @method _applyUrl * @param {Object} el HTML DOM element * @private */ YAHOO.util.ImageLoader.imgObj.prototype._applyUrl = function(el) { }; /** * Background image object. A background image is one whose URL is specified by "background-image" in the element's style * @class YAHOO.util.ImageLoader.bgImgObj * @constructor * @extends YAHOO.util.ImageLoader.imgObj * @param {String} domId HTML DOM id of the image element * @param {String} url URL for the image */ YAHOO.util.ImageLoader.bgImgObj = function(domId, url) { YAHOO.util.ImageLoader.bgImgObj.superclass.constructor.call(this, domId, url); }; YAHOO.lang.extend(YAHOO.util.ImageLoader.bgImgObj, YAHOO.util.ImageLoader.imgObj); /** * Inserts the image URL into the DOM so that the image is displayed. * Sets style.backgroundImage * @method _applyUrl * @param {Object} el HTML DOM element * @private */ YAHOO.util.ImageLoader.bgImgObj.prototype._applyUrl = function(el) { el.style.backgroundImage = "url('" + this.url + "')"; }; /** * Source image object. A source image is one whose URL is specified by a src attribute in the DOM element * @class YAHOO.util.ImageLoader.srcImgObj * @constructor * @extends YAHOO.util.ImageLoader.imgObj * @param {String} domId HTML DOM id of the image element * @param {String} url URL for the image * @param {Int} width pixel width of the image - defaults to image's natural size * @param {Int} height pixel height of the image - defaults to image's natural size */ YAHOO.util.ImageLoader.srcImgObj = function(domId, url, width, height) { YAHOO.util.ImageLoader.srcImgObj.superclass.constructor.call(this, domId, url); this.width = width; this.height = height; }; YAHOO.lang.extend(YAHOO.util.ImageLoader.srcImgObj, YAHOO.util.ImageLoader.imgObj); /** * Inserts the image URL into the DOM so that the image is displayed. * Sets src * @method _applyUrl * @param {Object} el HTML DOM element * @private */ YAHOO.util.ImageLoader.srcImgObj.prototype._applyUrl = function(el) { el.src = this.url; }; /** * PNG background image object. A PNG background image is one whose URL is specified through AlphaImageLoader or by "background-image" in the element's style * @class YAHOO.util.ImageLoader.pngBgImgObj * @constructor * @extends YAHOO.util.ImageLoader.imgObj * @param {String} domId HTML DOM id of the image element * @param {String} url URL for the image * @param {Object} ailProps The AlphaImageLoader properties to be set for the image * Valid properties are 'sizingMethod' and 'enabled' */ YAHOO.util.ImageLoader.pngBgImgObj = function(domId, url, ailProps) { YAHOO.util.ImageLoader.pngBgImgObj.superclass.constructor.call(this, domId, url); /** * AlphaImageLoader properties to be set for the image. * Valid properties are "sizingMethod" and "enabled". * @property props * @type Object */ this.props = ailProps || {}; }; YAHOO.lang.extend(YAHOO.util.ImageLoader.pngBgImgObj, YAHOO.util.ImageLoader.imgObj); /** * Inserts the image URL into the DOM so that the image is displayed. * If the browser is determined to be IE6 (or older), sets the AlphaImageLoader src; otherwise sets style.backgroundImage * @method _applyUrl * @param {Object} el HTML DOM element * @private */ YAHOO.util.ImageLoader.pngBgImgObj.prototype._applyUrl = function(el) { if (YAHOO.env.ua.ie && YAHOO.env.ua.ie <= 6) { var sizingMethod = (YAHOO.lang.isUndefined(this.props.sizingMethod)) ? 'scale' : this.props.sizingMethod; var enabled = (YAHOO.lang.isUndefined(this.props.enabled)) ? 'true' : this.props.enabled; el.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + this.url + '", sizingMethod="' + sizingMethod + '", enabled="' + enabled + '")'; } else { el.style.backgroundImage = "url('" + this.url + "')"; } }; YAHOO.register("imageloader", YAHOO.util.ImageLoader, {version: "2.6.0", build: "1321"}); }, '2.6.0' ,{"requires": ["yui2-yahoo", "yui2-dom", "yui2-event"]});
require File.expand_path('../boot', __FILE__) require 'rails/all' # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module RoRTest class Application < Rails::Application
$:.push File.expand_path('../../lib', __FILE__) require 'bash-visual' include Bash_Visual console = Console.new 'Font random demonstration'.chars do |char| console.write char, Font.new(:std, Font::rand_color(:black)) end
<?php declare(strict_types = 1); namespace App\Tests\Unit\Entity; use App\Entity\Role; use App\Entity\UserGroup; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; class RoleTest extends KernelTestCase { /** * @testdox Test that `Role::getUserGroups` returns expected */ public function <API key>(): void { $userGroup = (new UserGroup()) ->setName('some name'); $role = new Role('some role'); $role->getUserGroups()->add($userGroup); self::assertTrue($role->getUserGroups()->contains($userGroup)); } }
//Language: German //Translators: softwarerero, robhunt3r, sclausen, sarasate var de = { add: "hinzufügen", and: "und", back: "zurück", changePassword: "Passwort ändern", choosePassword: "Passwort auswählen", clickAgree: "Durch die Registrierung akzeptieren Sie unsere", configure: "Konfigurieren", createAccount: "Konto erstellen", currentPassword: "Aktuelles Passwort", dontHaveAnAccount: "Noch kein Konto?", email: "E-Mail", emailAddress: "E-Mail Adresse", emailResetLink: "Senden", forgotPassword: "Passwort vergessen?", <API key>: "Falls Sie ein Konto haben, bitte hier", newPassword: "Neues Passwort", newPasswordAgain: "Neues Passwort (wiederholen)", optional: "Optional", OR: "ODER", password: "Passwort", passwordAgain: "Passwort (wiederholen)", privacyPolicy: "Datenschutzerklärung", remove: "entfernen", resetYourPassword: "Passwort zurücksetzen", setPassword: "Passwort festlegen", sign: "Anmelden", signIn: "Anmelden", signin: "anmelden", signOut: "Abmelden", signUp: "Registrieren", signupCode: "Registrierungscode", <API key>: "Mit E-Mail registrieren", terms: "Geschäftsbedingungen", updateYourPassword: "Passwort aktualisieren", username: "Benutzername", usernameOrEmail: "Benutzername oder E-Mail", "with": "mit", info: { emailSent: "E-Mail gesendet", emailVerified: "E-Mail verifiziert", PasswordChanged: "Passwort geändert", PasswordReset: "Passwort zurückgesetzt" }, error: { emailRequired: "E-Mail benötigt.", minChar: "Passwort muss mindestens 7 Zeichen lang sein.", pwdsDontMatch: "Passwörter stimmen nicht überein.", pwOneDigit: "Passwort muss mindestens eine Ziffer enthalten.", pwOneLetter: "Passwort muss mindestens einen Buchstaben enthalten.", signInRequired: "Sie müssen sich anmelden.", signupCodeIncorrect: "Registrierungscode ungültig.", signupCodeRequired: "Registrierungscode benötigt.", usernameIsEmail: "Benutzername darf keine E-Mail Adresse sein.", usernameRequired: "Benutzername benötigt.", accounts: { "Email already exists.": "Die E-Mail Adresse wird bereits verwendet.", "Email doesn't match the criteria.": "E-Mail Adresse erfüllt die Anforderungen nicht.", "Invalid login token": "Ungültiger Login-Token", "Login forbidden": "Anmeldedaten ungültig", "Service unknown": "Dienst unbekannt", "Unrecognized options for login request": "Unbekannte Optionen für Login Request", "User validation failed": "Die Benutzerdaten sind nicht korrekt", "Username already exists.": "Der Benutzer existiert bereits.", "You are not logged in.": "Sie sind nicht eingeloggt.", "You've been logged out by the server. Please log in again.": "Der Server hat Dich ausgeloggt. Bitte melde Dich erneut an.", "Your session has expired. Please log in again.": "Ihre Sitzung ist abgelaufen. Bitte melden Sie sich erneut an.", "No matching login attempt found": "Kein passender Loginversuch gefunden.", "Password is old. Please reset your password.": "Passwort ist abgelaufen. Bitte setzen Sie es zurück.", "Incorrect password": "Falsches Passwort", "Invalid email": "Ungültige E-Mail Adresse", "Must be logged in": "Sie müssen sich anmelden", "Need to set a username or email": "Benutzername oder E-Mail Adresse müssen angegeben werden", "Password may not be empty": "Das Passwort darf nicht leer sein", "Signups forbidden": "Anmeldungen sind nicht erlaubt", "Token expired": "Token ist abgelaufen", "Token has invalid email address": "E-Mail Adresse passt nicht zum Token", "User has no password set": "Kein Passwort für den Benutzer angegeben", "User not found": "Benutzer nicht gefunden", "Verify email link expired": "Link zur E-Mail Verifizierung ist abgelaufen", "Verify email link is for unknown address": "Link zur Verifizierung ist für eine unbekannte E-Mail Adresse", "Verification email lost?": "Verifizierungsemail verloren?", "Send again": "Erneut senden", "Send the verification email again": "Verifizierungsemail erneut senden", "Send email again": "Email erneut senden", "A new email has been sent to you. If the email doesn't show up in your inbox, be sure to check your spam folder.": "Eine neue Email wurde an Sie verschickt. Sollte sich die Email nicht in Ihrem Posteingang befinden, prüfen Sie bitten Ihren Spamordner.", "Match failed": "Abgleich fehlgeschlagen", "Unknown error": "Unbekannter Fehler" } } }; T9n.map("de", de);
Date: Mon, 25 Nov 1996 22:02:40 GMT Server: NCSA/1.5.2 Last-modified: Fri, 27 Sep 1996 13:17:56 GMT Content-type: text/html Content-length: 3893 <HTML> <!--AUTO-UPDATE <!--TITLE "Robert D. Rodman" <HEAD> <TITLE>NCSU/CSC: Robert D. Rodman</TITLE> </HEAD> <BODY BACKGROUND="http: BGCOLOR="#FFFFFF" TEXT="#0000BB" LINK="#CC0022" VLINK="#770077" ALINK="#00FF00"> <CENTER><P ALIGN="CENTER"> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0> <TR> <TD COLSPAN=4> <!WA0><A HREF="http: <!WA1><IMG SRC="http: WIDTH=502 HEIGHT=122 BORDER=0 ISMAP></A> <BR></TD> </TR><TR> <TD> <!WA2><A HREF="http: ONMOUSEOVER="window.status='Return to CSC Homepage'; return true" > <!WA3><IMG SRC="http: BORDER=0 WIDTH=121 HEIGHT=32></A> </TD> <TD> <!WA4><A HREF="http: ONMOUSEOVER="window.status='Search the CSC Website'; return true" > <!WA5><IMG SRC="http: BORDER=0 WIDTH=121 HEIGHT=32></A> </TD> <TD> <!WA6><A HREF="http: ONMOUSEOVER="window.status='Phone/E-Mail Directory'; return true" > <!WA7><IMG SRC="http: BORDER=0 WIDTH=121 HEIGHT=32></A> </TD> <TD> <!WA8><A HREF="http: ONMOUSEOVER="window.status='Send E-Mail to Us'; return true" > <!WA9><IMG SRC="http: BORDER=0 WIDTH=121 HEIGHT=32></A> </TD> </TR></TABLE></P></CENTER> <HR> <FONT COLOR="#FF4422"> <H1 ALIGN=CENTER>Robert D. Rodman</H1> </FONT> <HR> <!-- END OF AUTOMATIC HEADER --> <!WA10><IMG SRC="http: <H3>Associate Professor</H3> Ph. D., University of California, Los Angeles, 1973<P> Dr. Rodman's research interests are in voice processing, computational linguistics, and applied CTI (computer-telephone interface). He is currently working on such projects as computer identification of speakers by voice, automated lip synchronization, the use of computerized telephone calls in political campaigns, the use of computerized telephone calls to monitor elderly or frail persons living alone. He has also published in the area of performance assessment of speech hardware, use of voice input/output as aids to the handicapped, speech recognition of Chinese, and theoretical linguistics. He is the co-author of a popular linguistics textbook. He is on the editorial board of the International Journal of Speech Technology and a member of the Association of Computational Linguistics (ACL), and the Linguistic Society of America (LSA). <BR CLEAR=LEFT><P> <DL> <DT><H4>Representative Publications</H4> <DD>"Automated Lip-Sync: Direct Translation of Speech-Sound to Mouth-Shape," (with B. Koster and D. Bitzer). <i>Proceedings of the 28th Annual Asilomar Conference on Signals, Systems and Computers, IEEE:</i>1994, pp 36-46. <p> <DD><i>An Introduction to Language 5/e,</i> Harcourt, Brace Jovanovich, (with V. Fromkin), 1993.<p> <DD>"A Voice System for the Computer Entry of Chinese Characters," <i>Computer Speech and Language</i>, (with D. Han), Vol. 7, 1993, pp. 1-13.<p> <DD>"Voice Dialogue Systems," (with A. W. Bierman), <i>Intelligent Systems, State of the Art and Future Directions</i>, 1990, pp. 318-336.<p> <DD>"Computer Speech Recognition in Augmentative Communication," <i>Journal of the American Voice I/O Society</i>, Vol. 6, July 1989, pp. 61-76.<p> </DL> <!-- START AUTOMATIC FOOTER --> <HR> <ADDRESS> Department of Computer Science, Box 8206<br> <!WA11><a href="http: <!WA12><a href="http: Raleigh, NC 27695 </ADDRESS> <P> (last update 27-Sep-96 by Auto-Format Script) </BODY> </HTML>
from CGATReport.Tracker import * from rrbsReport import * class M3DSummaryTable(RrbsTracker): # pattern = "^summary_table$" def __call__(self, track, slice=None): statement = ''' SELECT group1 as Group_1, group2 as Group_2, total as Total, significant as <API key> FROM summary_table ''' % locals() return self.getAll(statement)
#include <event2/event.h> #ifdef <API key> // It would probably be ideal to define dummy test(s) that report skipped, but boost::test doesn't seem to make that practical (at least not in versions available with common distros) #include <map> #include <stdlib.h> #include <support/events.h> #include <test/setup_common.h> #include <boost/test/unit_test.hpp> static std::map<void*, short> tags; static std::map<void*, uint16_t> orders; static uint16_t tagSequence = 0; static void* tag_malloc(size_t sz) { void* mem = malloc(sz); if (!mem) return mem; tags[mem]++; orders[mem] = tagSequence++; return mem; } static void tag_free(void* mem) { tags[mem] orders[mem] = tagSequence++; free(mem); } <API key>(raii_event_tests, BasicTestingSetup) <API key>(raii_event_creation) { <API key>(tag_malloc, realloc, tag_free); void* base_ptr = nullptr; { auto base = obtain_event_base(); base_ptr = (void*)base.get(); BOOST_CHECK(tags[base_ptr] == 1); } BOOST_CHECK(tags[base_ptr] == 0); void* event_ptr = nullptr; { auto base = obtain_event_base(); auto event = obtain_event(base.get(), -1, 0, nullptr, nullptr); base_ptr = (void*)base.get(); event_ptr = (void*)event.get(); BOOST_CHECK(tags[base_ptr] == 1); BOOST_CHECK(tags[event_ptr] == 1); } BOOST_CHECK(tags[base_ptr] == 0); BOOST_CHECK(tags[event_ptr] == 0); <API key>(malloc, realloc, free); } <API key>(raii_event_order) { <API key>(tag_malloc, realloc, tag_free); void* base_ptr = nullptr; void* event_ptr = nullptr; { auto base = obtain_event_base(); auto event = obtain_event(base.get(), -1, 0, nullptr, nullptr); base_ptr = (void*)base.get(); event_ptr = (void*)event.get(); // base should have allocated before event BOOST_CHECK(orders[base_ptr] < orders[event_ptr]); } // base should be freed after event BOOST_CHECK(orders[base_ptr] > orders[event_ptr]); <API key>(malloc, realloc, free); } <API key>() #endif // <API key>
package io.echosystem.ebr.constant; /** * * @author Rodolpho Picolo <rodolphopicolo@gmail.com> */ public enum TipoDocumento { CTE(57), NFE(55), MDFE(58); private final int <API key>; private TipoDocumento(int <API key>){ this.<API key> = <API key>; } public int <API key>(){ return this.<API key>; } public static TipoDocumento <API key>(int <API key>){ for(TipoDocumento td: TipoDocumento.values()){ if(td.<API key> == <API key>){ return td; } } return null; } }
using System; namespace Wires.Tests { public static class WeakHelpers { public static void ExecuteAndCollect(Action execute) { execute(); Bindings.Purge(); // Forcing garbage collection GC.Collect(); GC.<API key>(); GC.Collect(); } } }
<?php defined('BASEPATH') OR exit('No direct script access allowed'); $hook['<API key>'][] = array( 'function' => 'is_loged_in', 'filename' => 'authority.php', 'filepath' => 'hooks' ); $hook['<API key>'][] = array( 'function' => 'check_authority', 'filename' => 'authority.php', 'filepath' => 'hooks' );
-- Examples from chapter 8 -- http://learnyouahaskell.com/<API key> import qualified Data.Map as Map data Point = Point Float Float deriving (Show) data Shape = Circle Point Float | Rectangle Point Point deriving (Show) surface :: Shape -> Float surface (Circle _ r) = pi * r ^ 2 surface (Rectangle (Point x1 y1) (Point x2 y2)) = (abs $ x2 - x1) * (abs $ y2 - y1) nudge :: Shape -> Float -> Float -> Shape nudge (Circle (Point x y) r) a b = Circle (Point (x+a) (y+b)) r nudge (Rectangle (Point x1 y1) (Point x2 y2)) a b = Rectangle (Point (x1+a) (y1+b)) (Point (x2+a) (y2+b)) baseCircle :: Float -> Shape baseCircle = Circle (Point 0 0) baseRect :: Float -> Float -> Shape baseRect width height = Rectangle (Point 0 0) (Point width height) data Person = Person { firstName :: String , lastName :: String , age :: Int , height :: Float , phoneNumber :: String , flavor :: String } deriving (Show) data Day = Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday deriving (Eq, Ord, Show, Read, Bounded, Enum) type PhoneNumber = String type Name = String type PhoneBook = [(Name,PhoneNumber)] type IntMap = Map.Map Int data LockerState = Taken | Free deriving (Show, Eq) type Code = String type LockerMap = Map.Map Int (LockerState, Code) lockerLookup :: Int -> LockerMap -> Either String Code lockerLookup lockerNumber map = case Map.lookup lockerNumber map of Nothing -> Left $ "Locker number " ++ show lockerNumber ++ " doesn't exist!" Just (state, code) -> if state /= Taken then Right code else Left $ "Locker " ++ show lockerNumber ++ " is already taken!" lockers :: LockerMap lockers = Map.fromList [(100,(Taken,"ZD39I")) ,(101,(Free,"JAH3I")) ,(103,(Free,"IQSA9")) ,(105,(Free,"QOTSA")) ,(109,(Taken,"893JJ")) ,(110,(Taken,"99292")) ] data Tree a = EmptyTree | Node a (Tree a) (Tree a) deriving (Show, Read, Eq) singleton :: a -> Tree a singleton x = Node x EmptyTree EmptyTree treeInsert :: (Ord a) => a -> Tree a -> Tree a treeInsert x EmptyTree = singleton x treeInsert x (Node a left right) | x == a = Node x left right | x < a = Node a (treeInsert x left) right | x > a = Node a left (treeInsert x right) treeElem :: (Ord a) => a -> Tree a -> Bool treeElem x EmptyTree = False treeElem x (Node a left right) | x == a = True | x < a = treeElem x left | x > a = treeElem x right data TrafficLight = Red | Yellow | Green instance Eq TrafficLight where Red == Red = True Green == Green = True Yellow == Yellow = True _ == _ = False class YesNo a where yesno :: a -> Bool instance YesNo Int where yesno 0 = False yesno _ = True instance YesNo [a] where yesno [] = False yesno _ = True instance YesNo Bool where yesno = id instance YesNo (Maybe a) where yesno (Just _) = True yesno Nothing = False
define("ghost/utils/link-view", [], function() { "use strict"; Ember.LinkView.reopen({ active: Ember.computed('resolvedParams', 'routeArgs', function () { var isActive = this._super(); Ember.set(this, 'alternateActive', isActive); return isActive; }), activeClass: Ember.computed('tagName', function () { return this.get('tagName') === 'button' ? '' : 'active'; }) }); });
using RealCrowd.HelloSign.Models; using System.Threading.Tasks; using System; namespace RealCrowd.HelloSign.Clients { public class TemplateService : ITemplateService { private ISettings settings; private IHelloSignService helloSignService; public TemplateService(ISettings settings, IHelloSignService helloSignService) { this.settings = settings; this.helloSignService = helloSignService; } public Task<Template> GetAsync(string templateId) { return GetAsync(new TemplateRequest { TemplateId = templateId }); } public async Task<Template> GetAsync(TemplateRequest request) { TemplateResponse templateResponse = await helloSignService.MakeRequestAsync<TemplateResponse>( settings.HelloSignSettings.Endpoints.Template.Get, request); return templateResponse.Template; } public async Task<<API key>> GetListAsync(TemplateListRequest request) { <API key> <API key> = await helloSignService.MakeRequestAsync<<API key>>( settings.HelloSignSettings.Endpoints.Template.List, request); return <API key>; } } }
#include "main.h" #include "db.h" #include "init.h" #include "bitcoinrpc.h" using namespace json_spirit; using namespace std; // Return average network hashes per second based on the last 'lookup' blocks, // or from the last difficulty change if 'lookup' is nonpositive. // If 'height' is nonnegative, compute the estimate at the time when a given block was found. Value GetNetworkHashPS(int lookup, int height) { CBlockIndex *pb = pindexBest; if (height >= 0 && height < nBestHeight) pb = FindBlockByHeight(height); if (pb == NULL || !pb->nHeight) return 0; // If lookup is -1, then use blocks since last difficulty change. if (lookup <= 0) lookup = pb->nHeight % 2016 + 1; // If lookup is larger than chain, then set it to chain length. if (lookup > pb->nHeight) lookup = pb->nHeight; CBlockIndex *pb0 = pb; int64 minTime = pb0->GetBlockTime(); int64 maxTime = minTime; for (int i = 0; i < lookup; i++) { pb0 = pb0->pprev; int64 time = pb0->GetBlockTime(); minTime = std::min(time, minTime); maxTime = std::max(time, maxTime); } // In case there's a situation where minTime == maxTime, we don't want a divide by zero exception. if (minTime == maxTime) return 0; uint256 workDiff = pb->nChainWork - pb0->nChainWork; int64 timeDiff = maxTime - minTime; return (boost::int64_t)(workDiff.getdouble() / timeDiff); } Value getnetworkhashps(const Array& params, bool fHelp) { if (fHelp || params.size() > 2) throw runtime_error( "getnetworkhashps [blocks] [height]\n" "Returns the estimated network hashes per second based on the last 120 blocks.\n" "Pass in [blocks] to override # of blocks, -1 specifies since last difficulty change.\n" "Pass in [height] to estimate the network speed at the time when a certain block was found."); return GetNetworkHashPS(params.size() > 0 ? params[0].get_int() : 120, params.size() > 1 ? params[1].get_int() : -1); } // Key used by getwork/getblocktemplate miners. // Allocated in InitRPCMining, free'd in ShutdownRPCMining static CReserveKey* pMiningKey = NULL; void InitRPCMining() { if (!pwalletMain) return; // getwork/getblocktemplate mining rewards paid here: pMiningKey = new CReserveKey(pwalletMain); } void ShutdownRPCMining() { if (!pMiningKey) return; delete pMiningKey; pMiningKey = NULL; } Value getgenerate(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( "getgenerate\n" "Returns true or false."); if (!pMiningKey) return false; return GetBoolArg("-gen"); } Value setgenerate(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( "setgenerate <generate> [genproclimit]\n" "<generate> is true or false to turn generation on or off.\n" "Generation is limited to [genproclimit] processors, -1 is unlimited."); bool fGenerate = true; if (params.size() > 0) fGenerate = params[0].get_bool(); if (params.size() > 1) { int nGenProcLimit = params[1].get_int(); mapArgs["-genproclimit"] = itostr(nGenProcLimit); if (nGenProcLimit == 0) fGenerate = false; } mapArgs["-gen"] = (fGenerate ? "1" : "0"); assert(pwalletMain != NULL); GenerateBitcoins(fGenerate, pwalletMain); return Value::null; } Value gethashespersec(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( "gethashespersec\n" "Returns a recent hashes per second performance measurement while generating."); if (GetTimeMillis() - nHPSTimerStart > 8000) return (boost::int64_t)0; return (boost::int64_t)dHashesPerSec; } Value getmininginfo(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( "getmininginfo\n" "Returns an object containing mining-related information."); Object obj; obj.push_back(Pair("blocks", (int)nBestHeight)); obj.push_back(Pair("currentblocksize",(uint64_t)nLastBlockSize)); obj.push_back(Pair("currentblocktx",(uint64_t)nLastBlockTx)); obj.push_back(Pair("difficulty", (double)GetDifficulty())); obj.push_back(Pair("errors", GetWarnings("statusbar"))); obj.push_back(Pair("generate", GetBoolArg("-gen"))); obj.push_back(Pair("genproclimit", (int)GetArg("-genproclimit", -1))); obj.push_back(Pair("hashespersec", gethashespersec(params, false))); obj.push_back(Pair("networkhashps", getnetworkhashps(params, false))); obj.push_back(Pair("pooledtx", (uint64_t)mempool.size())); obj.push_back(Pair("testnet", fTestNet)); return obj; } Value getworkex(const Array& params, bool fHelp) { if (fHelp || params.size() > 2) throw runtime_error( "getworkex [data, coinbase]\n" "If [data, coinbase] is not specified, returns extended work data.\n" ); if (vNodes.empty()) throw JSONRPCError(<API key>, "POcoin is not connected!"); if (<API key>()) throw JSONRPCError(<API key>, "POcoin is downloading blocks..."); typedef map<uint256, pair<CBlock*, CScript> > mapNewBlock_t; static mapNewBlock_t mapNewBlock; // FIXME: thread safety static vector<CBlockTemplate*> vNewBlockTemplate; static CReserveKey reservekey(pwalletMain); if (params.size() == 0) { // Update block static unsigned int <API key>; static CBlockIndex* pindexPrev; static int64 nStart; static CBlockTemplate* pblocktemplate; if (pindexPrev != pindexBest || (<API key> != <API key> && GetTime() - nStart > 60)) { if (pindexPrev != pindexBest) { // Deallocate old blocks since they're obsolete now mapNewBlock.clear(); BOOST_FOREACH(CBlockTemplate* pblocktemplate, vNewBlockTemplate) delete pblocktemplate; vNewBlockTemplate.clear(); } // Clear pindexPrev so future getworks make a new block, despite any failures from here on pindexPrev = NULL; // Store the pindexBest used before CreateNewBlock, to avoid races <API key> = <API key>; CBlockIndex* pindexPrevNew = pindexBest; nStart = GetTime(); // Create new block pblocktemplate = <API key>(*pMiningKey); if (!pblocktemplate) throw JSONRPCError(RPC_OUT_OF_MEMORY, "Out of memory"); vNewBlockTemplate.push_back(pblocktemplate); // Need to update only after we know CreateNewBlock succeeded pindexPrev = pindexPrevNew; } CBlock* pblock = &pblocktemplate->block; // pointer for convenience // Update nTime pblock->UpdateTime(pindexPrev); pblock->nNonce = 0; // Update nExtraNonce static unsigned int nExtraNonce = 0; IncrementExtraNonce(pblock, pindexPrev, nExtraNonce); // Save mapNewBlock[pblock->hashMerkleRoot] = make_pair(pblock, pblock->vtx[0].vin[0].scriptSig); // Pre-build hash buffers char pmidstate[32]; char pdata[128]; char phash1[64]; FormatHashBuffers(pblock, pmidstate, pdata, phash1); uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256(); CTransaction coinbaseTx = pblock->vtx[0]; std::vector<uint256> merkle = pblock->GetMerkleBranch(0); Object result; result.push_back(Pair("data", HexStr(BEGIN(pdata), END(pdata)))); result.push_back(Pair("target", HexStr(BEGIN(hashTarget), END(hashTarget)))); CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); ssTx << coinbaseTx; result.push_back(Pair("coinbase", HexStr(ssTx.begin(), ssTx.end()))); Array merkle_arr; BOOST_FOREACH(uint256 merkleh, merkle) { printf("%s\n", merkleh.ToString().c_str()); merkle_arr.push_back(HexStr(BEGIN(merkleh), END(merkleh))); } result.push_back(Pair("merkle", merkle_arr)); return result; } else { // Parse parameters vector<unsigned char> vchData = ParseHex(params[0].get_str()); vector<unsigned char> coinbase; if(params.size() == 2) coinbase = ParseHex(params[1].get_str()); if (vchData.size() != 128) throw JSONRPCError(<API key>, "Invalid parameter"); CBlock* pdata = (CBlock*)&vchData[0]; // Byte reverse for (int i = 0; i < 128/4; i++) ((unsigned int*)pdata)[i] = ByteReverse(((unsigned int*)pdata)[i]); // Get saved block if (!mapNewBlock.count(pdata->hashMerkleRoot)) return false; CBlock* pblock = mapNewBlock[pdata->hashMerkleRoot].first; pblock->nTime = pdata->nTime; pblock->nNonce = pdata->nNonce; if(coinbase.size() == 0) pblock->vtx[0].vin[0].scriptSig = mapNewBlock[pdata->hashMerkleRoot].second; else CDataStream(coinbase, SER_NETWORK, PROTOCOL_VERSION) >> pblock->vtx[0]; pblock->hashMerkleRoot = pblock->BuildMerkleTree(); return CheckWork(pblock, *pwalletMain, reservekey); } } Value getwork(const Array& params, bool fHelp) { if (fHelp || params.size() > 1) throw runtime_error( "getwork [data]\n" "If [data] is not specified, returns formatted hash data to work on:\n" " \"midstate\" : precomputed hash state after hashing the first half of the data (DEPRECATED)\n" // deprecated " \"data\" : block data\n" " \"hash1\" : formatted hash buffer for second hash (DEPRECATED)\n" // deprecated " \"target\" : little endian hash target\n" "If [data] is specified, tries to solve the block and returns true if it was successful."); if (vNodes.empty()) throw JSONRPCError(<API key>, "POcoin is not connected!"); if (<API key>()) throw JSONRPCError(<API key>, "POcoin is downloading blocks..."); typedef map<uint256, pair<CBlock*, CScript> > mapNewBlock_t; static mapNewBlock_t mapNewBlock; // FIXME: thread safety static vector<CBlockTemplate*> vNewBlockTemplate; if (params.size() == 0) { // Update block static unsigned int <API key>; static CBlockIndex* pindexPrev; static int64 nStart; static CBlockTemplate* pblocktemplate; if (pindexPrev != pindexBest || (<API key> != <API key> && GetTime() - nStart > 60)) { if (pindexPrev != pindexBest) { // Deallocate old blocks since they're obsolete now mapNewBlock.clear(); BOOST_FOREACH(CBlockTemplate* pblocktemplate, vNewBlockTemplate) delete pblocktemplate; vNewBlockTemplate.clear(); } // Clear pindexPrev so future getworks make a new block, despite any failures from here on pindexPrev = NULL; // Store the pindexBest used before CreateNewBlock, to avoid races <API key> = <API key>; CBlockIndex* pindexPrevNew = pindexBest; nStart = GetTime(); // Create new block pblocktemplate = <API key>(*pMiningKey); if (!pblocktemplate) throw JSONRPCError(RPC_OUT_OF_MEMORY, "Out of memory"); vNewBlockTemplate.push_back(pblocktemplate); // Need to update only after we know CreateNewBlock succeeded pindexPrev = pindexPrevNew; } CBlock* pblock = &pblocktemplate->block; // pointer for convenience // Update nTime pblock->UpdateTime(pindexPrev); pblock->nNonce = 0; // Update nExtraNonce static unsigned int nExtraNonce = 0; IncrementExtraNonce(pblock, pindexPrev, nExtraNonce); // Save mapNewBlock[pblock->hashMerkleRoot] = make_pair(pblock, pblock->vtx[0].vin[0].scriptSig); // Pre-build hash buffers char pmidstate[32]; char pdata[128]; char phash1[64]; FormatHashBuffers(pblock, pmidstate, pdata, phash1); uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256(); Object result; result.push_back(Pair("midstate", HexStr(BEGIN(pmidstate), END(pmidstate)))); // deprecated result.push_back(Pair("data", HexStr(BEGIN(pdata), END(pdata)))); result.push_back(Pair("hash1", HexStr(BEGIN(phash1), END(phash1)))); // deprecated result.push_back(Pair("target", HexStr(BEGIN(hashTarget), END(hashTarget)))); return result; } else { // Parse parameters vector<unsigned char> vchData = ParseHex(params[0].get_str()); if (vchData.size() != 128) throw JSONRPCError(<API key>, "Invalid parameter"); CBlock* pdata = (CBlock*)&vchData[0]; // Byte reverse for (int i = 0; i < 128/4; i++) ((unsigned int*)pdata)[i] = ByteReverse(((unsigned int*)pdata)[i]); // Get saved block if (!mapNewBlock.count(pdata->hashMerkleRoot)) return false; CBlock* pblock = mapNewBlock[pdata->hashMerkleRoot].first; pblock->nTime = pdata->nTime; pblock->nNonce = pdata->nNonce; pblock->vtx[0].vin[0].scriptSig = mapNewBlock[pdata->hashMerkleRoot].second; pblock->hashMerkleRoot = pblock->BuildMerkleTree(); assert(pwalletMain != NULL); return CheckWork(pblock, *pwalletMain, *pMiningKey); } } Value getblocktemplate(const Array& params, bool fHelp) { if (fHelp || params.size() > 1) throw runtime_error( "getblocktemplate [params]\n" "Returns data needed to construct a block to work on:\n" " \"version\" : block version\n" " \"previousblockhash\" : hash of current highest block\n" " \"transactions\" : contents of non-coinbase transactions that should be included in the next block\n" " \"coinbaseaux\" : data that should be included in coinbase\n" " \"coinbasevalue\" : maximum allowable input to coinbase transaction, including the generation award and transaction fees\n" " \"target\" : hash target\n" " \"mintime\" : minimum timestamp appropriate for next block\n" " \"curtime\" : current timestamp\n" " \"mutable\" : list of ways the block template may be changed\n" " \"noncerange\" : range of valid nonces\n" " \"sigoplimit\" : limit of sigops in blocks\n" " \"sizelimit\" : limit of block size\n" " \"bits\" : compressed target of next block\n" " \"height\" : height of the next block\n" "See https://en.bitcoin.it/wiki/BIP_0022 for full specification."); std::string strMode = "template"; if (params.size() > 0) { const Object& oparam = params[0].get_obj(); const Value& modeval = find_value(oparam, "mode"); if (modeval.type() == str_type) strMode = modeval.get_str(); else if (modeval.type() == null_type) { /* Do nothing */ } else throw JSONRPCError(<API key>, "Invalid mode"); } if (strMode != "template") throw JSONRPCError(<API key>, "Invalid mode"); if (vNodes.empty()) throw JSONRPCError(<API key>, "POcoin is not connected!"); if (<API key>()) throw JSONRPCError(<API key>, "POcoin is downloading blocks..."); // Update block static unsigned int <API key>; static CBlockIndex* pindexPrev; static int64 nStart; static CBlockTemplate* pblocktemplate; if (pindexPrev != pindexBest || (<API key> != <API key> && GetTime() - nStart > 5)) { // Clear pindexPrev so future calls make a new block, despite any failures from here on pindexPrev = NULL; // Store the pindexBest used before CreateNewBlock, to avoid races <API key> = <API key>; CBlockIndex* pindexPrevNew = pindexBest; nStart = GetTime(); // Create new block if(pblocktemplate) { delete pblocktemplate; pblocktemplate = NULL; } CScript scriptDummy = CScript() << OP_TRUE; pblocktemplate = CreateNewBlock(scriptDummy); if (!pblocktemplate) throw JSONRPCError(RPC_OUT_OF_MEMORY, "Out of memory"); // Need to update only after we know CreateNewBlock succeeded pindexPrev = pindexPrevNew; } CBlock* pblock = &pblocktemplate->block; // pointer for convenience // Update nTime pblock->UpdateTime(pindexPrev); pblock->nNonce = 0; Array transactions; map<uint256, int64_t> setTxIndex; int i = 0; BOOST_FOREACH (CTransaction& tx, pblock->vtx) { uint256 txHash = tx.GetHash(); setTxIndex[txHash] = i++; if (tx.IsCoinBase()) continue; Object entry; CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); ssTx << tx; entry.push_back(Pair("data", HexStr(ssTx.begin(), ssTx.end()))); entry.push_back(Pair("hash", txHash.GetHex())); Array deps; BOOST_FOREACH (const CTxIn &in, tx.vin) { if (setTxIndex.count(in.prevout.hash)) deps.push_back(setTxIndex[in.prevout.hash]); } entry.push_back(Pair("depends", deps)); int index_in_template = i - 1; entry.push_back(Pair("fee", pblocktemplate->vTxFees[index_in_template])); entry.push_back(Pair("sigops", pblocktemplate->vTxSigOps[index_in_template])); transactions.push_back(entry); } Object aux; aux.push_back(Pair("flags", HexStr(COINBASE_FLAGS.begin(), COINBASE_FLAGS.end()))); uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256(); static Array aMutable; if (aMutable.empty()) { aMutable.push_back("time"); aMutable.push_back("transactions"); aMutable.push_back("prevblock"); } Object result; result.push_back(Pair("version", pblock->nVersion)); result.push_back(Pair("previousblockhash", pblock->hashPrevBlock.GetHex())); result.push_back(Pair("transactions", transactions)); result.push_back(Pair("coinbaseaux", aux)); result.push_back(Pair("coinbasevalue", (int64_t)pblock->vtx[0].vout[0].nValue)); result.push_back(Pair("target", hashTarget.GetHex())); result.push_back(Pair("mintime", (int64_t)pindexPrev->GetMedianTimePast()+1)); result.push_back(Pair("mutable", aMutable)); result.push_back(Pair("noncerange", "00000000ffffffff")); result.push_back(Pair("sigoplimit", (int64_t)MAX_BLOCK_SIGOPS)); result.push_back(Pair("sizelimit", (int64_t)MAX_BLOCK_SIZE)); result.push_back(Pair("curtime", (int64_t)pblock->nTime)); result.push_back(Pair("bits", HexBits(pblock->nBits))); result.push_back(Pair("height", (int64_t)(pindexPrev->nHeight+1))); return result; } Value submitblock(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( "submitblock <hex data> [optional-params-obj]\n" "[optional-params-obj] parameter is currently ignored.\n" "Attempts to submit new block to network.\n" "See https://en.bitcoin.it/wiki/BIP_0022 for full specification."); vector<unsigned char> blockData(ParseHex(params[0].get_str())); CDataStream ssBlock(blockData, SER_NETWORK, PROTOCOL_VERSION); CBlock pblock; try { ssBlock >> pblock; } catch (std::exception &e) { throw JSONRPCError(<API key>, "Block decode failed"); } CValidationState state; bool fAccepted = ProcessBlock(state, NULL, &pblock); if (!fAccepted) return "rejected"; // TODO: report validation state return Value::null; }
<?php namespace App\Modules\Demo\Services\Database; use Nova\Database\Service; class Car extends Service { protected $fetchClass = '\App\Modules\Demo\Models\Entities\Car'; protected $table = "car"; protected $primaryKeys = array("carid"); public function __construct() { parent::__construct(); } public function getAll() { return $this->read("SELECT * FROM " . DB_PREFIX . "car"); } }
<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Address | tsty</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="../assets/css/main.css"> <script src="../assets/js/modernizr.js"></script> </head> <body> <header> <div class="tsd-page-toolbar"> <div class="container"> <div class="table-wrap"> <div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base=".."> <div class="field"> <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> <input id="tsd-search-field" type="text" /> </div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li> </ul> <a href="../index.html" class="title">tsty</a> </div> <div class="table-cell" id="tsd-widgets"> <div id="tsd-filter"> <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> <div class="tsd-filter-group"> <div class="tsd-select" id="<API key>"> <span class="tsd-select-label">All</span> <ul class="tsd-select-list"> <li data-value="public">Public</li> <li data-value="protected">Public/Protected</li> <li data-value="private" class="selected">All</li> </ul> </div> <input type="checkbox" id="<API key>" checked /> <label class="tsd-widget" for="<API key>">Inherited</label> <input type="checkbox" id="<API key>" checked /> <label class="tsd-widget" for="<API key>">Externals</label> <input type="checkbox" id="<API key>" /> <label class="tsd-widget" for="<API key>">Only exported</label> </div> </div> <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a> </div> </div> </div> </div> <div class="tsd-page-title"> <div class="container"> <ul class="tsd-breadcrumb"> <li> <a href="../globals.html">Globals</a> </li> <li> <a href="../modules/<API key>.html">&quot;typings/node/node.d&quot;</a> </li> <li> <a href="../modules/<API key>._cluster_.html">&quot;cluster&quot;</a> </li> <li> <a href="<API key>._cluster_.address.html">Address</a> </li> </ul> <h1>Interface Address</h1> </div> </div> </header> <div class="container container-main"> <div class="row"> <div class="col-8 col-content"> <section class="tsd-panel tsd-hierarchy"> <h3>Hierarchy</h3> <ul class="tsd-hierarchy"> <li> <span class="target">Address</span> </li> </ul> </section> <section class="tsd-panel-group tsd-index-group"> <h2>Index</h2> <section class="tsd-panel tsd-index-panel"> <div class="tsd-index-content"> <section class="tsd-index-section tsd-is-external"> <h3>Properties</h3> <ul class="tsd-index-list"> <li class="tsd-kind-property <API key> tsd-is-external"><a href="<API key>._cluster_.address.html#address" class="tsd-kind-icon">address</a></li> <li class="tsd-kind-property <API key> tsd-is-external"><a href="<API key>._cluster_.address.html#addresstype" class="tsd-kind-icon">address<wbr>Type</a></li> <li class="tsd-kind-property <API key> tsd-is-external"><a href="<API key>._cluster_.address.html#port" class="tsd-kind-icon">port</a></li> </ul> </section> </div> </section> </section> <section class="tsd-panel-group tsd-member-group tsd-is-external"> <h2>Properties</h2> <section class="tsd-panel tsd-member tsd-kind-property <API key> tsd-is-external"> <a name="address" class="tsd-anchor"></a> <h3>address</h3> <div class="tsd-signature tsd-kind-icon">address<span class="<API key>">:</span> <span class="tsd-signature-type">string</span></div> <aside class="tsd-sources"> <ul> <li>Defined in typings/node/node.d.ts:736</li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property <API key> tsd-is-external"> <a name="addresstype" class="tsd-anchor"></a> <h3>address<wbr>Type</h3> <div class="tsd-signature tsd-kind-icon">address<wbr>Type<span class="<API key>">:</span> <span class="tsd-signature-type">string</span></div> <aside class="tsd-sources"> <ul> <li>Defined in typings/node/node.d.ts:738</li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property <API key> tsd-is-external"> <a name="port" class="tsd-anchor"></a> <h3>port</h3> <div class="tsd-signature tsd-kind-icon">port<span class="<API key>">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> <li>Defined in typings/node/node.d.ts:737</li> </ul> </aside> </section> </section> </div> <div class="col-4 col-menu menu-sticky-wrap menu-highlight"> <nav class="tsd-navigation primary"> <ul> <li class="globals "> <a href="../globals.html"><em>Globals</em></a> </li> <li class="current <API key> tsd-is-external"> <a href="../modules/<API key>.html">"typings/node/node.d"</a> <ul> <li class="current tsd-kind-module <API key> tsd-is-external tsd-is-not-exported"> <a href="../modules/<API key>._cluster_.html">"cluster"</a> </li> </ul> </li> </ul> </nav> <nav class="tsd-navigation secondary menu-sticky"> <ul class="before-current"> <li class=" tsd-kind-class <API key> tsd-is-external"> <a href="../classes/<API key>._cluster_.worker.html" class="tsd-kind-icon">Worker</a> </li> </ul> <ul class="current"> <li class="current tsd-kind-interface <API key> tsd-is-external"> <a href="<API key>._cluster_.address.html" class="tsd-kind-icon">Address</a> <ul> <li class=" tsd-kind-property <API key> tsd-is-external"> <a href="<API key>._cluster_.address.html#address" class="tsd-kind-icon">address</a> </li> <li class=" tsd-kind-property <API key> tsd-is-external"> <a href="<API key>._cluster_.address.html#addresstype" class="tsd-kind-icon">address<wbr>Type</a> </li> <li class=" tsd-kind-property <API key> tsd-is-external"> <a href="<API key>._cluster_.address.html#port" class="tsd-kind-icon">port</a> </li> </ul> </li> </ul> <ul class="after-current"> <li class=" tsd-kind-interface <API key> tsd-is-external"> <a href="<API key>._cluster_.clustersettings.html" class="tsd-kind-icon">Cluster<wbr>Settings</a> </li> <li class=" tsd-kind-variable <API key> tsd-is-external"> <a href="../modules/<API key>._cluster_.html#ismaster" class="tsd-kind-icon">is<wbr>Master</a> </li> <li class=" tsd-kind-variable <API key> tsd-is-external"> <a href="../modules/<API key>._cluster_.html#isworker" class="tsd-kind-icon">is<wbr>Worker</a> </li> <li class=" tsd-kind-variable <API key> tsd-is-external"> <a href="../modules/<API key>._cluster_.html#settings" class="tsd-kind-icon">settings</a> </li> <li class=" tsd-kind-variable <API key> tsd-is-external"> <a href="../modules/<API key>._cluster_.html#worker-1" class="tsd-kind-icon">worker</a> </li> <li class=" tsd-kind-variable <API key> tsd-is-external"> <a href="../modules/<API key>._cluster_.html#workers" class="tsd-kind-icon">workers</a> </li> <li class=" tsd-kind-function <API key> tsd-is-external"> <a href="../modules/<API key>._cluster_.html#addlistener" class="tsd-kind-icon">add<wbr>Listener</a> </li> <li class=" tsd-kind-function <API key> tsd-is-external"> <a href="../modules/<API key>._cluster_.html#disconnect" class="tsd-kind-icon">disconnect</a> </li> <li class=" tsd-kind-function <API key> tsd-is-external"> <a href="../modules/<API key>._cluster_.html#emit" class="tsd-kind-icon">emit</a> </li> <li class=" tsd-kind-function <API key> tsd-is-external"> <a href="../modules/<API key>._cluster_.html#fork" class="tsd-kind-icon">fork</a> </li> <li class=" tsd-kind-function <API key> tsd-is-external"> <a href="../modules/<API key>._cluster_.html#listeners" class="tsd-kind-icon">listeners</a> </li> <li class=" tsd-kind-function <API key> tsd-is-external"> <a href="../modules/<API key>._cluster_.html#on" class="tsd-kind-icon">on</a> </li> <li class=" tsd-kind-function <API key> tsd-is-external"> <a href="../modules/<API key>._cluster_.html#once" class="tsd-kind-icon">once</a> </li> <li class=" tsd-kind-function <API key> tsd-is-external"> <a href="../modules/<API key>._cluster_.html#removealllisteners" class="tsd-kind-icon">remove<wbr>All<wbr>Listeners</a> </li> <li class=" tsd-kind-function <API key> tsd-is-external"> <a href="../modules/<API key>._cluster_.html#removelistener" class="tsd-kind-icon">remove<wbr>Listener</a> </li> <li class=" tsd-kind-function <API key> tsd-is-external"> <a href="../modules/<API key>._cluster_.html#setmaxlisteners" class="tsd-kind-icon">set<wbr>Max<wbr>Listeners</a> </li> <li class=" tsd-kind-function <API key> tsd-is-external"> <a href="../modules/<API key>._cluster_.html#setupmaster" class="tsd-kind-icon">setup<wbr>Master</a> </li> </ul> </nav> </div> </div> </div> <footer class="with-border-bottom"> <div class="container"> <h2>Legend</h2> <div class="tsd-legend-group"> <ul class="tsd-legend"> <li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li> <li class="<API key>"><span class="tsd-kind-icon">Object literal</span></li> <li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li> <li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li> <li class="tsd-kind-function <API key>"><span class="tsd-kind-icon">Function with type parameter</span></li> <li class="<API key>"><span class="tsd-kind-icon">Index signature</span></li> <li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li> <li class="<API key>"><span class="tsd-kind-icon">Enumeration member</span></li> <li class="tsd-kind-property <API key>"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method <API key>"><span class="tsd-kind-icon">Method</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li> <li class="tsd-kind-interface <API key>"><span class="tsd-kind-icon">Interface with type parameter</span></li> <li class="<API key> <API key>"><span class="tsd-kind-icon">Constructor</span></li> <li class="tsd-kind-property <API key>"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method <API key>"><span class="tsd-kind-icon">Method</span></li> <li class="<API key> <API key>"><span class="tsd-kind-icon">Index signature</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li> <li class="tsd-kind-class <API key>"><span class="tsd-kind-icon">Class with type parameter</span></li> <li class="<API key> <API key>"><span class="tsd-kind-icon">Constructor</span></li> <li class="tsd-kind-property <API key>"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method <API key>"><span class="tsd-kind-icon">Method</span></li> <li class="tsd-kind-accessor <API key>"><span class="tsd-kind-icon">Accessor</span></li> <li class="<API key> <API key>"><span class="tsd-kind-icon">Index signature</span></li> </ul> <ul class="tsd-legend"> <li class="<API key> <API key> tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li> <li class="tsd-kind-property <API key> tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li> <li class="tsd-kind-method <API key> tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li> <li class="tsd-kind-accessor <API key> tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property <API key> tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li> <li class="tsd-kind-method <API key> tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li> <li class="tsd-kind-accessor <API key> tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property <API key> tsd-is-private"><span class="tsd-kind-icon">Private property</span></li> <li class="tsd-kind-method <API key> tsd-is-private"><span class="tsd-kind-icon">Private method</span></li> <li class="tsd-kind-accessor <API key> tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property <API key> tsd-is-static"><span class="tsd-kind-icon">Static property</span></li> <li class="<API key> <API key> tsd-is-static"><span class="tsd-kind-icon">Static method</span></li> </ul> </div> </div> </footer> <div class="container tsd-generator"> <p>Generated using <a href="http://typedoc.io" target="_blank">TypeDoc</a></p> </div> <div class="overlay"></div> <script src="../assets/js/main.js"></script> <script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script> </body> </html>
var debug = require('debug')('prototype-chain'); var test = require('tape'); test(' //Global declarations of functions and variables creates properties inside 'this' object because it is <API key> for the Global EC assert.equal(1, GLOBAL_OBJECT.GLOBAL_VAR); assert.equal(2, GLOBAL_OBJECT.fn()); t.end(); }); test(' function bar() {} //Reference Type for bar identifier. var barReferenceType = { base: 'GlobalObject', propertyName: "bar" }; //GetValue(barReferenceType); // function object "bar" var obj = { foo: function() {} }, //Reference Type for obj.foo (or obj['foo']) property. objFooReferenceType = { base: 'obj', propertyName: "foo" }; //GetValue(objFooReferenceType); // function object "foo" //Pseudocode of GetValue used to obtain the value of a reference type //function GetValue(value) { // if (Type(value) != Reference) { // return value; // var base = GetBase(value); // throw new ReferenceError; // return base.[[Get]](GetPropertyName(value)); t.end(); }); test(' function fn() { //This is not allowed //this = 'something'; throw new Error(); } assert.throw(fn, Error); t.end(); }); test(' var foo = {x: 20}; var bar = { x: 10, testCalledWithBar: function() { assert.strictEqual(bar, this); assert.strictEqual(10, this.x); }, testCalledWithFoo: function() { assert.strictEqual(foo, this); assert.strictEqual(20, this.x); } }; bar.testCalledWithBar(); foo.test = bar.testCalledWithFoo; foo.test(); t.end(); }); test(' function fn() { assert.strictEqual(this, GLOBAL_OBJECT); } //ReferenceType.base = GlobalObject fn(); function fn1() { assert.strictEqual(this, fn1.prototype); } //constructor property in the prototype has the same value as fn1 function assert.strictEqual(fn1, fn1.prototype.constructor); //So if we call fn1 in this way we will have its prototype as 'this' value inside its EC //Because ReferenceType.base = fn1.prototype fn1.prototype.constructor(); t.end(); }); test(' var foo = { barCalledWithFoo: function() { assert.strictEqual(this, foo); }, <API key>: function() { assert.strictEqual(this, anotherObj); }, <API key>: function() { assert.strictEqual(this, GLOBAL_OBJECT); } }, anotherObj = { anotherObjMethod: foo.<API key> }, fn = foo.<API key>; //this = foo //because ReferenceType.base = foo foo.barCalledWithFoo(); //this = anotherObj //because ReferenceType.base = anotherObj anotherObj.anotherObjMethod(); //this = GlobalObject //because ReferenceType.base = GlobalObject fn(); t.end(); }); test(' function foo() { function bar() { assert.equal(GLOBAL_OBJECT, this); } // it is implicit ActivationObject.bar() // but AO return null for 'this' value so we have null.bar() bar(); } t.end(); }); test(' function foo() { var x = 10; with({ foo: function() { assert.equal(20, this.x); }, x: 20 }) { //Here we have dynamicly augmented environment //So our reference type is //var fooReference = { // base: __withObject, // propertyName: 'foo' foo(); } } t.end(); }); test(' try { throw function() { assert.equal(GLOBAL_OBJECT, this); }; } catch(e) { // __catchObject - in ES3, global - fixed in ES5 e(); } // ES 3 var eReference = { base: '__catchObject', propertyName: 'e' }; // but, as this is a bug // then this value is forced to global in ES 5 // null => global var eReference = { base: 'global', propertyName: 'e' }; t.end(); }); test(' (function foo(bar) { assert.equal(GLOBAL_OBJECT, this); // In second execution it is a ReferenceType call and it "should" be special object, but it is always (the correct one) GlobalObject // Closely related with NFE - http://dmitrysoshnikov.com/ecmascript/chapter-5-functions/#<API key> !bar && foo(1); })(); // in initial execution 'this' is set to GlobalObject - it is actually a non-ReferenceType call t.end(); }); test(' //How this works: // - the new operator calls the internal [[Construct]] method of the ConstObj function // - which after that calls the internal [[Call]] method of the ConstObj function providing the newly created object as 'this' value var obj = new ConstObj(); function ConstObj() { this.ref = this; } assert.strictEqual(obj, obj.ref); t.end(); }); test(' (function () { //This invocation is not with a ReferenceType so this is set to null and converted to GlobalObject automatically assert.strictEqual(GLOBAL_OBJECT, this); })(); t.end(); }); test(' (function () { 'use strict'; //This invocation is not with a ReferenceType so 'this' is set to undefined in ES5 strict mode assert.isUndefined(this); })(); t.end(); }); test(' var foo = { bar1: function () { assert.equal(foo, this); }, bar2: function () { assert.equal(foo, this); }, bar3: function () { assert.equal(GLOBAL_OBJECT, this); }, bar4: function () { assert.equal(GLOBAL_OBJECT, this); }, bar5: function () { assert.equal(GLOBAL_OBJECT, this); } }; // Reference, OK => foo foo.bar1(); // Reference, OK => foo // grouping operator which does not call GetValue so the call is still of ReferenceType (foo.bar2)(); // non-Reference type call -> global or "undefined" in strict mode // assignment operator calls GetValue as a result we lose the ReferenceType and have the function object itself (foo.bar3 = foo.bar3)(); // non-Reference type call -> global or "undefined" in strict mode // logical OR expression calls GetValue as a result we lose the ReferenceType and have the function object itself (false || foo.bar4)(); // non-Reference type call -> global or "undefined" in strict mode // comma operator calls GetValue as a result we lose the ReferenceType and have the function object itself (foo.bar5, foo.bar5)(); t.end(); }); test(' var obj1 = {b: 20}, obj2 = {b: 30}; function a1(c) { assert.equal(GLOBAL_OBJECT, this); assert.equal(20, c); } function a2(c) { assert.equal(obj1, this); assert.equal(20, this.b); assert.equal(30, c); } function a3(c) { assert.equal(obj2, this); assert.equal(30, this.b); assert.equal(40, c); } a1(20); a2.call(obj1, 30); a3.apply(obj2, [40]) t.end(); });
'use strict'; /** * Module dependencies. */ const request = require('supertest'); const should = require('should'); const util = require('util'); const Mowa = require('../lib/mowa.js'); function createMowa() { return new Mowa('MowaBVT', { etcPath: 'test/etc-mocha', modulesPath: 'test/web_modules' }); } describe('mowa-bvt', function () { describe('basic features and functions', function () { it('should return a special header', function (done) { let mowa = createMowa(); mowa.start().once('started', function () { request(mowa.httpServer) .get('/') .expect('X-TEST-HEADER', 'For test only') .expect(200) .end((err) => { if (err) return done(err); mowa.stop().once('stopped', () => { done(); }); }); }); }); }); describe('serveStatic', function () { it('should return static page by visiting web root', function (done) { let mowa = createMowa(); mowa.start().once('started', function () { request(mowa.httpServer) .get('/') .expect('content-type', 'text/html; charset=utf-8') .expect(/<title>Static Page<\/title>/) .expect(200) .end((err) => { if (err) return done(err); mowa.stop().once('stopped', () => { done(); }); }); }); }); it('should return static page by visiting the page url', function (done) { let mowa = createMowa(); mowa.start().once('started', function () { request(mowa.httpServer) .get('/text-file.txt') .expect('content-type', 'text/plain; charset=utf-8') .expect('This is a test file.') .expect(200) .end((err) => { if (err) return done(err); mowa.stop().once('stopped', () => { done(); }); }); }); }); }); describe('rule router', function () { it('should return a page rendered by swig', function (done) { let mowa = createMowa(); mowa.start().once('started', function () { request(mowa.httpServer) .get('/test') .expect('content-type', 'text/html; charset=utf-8') .expect(/<title>Test.index<\/title>/) .expect(200) .end((err, res) => { if (err) return done(err); mowa.stop().once('stopped', () => { done(); }); }); }); }); }); describe('rest router', function () { it('should get a list of books', function (done) { let mowa = createMowa(); mowa.start().once('started', function () { request(mowa.httpServer) .get('/api/book') .set('Accept', 'application/json') .expect('Content-Type', /json/) .expect(200) .expect(function(res) { if (!util.isArray(res.body)) { return 'Result is not a list'; } if (res.body.length !== 2) { return 'Unexpected result'; } }) .end((err) => { if (err) return done(err); mowa.stop().once('stopped', () => { done(); }); }); }); }); it('should add a new book', function (done) { let mowa = createMowa(); mowa.start().once('started', function () { request(mowa.httpServer) .post('/api/book') .send({title: 'Avatar'}) .set('Accept', 'application/json') .expect('Content-Type', /json/) .expect(200) .expect({id: 3, title: 'Avatar'}) .end((err) => { if (err) return done(err); mowa.stop().once('stopped', () => { done(); }); }); }); }); it('should get book 2 successfully', function (done) { let mowa = createMowa(); mowa.start().once('started', function () { request(mowa.httpServer) .get('/api/book/2') .set('Accept', 'application/json') .expect('Content-Type', /json/) .expect(200) .expect({id: 2, title: 'Book 2'}) .end((err) => { if (err) return done(err); mowa.stop().once('stopped', () => { done(); }); }); }); }); it('should update book 2 successfully', function (done) { let mowa = createMowa(); mowa.start().once('started', function () { request(mowa.httpServer) .put('/api/book/2') .send({title: 'Brave Cross'}) .set('Accept', 'application/json') .expect('Content-Type', /json/) .expect(200) .expect({id: 2, title: 'Brave Cross'}) .end((err) => { if (err) return done(err); mowa.stop().once('stopped', () => { done(); }); }); }); }); it('should delete book 2 successfully', function (done) { let mowa = createMowa(); mowa.start().once('started', function () { request(mowa.httpServer) .del('/api/book/2') .set('Accept', 'application/json') .expect('Content-Type', /json/) .expect(200) .expect({id: 2, title: 'Book 2'}) .end(() => {}); request(mowa.httpServer) .get('/api/book/2') .set('Accept', 'application/json') .expect('Content-Type', /json/) .expect(200) .expect({}) .end((err) => { if (err) return done(err); mowa.stop().once('stopped', () => { done(); }); }); }); }); it('should return 404', function (done) { let mowa = createMowa(); mowa.start().once('started', function () { request(mowa.httpServer) .get('/api/non_exist/1') .set('Accept', 'application/json') .expect('Content-Type', 'text/plain; charset=utf-8') .expect(404) .end((err) => { if (err) return done(err); mowa.stop().once('stopped', () => { done(); }); }); }); }); }); describe('mod router', function () { it('should return a text file in test module', function (done) { let mowa = createMowa(); mowa.start().once('started', function () { request(mowa.httpServer) .get('/submodule/text-file.txt') //.expect('content-type', 'text/plain; charset=utf-8') //.expect('This is a test file in submodule.') .expect(200) .end((err) => { if (err) return done(err); mowa.stop().once('stopped', () => { done(); }); }); }); }); it('should return a page rendered by a controller', function (done) { let mowa = createMowa(); mowa.start().once('started', function () { request(mowa.httpServer) .get('/submodule/test') .expect('content-type', 'text/html; charset=utf-8') .expect(/<title>Test.index<\/title>/) .expect(200) .end((err) => { if (err) return done(err); mowa.stop().once('stopped', () => { done(); }); }); }); }); }); });
<?php /* FOSUserBundle:Security:login.html.twig */ class <API key> extends Twig_Template { public function __construct(Twig_Environment $env) { parent::__construct($env); // line 1 try { $this->parent = $this->env->loadTemplate("FOSUserBundle::layout.html.twig"); } catch (Twig_Error_Loader $e) { $e->setTemplateFile($this->getTemplateName()); $e->setTemplateLine(1); throw $e; } $this->blocks = array( 'body' => array($this, 'block_body'), ); } protected function doGetParent(array $context) { return "FOSUserBundle::layout.html.twig"; } protected function doDisplay(array $context, array $blocks = array()) { $this->parent->display($context, array_merge($this->blocks, $blocks)); } // line 3 public function block_body($context, array $blocks = array()) { // line 4 echo " "; // line 5 echo " <div class=\"bkg-content-top\"></div> <div class=\"bkg-content\"> <h1 class=\"title\">Connectez-vous: <span>Déposez vos annonces</span></h1> <div class=\"cb\"></div> <div class=\"separator2\"></div> <div class=\"bloc\"> <div class=\"cb\"></div> <div id=\"inscrire\"> <h2>Entrez vos informations ci-dessous </h2> <p class=\"error\"> "; // line 16 if ((isset($context["error"]) ? $context["error"] : $this->getContext($context, "error"))) { echo " <div>"; // line 17 echo twig_escape_filter($this->env, $this->env->getExtension('translator')->trans($this->getAttribute((isset($context["error"]) ? $context["error"] : $this->getContext($context, "error")), "messageKey", array()), $this->getAttribute((isset($context["error"]) ? $context["error"] : $this->getContext($context, "error")), "messageData", array()), "security"), "html", null, true); echo "</div> \t\t\t"; } // line 19 echo "\t\t </p> <form action=\""; // line 27 echo $this->env->getExtension('routing')->getPath("<API key>"); echo "\" method=\"post\" id=\"form\"> <input type=\"hidden\" name=\"_csrf_token\" value=\""; // line 28 echo twig_escape_filter($this->env, (isset($context["csrf_token"]) ? $context["csrf_token"] : $this->getContext($context, "csrf_token")), "html", null, true); echo "\" /> \t \t \t<div class=\"input\"> <label for=\"username\">Pseudo</label> <input type=\"text\" id=\"username\" name=\"_username\" value=\""; // line 33 echo twig_escape_filter($this->env, (isset($context["last_username"]) ? $context["last_username"] : $this->getContext($context, "last_username")), "html", null, true); echo "\" required=\"required\" /> \t <div class=\"cb\" ></div> </div class=\"input\"> <div class=\"input\"> <label for=\"password\">Mot de passe</label> <input type=\"password\" id=\"password\" name=\"_password\" required=\"required\" /> \t<div class=\"cb\" ></div> </div class=\"input\"> <div class=\"input\"> <label for=\"remember_me\">Garder ma session active</label> <input type=\"checkbox\" id=\"remember_me\" name=\"_remember_me\" value=\"on\" style=\"margin-left: 100px; margin-top:10px;\" /> \t<div class=\"cb\" ></div> </div class=\"input\"> <div class=\"input\"> <input type=\"submit\" id=\"btninscrire\" name=\"_submit\" value=\"Connecté\" /> </div> </form> </div> </div> </div> <div class=\"bkg-content-bottom\"></div> "; } public function getTemplateName() { return "FOSUserBundle:Security:login.html.twig"; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 85 => 33, 77 => 28, 73 => 27, 63 => 19, 58 => 17, 54 => 16, 41 => 5, 39 => 4, 36 => 3, 11 => 1,); } }
<?php namespace Tests\Behat\Gherkin; use Symfony\Component\Finder\Finder, Symfony\Component\Translation\Translator, Symfony\Component\Translation\MessageSelector, Symfony\Component\Translation\Loader\XliffFileLoader; use Behat\Gherkin\Lexer, Behat\Gherkin\Parser, Behat\Gherkin\Node, Behat\Gherkin\Keywords\<API key>; class <API key> extends \<API key> { private $translator; private $parser; public function <API key>() { $data = array(); $translator = $this->getTranslator(); $parser = $this->getParser(); $finder = new Finder(); $i18ns = $finder->files()->name('*.xliff')->in(__DIR__ . '/../../../i18n'); foreach ($i18ns as $i18n) { $language = basename($i18n, '.xliff'); $translator->addResource('xliff', $i18n, $language, 'gherkin'); $etalon = array(); $gherkin = "# language: $language"; $lineNum = 1; // Features foreach ($this-><API key>('Feature', $language) as $featureNum => $featureKeyword) { $feature = new Node\FeatureNode(null, null, null, ++$lineNum); $feature->setLanguage($language); $feature->setKeyword($featureKeyword); $feature->setTitle($title = "title of the feature N$featureNum"); $feature->setDescription($description = "some\nfeature\ndescription"); $gherkin .= "\n$featureKeyword: $title"; $gherkin .= "\n$description"; $lineNum += 3; $stepKeywords = $this-><API key>('Given|When|Then|And|But', $language); $backgroundKeywords = $this-><API key>('Background', $language); $examplesKeywords = $this-><API key>('Examples', $language); // Background $backgroundKeyword = $backgroundKeywords[0]; $background = new Node\BackgroundNode(++$lineNum); $background->setKeyword($backgroundKeyword); $feature->setBackground($background); $gherkin .= "\n$backgroundKeyword:"; foreach ($stepKeywords as $stepNum => $stepKeyword) { $step = new Node\StepNode($stepKeyword, $text = "text of the step N$stepNum", ++$lineNum); $background->addStep($step); $gherkin .= "\n$stepKeyword $text"; } // Scenarios foreach ($this-><API key>('Scenario', $language) as $scenarioNum => $scenarioKeyword) { $scenario = new Node\ScenarioNode($title = "title of the scenario N$scenarioNum", ++$lineNum); $scenario->setKeyword($scenarioKeyword); $feature->addScenario($scenario); $gherkin .= "\n$scenarioKeyword: $title"; foreach ($stepKeywords as $stepNum => $stepKeyword) { $step = new Node\StepNode($stepKeyword, $text = "text of the step N$stepNum", ++$lineNum); $scenario->addStep($step); $gherkin .= "\n$stepKeyword $text"; } } // Scenario Outlines foreach ($this-><API key>('Scenario Outline', $language) as $outlineNum => $outlineKeyword) { $outline = new Node\OutlineNode($title = "title of the outline N$outlineNum", ++$lineNum); $outline->setKeyword($outlineKeyword); $feature->addScenario($outline); $gherkin .= "\n$outlineKeyword: $title"; $stepKeyword = $stepKeywords[0]; $step = new Node\StepNode($stepKeyword, $text = "text of the step <num>", ++$lineNum); $outline->addStep($step); $gherkin .= "\n$stepKeyword $text"; $examplesKeyword = $examplesKeywords[0]; $examples = new Node\TableNode(); $examples->setKeyword($examplesKeyword); $examples->addRow(array('num')); $examples->addRow(array(2)); $outline->setExamples($examples); $gherkin .= "\n$examplesKeyword:"; $gherkin .= "\n | num |"; $gherkin .= "\n | 2 |"; $lineNum += 3; } $etalon[] = $feature; } $features = $this->getParser()->parse($gherkin); $data[] = array($language, $etalon, $features); } return $data; } /** * @dataProvider <API key> * * @param string $language language name * @param array $etalon etalon features (to test against) * @param array $features array of parsed feature(s) */ public function testTranslation($language, array $etalon, array $features) { $this->assertEquals($etalon, $features); } protected function getParser() { if (null === $this->parser) { $keywords = new <API key>($this->getTranslator()); $lexer = new Lexer($keywords); $this->parser = new Parser($lexer); } return $this->parser; } protected function getTranslator() { if (null === $this->translator) { $this->translator = new Translator(null, new MessageSelector()); $this->translator->addLoader('xliff', new XliffFileLoader()); } return $this->translator; } protected function <API key>($keyword, $language) { return explode('|', $this->translate($keyword, $language)); } protected function translate($keyword, $language) { return $this->getTranslator()->trans($keyword, array(), 'gherkin', $language); } }
# encoding: utf-8 class Courier::Mailer::Base < ActionMailer::Base attr_accessor :context def initialize(method_name, _context, *args) self.context = _context super( method_name, context, *args ) end def mail(headers={}, &block) super get_headers(headers), &block end private def get_headers h={} h['<API key>'] = context.subscription.subscription_list.name if context.subscription.present? h['<API key>'] = context.subscription.id.to_s end h[:to] = context.to if context.to h[:from] = context.from if context.from h[:subject] = context.subject if context.subject h end end
# qr-app-vue-frontend > A Vue.js project Front End to use the qr-backend ## Features - [x] Login as participant - [x] Logout as participant - [x] Login as instructor - [x] Logout as instructor - [x] Show participant qr-code - [x] Show instructor course list - [x] Show instructor register participant to course window - [x] Check permission in routing - [x] Add new Course ## Requirements - `Node 8.1+` - Optional run with Docker ## Configuration Need to change URL to backend server adress! Edit file `config/prod.env.js` Replace `URL` in `API_URL: '"URL"'` with you own configuration. ## Run with Docker Goto vue project folder `cd $VUE_PROJECT` Build docker container `docker build . -t vue-qr-app` Run docker container `docker run vue-qr-app:latest` visit: http://DOCKER_CONTAINER_IP:1337 # Get docker DOCKER_CONTAINER_IP with the following steps: Get CONTAINER_ID with: `docker container ps` than run: `docker inspect CONTAINER_ID | grep '"IPAddress"' | head -n 1` Example output: `"IPAddress": "172.17.0.2",` Example address: `http://172.17.0.2:1337` ## Build Setup bash # install dependencies npm install # serve with hot reload at localhost:1337 npm run dev # build for production with minification, need webserver to! file:// doesn't work! npm run build # build for production and view the bundle analyzer report npm run build --report
var newBlock = require('./new-block.js'); module.exports = function lostAlign(css, settings) { css.walkDecls('lost-align', function <API key>(decl) { var declArr = []; var alignDirection; var flexbox = settings.flexbox; declArr = decl.value.split(' '); alignDirection = declArr[0]; if (declArr.indexOf('flex') !== -1) { flexbox = 'flex'; } if (flexbox !== 'flex') { if (alignDirection === 'reset') { decl.cloneBefore({ prop: 'position', value: 'static' }); newBlock( decl, ' > *', ['position', 'top', 'right', 'bottom', 'left', 'transform'], ['static', 'auto', 'auto', 'auto', 'auto', 'translate(0, 0)'] ); } else { decl.cloneBefore({ prop: 'position', value: 'relative' }); if (alignDirection === 'horizontal') { newBlock( decl, ' > *', ['position', 'top', 'right', 'bottom', 'left', 'transform'], ['absolute', 'auto', 'auto', 'auto', '50%', 'translate(-50%, 0)'] ); } else if (alignDirection === 'vertical') { newBlock( decl, ' > *', ['position', 'top', 'right', 'bottom', 'left', 'transform'], ['absolute', '50%', 'auto', 'auto', 'auto', 'translate(0, -50%)'] ); } else if (alignDirection === 'top-left') { newBlock( decl, ' > *', ['position', 'top', 'right', 'bottom', 'left', 'transform'], ['absolute', '0', 'auto', 'auto', '0', 'translate(0, 0)'] ); } else if (alignDirection === 'top-center' || alignDirection === 'top') { newBlock( decl, ' > *', ['position', 'top', 'right', 'bottom', 'left', 'transform'], ['absolute', '0', 'auto', 'auto', '50%', 'translate(-50%, 0)'] ); } else if (alignDirection === 'top-right') { newBlock( decl, ' > *', ['position', 'top', 'right', 'bottom', 'left', 'transform'], ['absolute', '0', '0', 'auto', 'auto', 'translate(0, 0)'] ); } else if (alignDirection === 'middle-left' || alignDirection === 'left') { newBlock( decl, ' > *', ['position', 'top', 'right', 'bottom', 'left', 'transform'], ['absolute', '50%', 'auto', 'auto', '0', 'translate(0, -50%)'] ); } else if (alignDirection === 'middle-center' || alignDirection === 'center') { newBlock( decl, ' > *', ['position', 'top', 'right', 'bottom', 'left', 'transform'], ['absolute', '50%', 'auto', 'auto', '50%', 'translate(-50%, -50%)'] ); } else if (alignDirection === 'middle-right' || alignDirection === 'right') { newBlock( decl, ' > *', ['position', 'top', 'right', 'bottom', 'left', 'transform'], ['absolute', '50%', '0', 'auto', 'auto', 'translate(0, -50%)'] ); } else if (alignDirection === 'bottom-left') { newBlock( decl, ' > *', ['position', 'top', 'right', 'bottom', 'left', 'transform'], ['absolute', 'auto', 'auto', '0', '0', 'translate(0, 0)'] ); } else if (alignDirection === 'bottom-center' || alignDirection === 'bottom') { newBlock( decl, ' > *', ['position', 'top', 'right', 'bottom', 'left', 'transform'], ['absolute', 'auto', 'auto', '0', '50%', 'translate(-50%, 0)'] ); } else if (alignDirection === 'bottom-right') { newBlock( decl, ' > *', ['position', 'top', 'right', 'bottom', 'left', 'transform'], ['absolute', 'auto', '0', '0', 'auto', 'translate(0, 0)'] ); } else { throw decl.error(`lost-align: direction '${alignDirection}' is unknown.`); } } } else if (alignDirection === 'reset') { decl.cloneBefore({ prop: 'display', value: 'initial' }); newBlock( decl, '', ['justify-content', 'align-items'], ['inherit', 'inherit'] ); } else { decl.cloneBefore({ prop: 'display', value: 'flex' }); if (alignDirection === 'horizontal') { newBlock( decl, '', ['justify-content', 'align-items'], ['center', 'inherit'] ); } else if (alignDirection === 'vertical') { newBlock( decl, '', ['justify-content', 'align-items'], ['inherit', 'center'] ); } else if (alignDirection === 'top-left') { newBlock( decl, '', ['justify-content', 'align-items'], ['flex-start', 'flex-start'] ); } else if (alignDirection === 'top-center' || alignDirection === 'top') { newBlock( decl, '', ['justify-content', 'align-items'], ['center', 'flex-start'] ); } else if (alignDirection === 'top-right') { newBlock( decl, '', ['justify-content', 'align-items'], ['flex-end', 'flex-start'] ); } else if (alignDirection === 'middle-left' || alignDirection === 'left') { newBlock( decl, '', ['justify-content', 'align-items'], ['flex-start', 'center'] ); } else if (alignDirection === 'middle-center' || alignDirection === 'center') { newBlock( decl, '', ['justify-content', 'align-items'], ['center', 'center'] ); } else if (alignDirection === 'middle-right' || alignDirection === 'right') { newBlock( decl, '', ['justify-content', 'align-items'], ['flex-end', 'center'] ); } else if (alignDirection === 'bottom-left') { newBlock( decl, '', ['justify-content', 'align-items'], ['flex-start', 'flex-end'] ); } else if (alignDirection === 'bottom-center' || alignDirection === 'bottom') { newBlock( decl, '', ['justify-content', 'align-items'], ['center', 'flex-end'] ); } else if (alignDirection === 'bottom-right') { newBlock( decl, '', ['justify-content', 'align-items'], ['flex-end', 'flex-end'] ); } else { throw decl.error(`lost-align: direction '${alignDirection}' is unknown.`); } } decl.remove(); }); };
# node-surveymonkey A node.js library for the SurveyMonkey API _node-surveymonkey_ exposes the following features of the SurveyMonkey API to your node.js application: * SurveyMonkey API (Versions v3) SurveyMonkey API (Version v2) has been hard deprecated. See [https: Further information on the SurveyMonkey API and its features is available at [https: ## Installation Installing using npm (node package manager): npm install surveymonkey If you don't have npm installed or don't want to use it: cd ~/.node_libraries git clone git@github.com:Datahero/node-surveymonkey.git Please note that parts of _node-surveymonkey_ depend on [request](http: ## Usage Information on how to use the SurveyMonkey APIs can be found below. Further information on the API methods available can be found at [https: SurveyMonkey API _SurveyMonkeyAPI_ takes two arguments. 1. The first argument is your oAuth access token. 2. The second argument is an options object which can contain the following options: * `version` The API version to use. Defaults to v3. * `secure` Whether or not to use secure connections over HTTPS (true/false). Defaults to false. * `userAgent` Custom User-Agent description to use in the request header. The callback function for each API method gets two arguments. The first one is an error object which is null when no error occurred, the second one an object with all information retrieved as long as no error occurred. Example: javascript var SurveyMonkeyAPI = require('surveymonkey').SurveyMonkeyAPI; var accessToken = 'Your SurveyMonkey App Access Token'; try { var api = new SurveyMonkeyAPI(accessToken, { version : 'v3', secure : false }); } catch (error) { console.log(error.message); } api.getSurveyList({}, function (error, data) { if (error) console.log(error.message); else console.log(JSON.stringify(data)); // Do something with your data! }); // or with a survey id api.getSurveyDetails({id:'113260729'},function (error, data) { if (error) console.log(error); else console.log(JSON.stringify(data)); // Do something with your data! }); _node-surveymonkey_ is licensed under the MIT License. (See LICENSE)
// angular import { NgModule, Optional, SkipSelf } from '@angular/core'; import { CommonModule } from '@angular/common'; // libs import { StoreModule } from '@ngrx/store'; // app import { HoodieService } from './hoodie.service'; /** * Do not specify providers for modules that might be imported by a lazy loaded module. */ @NgModule({ imports: [ CommonModule, StoreModule ], declarations: [ ], providers: [ HoodieService ], exports: [ ] }) export class HoodieModule { constructor(@Optional() @SkipSelf() parentModule: HoodieModule) { if (parentModule) { throw new Error('SampleModule already loaded; Import in root module only.'); } } }
import cPickle as pickle import numpy as np import re from math import log from dic import Info from config.config import config from tools import tokenlize, comp_tuple, weights class query_voc(object): def __init__(self, tokens, dic): self.tokens = tokens self.dic = dic class query_entry(object): def __init__(self, doc_id, tokens, voc): self.docID = doc_id self.tokens = tokens self.vector = np.zeros([1, len(voc.tokens)]) for token in self.tokens: if config.WEIGHT_TYPE == 'wf-idf': self.vector[0, voc.dic[token]['index']] = (1 + log(self.tokens[token])) * voc.dic[token]['idf'] elif config.WEIGHT_TYPE == 'tf-idf': self.vector[0, voc.dic[token]['index']] = self.tokens[token] * voc.dic[token]['idf'] class query_index(object): def __init__(self, tiered_index): self.tiered_index = tiered_index def load_and_calc(info): # assert isinstance(pkl_path, str), "pkl_path is not the instance of string.\n" # pkl_file = open(pkl_path, 'r') # info = pickle.load(pkl_file) voc = query_voc(info.voc_tokens, info.voc_dic) tiered_index = query_index(info.tiered_index) entries = {} for item in info.entry_tokens: entries[item] = query_entry(item, info.entry_tokens[item], voc) return tiered_index, voc, entries def <API key>(tokens, voc): query_vector = np.zeros([1, len(voc.tokens)]) print tokens for token in tokens: if token in voc.tokens: query_vector[0, voc.dic[token]['index']] = tokens[token] return query_vector def topK_get_result(index, voc, entries, tokens): result = [] query_vector = <API key>(tokens, voc) for level in index.tiered_index: for token in tokens: if token not in voc.tokens: continue docs = level[voc.dic[token]['index']] for doc_id in docs: if doc_id not in result: weight = weights(query_vector, entries[doc_id].vector) result.append((doc_id, weight)) if len(result) >= config.PARA_TOP_K: return result[:config.PARA_TOP_K] # if config.DEBUG: # print result return result def topK_query(index, voc, entries, query, index_type='tiered'): result = [] if index_type == 'tiered': result = topK_get_result(index, voc, entries, tokenlize(query)) result.sort(comp_tuple) return result def wildcard_query(index, voc, entries, query, index_type='tiered'): tokens = tokenlize(query) query_match = [[]] for token in tokens: match_tokens = [] if '*' in token: regex = re.compile(token) match_tokens = [string for string in voc.tokens if re.match(regex, string)] else: match_tokens.append(token) tmp = [] if len(match_tokens) > 0: for t1 in match_tokens: for t2 in query_match: tmp.append(t2 + [t1]) query_match = tmp tmp = [] for item in query_match: q = {} for token in item: if token in q: q[token] += 1 else: q[token] = 1 tmp.append(q) query_match = tmp result = [] if index_type == 'tiered': for match in query_match: result += topK_get_result(index, voc, entries, match) result.sort(comp_tuple) match = [] match_id = [] for doc in result: if doc[0] in match_id: continue else: match_id.append(doc[0]) match.append(doc) if len(match_id) > config.PARA_TOP_K: return match return match
/*! \file fbxfilesdk_nsend.h */ #ifdef <API key> } #endif
var intersectsWithSome = require('./intersection').intersectsWithSome; var <API key> = require('./<API key>'); module.exports = function <API key>(intervals, options) { options = options || {}; if (!Array.isArray(intervals)) { throw new Error('The interval packer requires an array of objects with start and end properties.'); } if (intervals.length === 0) { return []; } intervals.forEach(function (interval) { if ( typeof interval !== 'object' || typeof interval.start !== 'number' || typeof interval.end !== 'number' || interval.end <= interval.start ) { throw new Error('Intervals must be objects with integer properties start and end where start < end.'); } }); intervals = [].concat(intervals).sort(<API key>); var currentPartition; var partitions = []; var currentPartitionEnd = -Infinity; while (intervals.length > 0) { var interval = intervals.pop(); if (currentPartitionEnd <= interval.start) { currentPartition = [[]]; partitions.push(currentPartition); } var i = 0; while ( i < currentPartition.length && intersectsWithSome(currentPartition[i], interval) ) { i += 1; } (currentPartition[i] = currentPartition[i] || []).push(interval); currentPartitionEnd = Math.max(currentPartitionEnd, interval.end); } if (!options.groupPartitions) { return partitions.reduce(function (result, partition) { partition.forEach(function (partitionGroup, i) { result[i] = result[i] || []; Array.prototype.push.apply(result[i], partitionGroup); return result; }); return result; }, []); } else { return partitions; } };