code
stringlengths
4
1.01M
language
stringclasses
2 values
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using LCC.ControlesLCCGestion.filtros; namespace LCC.WebGestion.presupuestos { public partial class presupuestos_FiltroPresupuesto : RaizFiltroASCX { public override PROT.ControlesEspeciales.PanelBuscador PanelBuscador { get { return bus; } } public override PROT.ControlesEspeciales.ControlFiltro ControlFiltro { get { return c; } } protected void dv_SelectedIndexChanged(object sender, EventArgs e) { suc.Param = Int32.Parse(dv.SelectedValue); suc.Preparar(bus.FiltroActual, bus.ObjetoNegocio); tip.Param = Int32.Parse(dv.SelectedValue); tip.Preparar(bus.FiltroActual, bus.ObjetoNegocio); mat.Param = Int32.Parse(dv.SelectedValue); mat.Preparar(bus.FiltroActual, bus.ObjetoNegocio); us.Param = Int32.Parse(dv.SelectedValue); us.Preparar(bus.FiltroActual, bus.ObjetoNegocio); o1.ServicioParam = dv.SelectedValue; tar.ServicioParam = dv.SelectedValue; ta1.ServicioParam = dv.SelectedValue; ta2.ServicioParam = dv.SelectedValue; des.ServicioParam = dv.SelectedValue; obn.ServicioParam = dv.SelectedValue; } } }
Java
""" Python Blueprint ================ Does not install python itself, only develop and setup tools. Contains pip helper for other blueprints to use. **Fabric environment:** .. code-block:: yaml blueprints: - blues.python """ from fabric.decorators import task from refabric.api import run, info from refabric.context_managers import sudo from . import debian __all__ = ['setup'] pip_log_file = '/tmp/pip.log' @task def setup(): """ Install python develop tools """ install() def install(): with sudo(): info('Install python dependencies') debian.apt_get('install', 'python-dev', 'python-setuptools') run('easy_install pip') run('touch {}'.format(pip_log_file)) debian.chmod(pip_log_file, mode=777) pip('install', 'setuptools', '--upgrade') def pip(command, *options): info('Running pip {}', command) run('pip {0} {1} -v --log={2} --log-file={2}'.format(command, ' '.join(options), pip_log_file))
Java
#!/bin/sh controllerIP=`grep controller /etc/hosts | awk '{print $1}'` #controllerIP=192.168.122.75 controllerIP=127.0.0.1 echo controllerIP $controllerIP file=/etc/pike/cinder/cinder.conf orig=/etc/pike/cinder/.orig-$(basename $file) jdate=`date "+%Y_%j_%H_%M"` orig=${orig}${jdate} if [ ! -e $orig ] ; then cp -p $file $orig fi function crudset { file=/etc/pike/cinder/cinder.conf section=database key=connection val='mysql+pymysql://cinder:cloud@controller/cinder' if [ $1 ] ; then file="$1" ; fi if [ $2 ] ; then section="$2" ; fi if [ $3 ] ; then key="$3" ; fi if [ $4 ] ; then val="$4" ; fi touch $file crudini --set --existing $file $section $key $val if [ $? != 0 ] ; then crudini --set $file $section $key $val fi crudini --get $file $section $key } function cinderset { crudset $file database connection 'mysql+pymysql://cinder:cloud@controller/cinder' crudset $file DEFAULT transport_url rabbit://openstack:cloud@controller crudset $file DEFAULT auth_strategy keystone crudset $file DEFAULT my_ip $controllerIP crudset $file DEFAULT enabled_backends lvm crudset $file DEFAULT glance_api_servers http://controller:9292 crudset $file keystone_authtoken auth_uri http://controller:5000 crudset $file keystone_authtoken auth_url http://controller:35357 crudset $file keystone_authtoken memcached_servers controller:11211 crudset $file keystone_authtoken auth_type password crudset $file keystone_authtoken project_domain_name default crudset $file keystone_authtoken user_domain_name default crudset $file keystone_authtoken project_name service crudset $file keystone_authtoken username cinder crudset $file keystone_authtoken password cloud crudset $file lvm volume_driver cinder.volume.drivers.lvm.LVMVolumeDriver crudset $file lvm volume_group cinder-volumes crudset $file lvm iscsi_protocol iscsi crudset $file lvm iscsi_helper lioadm crudset $file oslo_concurrency lock_path /var/lib/cinder/tmp } function cinder_test { openstack volume create --size 1 volume1 openstack volume list # openstack server add volume instance-name volume1 } echo diff $orig $file diff $orig $file echo cinder whatcloud instructions seem congruent with openstack.org manual install guide: echo avoid password-prompt and instead set it directly ... see funcs in authsetup.sh echo su -s /bin/sh -c \'cinder-manage db sync\' cinder echo systemctl start lvm2-lvmetad.service echo pvcreate /dev/vdb echo vgcreate cinder-volumes /dev/vdb echo systemctl start openstack-cinder-api.service openstack-cinder-scheduler.service
Java
var path = require('path'), fs = require('fs'), Source = require(hexo.lib_dir + '/core/source'), config_dir = path.dirname(hexo.configfile), config = hexo.config; function testver(){ var ver = hexo.env.version.split('.'); var test = true; if (ver[0] < 2) test = false; else if (ver[0] == 2 && ver[1] < 5) test = false; if (test) return; var hexo_curver = 'hexo'.red + (' V' + hexo.env.version).green; var theme_curver = 'chenall'.green + ' V2.2'.red; var error = 'Current version of ' + hexo_curver + ' Does not apply to the theme ' + theme_curver; error += ',Please use theme ' + 'chenall '.green + 'V1.0'.red + ' or upgrade to' + ' hexo 2.5.0 '.green + 'or latest.'; error +='\n\n\t当前版本 ' + hexo_curver + ' 不适用于主题 ' + theme_curver + '\n请使用' + 'chenall '.green + 'V1.0'.red + ' 版主题或升级hexo到' + ' 2.5.0 '.green + '以上'; error +='\n\nchenall V1.0:\n' + 'svn co https://github.com/chenall/hexo-theme-chenall/tags/V1.0 themes/chenall'.yellow; error +='\n\nhexo latest(升级):\n\t' + 'npm update hexo'.yellow; error +='\n\nhexo V2.5.X(安装指定版本):\n\t' + 'npm install hexo@2.5.3 -g'.yellow; error += '\n\n\t有什么疑问可以联系我 http://chenall.net'; hexo.log.e(error); process.exit(1); } function checkenv(){ var store = hexo.extend.renderer.store; var error = ''; if (!store['ejs']) error += '\tnpm install hexo-renderer-ejs\n'; if (!store['md']) error += '\tnpm install hexo-renderer-marked\n'; if (!store['styl']) error +='\tnpm install hexo-renderer-stylus\n'; if (error){ hexo.log.e('\t主题使用环境检测失败\n\n\t缺少必要插件,请使用以下命令安装:\n\n',error); process.exit(1); } } testver(); checkenv(); if (hexo.hasOwnProperty('env') && hexo.env.hasOwnProperty('debug')) hexo.debug = hexo.env.debug; hexo.__dump = function(obj){ var cache = []; return JSON.stringify(obj,function(key, value){ if (typeof value === 'object' && value !== null) { if (cache.indexOf(value) !== -1) { // Circular reference found, discard key return; } cache.push(value); } return value; }); } if (config.CustomDir && typeof(config.CustomDir) == 'object'){ var joinPath = function(){ var str = path.join.apply(this, arguments); if (str[str.length - 1] !== path.sep) str += path.sep; return str; }; var custom = config.CustomDir; ['public_dir','source_dir','scaffold_dir'].forEach(function(p){ if (!custom[p]) return; if (custom[p] == 'auto'){ hexo.constant(p,joinPath(config_dir,p)); } else { var test = custom[p].match(/^:config(.*)$/); if (test){ hexo.constant(p,joinPath(config_dir,test[1])); } else { hexo.constant(p,joinPath(config_dir,custom[p])); } } }) hexo.source = new Source(); } var load_default_usercfg = function(){ var cfg = global.usercfg = { ajax_widgets: true, updated: true, cached_widgets:true }; cfg.twbs_style = ['primary','success','info','warning','danger']; var user_cfg = hexo.source_dir + '_' + hexo.config.theme + '.yml'; if (!fs.existsSync(user_cfg)){ user_cfg = hexo.theme_dir + '_config.yml'; cfg.themeconfig = hexo.render.renderSync({path: user_cfg}); hexo.log.i("Theme config file: " + user_cfg.green); } cfg.twbs_sty = function(i){return cfg.twbs_style[i%4];} hexo.log.d('Using theme ' + 'chenall V2.2'.green); } hexo.on('ready',load_default_usercfg);
Java
<?php namespace Alcodo\AsyncCss\Commands; use Alcodo\AsyncCss\Cache\CssKeys; use Illuminate\Console\Command; class Show extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'alcodo:asynccss:show'; /** * The console command description. * * @var string */ protected $description = 'Show all generated css async paths'; /** * Create a new command instance. * * @return void */ public function __construct() { parent::__construct(); } /** * Execute the console command. * * @return mixed */ public function handle() { $keys = CssKeys::show(); if ($keys === null) { $this->info('Cache is empty'); return true; } if (is_array($keys)) { foreach ($keys as $key) { $path = CssKeys::getSinglePath($key); $this->info('Path: '.$path); } } return true; } }
Java
#!/usr/bin/env ruby $:.unshift File.expand_path('../../../lib', __FILE__) $stdout.sync = true require 'philotic' require 'awesome_print' class NamedQueueConsumer < Philotic::Consumer # subscribe to an existing named queue subscribe_to :test_queue # use acknowledgements auto_acknowledge # REQUEUE the message with RabbitMQ if consume throws these errors. I.e., something went wrong with the consumer # Only valid with ack_messages # requeueable_errors PossiblyTransientErrorOne, PossiblyTransientErrorTwo # REJECT the message with RabbitMQ if consume throws these errors. I.e., The message is malformed/invalid # Only valid with ack_messages # rejectable_errors BadMessageError def consume(message) ap named: message.attributes end end class AnonymousQueueConsumer < Philotic::Consumer # subscribe anonymously to a set of headers: # subscribe_to header_1: 'value_1', # header_2: 'value_2', # header_3: 'value_3' subscribe_to philotic_firehose: true def consume(message) ap anon: message.attributes end end #run the consumers AnonymousQueueConsumer.subscribe NamedQueueConsumer.subscribe # keep the parent thread alive Philotic.endure
Java
# wedding-rsvp A simple concept for RSVPing to a wedding ### Technologies * Sinatra * ActiveRecord * Postgres * MVC Structure
Java
#include "arrow.h" /** * @brief Arrow::Arrow */ Arrow::Arrow() : Shape(SHAPES::ARROW) { } /** * @brief Arrow::Arrow * @param col Colour of the new object * @param pos Starting point for the new object */ Arrow::Arrow(QColor col, QPoint pos) : Shape(SHAPES::ARROW, col, pos) { } /** * @brief Arrow::draw * Draws the object on top of the specified frame. * @param frame Frame to draw on. * @return Returns the frame with drawing. */ cv::Mat Arrow::draw(cv::Mat &frame) { cv::arrowedLine(frame, draw_start, draw_end, colour, LINE_THICKNESS); return frame; } /** * @brief Arrow::handle_new_pos * Function to handle the new position of the mouse. * Does not need to store the new position. * @param pos */ void Arrow::handle_new_pos(QPoint pos) { } /** * @brief Arrow::write * @param json * Writes to a Json object. */ void Arrow::write(QJsonObject& json) { write_shape(json); } /** * @brief Arrow::read * @param json * Reads from a Json object. */ void Arrow::read(const QJsonObject& json) { read_shape(json); }
Java
const request = require('request-promise'); const oauth = require('./config').auth; const rootUrl = 'https://api.twitter.com/1.1'; let allItems = []; /* API methods */ const API = { /** * Search for tweets * @param options {Object} Options object containing: * - text (Required) : String * - count (optional) : Number * - result_type (optional) : String * - geocode (optional) : String (lat long radius_in_miles) * - since_id (optional) : Number - start search from this ID * - max_id (optional) : Number - end search on this ID */ search: (options) => { return new Promise((resolve, reject) => { const {text, count = 100, result_type = 'popular', since_id = 0, max_id, geocode} = options; let params = `?q=${encodeURIComponent(options.text)}` + `&count=${count}` + `&result_type=${result_type}` + `&since_id=${since_id}`; if (max_id) { params += `&max_id=${max_id}`; } if (geocode) { params += `&geocode=${encodeURIComponent(geocode)}`; } allItems = []; API.searchByStringParam(params).then((items) => resolve(items)).catch((err) => reject(err)); }); }, /** * Search w/ params * @param stringParams {String} Params as string */ searchByStringParam: (stringParams) => new Promise((resolve, reject) => { const searchCallback = (res) => { const result = JSON.parse(res); if (result && result.statuses) { result.statuses.forEach(item => allItems.push(item)); console.log('[Search] So far we have', allItems.length, 'items'); // If we have the next_results, search again for the rest (sort of a pagination) const nextRes = result.search_metadata.next_results; if (nextRes) { API.searchByStringParam(nextRes).then((items) => resolve(items)); } else { resolve(allItems); } } else { resolve(null); } }; request.get({url: `${rootUrl}/search/tweets.json${stringParams}`, oauth}) .then(res => searchCallback(res)) .catch(err => reject(err)); }) , /** * Retweet a tweet * @param tweetId {String} identifier for the tweet */ retweet: (tweetId) => new Promise((resolve, reject) => request.post({url: `${rootUrl}/statuses/retweet/${tweetId}.json`, oauth}) .then((res) => resolve(res)) .catch((err) => reject(err)) ) , /** * Like (aka favorite) a tweet * @param tweetId {String} identifier for the tweet */ like: (tweetId) => new Promise((resolve, reject) => request.post({url: `${rootUrl}/favorites/create.json?id=${tweetId}`, oauth}) .then((res) => resolve(res)) .catch((err) => reject(err)) ) , /** * Follow a user by username * @param userId {String} identifier for the user */ follow: (userId) => new Promise((resolve, reject) => request.post({url: `${rootUrl}/friendships/create.json?user_id=${userId}`, oauth}) .then((res) => resolve(res)) .catch((err) => reject(err)) ) , /** * Follow a user by username * @param userName {String} username identifier for the user */ followByUsername: (userName) => new Promise((resolve, reject) => request.post({url: `${rootUrl}/friendships/create.json?screen_name=${userName}`, oauth}) .then((res) => resolve(res)) .catch((err) => reject(err)) ) , /** * Block a user * @param userId {String} ID of the user to block */ blockUser: (userId) => new Promise((resolve, reject) => request.post({url: `${rootUrl}/blocks/create.json?user_id=${userId}`, oauth}) .then((res) => resolve(res)) .catch((err) => reject(err)) ) , /** Get list of blocked users for the current user */ getBlockedUsers: () => new Promise((resolve, reject) => request.get({url: `${rootUrl}/blocks/list.json`, oauth}) .then((res) => resolve(JSON.parse(res).users.map((user) => user.id))) .catch((err) => reject(err)) ) , /** * Get a user's tweets * @param userId {String} identifier for the user * @param count {Number} max tweets to retrieve */ getTweetsForUser: (userId, count) => new Promise((resolve, reject) => request.get({url: `${rootUrl}/statuses/user_timeline.json?user_id=${userId}&count=${count}`, oauth}) .then((response) => resolve(response)) .catch((err) => reject(err)) ) , /** * Delete a tweet * @param tweetId {String} identifier for the tweet */ deleteTweet: (tweetId) => new Promise((resolve, reject) => request.post({url: `${rootUrl}/statuses/destroy/${tweetId}.json`, oauth}) .then(() => { console.log('Deleted tweet', tweetId); resolve(); }) .catch((err) => reject(err)) ) , /** * Reply to a tweet * (The Reply on Twitter is basically a Status Update containing @username, where username is author of the original tweet) * @param tweet {Object} The full Tweet we want to reply to */ replyToTweet: (tweet) => new Promise((resolve, reject) => { try { const text = encodeURIComponent(`@${tweet.user.screen_name} `); request.post({ url: `${rootUrl}/statuses/update.json?status=${text}&in_reply_to_status_id=${tweet.id}`, oauth }) .then(() => resolve()) .catch(err => reject(err)) } catch (err) { reject(err); } }) }; module.exports = API;
Java
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Extensions { public static class IEnumerableExtensions { public static T Sum<T>(this IEnumerable<T> enumerable) { dynamic sum = 0; foreach (var element in enumerable) { sum += element; } return sum; } public static T Product<T>(this IEnumerable<T> enumerable) { dynamic Prod = 1; foreach (var element in enumerable) { Prod *= element; } return Prod; } public static T Min<T>(this IEnumerable<T> enumerable) where T : IComparable<T> { T result = enumerable.First(); foreach (var element in enumerable) { if (result.CompareTo(element) > 0) { result = element; } } return result; } public static T Max<T>(this IEnumerable<T> enumerable) where T : IComparable<T> { T result = enumerable.First(); foreach (var element in enumerable) { if (result.CompareTo(element) < 0) { result = element; } } return result; } public static T Average<T>(this IEnumerable<T> enumerable) { return (dynamic)enumerable.Sum() / enumerable.Count(); } } }
Java
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="zh"> <head> <!-- Generated by javadoc (version 1.7.0_79) on Fri Sep 09 15:51:56 CST 2016 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>S - 索引</title> <meta name="date" content="2016-09-09"> <link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="S - \u7D22\u5F15"; } //--> </script> <noscript> <div>您的浏览器已禁用 JavaScript。</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="跳过导航链接"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="导航"> <li><a href="../overview-summary.html">概览</a></li> <li>程序包</li> <li>类</li> <li><a href="../overview-tree.html">树</a></li> <li><a href="../deprecated-list.html">已过时</a></li> <li class="navBarCell1Rev">索引</li> <li><a href="../help-doc.html">帮助</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="index-15.html">上一个字母</a></li> <li><a href="index-17.html">下一个字母</a></li> </ul> <ul class="navList"> <li><a href="../index.html?index-filesindex-16.html" target="_top">框架</a></li> <li><a href="index-16.html" target="_top">无框架</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../allclasses-noframe.html">所有类</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="contentContainer"><a href="index-1.html">A</a>&nbsp;<a href="index-2.html">B</a>&nbsp;<a href="index-3.html">C</a>&nbsp;<a href="index-4.html">D</a>&nbsp;<a href="index-5.html">E</a>&nbsp;<a href="index-6.html">F</a>&nbsp;<a href="index-7.html">G</a>&nbsp;<a href="index-8.html">I</a>&nbsp;<a href="index-9.html">J</a>&nbsp;<a href="index-10.html">L</a>&nbsp;<a href="index-11.html">M</a>&nbsp;<a href="index-12.html">N</a>&nbsp;<a href="index-13.html">O</a>&nbsp;<a href="index-14.html">P</a>&nbsp;<a href="index-15.html">R</a>&nbsp;<a href="index-16.html">S</a>&nbsp;<a href="index-17.html">T</a>&nbsp;<a href="index-18.html">U</a>&nbsp;<a href="index-19.html">V</a>&nbsp;<a name="_S_"> <!-- --> </a> <h2 class="title">S</h2> <dl> <dt><span class="strong"><a href="../cn/jpush/im/android/api/JMessageClient.html#sChattingTarget">sChattingTarget</a></span> - 类 中的静态变量cn.jpush.im.android.api.<a href="../cn/jpush/im/android/api/JMessageClient.html" title="cn.jpush.im.android.api中的类">JMessageClient</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/ContactManager.html#sendInvitationRequest(java.lang.String,%20java.lang.String,%20java.lang.String,%20cn.jpush.im.api.BasicCallback)">sendInvitationRequest(String, String, String, BasicCallback)</a></span> - 类 中的静态方法cn.jpush.im.android.api.<a href="../cn/jpush/im/android/api/ContactManager.html" title="cn.jpush.im.android.api中的类">ContactManager</a></dt> <dd> <div class="block">发送添加好友请求。</div> </dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/JMessageClient.html#sendMessage(cn.jpush.im.android.api.model.Message)">sendMessage(Message)</a></span> - 类 中的静态方法cn.jpush.im.android.api.<a href="../cn/jpush/im/android/api/JMessageClient.html" title="cn.jpush.im.android.api中的类">JMessageClient</a></dt> <dd> <div class="block">发送消息</div> </dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/model/UserInfo.html#setAddress(java.lang.String)">setAddress(String)</a></span> - 类 中的方法cn.jpush.im.android.api.model.<a href="../cn/jpush/im/android/api/model/UserInfo.html" title="cn.jpush.im.android.api.model中的类">UserInfo</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/content/CustomContent.html#setAllValues(java.util.Map)">setAllValues(Map&lt;? extends String, ? extends String&gt;)</a></span> - 类 中的方法cn.jpush.im.android.api.content.<a href="../cn/jpush/im/android/api/content/CustomContent.html" title="cn.jpush.im.android.api.content中的类">CustomContent</a></dt> <dd> <div class="block">将map中所有键值对放入消息体,</div> </dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/model/UserInfo.html#setBirthday(long)">setBirthday(long)</a></span> - 类 中的方法cn.jpush.im.android.api.model.<a href="../cn/jpush/im/android/api/model/UserInfo.html" title="cn.jpush.im.android.api.model中的类">UserInfo</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/model/UserInfo.html#setBlacklist(int)">setBlacklist(int)</a></span> - 类 中的方法cn.jpush.im.android.api.model.<a href="../cn/jpush/im/android/api/model/UserInfo.html" title="cn.jpush.im.android.api.model中的类">UserInfo</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/content/MessageContent.html#setBooleanExtra(java.lang.String,%20java.lang.Boolean)">setBooleanExtra(String, Boolean)</a></span> - 类 中的方法cn.jpush.im.android.api.content.<a href="../cn/jpush/im/android/api/content/MessageContent.html" title="cn.jpush.im.android.api.content中的类">MessageContent</a></dt> <dd> <div class="block">设置消息体中的附加字段</div> </dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/content/CustomContent.html#setBooleanValue(java.lang.String,%20java.lang.Boolean)">setBooleanValue(String, Boolean)</a></span> - 类 中的方法cn.jpush.im.android.api.content.<a href="../cn/jpush/im/android/api/content/CustomContent.html" title="cn.jpush.im.android.api.content中的类">CustomContent</a></dt> <dd> <div class="block">设置自定义消息体中的值</div> </dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/event/BaseNotificationEvent.Builder.html#setcTime(long)">setcTime(long)</a></span> - 类 中的方法cn.jpush.im.android.api.event.<a href="../cn/jpush/im/android/api/event/BaseNotificationEvent.Builder.html" title="cn.jpush.im.android.api.event中的类">BaseNotificationEvent.Builder</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/JMessageClient.html#setDebugMode(boolean)">setDebugMode(boolean)</a></span> - 类 中的静态方法cn.jpush.im.android.api.<a href="../cn/jpush/im/android/api/JMessageClient.html" title="cn.jpush.im.android.api中的类">JMessageClient</a></dt> <dd> <div class="block">设置debug模式,sdk将会输出更多debug信息。</div> </dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/event/BaseNotificationEvent.Builder.html#setDesc(java.lang.String)">setDesc(String)</a></span> - 类 中的方法cn.jpush.im.android.api.event.<a href="../cn/jpush/im/android/api/event/BaseNotificationEvent.Builder.html" title="cn.jpush.im.android.api.event中的类">BaseNotificationEvent.Builder</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/event/BaseNotificationEvent.Builder.html#setEventId(long)">setEventId(long)</a></span> - 类 中的方法cn.jpush.im.android.api.event.<a href="../cn/jpush/im/android/api/event/BaseNotificationEvent.Builder.html" title="cn.jpush.im.android.api.event中的类">BaseNotificationEvent.Builder</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/event/BaseNotificationEvent.Builder.html#setEventType(int)">setEventType(int)</a></span> - 类 中的方法cn.jpush.im.android.api.event.<a href="../cn/jpush/im/android/api/event/BaseNotificationEvent.Builder.html" title="cn.jpush.im.android.api.event中的类">BaseNotificationEvent.Builder</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/event/BaseNotificationEvent.Builder.html#setExtra(int)">setExtra(int)</a></span> - 类 中的方法cn.jpush.im.android.api.event.<a href="../cn/jpush/im/android/api/event/BaseNotificationEvent.Builder.html" title="cn.jpush.im.android.api.event中的类">BaseNotificationEvent.Builder</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/content/MessageContent.html#setExtras(java.util.Map)">setExtras(Map&lt;String, String&gt;)</a></span> - 类 中的方法cn.jpush.im.android.api.content.<a href="../cn/jpush/im/android/api/content/MessageContent.html" title="cn.jpush.im.android.api.content中的类">MessageContent</a></dt> <dd> <div class="block">设置消息体中的附加字段</div> </dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/content/MediaContent.html#setFileUploaded(boolean)">setFileUploaded(boolean)</a></span> - 类 中的方法cn.jpush.im.android.api.content.<a href="../cn/jpush/im/android/api/content/MediaContent.html" title="cn.jpush.im.android.api.content中的类">MediaContent</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/event/BaseNotificationEvent.Builder.html#setfromUserAppKey(java.lang.String)">setfromUserAppKey(String)</a></span> - 类 中的方法cn.jpush.im.android.api.event.<a href="../cn/jpush/im/android/api/event/BaseNotificationEvent.Builder.html" title="cn.jpush.im.android.api.event中的类">BaseNotificationEvent.Builder</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/event/BaseNotificationEvent.Builder.html#setFromUsername(java.lang.String)">setFromUsername(String)</a></span> - 类 中的方法cn.jpush.im.android.api.event.<a href="../cn/jpush/im/android/api/event/BaseNotificationEvent.Builder.html" title="cn.jpush.im.android.api.event中的类">BaseNotificationEvent.Builder</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/model/UserInfo.html#setGender(cn.jpush.im.android.api.model.UserInfo.Gender)">setGender(UserInfo.Gender)</a></span> - 类 中的方法cn.jpush.im.android.api.model.<a href="../cn/jpush/im/android/api/model/UserInfo.html" title="cn.jpush.im.android.api.model中的类">UserInfo</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/event/BaseNotificationEvent.Builder.html#setGid(long)">setGid(long)</a></span> - 类 中的方法cn.jpush.im.android.api.event.<a href="../cn/jpush/im/android/api/event/BaseNotificationEvent.Builder.html" title="cn.jpush.im.android.api.event中的类">BaseNotificationEvent.Builder</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/content/ImageContent.html#setImg_link(java.lang.String)">setImg_link(String)</a></span> - 类 中的方法cn.jpush.im.android.api.content.<a href="../cn/jpush/im/android/api/content/ImageContent.html" title="cn.jpush.im.android.api.content中的类">ImageContent</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/content/MediaContent.html#setLocalPath(java.lang.String)">setLocalPath(String)</a></span> - 类 中的方法cn.jpush.im.android.api.content.<a href="../cn/jpush/im/android/api/content/MediaContent.html" title="cn.jpush.im.android.api.content中的类">MediaContent</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/content/ImageContent.html#setLocalThumbnailPath(java.lang.String)">setLocalThumbnailPath(String)</a></span> - 类 中的方法cn.jpush.im.android.api.content.<a href="../cn/jpush/im/android/api/content/ImageContent.html" title="cn.jpush.im.android.api.content中的类">ImageContent</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/content/MediaContent.html#setMediaID(java.lang.String)">setMediaID(String)</a></span> - 类 中的方法cn.jpush.im.android.api.content.<a href="../cn/jpush/im/android/api/content/MediaContent.html" title="cn.jpush.im.android.api.content中的类">MediaContent</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/model/UserInfo.html#setNickname(java.lang.String)">setNickname(String)</a></span> - 类 中的方法cn.jpush.im.android.api.model.<a href="../cn/jpush/im/android/api/model/UserInfo.html" title="cn.jpush.im.android.api.model中的类">UserInfo</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/model/GroupInfo.html#setNoDisturb(int,%20cn.jpush.im.api.BasicCallback)">setNoDisturb(int, BasicCallback)</a></span> - 类 中的方法cn.jpush.im.android.api.model.<a href="../cn/jpush/im/android/api/model/GroupInfo.html" title="cn.jpush.im.android.api.model中的类">GroupInfo</a></dt> <dd> <div class="block">将此群组设置为免打扰。</div> </dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/model/UserInfo.html#setNoDisturb(int,%20cn.jpush.im.api.BasicCallback)">setNoDisturb(int, BasicCallback)</a></span> - 类 中的方法cn.jpush.im.android.api.model.<a href="../cn/jpush/im/android/api/model/UserInfo.html" title="cn.jpush.im.android.api.model中的类">UserInfo</a></dt> <dd> <div class="block">将此用户设置为免打扰。</div> </dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/JMessageClient.html#setNoDisturbGlobal(int,%20cn.jpush.im.api.BasicCallback)">setNoDisturbGlobal(int, BasicCallback)</a></span> - 类 中的静态方法cn.jpush.im.android.api.<a href="../cn/jpush/im/android/api/JMessageClient.html" title="cn.jpush.im.android.api中的类">JMessageClient</a></dt> <dd> <div class="block">设置全局免打扰标识,设置之后用户在所有设备上收到消息时通知栏都不会弹出消息通知。</div> </dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/model/UserInfo.html#setNotename(java.lang.String)">setNotename(String)</a></span> - 类 中的方法cn.jpush.im.android.api.model.<a href="../cn/jpush/im/android/api/model/UserInfo.html" title="cn.jpush.im.android.api.model中的类">UserInfo</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/model/UserInfo.html#setNoteText(java.lang.String)">setNoteText(String)</a></span> - 类 中的方法cn.jpush.im.android.api.model.<a href="../cn/jpush/im/android/api/model/UserInfo.html" title="cn.jpush.im.android.api.model中的类">UserInfo</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/JMessageClient.html#setNotificationMode(int)">setNotificationMode(int)</a></span> - 类 中的静态方法cn.jpush.im.android.api.<a href="../cn/jpush/im/android/api/JMessageClient.html" title="cn.jpush.im.android.api中的类">JMessageClient</a></dt> <dd> <div class="block">设置通知的展示类型</div> </dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/content/MessageContent.html#setNumberExtra(java.lang.String,%20java.lang.Number)">setNumberExtra(String, Number)</a></span> - 类 中的方法cn.jpush.im.android.api.content.<a href="../cn/jpush/im/android/api/content/MessageContent.html" title="cn.jpush.im.android.api.content中的类">MessageContent</a></dt> <dd> <div class="block">设置消息体中的附加字段</div> </dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/content/CustomContent.html#setNumberValue(java.lang.String,%20java.lang.Number)">setNumberValue(String, Number)</a></span> - 类 中的方法cn.jpush.im.android.api.content.<a href="../cn/jpush/im/android/api/content/CustomContent.html" title="cn.jpush.im.android.api.content中的类">CustomContent</a></dt> <dd> <div class="block">设置自定义消息体中的值</div> </dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/model/Message.html#setOnContentDownloadProgressCallback(cn.jpush.im.android.api.callback.ProgressUpdateCallback)">setOnContentDownloadProgressCallback(ProgressUpdateCallback)</a></span> - 类 中的方法cn.jpush.im.android.api.model.<a href="../cn/jpush/im/android/api/model/Message.html" title="cn.jpush.im.android.api.model中的类">Message</a></dt> <dd> <div class="block">设置监听消息所带附件(图片、语音等)下载进度的回调接口</div> </dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/model/Message.html#setOnContentUploadProgressCallback(cn.jpush.im.android.api.callback.ProgressUpdateCallback)">setOnContentUploadProgressCallback(ProgressUpdateCallback)</a></span> - 类 中的方法cn.jpush.im.android.api.model.<a href="../cn/jpush/im/android/api/model/Message.html" title="cn.jpush.im.android.api.model中的类">Message</a></dt> <dd> <div class="block">设置监听消息所带附件(图片、语音等)上传进度的回调接口</div> </dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/model/Message.html#setOnSendCompleteCallback(cn.jpush.im.api.BasicCallback)">setOnSendCompleteCallback(BasicCallback)</a></span> - 类 中的方法cn.jpush.im.android.api.model.<a href="../cn/jpush/im/android/api/model/Message.html" title="cn.jpush.im.android.api.model中的类">Message</a></dt> <dd> <div class="block">设置监听消息发送完成的回调接口</div> </dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/model/UserInfo.html#setRegion(java.lang.String)">setRegion(String)</a></span> - 类 中的方法cn.jpush.im.android.api.model.<a href="../cn/jpush/im/android/api/model/UserInfo.html" title="cn.jpush.im.android.api.model中的类">UserInfo</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/event/BaseNotificationEvent.Builder.html#setReturnCode(int)">setReturnCode(int)</a></span> - 类 中的方法cn.jpush.im.android.api.event.<a href="../cn/jpush/im/android/api/event/BaseNotificationEvent.Builder.html" title="cn.jpush.im.android.api.event中的类">BaseNotificationEvent.Builder</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/model/UserInfo.html#setSignature(java.lang.String)">setSignature(String)</a></span> - 类 中的方法cn.jpush.im.android.api.model.<a href="../cn/jpush/im/android/api/model/UserInfo.html" title="cn.jpush.im.android.api.model中的类">UserInfo</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/model/UserInfo.html#setStar(int)">setStar(int)</a></span> - 类 中的方法cn.jpush.im.android.api.model.<a href="../cn/jpush/im/android/api/model/UserInfo.html" title="cn.jpush.im.android.api.model中的类">UserInfo</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/content/MessageContent.html#setStringExtra(java.lang.String,%20java.lang.String)">setStringExtra(String, String)</a></span> - 类 中的方法cn.jpush.im.android.api.content.<a href="../cn/jpush/im/android/api/content/MessageContent.html" title="cn.jpush.im.android.api.content中的类">MessageContent</a></dt> <dd> <div class="block">设置消息体中的附加字段</div> </dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/content/CustomContent.html#setStringValue(java.lang.String,%20java.lang.String)">setStringValue(String, String)</a></span> - 类 中的方法cn.jpush.im.android.api.content.<a href="../cn/jpush/im/android/api/content/CustomContent.html" title="cn.jpush.im.android.api.content中的类">CustomContent</a></dt> <dd> <div class="block">设置自定义消息体中的值</div> </dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/event/BaseNotificationEvent.Builder.html#setToUsernameList(java.util.List)">setToUsernameList(List&lt;String&gt;)</a></span> - 类 中的方法cn.jpush.im.android.api.event.<a href="../cn/jpush/im/android/api/event/BaseNotificationEvent.Builder.html" title="cn.jpush.im.android.api.event中的类">BaseNotificationEvent.Builder</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/model/Conversation.html#setUnReadMessageCnt(int)">setUnReadMessageCnt(int)</a></span> - 类 中的方法cn.jpush.im.android.api.model.<a href="../cn/jpush/im/android/api/model/Conversation.html" title="cn.jpush.im.android.api.model中的类">Conversation</a></dt> <dd> <div class="block">设置会话中的未读消息数</div> </dd> <dt><span class="strong"><a href="../cn/jpush/im/android/api/JMessageClient.html#swapEnvironment(Context,%20java.lang.Boolean)">swapEnvironment(Context, Boolean)</a></span> - 类 中的静态方法cn.jpush.im.android.api.<a href="../cn/jpush/im/android/api/JMessageClient.html" title="cn.jpush.im.android.api中的类">JMessageClient</a></dt> <dd>&nbsp;</dd> </dl> <a href="index-1.html">A</a>&nbsp;<a href="index-2.html">B</a>&nbsp;<a href="index-3.html">C</a>&nbsp;<a href="index-4.html">D</a>&nbsp;<a href="index-5.html">E</a>&nbsp;<a href="index-6.html">F</a>&nbsp;<a href="index-7.html">G</a>&nbsp;<a href="index-8.html">I</a>&nbsp;<a href="index-9.html">J</a>&nbsp;<a href="index-10.html">L</a>&nbsp;<a href="index-11.html">M</a>&nbsp;<a href="index-12.html">N</a>&nbsp;<a href="index-13.html">O</a>&nbsp;<a href="index-14.html">P</a>&nbsp;<a href="index-15.html">R</a>&nbsp;<a href="index-16.html">S</a>&nbsp;<a href="index-17.html">T</a>&nbsp;<a href="index-18.html">U</a>&nbsp;<a href="index-19.html">V</a>&nbsp;</div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="跳过导航链接"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="导航"> <li><a href="../overview-summary.html">概览</a></li> <li>程序包</li> <li>类</li> <li><a href="../overview-tree.html">树</a></li> <li><a href="../deprecated-list.html">已过时</a></li> <li class="navBarCell1Rev">索引</li> <li><a href="../help-doc.html">帮助</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="index-15.html">上一个字母</a></li> <li><a href="index-17.html">下一个字母</a></li> </ul> <ul class="navList"> <li><a href="../index.html?index-filesindex-16.html" target="_top">框架</a></li> <li><a href="index-16.html" target="_top">无框架</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../allclasses-noframe.html">所有类</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
Java
using System; using System.Collections; using UnityEngine; using VRStandardAssets.Common; using VRStandardAssets.Utils; namespace VRStandardAssets.ShootingGallery { // This script handles a target in the shooter scenes. // It includes what should happen when it is hit and // how long before it despawns. public class ShootingTarget : MonoBehaviour { public event Action<ShootingTarget> OnRemove; // This event is triggered when the target needs to be removed. [SerializeField] private int m_Score = 1; // This is the amount added to the users score when the target is hit. [SerializeField] private float m_TimeOutDuration = 2f; // How long the target lasts before it disappears. [SerializeField] private float m_DestroyTimeOutDuration = 2f; // When the target is hit, it shatters. This is how long before the shattered pieces disappear. [SerializeField] private GameObject m_DestroyPrefab; // The prefab for the shattered target. [SerializeField] private AudioClip m_DestroyClip; // The audio clip to play when the target shatters. [SerializeField] private AudioClip m_SpawnClip; // The audio clip that plays when the target appears. [SerializeField] private AudioClip m_MissedClip; // The audio clip that plays when the target disappears without being hit. private Transform m_CameraTransform; // Used to make sure the target is facing the camera. private VRInteractiveItem m_InteractiveItem; // Used to handle the user clicking whilst looking at the target. private AudioSource m_Audio; // Used to play the various audio clips. private Renderer m_Renderer; // Used to make the target disappear before it is removed. private Collider m_Collider; // Used to make sure the target doesn't interupt other shots happening. private bool m_IsEnding; // Whether the target is currently being removed by another source. private void Awake() { // Setup the references. m_CameraTransform = Camera.main.transform; m_Audio = GetComponent<AudioSource> (); m_InteractiveItem = GetComponent<VRInteractiveItem>(); m_Renderer = GetComponent<Renderer>(); m_Collider = GetComponent<Collider>(); } private void OnEnable () { m_InteractiveItem.OnDown += HandleDown; } private void OnDisable () { m_InteractiveItem.OnDown -= HandleDown; } private void OnDestroy() { // Ensure the event is completely unsubscribed when the target is destroyed. OnRemove = null; } public void Restart (float gameTimeRemaining) { // When the target is spawned turn the visual and physical aspects on. m_Renderer.enabled = true; m_Collider.enabled = true; // Since the target has just spawned, it's not ending yet. m_IsEnding = false; // Play the spawn clip. m_Audio.clip = m_SpawnClip; m_Audio.Play(); // Make sure the target is facing the camera. transform.LookAt(m_CameraTransform); // Start the time out for when the target would naturally despawn. StartCoroutine (MissTarget()); // Start the time out for when the game ends. // Note this will only come into effect if the game time remaining is less than the time out duration. StartCoroutine (GameOver (gameTimeRemaining)); } private IEnumerator MissTarget() { // Wait for the target to disappear naturally. yield return new WaitForSeconds (m_TimeOutDuration); // If by this point it's already ending, do nothing else. if(m_IsEnding) yield break; // Otherwise this is ending the target's lifetime. m_IsEnding = true; // Turn off the visual and physical aspects. m_Renderer.enabled = false; m_Collider.enabled = false; // Play the clip of the target being missed. m_Audio.clip = m_MissedClip; m_Audio.Play(); // Wait for the clip to finish. yield return new WaitForSeconds(m_MissedClip.length); // Tell subscribers that this target is ready to be removed. if (OnRemove != null) OnRemove(this); } private IEnumerator GameOver (float gameTimeRemaining) { // Wait for the game to end. yield return new WaitForSeconds (gameTimeRemaining); // If by this point it's already ending, do nothing else. if(m_IsEnding) yield break; // Otherwise this is ending the target's lifetime. m_IsEnding = true; // Turn off the visual and physical aspects. m_Renderer.enabled = false; m_Collider.enabled = false; // Tell subscribers that this target is ready to be removed. if (OnRemove != null) OnRemove (this); } private void HandleDown() { // If it's already ending, do nothing else. if (m_IsEnding) return; // Otherwise this is ending the target's lifetime. m_IsEnding = true; // Turn off the visual and physical aspects. m_Renderer.enabled = false; m_Collider.enabled = false; // Play the clip of the target being hit. m_Audio.clip = m_DestroyClip; m_Audio.Play(); // Add to the player's score. SessionData.AddScore(m_Score); // Instantiate the shattered target prefab in place of this target. GameObject destroyedTarget = Instantiate(m_DestroyPrefab, transform.position, transform.rotation) as GameObject; // Destroy the shattered target after it's time out duration. Destroy(destroyedTarget, m_DestroyTimeOutDuration); // Tell subscribers that this target is ready to be removed. if (OnRemove != null) OnRemove(this); } } }
Java
# Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible import __version__ from ansible.errors import AnsibleError from distutils.version import LooseVersion from operator import eq, ge, gt from sys import version_info try: from __main__ import display except ImportError: from ansible.utils.display import Display display = Display() version_requirement = '2.5.0.0' version_tested_max = '2.7.5' python3_required_version = '2.5.3' if version_info[0] == 3 and not ge(LooseVersion(__version__), LooseVersion(python3_required_version)): raise AnsibleError(('Ansible >= {} is required when using Python 3.\n' 'Either downgrade to Python 2 or update your Ansible version to {}.').format(python3_required_version, python3_required_version)) if not ge(LooseVersion(__version__), LooseVersion(version_requirement)): raise AnsibleError(('Trellis no longer supports Ansible {}.\n' 'Please upgrade to Ansible {} or higher.').format(__version__, version_requirement)) elif gt(LooseVersion(__version__), LooseVersion(version_tested_max)): display.warning(u'You Ansible version is {} but this version of Trellis has only been tested for ' u'compatability with Ansible {} -> {}. It is advisable to check for Trellis updates or ' u'downgrade your Ansible version.'.format(__version__, version_requirement, version_tested_max)) if eq(LooseVersion(__version__), LooseVersion('2.5.0')): display.warning(u'You Ansible version is {}. Consider upgrading your Ansible version to avoid ' u'erroneous warnings such as `Removed restricted key from module data...`'.format(__version__)) # Import BaseVarsPlugin after Ansible version check. # Otherwise import error for Ansible versions older than 2.4 would prevent display of version check message. from ansible.plugins.vars import BaseVarsPlugin class VarsModule(BaseVarsPlugin): def get_vars(self, loader, path, entities, cache=True): return {}
Java
//@flow const {foo, Bar, baz, qux} = require('./jsdoc-exports'); const { DefaultedStringEnum, InitializedStringEnum, NumberEnum, BooleanEnum, SymbolEnum, } = require('./jsdoc-objects'); /** a JSDoc in the same file */ function x() {} ( ); // ^
Java
ace.define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var TexHighlightRules = function(textClass) { if (!textClass) textClass = "text"; this.$rules = { "start" : [ { token : "comment", regex : "%.*$" }, { token : textClass, // non-command regex : "\\\\[$&%#\\{\\}]" }, { token : "keyword", // command regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b", next : "nospell" }, { token : "keyword", // command regex : "\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])" }, { token : "paren.keyword.operator", regex : "[[({]" }, { token : "paren.keyword.operator", regex : "[\\])}]" }, { token : textClass, regex : "\\s+" } ], "nospell" : [ { token : "comment", regex : "%.*$", next : "start" }, { token : "nospell." + textClass, // non-command regex : "\\\\[$&%#\\{\\}]" }, { token : "keyword", // command regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b" }, { token : "keyword", // command regex : "\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])", next : "start" }, { token : "paren.keyword.operator", regex : "[[({]" }, { token : "paren.keyword.operator", regex : "[\\])]" }, { token : "paren.keyword.operator", regex : "}", next : "start" }, { token : "nospell." + textClass, regex : "\\s+" }, { token : "nospell." + textClass, regex : "\\w+" } ] }; }; oop.inherits(TexHighlightRules, TextHighlightRules); exports.TexHighlightRules = TexHighlightRules; }); ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); ace.define("ace/mode/tex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Mode = function(suppressHighlighting) { if (suppressHighlighting) this.HighlightRules = TextHighlightRules; else this.HighlightRules = TexHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = this.$defaultBehaviour; }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "%"; this.getNextLineIndent = function(state, line, tab) { return this.$getIndent(line); }; this.allowAutoInsert = function() { return false; }; this.$id = "ace/mode/tex"; }).call(Mode.prototype); exports.Mode = Mode; }); (function() { ace.require(["ace/mode/tex"], function(m) { if (typeof module == "object" && typeof exports == "object" && module) { module.exports = m; } }); })();
Java
/** * This code was auto-generated by a Codezu. * * Changes to this file may cause incorrect behavior and will be lost if * the code is regenerated. */ package com.mozu.api.contracts.paymentservice.extensibility.v1; import java.util.List; import java.util.HashMap; import java.io.Serializable; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import org.joda.time.DateTime; import java.io.IOException; import java.lang.ClassNotFoundException; import com.mozu.api.contracts.paymentservice.extensibility.v1.ConnectionStatuses; import com.mozu.api.contracts.paymentservice.extensibility.v1.KeyValueTuple; /** * Contains a credit response */ @JsonIgnoreProperties(ignoreUnknown = true) public class GatewayCreditResponse implements Serializable { // Default Serial Version UID private static final long serialVersionUID = 1L; /** * Set this to true if the transaction is declined or fails for any reason. */ protected Boolean isDeclined; public Boolean getIsDeclined() { return this.isDeclined; } public void setIsDeclined(Boolean isDeclined) { this.isDeclined = isDeclined; } /** * Contains the response code from the gateway. */ protected String responseCode; public String getResponseCode() { return this.responseCode; } public void setResponseCode(String responseCode) { this.responseCode = responseCode; } /** * Contains the text for the response, eg, 'Insufficient funds'. */ protected String responseText; public String getResponseText() { return this.responseText; } public void setResponseText(String responseText) { this.responseText = responseText; } /** * Contains the id for the transaction provided by the gateway. */ protected String transactionId; public String getTransactionId() { return this.transactionId; } public void setTransactionId(String transactionId) { this.transactionId = transactionId; } /** * Contains information about the interaction with the gateway. */ protected ConnectionStatuses remoteConnectionStatus; public ConnectionStatuses getRemoteConnectionStatus() { return this.remoteConnectionStatus; } public void setRemoteConnectionStatus(ConnectionStatuses remoteConnectionStatus) { this.remoteConnectionStatus = remoteConnectionStatus; } /** * Contains information not in the object allowing flexibility. */ protected List<KeyValueTuple> responseData; public List<KeyValueTuple> getResponseData() { return this.responseData; } public void setResponseData(List<KeyValueTuple> responseData) { this.responseData = responseData; } }
Java
module Hello module Business module Management class ResetPassword < Base attr_reader :password_credential def initialize(password_credential) @password_credential = password_credential end def update_password(plain_text_password) if @password_credential.update(password: plain_text_password) @password_credential.reset_verifying_token! return true else merge_errors_to_self return false end end def user password_credential.user end private def merge_errors_to_self hash = @password_credential.errors.to_hash hash.each { |k, v| v.each { |v1| errors.add(k, v1) } } end end end end end
Java
#region Copyright // // DotNetNuke® - http://www.dotnetnuke.com // Copyright (c) 2002-2016 // by DotNetNuke Corporation // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated // documentation files (the "Software"), to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and // to permit persons to whom the Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all copies or substantial portions // of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. #endregion #region Usings using Telerik.Web.UI; #endregion namespace DotNetNuke.Web.UI.WebControls { public class DnnInputManager : RadInputManager { } }
Java
//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //------------------------------------------------------------------------------------------------------- #pragma once namespace Js { #ifdef TARGET_64 // This base class has a 4-byte length field. Change struct pack to 4 on 64bit to avoid 4 padding bytes here. #pragma pack(push, 4) #endif // // A base class for all array-like objects types, that can serve as an Object's internal array: // JavascriptArray/ES5Array or TypedArray. // class ArrayObject : public DynamicObject { protected: Field(uint32) length; protected: DEFINE_VTABLE_CTOR_ABSTRACT(ArrayObject, DynamicObject); ArrayObject(DynamicType * type, bool initSlots = true, uint32 length = 0) : DynamicObject(type, initSlots), length(length) { } ArrayObject(DynamicType * type, ScriptContext * scriptContext) : DynamicObject(type, scriptContext), length(0) { } // For boxing stack instance ArrayObject(ArrayObject * instance, bool deepCopy); void __declspec(noreturn) ThrowItemNotConfigurableError(PropertyId propId = Constants::NoProperty); void VerifySetItemAttributes(PropertyId propId, PropertyAttributes attributes); public: uint32 GetLength() const { return length; } static uint32 GetOffsetOfLength() { return offsetof(ArrayObject, length); } // objectArray support virtual BOOL SetItemWithAttributes(uint32 index, Var value, PropertyAttributes attributes) = 0; virtual BOOL SetItemAttributes(uint32 index, PropertyAttributes attributes); virtual BOOL SetItemAccessors(uint32 index, Var getter, Var setter); virtual BOOL IsObjectArrayFrozen(); virtual JavascriptEnumerator * GetIndexEnumerator(EnumeratorFlags flags, ScriptContext* requestContext) = 0; }; #ifdef TARGET_64 #pragma pack(pop) #endif } // namespace Js
Java
(function(){ 'use strict'; angular .module('app') .factory('ceUsers', ceUsers); ceUsers.$inject = ['$resource']; function ceUsers ($resource) { console.log('ok'); return $resource('https://mysterious-eyrie-9135.herokuapp.com/users/:username', {username: '@username'}, {'update': { method: 'PUT'}} ); } })();
Java
<?php /** * Version : 1.2.0 * Author : inc2734 * Author URI : http://2inc.org * Created : April 17, 2015 * Modified : July 31, 2015 * License : GPLv2 or later * License URI: license.txt */ ?> <div class="container"> <div class="row"> <div class="col-md-9"> <main id="main" role="main"> <?php Habakiri::the_bread_crumb(); ?> <?php $name = ( is_search() ) ? 'search' : 'archive'; get_template_part( 'content', $name ); ?> <!-- end #main --></main> <!-- end .col-md-9 --></div> <div class="col-md-3"> <?php get_sidebar(); ?> <!-- end .col-md-3 --></div> <!-- end .row --></div> <!-- end .container --></div>
Java
<?php /** * Zend Framework * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://framework.zend.com/license/new-bsd * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * * @category Zend * @package Zend_Db * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id: Exception.php 23775 2011-03-01 17:25:24Z ralph $ */ /** * Zend_Exception */ /** * @category Zend * @package Zend_Db * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Exception extends Zend_Exception { }
Java
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using Microsoft.VisualStudio.TestPlatform.UnitTestFramework; using Newtonsoft.Json.Linq; using ReactNative.Bridge; using System; using System.Threading; using System.Threading.Tasks; namespace ReactNative.Tests.Bridge { [TestClass] public class ReactInstanceTests { [TestMethod] public async Task ReactInstance_GetModules() { var module = new TestNativeModule(); var reactContext = new ReactContext(); var registry = new NativeModuleRegistry.Builder(reactContext) .Add(module) .Build(); var executor = new MockJavaScriptExecutor { OnCallFunctionReturnFlushedQueue = (_, __, ___) => JValue.CreateNull(), OnFlushQueue = () => JValue.CreateNull(), OnInvokeCallbackAndReturnFlushedQueue = (_, __) => JValue.CreateNull() }; var builder = new ReactInstance.Builder() { QueueConfiguration = TestReactQueueConfiguration.Create(_ => { }), Registry = registry, JavaScriptExecutorFactory = () => executor, BundleLoader = JavaScriptBundleLoader.CreateFileLoader("ms-appx:///Resources/test.js"), }; var instance = await DispatcherHelpers.CallOnDispatcherAsync(() => builder.Build()); reactContext.InitializeWithInstance(instance); var actualModule = instance.GetNativeModule<TestNativeModule>(); Assert.AreSame(module, actualModule); var firstJSModule = instance.GetJavaScriptModule<TestJavaScriptModule>(); var secondJSModule = instance.GetJavaScriptModule<TestJavaScriptModule>(); Assert.AreSame(firstJSModule, secondJSModule); await DispatcherHelpers.CallOnDispatcherAsync(instance.DisposeAsync); } [TestMethod] public async Task ReactInstance_Initialize_Dispose() { var mre = new ManualResetEvent(false); var module = new TestNativeModule { OnInitialized = () => mre.Set(), }; var reactContext = new ReactContext(); var registry = new NativeModuleRegistry.Builder(reactContext) .Add(module) .Build(); var executor = new MockJavaScriptExecutor { OnCallFunctionReturnFlushedQueue = (_, __, ___) => JValue.CreateNull(), OnFlushQueue = () => JValue.CreateNull(), OnInvokeCallbackAndReturnFlushedQueue = (_, __) => JValue.CreateNull() }; var builder = new ReactInstance.Builder() { QueueConfiguration = TestReactQueueConfiguration.Create(_ => { }), Registry = registry, JavaScriptExecutorFactory = () => executor, BundleLoader = JavaScriptBundleLoader.CreateFileLoader("ms-appx:///Resources/test.js"), }; var instance = await DispatcherHelpers.CallOnDispatcherAsync(() => builder.Build()); reactContext.InitializeWithInstance(instance); await DispatcherHelpers.CallOnDispatcherAsync(async () => await instance.InitializeAsync()); var caught = false; await DispatcherHelpers.CallOnDispatcherAsync(async () => { try { await instance.InitializeAsync(); } catch (InvalidOperationException) { caught = true; } }); Assert.IsTrue(caught); mre.WaitOne(); Assert.AreEqual(1, module.InitializeCalls); await DispatcherHelpers.CallOnDispatcherAsync(instance.DisposeAsync); Assert.AreEqual(1, module.OnReactInstanceDisposeCalls); // Dispose is idempotent await DispatcherHelpers.CallOnDispatcherAsync(instance.DisposeAsync); Assert.AreEqual(1, module.OnReactInstanceDisposeCalls); Assert.IsTrue(instance.IsDisposed); } [TestMethod] public async Task ReactInstance_ExceptionHandled_DoesNotDispose() { var eventHandler = new AutoResetEvent(false); var module = new OnDisposeNativeModule(() => eventHandler.Set()); var registry = new NativeModuleRegistry.Builder(new ReactContext()) .Add(module) .Build(); var executor = new MockJavaScriptExecutor { OnCallFunctionReturnFlushedQueue = (_, __, ___) => JValue.CreateNull(), OnFlushQueue = () => JValue.CreateNull(), OnInvokeCallbackAndReturnFlushedQueue = (_, __) => JValue.CreateNull() }; var exception = new Exception(); var tcs = new TaskCompletionSource<Exception>(TaskCreationOptions.RunContinuationsAsynchronously); var builder = new ReactInstance.Builder() { QueueConfiguration = TestReactQueueConfiguration.Create(tcs.SetResult), Registry = registry, JavaScriptExecutorFactory = () => executor, BundleLoader = JavaScriptBundleLoader.CreateFileLoader("ms-appx:///Resources/test.js"), }; var instance = await DispatcherHelpers.CallOnDispatcherAsync(() => builder.Build()); instance.QueueConfiguration.JavaScriptQueue.Dispatch(() => { throw exception; }); var actualException = await tcs.Task; Assert.AreSame(exception, actualException); Assert.IsFalse(eventHandler.WaitOne(500)); Assert.IsFalse(instance.IsDisposed); } class TestNativeModule : NativeModuleBase { public Action OnInitialized { get; set; } public int InitializeCalls { get; set; } public int OnReactInstanceDisposeCalls { get; set; } public override string Name { get { return "Test"; } } public override void Initialize() { InitializeCalls++; OnInitialized?.Invoke(); } public override Task OnReactInstanceDisposeAsync() { OnReactInstanceDisposeCalls++; return Task.CompletedTask; } } class OnDisposeNativeModule : NativeModuleBase { private readonly Action _onDispose; public OnDisposeNativeModule(Action onDispose) { _onDispose = onDispose; } public override string Name { get { return "Test"; } } public override Task OnReactInstanceDisposeAsync() { _onDispose(); return Task.CompletedTask; } } class TestJavaScriptModule : JavaScriptModuleBase { } } }
Java
using System; using Machine.Specifications; namespace FactoryGirl.NET.Specs { [Subject(typeof(FactoryGirl))] public class FactoryGirlSpecs : ICleanupAfterEveryContextInAssembly { [Subject(typeof(FactoryGirl))] public class When_we_define_a_factory { Establish context = () => { }; Because of = () => FactoryGirl.Define(() => new Dummy()); It should_contain_the_definition = () => FactoryGirl.DefinedFactories.ShouldContain(typeof(Dummy)); } [Subject(typeof(FactoryGirl))] public class When_a_factory_has_been_defined { Establish context = () => FactoryGirl.Define(() => new Dummy()); [Subject(typeof(FactoryGirl))] public class When_we_define_the_same_factory_again { Because of = () => exception = Catch.Exception(() => FactoryGirl.Define(() => new Dummy())); It should_throw_a_DuplicateFactoryException = () => exception.ShouldBeOfType<DuplicateFactoryException>(); static Exception exception; } [Subject(typeof(FactoryGirl))] public class When_we_build_a_default_object { Because of = () => builtObject = FactoryGirl.Build<Dummy>(); It should_build_the_object = () => builtObject.ShouldNotBeNull(); It should_assign_the_default_value_for_the_property = () => builtObject.Value.ShouldEqual(Dummy.DefaultValue); static Dummy builtObject; } [Subject(typeof(FactoryGirl))] public class When_we_build_a_customized_object { Because of = () => builtObject = FactoryGirl.Build<Dummy>(x => x.Value = 42); It should_update_the_specified_value = () => builtObject.Value.ShouldEqual(42); static Dummy builtObject; } } public void AfterContextCleanup() { FactoryGirl.ClearFactoryDefinitions(); } } }
Java
""" A Pygments lexer for Magpie. """ from setuptools import setup __author__ = 'Robert Nystrom' setup( name='Magpie', version='1.0', description=__doc__, author=__author__, packages=['magpie'], entry_points=''' [pygments.lexers] magpielexer = magpie:MagpieLexer ''' )
Java
'use strict'; import gulp from 'gulp'; import gutil from 'gulp-util'; import uglify from 'gulp-uglify'; import stylus from 'gulp-stylus'; import watch from 'gulp-watch'; import plumber from 'gulp-plumber'; import cleanCss from 'gulp-clean-css'; import imagemin from 'gulp-imagemin'; import concat from 'gulp-concat'; import babel from 'gulp-babel'; // Minificação dos arquivos .js gulp.task('minjs', () => { return gulp // Define a origem dos arquivos .js .src(['src/js/**/*.js']) // Prevençãao de erros .pipe(plumber()) // Suporte para o padrão ES6 .pipe(babel({ presets: ['es2015'] })) // Realiza minificação .pipe(uglify()) // Altera a extenção do arquivo .pipe(concat('app.min.js')) // Salva os arquivos minificados na pasta de destino .pipe(gulp.dest('dist/js')); }); gulp.task('stylus', () => { return gulp // Define a origem dos arquivos .scss .src('src/stylus/**/*.styl') // Prevençãao de erros .pipe(plumber()) // Realiza o pré-processamento para css .pipe(stylus()) // Realiza a minificação do css .pipe(cleanCss()) // Altera a extenção do arquivo .pipe(concat('style.min.css')) // Salva os arquivos processados na pasta de destino .pipe(gulp.dest('dist/css')); }); gulp.task('images', () => gulp.src('src/assets/*') .pipe(imagemin()) .pipe(gulp.dest('dist/assets')) ); gulp.task('watch', function() { gulp.start('default') gulp.watch('src/js/**/*.js', ['minjs']) gulp.watch('src/stylus/**/*.styl', ['stylus']) gulp.watch('src/assets/*', ['images']) }); gulp.task('default', ['minjs', 'stylus', 'images']);
Java
<?php use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateEveCorporationMemberSecurityLog extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('corporation_msec_log', function(Blueprint $table) { $table->increments('id'); $table->integer('corporationID'); $table->integer('characterID'); $table->string('characterName'); $table->dateTime('changeTime'); $table->integer('issuerID'); $table->string('issuerName'); $table->string('roleLocationType'); $table->string('hash')->unique(); // Indexes $table->index('characterID'); $table->index('corporationID'); $table->index('hash'); $table->timestamps(); }); } // changeTime,characterID,issuerID,roleLocationType /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('corporation_msec_log'); } }
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <title>PCAP Report</title> <!-- Bootstrap core CSS --> <link href="/css/bootstrap.min.css" rel="stylesheet"> <style type="text/css"> html, body { height:100% } </style> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[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="page-header"> <h1>Sample View for {{md5}} md5</h1> </div> <pre>{{md5_view|pprint}}</pre> </div> </body> </html>
Java
require 'shellwords' require 'fileutils' module Hibiki class Downloading CH_NAME = 'hibiki' def initialize @a = Mechanize.new @a.user_agent_alias = 'Windows Chrome' end def download(program) infos = get_infos(program) if infos['episode']['id'] != program.episode_id Rails.logger.error("episode outdated. title=#{program.title} expected_episode_id=#{program.episode_id} actual_episode_id=#{infos['episode']['id']}") program.state = HibikiProgramV2::STATE[:outdated] return end live_flg = infos['episode'].try(:[], 'video').try(:[], 'live_flg') if live_flg == nil || live_flg == true program.state = HibikiProgramV2::STATE[:not_downloadable] return end url = get_m3u8_url(infos['episode']['video']['id']) unless download_hls(program, url) program.state = HibikiProgramV2::STATE[:failed] return end program.state = HibikiProgramV2::STATE[:done] end def get_infos(program) res = get_api("https://vcms-api.hibiki-radio.jp/api/v1/programs/#{program.access_id}") infos = JSON.parse(res.body) end def get_m3u8_url(video_id) res = get_api("https://vcms-api.hibiki-radio.jp/api/v1/videos/play_check?video_id=#{video_id}") play_infos = JSON.parse(res.body) play_infos['playlist_url'] end def download_hls(program, m3u8_url) file_path = Main::file_path_working(CH_NAME, title(program), 'mp4') arg = "\ -loglevel error \ -y \ -i #{Shellwords.escape(m3u8_url)} \ -vcodec copy -acodec copy -bsf:a aac_adtstoasc \ #{Shellwords.escape(file_path)}" Main::prepare_working_dir(CH_NAME) exit_status, output = Main::ffmpeg(arg) unless exit_status.success? Rails.logger.error "rec failed. program:#{program}, exit_status:#{exit_status}, output:#{output}" return false end if output.present? Rails.logger.warn "hibiki ffmpeg command:#{arg} output:#{output}" end Main::move_to_archive_dir(CH_NAME, program.created_at, file_path) true end def get_api(url) @a.get( url, [], "http://hibiki-radio.jp/", 'X-Requested-With' => 'XMLHttpRequest', 'Origin' => 'http://hibiki-radio.jp' ) end def title(program) date = program.created_at.strftime('%Y_%m_%d') title = "#{date}_#{program.title}_#{program.episode_name}" if program.cast.present? cast = program.cast.gsub(',', ' ') title += "_#{cast}" end title end end end
Java
--- date: 2014-10-23 title: Open Source at Facebook speaker: Patrick Shuff from Facebook type: Meeting --- Thursday, 2014-10-23 at 7:00pm in Caldwell Labs 120, Patrick Shuff (an engineer at Facebook) will present "Open Source at Facebook". Description follows: Facebook serves requests for over 1.3 billion people every month. I will give a brief overview of our Traffic/CDN (e.g. images and videos) infrastructure and how open source software is core to being able to deliver all of those bits to the world every day! Laptops are encouraged but not required, and as always, there will be pizza.
Java
<?xml version="1.0" ?><!DOCTYPE TS><TS language="bs" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About buynowcoin</source> <translation type="unfinished"/> </message> <message> <location line="+39"/> <source>&lt;b&gt;buynowcoin&lt;/b&gt; version</source> <translation type="unfinished"/> </message> <message> <location line="+41"/> <source>Copyright © 2009-2014 The Bitcoin developers Copyright © 2012-2014 The NovaCoin developers Copyright © 2014 The buynowcoin developers</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>Double-click to edit address or label</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation type="unfinished"/> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation type="unfinished"/> </message> <message> <location line="-46"/> <source>These are your buynowcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source> <translation type="unfinished"/> </message> <message> <location line="+60"/> <source>&amp;Copy Address</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Show &amp;QR Code</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Sign a message to prove you own a buynowcoin address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Delete the currently selected address from the list</source> <translation type="unfinished"/> </message> <message> <location line="-14"/> <source>Verify a message to ensure it was signed with a specified buynowcoin address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>&amp;Delete</source> <translation type="unfinished"/> </message> <message> <location filename="../addressbookpage.cpp" line="+65"/> <source>Copy &amp;Label</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Edit</source> <translation type="unfinished"/> </message> <message> <location line="+250"/> <source>Export Address Book Data</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Error exporting</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+144"/> <source>Label</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Address</source> <translation type="unfinished"/> </message> <message> <location line="+36"/> <source>(no label)</source> <translation type="unfinished"/> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation type="unfinished"/> </message> <message> <location line="+33"/> <source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>For staking only</source> <translation type="unfinished"/> </message> <message> <location filename="../askpassphrasedialog.cpp" line="+35"/> <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR COINS&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="+103"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation type="unfinished"/> </message> <message> <location line="-133"/> <location line="+60"/> <source>Wallet encrypted</source> <translation type="unfinished"/> </message> <message> <location line="-58"/> <source>buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer.</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+44"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation type="unfinished"/> </message> <message> <location line="-56"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <location line="+50"/> <source>The supplied passphrases do not match.</source> <translation type="unfinished"/> </message> <message> <location line="-38"/> <source>Wallet unlock failed</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+12"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation type="unfinished"/> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation type="unfinished"/> </message> </context> <context> <name>BitcoinGUI</name> <message> <location filename="../bitcoingui.cpp" line="+282"/> <source>Sign &amp;message...</source> <translation type="unfinished"/> </message> <message> <location line="+251"/> <source>Synchronizing with network...</source> <translation type="unfinished"/> </message> <message> <location line="-319"/> <source>&amp;Overview</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>&amp;Transactions</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>&amp;Address Book</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Edit the list of stored addresses and labels</source> <translation type="unfinished"/> </message> <message> <location line="-13"/> <source>&amp;Receive coins</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show the list of addresses for receiving payments</source> <translation type="unfinished"/> </message> <message> <location line="-7"/> <source>&amp;Send coins</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>E&amp;xit</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Quit application</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Show information about buynowcoin</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>&amp;Encrypt Wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+259"/> <source>~%n block(s) remaining</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+6"/> <source>Downloaded %1 of %2 blocks of transaction history (%3% done).</source> <translation type="unfinished"/> </message> <message> <location line="-256"/> <source>&amp;Export...</source> <translation type="unfinished"/> </message> <message> <location line="-64"/> <source>Send coins to a buynowcoin address</source> <translation type="unfinished"/> </message> <message> <location line="+47"/> <source>Modify configuration options for buynowcoin</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"/> </message> <message> <location line="-14"/> <source>Encrypt or decrypt wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Backup wallet to another location</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>&amp;Debug window</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation type="unfinished"/> </message> <message> <location line="-5"/> <source>&amp;Verify message...</source> <translation type="unfinished"/> </message> <message> <location line="-202"/> <source>buynowcoin</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+180"/> <source>&amp;About buynowcoin</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Unlock wallet</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>&amp;Lock Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Lock wallet</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>&amp;File</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>&amp;Settings</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>&amp;Help</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Tabs toolbar</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Actions toolbar</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <location line="+9"/> <source>[testnet]</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <location line="+60"/> <source>buynowcoin client</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+75"/> <source>%n active connection(s) to buynowcoin network</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+40"/> <source>Downloaded %1 blocks of transaction history.</source> <translation type="unfinished"/> </message> <message> <location line="+413"/> <source>Staking.&lt;br&gt;Your weight is %1&lt;br&gt;Network weight is %2&lt;br&gt;Expected time to earn reward is %3</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Not staking because wallet is locked</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Not staking because wallet is offline</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Not staking because wallet is syncing</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Not staking because you don&apos;t have mature coins</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-403"/> <source>%n second(s) ago</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="-312"/> <source>About buynowcoin card</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show information about buynowcoin card</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>&amp;Unlock Wallet...</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+297"/> <source>%n minute(s) ago</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n hour(s) ago</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s) ago</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+6"/> <source>Up to date</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Catching up...</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Last received block was generated %1.</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Confirm transaction fee</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Sent transaction</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Incoming transaction</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation type="unfinished"/> </message> <message> <location line="+100"/> <location line="+15"/> <source>URI handling</source> <translation type="unfinished"/> </message> <message> <location line="-15"/> <location line="+15"/> <source>URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters.</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Backup Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Wallet Data (*.dat)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Backup Failed</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+76"/> <source>%n second(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n minute(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n hour(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+18"/> <source>Not staking</source> <translation type="unfinished"/> </message> <message> <location filename="../bitcoin.cpp" line="+109"/> <source>A fatal error occurred. buynowcoin can no longer continue safely and will quit.</source> <translation type="unfinished"/> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+90"/> <source>Network Alert</source> <translation type="unfinished"/> </message> </context> <context> <name>CoinControlDialog</name> <message> <location filename="../forms/coincontroldialog.ui" line="+14"/> <source>Coin Control</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Quantity:</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>Bytes:</source> <translation type="unfinished"/> </message> <message> <location line="+48"/> <source>Amount:</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>Priority:</source> <translation type="unfinished"/> </message> <message> <location line="+48"/> <source>Fee:</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Low Output:</source> <translation type="unfinished"/> </message> <message> <location filename="../coincontroldialog.cpp" line="+551"/> <source>no</source> <translation type="unfinished"/> </message> <message> <location filename="../forms/coincontroldialog.ui" line="+51"/> <source>After Fee:</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Change:</source> <translation type="unfinished"/> </message> <message> <location line="+69"/> <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="+45"/> <source>Amount</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Label</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Address</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Confirmations</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Confirmed</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Priority</source> <translation type="unfinished"/> </message> <message> <location filename="../coincontroldialog.cpp" line="-515"/> <source>Copy address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+26"/> <source>Copy amount</source> <translation type="unfinished"/> </message> <message> <location line="-25"/> <source>Copy transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <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="+317"/> <source>highest</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>lowest</source> <translation type="unfinished"/> </message> <message> <location line="+155"/> <source>DUST</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>yes</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>This label turns red, if the transaction size is bigger than 10000 bytes. This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transactions with higher priority get more likely into a block. This label turns red, if the priority is smaller than &quot;medium&quot;. This means a fee of at least %1 per kb is required.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This label turns red, if any recipient receives an amount smaller than %1. This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required.</source> <translation type="unfinished"/> </message> <message> <location line="+37"/> <location line="+66"/> <source>(no label)</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>The address associated with this address book entry. This can only be modified for sending addresses.</source> <translation type="unfinished"/> </message> <message> <location filename="../editaddressdialog.cpp" line="+20"/> <source>New receiving address</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>New sending address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation type="unfinished"/> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation type="unfinished"/> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid buynowcoin address.</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation type="unfinished"/> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+420"/> <location line="+12"/> <source>buynowcoin-Qt</source> <translation type="unfinished"/> </message> <message> <location line="-12"/> <source>version</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Usage:</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>command-line options</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>UI options</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation type="unfinished"/> </message> </context> <context> <name>OptionsDialog</name> <message> <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Reserved amount does not participate in staking and is therefore spendable at any time.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Reserve</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Automatically start buynowcoin after logging in to the system.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Start buynowcoin on system login</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Detach block and address databases at shutdown. This means they can be moved to another data directory, but it slows down shutdown. The wallet is always detached.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Detach databases at shutdown</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>&amp;Network</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Map port using &amp;UPnP</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy:</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Proxy &amp;IP:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation type="unfinished"/> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting buynowcoin.</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Whether to show buynowcoin addresses in the transaction list or not.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Whether to show coin control features or not.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Display coin &amp;control features (experts only!)</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>&amp;OK</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation type="unfinished"/> </message> <message> <location filename="../optionsdialog.cpp" line="+55"/> <source>default</source> <translation type="unfinished"/> </message> <message> <location line="+149"/> <location line="+9"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="-9"/> <location line="+9"/> <source>This setting will take effect after restarting buynowcoin.</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation type="unfinished"/> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation type="unfinished"/> </message> <message> <location line="+33"/> <location line="+231"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet.</source> <translation type="unfinished"/> </message> <message> <location line="-160"/> <source>Stake:</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>Unconfirmed:</source> <translation type="unfinished"/> </message> <message> <location line="-107"/> <source>Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+49"/> <source>Spendable:</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Your current spendable balance</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>Immature:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation type="unfinished"/> </message> <message> <location line="+20"/> <source>Total:</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Your current total balance</source> <translation type="unfinished"/> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation type="unfinished"/> </message> <message> <location line="-108"/> <source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source> <translation type="unfinished"/> </message> <message> <location line="-29"/> <source>Total of coins that was staked, and do not yet count toward the current balance</source> <translation type="unfinished"/> </message> <message> <location filename="../overviewpage.cpp" line="+113"/> <location line="+1"/> <source>out of sync</source> <translation type="unfinished"/> </message> </context> <context> <name>QRCodeDialog</name> <message> <location filename="../forms/qrcodedialog.ui" line="+14"/> <source>QR Code Dialog</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <source>Request Payment</source> <translation type="unfinished"/> </message> <message> <location line="+56"/> <source>Amount:</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>Label:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Message:</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>&amp;Save As...</source> <translation type="unfinished"/> </message> <message> <location filename="../qrcodedialog.cpp" line="+62"/> <source>Error encoding URI into QR Code.</source> <translation type="unfinished"/> </message> <message> <location line="+40"/> <source>The entered amount is invalid, please check.</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Save QR Code</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>PNG Images (*.png)</source> <translation type="unfinished"/> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <location line="+23"/> <location line="+26"/> <location line="+23"/> <location line="+23"/> <location line="+36"/> <location line="+53"/> <location line="+23"/> <location line="+23"/> <location filename="../rpcconsole.cpp" line="+348"/> <source>N/A</source> <translation type="unfinished"/> </message> <message> <location line="-217"/> <source>Client version</source> <translation type="unfinished"/> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation type="unfinished"/> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation type="unfinished"/> </message> <message> <location line="+49"/> <source>Startup time</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>Network</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>On testnet</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Block chain</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Last block time</source> <translation type="unfinished"/> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Show</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation type="unfinished"/> </message> <message> <location line="-260"/> <source>Build date</source> <translation type="unfinished"/> </message> <message> <location line="-104"/> <source>buynowcoin - Debug window</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>buynowcoin Core</source> <translation type="unfinished"/> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation type="unfinished"/> </message> <message> <location line="+102"/> <source>Clear console</source> <translation type="unfinished"/> </message> <message> <location filename="../rpcconsole.cpp" line="-33"/> <source>Welcome to the buynowcoin RPC console.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation type="unfinished"/> </message> </context> <context> <name>SendCoinsDialog</name> <message> <location filename="../forms/sendcoinsdialog.ui" line="+14"/> <location filename="../sendcoinsdialog.cpp" line="+182"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+6"/> <location line="+5"/> <location line="+5"/> <source>Send Coins</source> <translation type="unfinished"/> </message> <message> <location line="+76"/> <source>Coin Control Features</source> <translation type="unfinished"/> </message> <message> <location line="+20"/> <source>Inputs...</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>automatically selected</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Insufficient funds!</source> <translation type="unfinished"/> </message> <message> <location line="+77"/> <source>Quantity:</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <location line="+35"/> <source>0</source> <translation type="unfinished"/> </message> <message> <location line="-19"/> <source>Bytes:</source> <translation type="unfinished"/> </message> <message> <location line="+51"/> <source>Amount:</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <location line="+86"/> <location line="+86"/> <location line="+32"/> <source>0.00 BTC</source> <translation type="unfinished"/> </message> <message> <location line="-191"/> <source>Priority:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>medium</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>Fee:</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Low Output:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>no</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>After Fee:</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Change</source> <translation type="unfinished"/> </message> <message> <location line="+50"/> <source>custom change address</source> <translation type="unfinished"/> </message> <message> <location line="+106"/> <source>Send to multiple recipients at once</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation type="unfinished"/> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>Balance:</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>123.456 BTC</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Confirm the send action</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation type="unfinished"/> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-173"/> <source>Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX)</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Copy quantity</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation type="unfinished"/> </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="+86"/> <source>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Confirm send coins</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source> and </source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>The recipient address is not valid, please recheck.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Error: Transaction creation failed.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> <message> <location line="+251"/> <source>WARNING: Invalid buynowcoin address</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>(no label)</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>WARNING: unknown change address</source> <translation type="unfinished"/> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>A&amp;mount:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <location filename="../sendcoinsentry.cpp" line="+25"/> <source>Enter a label for this address to add it to your address book</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>&amp;Label:</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX)</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Choose address from address book</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="+7"/> <source>Paste address from clipboard</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation>Alt+P</translation> </message> <message> <location line="+7"/> <source>Remove this recipient</source> <translation type="unfinished"/> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX)</source> <translation type="unfinished"/> </message> </context> <context> <name>SignVerifyMessageDialog</name> <message> <location filename="../forms/signverifymessagedialog.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <location line="+124"/> <source>&amp;Sign Message</source> <translation type="unfinished"/> </message> <message> <location line="-118"/> <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX)</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <location line="+203"/> <source>Choose an address from the address book</source> <translation type="unfinished"/> </message> <message> <location line="-193"/> <location line="+203"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="-193"/> <source>Paste address from clipboard</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+24"/> <source>Copy the current signature to the system clipboard</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this buynowcoin address</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Reset all sign message fields</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation type="unfinished"/> </message> <message> <location line="-87"/> <location line="+70"/> <source>&amp;Verify Message</source> <translation type="unfinished"/> </message> <message> <location line="-64"/> <source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX)</source> <translation type="unfinished"/> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified buynowcoin address</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Reset all verify message fields</source> <translation type="unfinished"/> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX)</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Enter buynowcoin signature</source> <translation type="unfinished"/> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation type="unfinished"/> </message> <message> <location line="-81"/> <location line="+8"/> <location line="+73"/> <location line="+8"/> <source>Please check the address and try again.</source> <translation type="unfinished"/> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation type="unfinished"/> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+19"/> <source>Open until %1</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-2"/> <source>Open for %n block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+8"/> <source>conflicted</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1/offline</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>Status</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Source</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Generated</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation type="unfinished"/> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>label</source> <translation type="unfinished"/> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation type="unfinished"/> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation type="unfinished"/> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Net amount</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Message</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Comment</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Generated coins must mature 510 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Debug information</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Transaction</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Inputs</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>true</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>false</source> <translation type="unfinished"/> </message> <message> <location line="-211"/> <source>, has not been successfully broadcast yet</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>unknown</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+226"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Type</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Address</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Amount</source> <translation type="unfinished"/> </message> <message> <location line="+60"/> <source>Open until %1</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Confirmed (%1 confirmations)</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-15"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+6"/> <source>Offline</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Unconfirmed</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Confirming (%1 of %2 recommended confirmations)</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Conflicted</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Immature (%1 confirmations, will be available after %2)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>This block was not received by any other nodes and will probably not be accepted!</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation type="unfinished"/> </message> <message> <location line="+42"/> <source>Received with</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Received from</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Sent to</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Mined</source> <translation type="unfinished"/> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation type="unfinished"/> </message> <message> <location line="+190"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+55"/> <location line="+16"/> <source>All</source> <translation>Sve</translation> </message> <message> <location line="-15"/> <source>Today</source> <translation>Danas</translation> </message> <message> <location line="+1"/> <source>This week</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This month</source> <translation>Ovaj mjesec</translation> </message> <message> <location line="+1"/> <source>Last month</source> <translation>Prošli mjesec</translation> </message> <message> <location line="+1"/> <source>This year</source> <translation>Ove godine</translation> </message> <message> <location line="+1"/> <source>Range...</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Received with</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Sent to</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>To yourself</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Mined</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Other</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Min amount</source> <translation type="unfinished"/> </message> <message> <location line="+34"/> <source>Copy address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Edit label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation type="unfinished"/> </message> <message> <location line="+144"/> <source>Export Transaction Data</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Type</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>ID</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation type="unfinished"/> </message> <message> <location line="+100"/> <source>Range:</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>to</source> <translation type="unfinished"/> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+206"/> <source>Sending...</source> <translation type="unfinished"/> </message> </context> <context> <name>bitcoin-core</name> <message> <location filename="../bitcoinstrings.cpp" line="+33"/> <source>buynowcoin version</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Usage:</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Send command to -server or buynowcoind</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>List commands</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Get help for a command</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Options:</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify configuration file (default: buynowcoin.conf)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Specify pid file (default: buynowcoind.pid)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify wallet file (within data directory)</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Set database cache size in megabytes (default: 25)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set database disk log size in megabytes (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Listen for connections on &lt;port&gt; (default: 15714 or testnet: 25714)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Specify your own public address</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Bind to given address. Use [host]:port notation for IPv6</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Stake your coins to support network and gain reward (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+51"/> <source>Detach block and address databases. Increases shutdown time (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+109"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> <message> <location line="-5"/> <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds </source> <translation type="unfinished"/> </message> <message> <location line="-87"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 15715 or testnet: 25715)</source> <translation type="unfinished"/> </message> <message> <location line="-11"/> <source>Accept command line and JSON-RPC commands</source> <translation type="unfinished"/> </message> <message> <location line="+101"/> <source>Error: Transaction creation failed </source> <translation type="unfinished"/> </message> <message> <location line="-5"/> <source>Error: Wallet locked, unable to create transaction </source> <translation type="unfinished"/> </message> <message> <location line="-8"/> <source>Importing blockchain data file.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Importing bootstrap blockchain data file.</source> <translation type="unfinished"/> </message> <message> <location line="-88"/> <source>Run in the background as a daemon and accept commands</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Use the test network</source> <translation type="unfinished"/> </message> <message> <location line="-24"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation type="unfinished"/> </message> <message> <location line="-38"/> <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+117"/> <source>Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat.</source> <translation type="unfinished"/> </message> <message> <location line="-20"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+61"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong buynowcoin will not work properly.</source> <translation type="unfinished"/> </message> <message> <location line="-31"/> <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> <translation type="unfinished"/> </message> <message> <location line="-18"/> <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source> <translation type="unfinished"/> </message> <message> <location line="-30"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Block creation options:</source> <translation type="unfinished"/> </message> <message> <location line="-62"/> <source>Connect only to the specified node(s)</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation type="unfinished"/> </message> <message> <location line="+94"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation type="unfinished"/> </message> <message> <location line="-90"/> <source>Find peers using DNS lookup (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Sync checkpoints policy (default: strict)</source> <translation type="unfinished"/> </message> <message> <location line="+83"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Invalid amount for -reservebalance=&lt;amount&gt;</source> <translation type="unfinished"/> </message> <message> <location line="-82"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation 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="-16"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>Output extra debugging information. Implies all other -debug* options</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Output extra network debugging information</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Prepend debug output with timestamp</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source> <translation type="unfinished"/> </message> <message> <location line="-74"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation type="unfinished"/> </message> <message> <location line="+41"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>Set maximum block size in bytes (default: 250000)</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Set minimum block size in bytes (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="-29"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation type="unfinished"/> </message> <message> <location line="-42"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation type="unfinished"/> </message> <message> <location line="+109"/> <source>Unable to sign checkpoint, wrong checkpointkey? </source> <translation type="unfinished"/> </message> <message> <location line="-80"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation type="unfinished"/> </message> <message> <location line="-25"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation type="unfinished"/> </message> <message> <location line="+42"/> <source>Username for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="+47"/> <source>Verifying database integrity...</source> <translation type="unfinished"/> </message> <message> <location line="+57"/> <source>WARNING: syncronized checkpoint violation detected, but skipped!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Warning: Disk space is low!</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation type="unfinished"/> </message> <message> <location line="-48"/> <source>wallet.dat corrupt, salvage failed</source> <translation type="unfinished"/> </message> <message> <location line="-54"/> <source>Password for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="-84"/> <source>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: rpcuser=buynowcoinrpc 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;buynowcoin Alert&quot; admin@foo.com </source> <translation type="unfinished"/> </message> <message> <location line="+51"/> <source>Find peers using internet relay chat (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>When creating transactions, ignore inputs with value less than this (default: 0.01)</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Require a confirmations for change (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Enforce transaction scripts to use canonical PUSH operators (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Upgrade wallet to latest format</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Rescan the block chain for missing wallet transactions</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 2500, 0 = all)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>How thorough the block verification is (0-6, default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Imports blocks from external blk000?.dat file</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Server certificate file (default: server.cert)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation type="unfinished"/> </message> <message> <location line="+53"/> <source>Error: Wallet unlocked for staking only, unable to create transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers.</source> <translation type="unfinished"/> </message> <message> <location line="-158"/> <source>This help message</source> <translation type="unfinished"/> </message> <message> <location line="+95"/> <source>Wallet %s resides outside data directory %s.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Cannot obtain a lock on data directory %s. buynowcoin is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="-98"/> <source>buynowcoin</source> <translation type="unfinished"/> </message> <message> <location line="+140"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation type="unfinished"/> </message> <message> <location line="-130"/> <source>Connect through socks proxy</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation type="unfinished"/> </message> <message> <location line="+122"/> <source>Loading addresses...</source> <translation type="unfinished"/> </message> <message> <location line="-15"/> <source>Error loading blkindex.dat</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error loading wallet.dat: Wallet requires newer version of buynowcoin</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Wallet needed to be rewritten: restart buynowcoin to complete</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="-16"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="-24"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+44"/> <source>Error: could not start node</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Sending...</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Invalid amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Insufficient funds</source> <translation type="unfinished"/> </message> <message> <location line="-34"/> <source>Loading block index...</source> <translation type="unfinished"/> </message> <message> <location line="-103"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation type="unfinished"/> </message> <message> <location line="+122"/> <source>Unable to bind to %s on this computer. buynowcoin is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="-97"/> <source>Fee per KB to add to transactions you send</source> <translation type="unfinished"/> </message> <message> <location line="+55"/> <source>Invalid amount for -mininput=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Loading wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Cannot downgrade wallet</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Cannot initialize keypool</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Cannot write default address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Rescanning...</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Done loading</source> <translation type="unfinished"/> </message> <message> <location line="-167"/> <source>To use the %s option</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Error</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>You must set rpcpassword=&lt;password&gt; in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions.</source> <translation type="unfinished"/> </message> </context> </TS>
Java
require File.dirname(__FILE__) + '/init' class NamedRouteCollectionTest < Test::Unit::TestCase def setup @controller = TestController.new @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new @request.host = 'example.com' ActionController::UrlWriter.default_url_options[:host] = nil ActionController::Base.relative_url_root = nil end def test_should_alias_method_chain_url_helpers [ActionController::Base, ActionView::Base].each do |klass| assert klass.method_defined?(:normal_action_url_with_proxy) assert klass.method_defined?(:normal_action_url_without_proxy) end end def test_should_not_alias_method_chain_path_helpers [ActionController::Base, ActionView::Base].each do |klass| assert !klass.method_defined?(:normal_action_path_with_proxy) assert !klass.method_defined?(:normal_action_path_without_proxy) end end end
Java
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon")); var _jsxRuntime = require("react/jsx-runtime"); var _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M21 17h-1v-6c0-1.1-.9-2-2-2H7v-.74c0-.46-.56-.7-.89-.37L4.37 9.63c-.2.2-.2.53 0 .74l1.74 1.74c.33.33.89.1.89-.37V11h4v3H5c-.55 0-1 .45-1 1v2c0 1.1.9 2 2 2h2c0 1.66 1.34 3 3 3s3-1.34 3-3h7c.55 0 1-.45 1-1s-.45-1-1-1zm-10 3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm7-6h-4v-3h3c.55 0 1 .45 1 1v2zm-8-8h7v.74c0 .46.56.7.89.37l1.74-1.74c.2-.2.2-.53 0-.74l-1.74-1.74c-.33-.33-.89-.1-.89.37V4h-7c-.55 0-1 .45-1 1s.45 1 1 1z" }), 'RvHookupRounded'); exports.default = _default;
Java
import { set } from 'ember-metal'; import { jQuery } from 'ember-views'; import { moduleFor, RenderingTest } from '../../utils/test-case'; import { Component, compile } from '../../utils/helpers'; import { strip } from '../../utils/abstract-test-case'; class AbstractAppendTest extends RenderingTest { constructor() { super(); this.components = []; this.ids = []; } teardown() { this.component = null; this.components.forEach(component => { this.runTask(() => component.destroy()); }); this.ids.forEach(id => { let $element = jQuery(id).remove(); this.assert.strictEqual($element.length, 0, `Should not leak element: #${id}`); }); super(); } /* abstract append(component): Element; */ didAppend(component) { this.components.push(component); this.ids.push(component.elementId); } ['@test lifecycle hooks during component append'](assert) { let hooks = []; let oldRegisterComponent = this.registerComponent; let componentsByName = {}; // TODO: refactor/combine with other life-cycle tests this.registerComponent = function(name, _options) { function pushHook(hookName) { hooks.push([name, hookName]); } let options = { ComponentClass: _options.ComponentClass.extend({ init() { expectDeprecation(() => { this._super(...arguments); }, /didInitAttrs called/); if (name in componentsByName) { throw new TypeError('Component named: ` ' + name + ' ` already registered'); } componentsByName[name] = this; pushHook('init'); this.on('init', () => pushHook('on(init)')); }, didInitAttrs(options) { pushHook('didInitAttrs', options); }, didReceiveAttrs() { pushHook('didReceiveAttrs'); }, willInsertElement() { pushHook('willInsertElement'); }, willRender() { pushHook('willRender'); }, didInsertElement() { pushHook('didInsertElement'); }, didRender() { pushHook('didRender'); }, didUpdateAttrs() { pushHook('didUpdateAttrs'); }, willUpdate() { pushHook('willUpdate'); }, didUpdate() { pushHook('didUpdate'); }, willDestroyElement() { pushHook('willDestroyElement'); }, willClearRender() { pushHook('willClearRender'); }, didDestroyElement() { pushHook('didDestroyElement'); }, willDestroy() { pushHook('willDestroy'); this._super(...arguments); } }), template: _options.template }; oldRegisterComponent.call(this, name, options); }; this.registerComponent('x-parent', { ComponentClass: Component.extend({ layoutName: 'components/x-parent' }), template: '[parent: {{foo}}]{{#x-child bar=foo}}[yielded: {{foo}}]{{/x-child}}' }); this.registerComponent('x-child', { ComponentClass: Component.extend({ tagName: '' }), template: '[child: {{bar}}]{{yield}}' }); let XParent = this.owner._lookupFactory('component:x-parent'); this.component = XParent.create({ foo: 'zomg' }); assert.deepEqual(hooks, [ ['x-parent', 'init'], ['x-parent', 'didInitAttrs'], ['x-parent', 'didReceiveAttrs'], ['x-parent', 'on(init)'] ], 'creation of x-parent'); hooks.length = 0; this.element = this.append(this.component); assert.deepEqual(hooks, [ ['x-parent', 'willInsertElement'], ['x-child', 'init'], ['x-child', 'didInitAttrs'], ['x-child', 'didReceiveAttrs'], ['x-child', 'on(init)'], ['x-child', 'willRender'], ['x-child', 'willInsertElement'], ['x-child', 'didInsertElement'], ['x-child', 'didRender'], ['x-parent', 'didInsertElement'], ['x-parent', 'didRender'] ], 'appending of x-parent'); hooks.length = 0; this.runTask(() => componentsByName['x-parent'].rerender()); assert.deepEqual(hooks, [ ['x-parent', 'willUpdate'], ['x-parent', 'willRender'], ['x-parent', 'didUpdate'], ['x-parent', 'didRender'] ], 'rerender x-parent'); hooks.length = 0; this.runTask(() => componentsByName['x-child'].rerender()); assert.deepEqual(hooks, [ ['x-parent', 'willUpdate'], ['x-parent', 'willRender'], ['x-child', 'willUpdate'], ['x-child', 'willRender'], ['x-child', 'didUpdate'], ['x-child', 'didRender'], ['x-parent', 'didUpdate'], ['x-parent', 'didRender'] ], 'rerender x-child'); hooks.length = 0; this.runTask(() => set(this.component, 'foo', 'wow')); assert.deepEqual(hooks, [ ['x-parent', 'willUpdate'], ['x-parent', 'willRender'], ['x-child', 'didUpdateAttrs'], ['x-child', 'didReceiveAttrs'], ['x-child', 'willUpdate'], ['x-child', 'willRender'], ['x-child', 'didUpdate'], ['x-child', 'didRender'], ['x-parent', 'didUpdate'], ['x-parent', 'didRender'] ], 'set foo = wow'); hooks.length = 0; this.runTask(() => set(this.component, 'foo', 'zomg')); assert.deepEqual(hooks, [ ['x-parent', 'willUpdate'], ['x-parent', 'willRender'], ['x-child', 'didUpdateAttrs'], ['x-child', 'didReceiveAttrs'], ['x-child', 'willUpdate'], ['x-child', 'willRender'], ['x-child', 'didUpdate'], ['x-child', 'didRender'], ['x-parent', 'didUpdate'], ['x-parent', 'didRender'] ], 'set foo = zomg'); hooks.length = 0; this.runTask(() => this.component.destroy()); assert.deepEqual(hooks, [ ['x-parent', 'willDestroyElement'], ['x-parent', 'willClearRender'], ['x-child', 'willDestroyElement'], ['x-child', 'willClearRender'], ['x-child', 'didDestroyElement'], ['x-parent', 'didDestroyElement'], ['x-parent', 'willDestroy'], ['x-child', 'willDestroy'] ], 'destroy'); } ['@test appending, updating and destroying a single component'](assert) { let willDestroyCalled = 0; this.registerComponent('x-parent', { ComponentClass: Component.extend({ layoutName: 'components/x-parent', willDestroyElement() { willDestroyCalled++; } }), template: '[parent: {{foo}}]{{#x-child bar=foo}}[yielded: {{foo}}]{{/x-child}}' }); this.registerComponent('x-child', { ComponentClass: Component.extend({ tagName: '' }), template: '[child: {{bar}}]{{yield}}' }); let XParent = this.owner._lookupFactory('component:x-parent'); this.component = XParent.create({ foo: 'zomg' }); assert.ok(!this.component.element, 'precond - should not have an element'); this.element = this.append(this.component); let componentElement = this.component.element; this.assertComponentElement(componentElement, { content: '[parent: zomg][child: zomg][yielded: zomg]' }); assert.equal(componentElement.parentElement, this.element, 'It should be attached to the target'); this.runTask(() => this.rerender()); this.assertComponentElement(componentElement, { content: '[parent: zomg][child: zomg][yielded: zomg]' }); assert.equal(componentElement.parentElement, this.element, 'It should be attached to the target'); this.runTask(() => set(this.component, 'foo', 'wow')); this.assertComponentElement(componentElement, { content: '[parent: wow][child: wow][yielded: wow]' }); assert.equal(componentElement.parentElement, this.element, 'It should be attached to the target'); this.runTask(() => set(this.component, 'foo', 'zomg')); this.assertComponentElement(componentElement, { content: '[parent: zomg][child: zomg][yielded: zomg]' }); assert.equal(componentElement.parentElement, this.element, 'It should be attached to the target'); this.runTask(() => this.component.destroy()); if (this.isHTMLBars) { // Bug in Glimmer – component should not have .element at this point assert.ok(!this.component.element, 'It should not have an element'); } assert.ok(!componentElement.parentElement, 'The component element should be detached'); this.assert.equal(willDestroyCalled, 1); } ['@test appending, updating and destroying multiple components'](assert) { let willDestroyCalled = 0; this.registerComponent('x-first', { ComponentClass: Component.extend({ layoutName: 'components/x-first', willDestroyElement() { willDestroyCalled++; } }), template: 'x-first {{foo}}!' }); this.registerComponent('x-second', { ComponentClass: Component.extend({ layoutName: 'components/x-second', willDestroyElement() { willDestroyCalled++; } }), template: 'x-second {{bar}}!' }); let First = this.owner._lookupFactory('component:x-first'); let Second = this.owner._lookupFactory('component:x-second'); let first = First.create({ foo: 'foo' }); let second = Second.create({ bar: 'bar' }); this.assert.ok(!first.element, 'precond - should not have an element'); this.assert.ok(!second.element, 'precond - should not have an element'); let wrapper1, wrapper2; this.runTask(() => wrapper1 = this.append(first)); this.runTask(() => wrapper2 = this.append(second)); let componentElement1 = first.element; let componentElement2 = second.element; this.assertComponentElement(componentElement1, { content: 'x-first foo!' }); this.assertComponentElement(componentElement2, { content: 'x-second bar!' }); assert.equal(componentElement1.parentElement, wrapper1, 'The first component should be attached to the target'); assert.equal(componentElement2.parentElement, wrapper2, 'The second component should be attached to the target'); this.runTask(() => set(first, 'foo', 'FOO')); this.assertComponentElement(componentElement1, { content: 'x-first FOO!' }); this.assertComponentElement(componentElement2, { content: 'x-second bar!' }); assert.equal(componentElement1.parentElement, wrapper1, 'The first component should be attached to the target'); assert.equal(componentElement2.parentElement, wrapper2, 'The second component should be attached to the target'); this.runTask(() => set(second, 'bar', 'BAR')); this.assertComponentElement(componentElement1, { content: 'x-first FOO!' }); this.assertComponentElement(componentElement2, { content: 'x-second BAR!' }); assert.equal(componentElement1.parentElement, wrapper1, 'The first component should be attached to the target'); assert.equal(componentElement2.parentElement, wrapper2, 'The second component should be attached to the target'); this.runTask(() => { set(first, 'foo', 'foo'); set(second, 'bar', 'bar'); }); this.assertComponentElement(componentElement1, { content: 'x-first foo!' }); this.assertComponentElement(componentElement2, { content: 'x-second bar!' }); assert.equal(componentElement1.parentElement, wrapper1, 'The first component should be attached to the target'); assert.equal(componentElement2.parentElement, wrapper2, 'The second component should be attached to the target'); this.runTask(() => { first.destroy(); second.destroy(); }); if (this.isHTMLBars) { // Bug in Glimmer – component should not have .element at this point assert.ok(!first.element, 'The first component should not have an element'); assert.ok(!second.element, 'The second component should not have an element'); } assert.ok(!componentElement1.parentElement, 'The first component element should be detached'); assert.ok(!componentElement2.parentElement, 'The second component element should be detached'); this.assert.equal(willDestroyCalled, 2); } ['@test can appendTo while rendering'](assert) { let owner = this.owner; let append = (component) => { return this.append(component); }; let element1, element2; this.registerComponent('first-component', { ComponentClass: Component.extend({ layout: compile('component-one'), didInsertElement() { element1 = this.element; let SecondComponent = owner._lookupFactory('component:second-component'); append(SecondComponent.create()); } }) }); this.registerComponent('second-component', { ComponentClass: Component.extend({ layout: compile(`component-two`), didInsertElement() { element2 = this.element; } }) }); let FirstComponent = this.owner._lookupFactory('component:first-component'); this.runTask(() => append(FirstComponent.create())); this.assertComponentElement(element1, { content: 'component-one' }); this.assertComponentElement(element2, { content: 'component-two' }); } ['@test can appendTo and remove while rendering'](assert) { let owner = this.owner; let append = (component) => { return this.append(component); }; let element1, element2, element3, element4, component1, component2; this.registerComponent('foo-bar', { ComponentClass: Component.extend({ layout: compile('foo-bar'), init() { this._super(...arguments); component1 = this; }, didInsertElement() { element1 = this.element; let OtherRoot = owner._lookupFactory('component:other-root'); this._instance = OtherRoot.create({ didInsertElement() { element2 = this.element; } }); append(this._instance); }, willDestroy() { this._instance.destroy(); } }) }); this.registerComponent('baz-qux', { ComponentClass: Component.extend({ layout: compile('baz-qux'), init() { this._super(...arguments); component2 = this; }, didInsertElement() { element3 = this.element; let OtherRoot = owner._lookupFactory('component:other-root'); this._instance = OtherRoot.create({ didInsertElement() { element4 = this.element; } }); append(this._instance); }, willDestroy() { this._instance.destroy(); } }) }); let instantiatedRoots = 0; let destroyedRoots = 0; this.registerComponent('other-root', { ComponentClass: Component.extend({ layout: compile(`fake-thing: {{counter}}`), init() { this._super(...arguments); this.counter = instantiatedRoots++; }, willDestroy() { destroyedRoots++; this._super(...arguments); } }) }); this.render(strip` {{#if showFooBar}} {{foo-bar}} {{else}} {{baz-qux}} {{/if}} `, { showFooBar: true }); this.assertComponentElement(element1, { }); this.assertComponentElement(element2, { content: 'fake-thing: 0' }); assert.equal(instantiatedRoots, 1); this.assertStableRerender(); this.runTask(() => set(this.context, 'showFooBar', false)); assert.equal(instantiatedRoots, 2); assert.equal(destroyedRoots, 1); this.assertComponentElement(element3, { }); this.assertComponentElement(element4, { content: 'fake-thing: 1' }); this.runTask(() => { component1.destroy(); component2.destroy(); }); assert.equal(instantiatedRoots, 2); assert.equal(destroyedRoots, 2); } } moduleFor('append: no arguments (attaching to document.body)', class extends AbstractAppendTest { append(component) { this.runTask(() => component.append()); this.didAppend(component); return document.body; } }); moduleFor('appendTo: a selector', class extends AbstractAppendTest { append(component) { this.runTask(() => component.appendTo('#qunit-fixture')); this.didAppend(component); return jQuery('#qunit-fixture')[0]; } ['@test raises an assertion when the target does not exist in the DOM'](assert) { this.registerComponent('foo-bar', { ComponentClass: Component.extend({ layoutName: 'components/foo-bar' }), template: 'FOO BAR!' }); let FooBar = this.owner._lookupFactory('component:foo-bar'); this.component = FooBar.create(); assert.ok(!this.component.element, 'precond - should not have an element'); this.runTask(() => { expectAssertion(() => { this.component.appendTo('#does-not-exist-in-dom'); }, /You tried to append to \(#does-not-exist-in-dom\) but that isn't in the DOM/); }); assert.ok(!this.component.element, 'component should not have an element'); } }); moduleFor('appendTo: an element', class extends AbstractAppendTest { append(component) { let element = jQuery('#qunit-fixture')[0]; this.runTask(() => component.appendTo(element)); this.didAppend(component); return element; } }); moduleFor('appendTo: with multiple components', class extends AbstractAppendTest { append(component) { this.runTask(() => component.appendTo('#qunit-fixture')); this.didAppend(component); return jQuery('#qunit-fixture')[0]; } }); moduleFor('renderToElement: no arguments (defaults to a body context)', class extends AbstractAppendTest { append(component) { expectDeprecation(/Using the `renderToElement` is deprecated in favor of `appendTo`. Called in/); let wrapper; this.runTask(() => wrapper = component.renderToElement()); this.didAppend(component); this.assert.equal(wrapper.tagName, 'BODY', 'wrapper is a body element'); this.assert.notEqual(wrapper, document.body, 'wrapper is not document.body'); this.assert.ok(!wrapper.parentNode, 'wrapper is detached'); return wrapper; } }); moduleFor('renderToElement: a div', class extends AbstractAppendTest { append(component) { expectDeprecation(/Using the `renderToElement` is deprecated in favor of `appendTo`. Called in/); let wrapper; this.runTask(() => wrapper = component.renderToElement('div')); this.didAppend(component); this.assert.equal(wrapper.tagName, 'DIV', 'wrapper is a body element'); this.assert.ok(!wrapper.parentNode, 'wrapper is detached'); return wrapper; } });
Java
<html lang="en"> <head> <title>ARM Options - Using as</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="Using as"> <meta name="generator" content="makeinfo 4.11"> <link title="Top" rel="start" href="index.html#Top"> <link rel="up" href="ARM_002dDependent.html#ARM_002dDependent" title="ARM-Dependent"> <link rel="next" href="ARM-Syntax.html#ARM-Syntax" title="ARM Syntax"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <!-- This file documents the GNU Assembler "as". Copyright (C) 1991-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. --> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <div class="node"> <p> <a name="ARM-Options"></a> Next:&nbsp;<a rel="next" accesskey="n" href="ARM-Syntax.html#ARM-Syntax">ARM Syntax</a>, Up:&nbsp;<a rel="up" accesskey="u" href="ARM_002dDependent.html#ARM_002dDependent">ARM-Dependent</a> <hr> </div> <h4 class="subsection">9.4.1 Options</h4> <p><a name="index-ARM-options-_0028none_0029-614"></a><a name="index-options-for-ARM-_0028none_0029-615"></a> <a name="index-g_t_0040code_007b_002dmcpu_003d_007d-command-line-option_002c-ARM-616"></a> <dl><dt><code>-mcpu=</code><var>processor</var><code>[+</code><var>extension</var><code>...]</code><dd>This option specifies the target processor. The assembler will issue an error message if an attempt is made to assemble an instruction which will not execute on the target processor. The following processor names are recognized: <code>arm1</code>, <code>arm2</code>, <code>arm250</code>, <code>arm3</code>, <code>arm6</code>, <code>arm60</code>, <code>arm600</code>, <code>arm610</code>, <code>arm620</code>, <code>arm7</code>, <code>arm7m</code>, <code>arm7d</code>, <code>arm7dm</code>, <code>arm7di</code>, <code>arm7dmi</code>, <code>arm70</code>, <code>arm700</code>, <code>arm700i</code>, <code>arm710</code>, <code>arm710t</code>, <code>arm720</code>, <code>arm720t</code>, <code>arm740t</code>, <code>arm710c</code>, <code>arm7100</code>, <code>arm7500</code>, <code>arm7500fe</code>, <code>arm7t</code>, <code>arm7tdmi</code>, <code>arm7tdmi-s</code>, <code>arm8</code>, <code>arm810</code>, <code>strongarm</code>, <code>strongarm1</code>, <code>strongarm110</code>, <code>strongarm1100</code>, <code>strongarm1110</code>, <code>arm9</code>, <code>arm920</code>, <code>arm920t</code>, <code>arm922t</code>, <code>arm940t</code>, <code>arm9tdmi</code>, <code>fa526</code> (Faraday FA526 processor), <code>fa626</code> (Faraday FA626 processor), <code>arm9e</code>, <code>arm926e</code>, <code>arm926ej-s</code>, <code>arm946e-r0</code>, <code>arm946e</code>, <code>arm946e-s</code>, <code>arm966e-r0</code>, <code>arm966e</code>, <code>arm966e-s</code>, <code>arm968e-s</code>, <code>arm10t</code>, <code>arm10tdmi</code>, <code>arm10e</code>, <code>arm1020</code>, <code>arm1020t</code>, <code>arm1020e</code>, <code>arm1022e</code>, <code>arm1026ej-s</code>, <code>fa606te</code> (Faraday FA606TE processor), <code>fa616te</code> (Faraday FA616TE processor), <code>fa626te</code> (Faraday FA626TE processor), <code>fmp626</code> (Faraday FMP626 processor), <code>fa726te</code> (Faraday FA726TE processor), <code>arm1136j-s</code>, <code>arm1136jf-s</code>, <code>arm1156t2-s</code>, <code>arm1156t2f-s</code>, <code>arm1176jz-s</code>, <code>arm1176jzf-s</code>, <code>mpcore</code>, <code>mpcorenovfp</code>, <code>cortex-a5</code>, <code>cortex-a7</code>, <code>cortex-a8</code>, <code>cortex-a9</code>, <code>cortex-a15</code>, <code>cortex-r4</code>, <code>cortex-r4f</code>, <code>cortex-r5</code>, <code>cortex-r7</code>, <code>cortex-m7</code>, <code>cortex-m4</code>, <code>cortex-m3</code>, <code>cortex-m1</code>, <code>cortex-m0</code>, <code>cortex-m0plus</code>, <code>ep9312</code> (ARM920 with Cirrus Maverick coprocessor), <code>i80200</code> (Intel XScale processor) <code>iwmmxt</code> (Intel(r) XScale processor with Wireless MMX(tm) technology coprocessor) and <code>xscale</code>. The special name <code>all</code> may be used to allow the assembler to accept instructions valid for any ARM processor. <p>In addition to the basic instruction set, the assembler can be told to accept various extension mnemonics that extend the processor using the co-processor instruction space. For example, <code>-mcpu=arm920+maverick</code> is equivalent to specifying <code>-mcpu=ep9312</code>. <p>Multiple extensions may be specified, separated by a <code>+</code>. The extensions should be specified in ascending alphabetical order. <p>Some extensions may be restricted to particular architectures; this is documented in the list of extensions below. <p>Extension mnemonics may also be removed from those the assembler accepts. This is done be prepending <code>no</code> to the option that adds the extension. Extensions that are removed should be listed after all extensions which have been added, again in ascending alphabetical order. For example, <code>-mcpu=ep9312+nomaverick</code> is equivalent to specifying <code>-mcpu=arm920</code>. <p>The following extensions are currently supported: <code>crypto</code> (Cryptography Extensions for v8-A architecture, implies <code>fp+simd</code>), <code>fp</code> (Floating Point Extensions for v8-A architecture), <code>idiv</code> (Integer Divide Extensions for v7-A and v7-R architectures), <code>iwmmxt</code>, <code>iwmmxt2</code>, <code>maverick</code>, <code>mp</code> (Multiprocessing Extensions for v7-A and v7-R architectures), <code>os</code> (Operating System for v6M architecture), <code>sec</code> (Security Extensions for v6K and v7-A architectures), <code>simd</code> (Advanced SIMD Extensions for v8-A architecture, implies <code>fp</code>), <code>virt</code> (Virtualization Extensions for v7-A architecture, implies <code>idiv</code>), and <code>xscale</code>. <p><a name="index-g_t_0040code_007b_002dmarch_003d_007d-command-line-option_002c-ARM-617"></a><br><dt><code>-march=</code><var>architecture</var><code>[+</code><var>extension</var><code>...]</code><dd>This option specifies the target architecture. The assembler will issue an error message if an attempt is made to assemble an instruction which will not execute on the target architecture. The following architecture names are recognized: <code>armv1</code>, <code>armv2</code>, <code>armv2a</code>, <code>armv2s</code>, <code>armv3</code>, <code>armv3m</code>, <code>armv4</code>, <code>armv4xm</code>, <code>armv4t</code>, <code>armv4txm</code>, <code>armv5</code>, <code>armv5t</code>, <code>armv5txm</code>, <code>armv5te</code>, <code>armv5texp</code>, <code>armv6</code>, <code>armv6j</code>, <code>armv6k</code>, <code>armv6z</code>, <code>armv6zk</code>, <code>armv6-m</code>, <code>armv6s-m</code>, <code>armv7</code>, <code>armv7-a</code>, <code>armv7ve</code>, <code>armv7-r</code>, <code>armv7-m</code>, <code>armv7e-m</code>, <code>armv8-a</code>, <code>iwmmxt</code> and <code>xscale</code>. If both <code>-mcpu</code> and <code>-march</code> are specified, the assembler will use the setting for <code>-mcpu</code>. <p>The architecture option can be extended with the same instruction set extension options as the <code>-mcpu</code> option. <p><a name="index-g_t_0040code_007b_002dmfpu_003d_007d-command-line-option_002c-ARM-618"></a><br><dt><code>-mfpu=</code><var>floating-point-format</var><dd> This option specifies the floating point format to assemble for. The assembler will issue an error message if an attempt is made to assemble an instruction which will not execute on the target floating point unit. The following format options are recognized: <code>softfpa</code>, <code>fpe</code>, <code>fpe2</code>, <code>fpe3</code>, <code>fpa</code>, <code>fpa10</code>, <code>fpa11</code>, <code>arm7500fe</code>, <code>softvfp</code>, <code>softvfp+vfp</code>, <code>vfp</code>, <code>vfp10</code>, <code>vfp10-r0</code>, <code>vfp9</code>, <code>vfpxd</code>, <code>vfpv2</code>, <code>vfpv3</code>, <code>vfpv3-fp16</code>, <code>vfpv3-d16</code>, <code>vfpv3-d16-fp16</code>, <code>vfpv3xd</code>, <code>vfpv3xd-d16</code>, <code>vfpv4</code>, <code>vfpv4-d16</code>, <code>fpv4-sp-d16</code>, <code>fpv5-sp-d16</code>, <code>fpv5-d16</code>, <code>fp-armv8</code>, <code>arm1020t</code>, <code>arm1020e</code>, <code>arm1136jf-s</code>, <code>maverick</code>, <code>neon</code>, <code>neon-vfpv4</code>, <code>neon-fp-armv8</code>, and <code>crypto-neon-fp-armv8</code>. <p>In addition to determining which instructions are assembled, this option also affects the way in which the <code>.double</code> assembler directive behaves when assembling little-endian code. <p>The default is dependent on the processor selected. For Architecture 5 or later, the default is to assembler for VFP instructions; for earlier architectures the default is to assemble for FPA instructions. <p><a name="index-g_t_0040code_007b_002dmthumb_007d-command-line-option_002c-ARM-619"></a><br><dt><code>-mthumb</code><dd>This option specifies that the assembler should start assembling Thumb instructions; that is, it should behave as though the file starts with a <code>.code 16</code> directive. <p><a name="index-g_t_0040code_007b_002dmthumb_002dinterwork_007d-command-line-option_002c-ARM-620"></a><br><dt><code>-mthumb-interwork</code><dd>This option specifies that the output generated by the assembler should be marked as supporting interworking. <p><a name="index-g_t_0040code_007b_002dmimplicit_002dit_007d-command-line-option_002c-ARM-621"></a><br><dt><code>-mimplicit-it=never</code><dt><code>-mimplicit-it=always</code><dt><code>-mimplicit-it=arm</code><dt><code>-mimplicit-it=thumb</code><dd>The <code>-mimplicit-it</code> option controls the behavior of the assembler when conditional instructions are not enclosed in IT blocks. There are four possible behaviors. If <code>never</code> is specified, such constructs cause a warning in ARM code and an error in Thumb-2 code. If <code>always</code> is specified, such constructs are accepted in both ARM and Thumb-2 code, where the IT instruction is added implicitly. If <code>arm</code> is specified, such constructs are accepted in ARM code and cause an error in Thumb-2 code. If <code>thumb</code> is specified, such constructs cause a warning in ARM code and are accepted in Thumb-2 code. If you omit this option, the behavior is equivalent to <code>-mimplicit-it=arm</code>. <p><a name="index-g_t_0040code_007b_002dmapcs_002d26_007d-command-line-option_002c-ARM-622"></a><a name="index-g_t_0040code_007b_002dmapcs_002d32_007d-command-line-option_002c-ARM-623"></a><br><dt><code>-mapcs-26</code><dt><code>-mapcs-32</code><dd>These options specify that the output generated by the assembler should be marked as supporting the indicated version of the Arm Procedure. Calling Standard. <p><a name="index-g_t_0040code_007b_002dmatpcs_007d-command-line-option_002c-ARM-624"></a><br><dt><code>-matpcs</code><dd>This option specifies that the output generated by the assembler should be marked as supporting the Arm/Thumb Procedure Calling Standard. If enabled this option will cause the assembler to create an empty debugging section in the object file called .arm.atpcs. Debuggers can use this to determine the ABI being used by. <p><a name="index-g_t_0040code_007b_002dmapcs_002dfloat_007d-command-line-option_002c-ARM-625"></a><br><dt><code>-mapcs-float</code><dd>This indicates the floating point variant of the APCS should be used. In this variant floating point arguments are passed in FP registers rather than integer registers. <p><a name="index-g_t_0040code_007b_002dmapcs_002dreentrant_007d-command-line-option_002c-ARM-626"></a><br><dt><code>-mapcs-reentrant</code><dd>This indicates that the reentrant variant of the APCS should be used. This variant supports position independent code. <p><a name="index-g_t_0040code_007b_002dmfloat_002dabi_003d_007d-command-line-option_002c-ARM-627"></a><br><dt><code>-mfloat-abi=</code><var>abi</var><dd>This option specifies that the output generated by the assembler should be marked as using specified floating point ABI. The following values are recognized: <code>soft</code>, <code>softfp</code> and <code>hard</code>. <p><a name="index-g_t_0040code_007b_002deabi_003d_007d-command-line-option_002c-ARM-628"></a><br><dt><code>-meabi=</code><var>ver</var><dd>This option specifies which EABI version the produced object files should conform to. The following values are recognized: <code>gnu</code>, <code>4</code> and <code>5</code>. <p><a name="index-g_t_0040code_007b_002dEB_007d-command-line-option_002c-ARM-629"></a><br><dt><code>-EB</code><dd>This option specifies that the output generated by the assembler should be marked as being encoded for a big-endian processor. <p><a name="index-g_t_0040code_007b_002dEL_007d-command-line-option_002c-ARM-630"></a><br><dt><code>-EL</code><dd>This option specifies that the output generated by the assembler should be marked as being encoded for a little-endian processor. <p><a name="index-g_t_0040code_007b_002dk_007d-command-line-option_002c-ARM-631"></a><a name="index-PIC-code-generation-for-ARM-632"></a><br><dt><code>-k</code><dd>This option specifies that the output of the assembler should be marked as position-independent code (PIC). <p><a name="index-g_t_0040code_007b_002d_002dfix_002dv4bx_007d-command-line-option_002c-ARM-633"></a><br><dt><code>--fix-v4bx</code><dd>Allow <code>BX</code> instructions in ARMv4 code. This is intended for use with the linker option of the same name. <p><a name="index-g_t_0040code_007b_002dmwarn_002ddeprecated_007d-command-line-option_002c-ARM-634"></a><br><dt><code>-mwarn-deprecated</code><dt><code>-mno-warn-deprecated</code><dd>Enable or disable warnings about using deprecated options or features. The default is to warn. </dl> </body></html>
Java
using System; using System.Collections.Generic; using System.Linq; using System.Text; using FlatRedBall.Content.Scene; using FlatRedBall; using FlatRedBall.IO; namespace EditorObjects.EditorSettings { public class AIEditorPropertiesSave { public const string Extension = "aiep"; public CameraSave BoundsCamera; public CameraSave Camera = new CameraSave(); public bool BoundsVisible = false; // For loading. public AIEditorPropertiesSave() { Camera.Z = 40; // do nothing } public void SetFromRuntime(Camera camera, Camera boundsCamera, bool boundsVisible) { Camera = CameraSave.FromCamera(camera); if (boundsCamera != null) { BoundsCamera = CameraSave.FromCamera(boundsCamera, true); } BoundsVisible = boundsVisible; // Gui.GuiData.listWindow } public static AIEditorPropertiesSave Load(string fileName) { AIEditorPropertiesSave toReturn = new AIEditorPropertiesSave(); FileManager.XmlDeserialize(fileName, out toReturn); return toReturn; } public void Save(string fileName) { FileManager.XmlSerialize(this, fileName); } } }
Java
pub fn compress(src: &str) -> String { if src.is_empty() { src.to_owned() } else { let mut compressed = String::new(); let mut chars = src.chars().peekable(); while let Some(c) = chars.peek().cloned() { let mut counter = 0; while let Some(n) = chars.peek().cloned() { if c == n { counter += 1; chars.next(); } else { break; } } compressed.push_str(counter.to_string().as_str()); compressed.push(c); } compressed } } #[cfg(test)] mod tests { use super::*; #[test] fn compress_empty_string() { assert_eq!(compress(""), ""); } #[test] fn compress_unique_chars_string() { assert_eq!(compress("abc"), "1a1b1c"); } #[test] fn compress_doubled_chars_string() { assert_eq!(compress("aabbcc"), "2a2b2c"); } }
Java
require 'spec_helper' try_spec do require './spec/fixtures/bookmark' describe DataMapper::TypesFixtures::Bookmark do supported_by :all do before :all do DataMapper::TypesFixtures::Bookmark.auto_migrate! end let(:resource) do DataMapper::TypesFixtures::Bookmark.create( :title => 'Check this out', :uri => uri, :shared => false, :tags => %w[ misc ] ) end before do resource.should be_saved end context 'without URI' do let(:uri) { nil } it 'can be found by uri' do DataMapper::TypesFixtures::Bookmark.first(:uri => uri).should eql(resource) end describe 'when reloaded' do before do resource.reload end it 'has no uri' do resource.uri.should be(nil) end end end describe 'with a blank URI' do let(:uri) { '' } it 'can be found by uri' do DataMapper::TypesFixtures::Bookmark.first(:uri => uri).should eql(resource) end describe 'when reloaded' do before do resource.reload end it 'is loaded as URI object' do resource.uri.should be_an_instance_of(Addressable::URI) end it 'has the same original URI' do resource.uri.to_s.should eql(uri) end end end describe 'with invalid URI' do let(:uri) { 'this is def. not URI' } it 'is perfectly valid (URI type does not provide auto validations)' do resource.save.should be(true) end end %w[ http://apple.com http://www.apple.com http://apple.com/ http://apple.com/iphone http://www.google.com/search?client=safari&rls=en-us&q=LED&ie=UTF-8&oe=UTF-8 http://books.google.com http://books.google.com/ http://db2.clouds.megacorp.net:8080 https://github.com https://github.com/ http://www.example.com:8088/never/ending/path/segments/ http://db2.clouds.megacorp.net:8080/resources/10 http://www.example.com:8088/never/ending/path/segments http://books.google.com/books?id=uSUJ3VhH4BsC&printsec=frontcover&dq=subject:%22+Linguistics+%22&as_brr=3&ei=DAHPSbGQE5rEzATk1sShAQ&rview=1 http://books.google.com:80/books?uid=14472359158468915761&rview=1 http://books.google.com/books?id=Ar3-TXCYXUkC&printsec=frontcover&rview=1 http://books.google.com/books/vp6ae081e454d30f89b6bca94e0f96fc14.js http://www.google.com/images/cleardot.gif http://books.google.com:80/books?id=Ar3-TXCYXUkC&printsec=frontcover&rview=1#PPA5,M1 http://www.hulu.com/watch/64923/terminator-the-sarah-connor-chronicles-to-the-lighthouse http://hulu.com:80/browse/popular/tv http://www.hulu.com/watch/62475/the-simpsons-gone-maggie-gone#s-p1-so-i0 ].each do |uri| describe "with URI set to '#{uri}'" do let(:uri) { uri } it 'can be found by uri' do DataMapper::TypesFixtures::Bookmark.first(:uri => uri).should_not be(nil) end describe 'when reloaded' do before do resource.reload end it 'matches a normalized form of the original URI' do resource.uri.should eql(Addressable::URI.parse(uri).normalize) end end end end end end end
Java
import readdirRecursive from "fs-readdir-recursive"; import * as babel from "@babel/core"; import path from "path"; import fs from "fs"; import * as watcher from "./watcher"; export function chmod(src: string, dest: string): void { try { fs.chmodSync(dest, fs.statSync(src).mode); } catch (err) { console.warn(`Cannot change permissions of ${dest}`); } } type ReaddirFilter = (filename: string) => boolean; export function readdir( dirname: string, includeDotfiles: boolean, filter?: ReaddirFilter, ): Array<string> { return readdirRecursive(dirname, (filename, _index, currentDirectory) => { const stat = fs.statSync(path.join(currentDirectory, filename)); if (stat.isDirectory()) return true; return ( (includeDotfiles || filename[0] !== ".") && (!filter || filter(filename)) ); }); } export function readdirForCompilable( dirname: string, includeDotfiles: boolean, altExts?: Array<string>, ): Array<string> { return readdir(dirname, includeDotfiles, function (filename) { return isCompilableExtension(filename, altExts); }); } /** * Test if a filename ends with a compilable extension. */ export function isCompilableExtension( filename: string, altExts?: readonly string[], ): boolean { const exts = altExts || babel.DEFAULT_EXTENSIONS; const ext = path.extname(filename); return exts.includes(ext); } export function addSourceMappingUrl(code: string, loc: string): string { return code + "\n//# sourceMappingURL=" + path.basename(loc); } const CALLER = { name: "@babel/cli", }; export function transformRepl( filename: string, code: string, opts: any, ): Promise<any> { opts = { ...opts, caller: CALLER, filename, }; return new Promise((resolve, reject) => { babel.transform(code, opts, (err, result) => { if (err) reject(err); else resolve(result); }); }); } export async function compile( filename: string, opts: any | Function, ): Promise<any> { opts = { ...opts, caller: CALLER, }; // TODO (Babel 8): Use `babel.transformFileAsync` const result: any = await new Promise((resolve, reject) => { babel.transformFile(filename, opts, (err, result) => { if (err) reject(err); else resolve(result); }); }); if (result) { if (!process.env.BABEL_8_BREAKING) { if (!result.externalDependencies) return result; } watcher.updateExternalDependencies(filename, result.externalDependencies); } return result; } export function deleteDir(path: string): void { if (fs.existsSync(path)) { fs.readdirSync(path).forEach(function (file) { const curPath = path + "/" + file; if (fs.lstatSync(curPath).isDirectory()) { // recurse deleteDir(curPath); } else { // delete file fs.unlinkSync(curPath); } }); fs.rmdirSync(path); } } process.on("uncaughtException", function (err) { console.error(err); process.exitCode = 1; }); export function withExtension(filename: string, ext: string = ".js") { const newBasename = path.basename(filename, path.extname(filename)) + ext; return path.join(path.dirname(filename), newBasename); } export function debounce(fn: () => void, time: number) { let timer; function debounced() { clearTimeout(timer); timer = setTimeout(fn, time); } debounced.flush = () => { clearTimeout(timer); fn(); }; return debounced; }
Java
namespace WebApiContrib.Formatting.Xlsx.Tests.TestData { public class BooleanTestItem { public bool Value1 { get; set; } [ExcelColumn(TrueValue="Yes", FalseValue="No")] public bool Value2 { get; set; } public bool? Value3 { get; set; } [ExcelColumn(TrueValue = "Yes", FalseValue = "No")] public bool? Value4 { get; set; } } }
Java
<?php /* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sylius\Bundle\ApiBundle\DependencyInjection; use Sylius\Bundle\ApiBundle\Form\Type\ClientType; use Sylius\Bundle\ApiBundle\Model\AccessToken; use Sylius\Bundle\ApiBundle\Model\AccessTokenInterface; use Sylius\Bundle\ApiBundle\Model\AuthCode; use Sylius\Bundle\ApiBundle\Model\AuthCodeInterface; use Sylius\Bundle\ApiBundle\Model\Client; use Sylius\Bundle\ApiBundle\Model\ClientInterface; use Sylius\Bundle\ApiBundle\Model\RefreshToken; use Sylius\Bundle\ApiBundle\Model\RefreshTokenInterface; use Sylius\Bundle\ApiBundle\Model\UserInterface; use Sylius\Bundle\ResourceBundle\Controller\ResourceController; use Sylius\Bundle\ResourceBundle\SyliusResourceBundle; use Sylius\Component\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; /** * This class contains the configuration information for the bundle. * * This information is solely responsible for how the different configuration * sections are normalized, and merged. * * @author Paweł Jędrzejewski <pjedrzejewski@diweb.pl> */ class Configuration implements ConfigurationInterface { /** * {@inheritdoc} */ public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder(); $rootNode = $treeBuilder->root('sylius_api'); $rootNode ->children() ->scalarNode('driver')->defaultValue(SyliusResourceBundle::DRIVER_DOCTRINE_ORM)->end() ->end() ; $this->addResourcesSection($rootNode); return $treeBuilder; } /** * @param ArrayNodeDefinition $node */ private function addResourcesSection(ArrayNodeDefinition $node) { $node ->children() ->arrayNode('resources') ->addDefaultsIfNotSet() ->children() ->arrayNode('api_user') ->addDefaultsIfNotSet() ->children() ->variableNode('options')->end() ->arrayNode('classes') ->addDefaultsIfNotSet() ->children() ->scalarNode('model')->isRequired()->cannotBeEmpty()->end() ->scalarNode('interface')->defaultValue(UserInterface::class)->cannotBeEmpty()->end() ->end() ->end() ->end() ->end() ->arrayNode('api_client') ->addDefaultsIfNotSet() ->children() ->variableNode('options')->end() ->arrayNode('classes') ->addDefaultsIfNotSet() ->children() ->scalarNode('model')->defaultValue(Client::class)->cannotBeEmpty()->end() ->scalarNode('interface')->defaultValue(ClientInterface::class)->cannotBeEmpty()->end() ->scalarNode('controller')->defaultValue(ResourceController::class)->cannotBeEmpty()->end() ->scalarNode('repository')->cannotBeEmpty()->end() ->scalarNode('factory')->defaultValue(Factory::class)->cannotBeEmpty()->end() ->arrayNode('form') ->addDefaultsIfNotSet() ->children() ->scalarNode('default')->defaultValue(ClientType::class)->cannotBeEmpty()->end() ->end() ->end() ->end() ->end() ->arrayNode('validation_groups') ->addDefaultsIfNotSet() ->children() ->arrayNode('default') ->prototype('scalar')->end() ->defaultValue(['sylius']) ->end() ->end() ->end() ->end() ->end() ->arrayNode('api_access_token') ->addDefaultsIfNotSet() ->children() ->variableNode('options')->end() ->arrayNode('classes') ->addDefaultsIfNotSet() ->children() ->scalarNode('model')->defaultValue(AccessToken::class)->cannotBeEmpty()->end() ->scalarNode('interface')->defaultValue(AccessTokenInterface::class)->cannotBeEmpty()->end() ->scalarNode('controller')->defaultValue(ResourceController::class)->cannotBeEmpty()->end() ->scalarNode('repository')->cannotBeEmpty()->end() ->scalarNode('factory')->defaultValue(Factory::class)->cannotBeEmpty()->end() ->end() ->end() ->arrayNode('validation_groups') ->addDefaultsIfNotSet() ->children() ->arrayNode('default') ->prototype('scalar')->end() ->defaultValue(['sylius']) ->end() ->end() ->end() ->end() ->end() ->arrayNode('api_refresh_token') ->addDefaultsIfNotSet() ->children() ->variableNode('options')->end() ->arrayNode('classes') ->addDefaultsIfNotSet() ->children() ->scalarNode('model')->defaultValue(RefreshToken::class)->cannotBeEmpty()->end() ->scalarNode('interface')->defaultValue(RefreshTokenInterface::class)->cannotBeEmpty()->end() ->scalarNode('controller')->defaultValue(ResourceController::class)->cannotBeEmpty()->end() ->scalarNode('repository')->cannotBeEmpty()->end() ->scalarNode('factory')->defaultValue(Factory::class)->cannotBeEmpty()->end() ->end() ->end() ->arrayNode('validation_groups') ->addDefaultsIfNotSet() ->children() ->arrayNode('default') ->prototype('scalar')->end() ->defaultValue(['sylius']) ->end() ->end() ->end() ->end() ->end() ->arrayNode('api_auth_code') ->addDefaultsIfNotSet() ->children() ->variableNode('options')->end() ->arrayNode('classes') ->addDefaultsIfNotSet() ->children() ->scalarNode('model')->defaultValue(AuthCode::class)->cannotBeEmpty()->end() ->scalarNode('interface')->defaultValue(AuthCodeInterface::class)->cannotBeEmpty()->end() ->scalarNode('controller')->defaultValue(ResourceController::class)->cannotBeEmpty()->end() ->scalarNode('repository')->cannotBeEmpty()->end() ->scalarNode('factory')->defaultValue(Factory::class)->cannotBeEmpty()->end() ->end() ->end() ->arrayNode('validation_groups') ->addDefaultsIfNotSet() ->children() ->arrayNode('default') ->prototype('scalar')->end() ->defaultValue(['sylius']) ->end() ->end() ->end() ->end() ->end() ->end() ->end() ->end() ; } }
Java
<!DOCTYPE html> <!--Aegis Framework | MIT License | http://www.aegisframework.com/ --> <html lang="en"> <head> <title>Bad Request</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> html, body { width: 100%; height: 100%; } body { text-align: center; color: rgb(84, 84, 84); margin: 0; display: flex; justify-content: center; align-items: center; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Open Sans", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; } h1, h2 { font-weight: lighter; } h1 { font-size: 4em; } h2 { font-size: 2em; } </style> </head> <body> <div> <h1>Request Timeout</h1> <h2>The server timed out waiting for the request.</h2> </div> </body> </html>
Java
using System.Collections.Generic; using System; using UnityEngine; public class EventService { public delegate void EventDelegate<T>(T e) where T : GameEvent; Dictionary<Type, Delegate> delegates = new Dictionary<Type, Delegate>(); public void AddListener<T>(EventDelegate<T> listener) where T : GameEvent { Type type = typeof(T); Delegate d; if (delegates.TryGetValue(type, out d)) { delegates[type] = Delegate.Combine(d, listener); } else { delegates[type] = listener; } } public void RemoveListener<T>(EventDelegate<T> listener) where T : GameEvent { Type type = typeof(T); Delegate d; if (delegates.TryGetValue(type, out d)) { Delegate currentDel = Delegate.Remove(d, listener); if (currentDel == null) { delegates.Remove(type); } else { delegates[type] = currentDel; } } } public void Dispatch<T>(T e) where T : GameEvent { if (e == null) { Debug.Log("Invalid event argument: " + e.GetType()); return; } Type type = e.GetType(); Delegate d; if (delegates.TryGetValue(type, out d)) { EventDelegate<T> callback = d as EventDelegate<T>; if (callback != null) { callback(e); } else { Debug.Log("Not removed callback: " + type); } } } } public class GameEvent { }
Java
(function () { var g = void 0, k = !0, m = null, o = !1, p, q = this, r = function (a) { var b = typeof a; if ("object" == b) if (a) { if (a instanceof Array) return "array"; if (a instanceof Object) return b; var c = Object.prototype.toString.call(a); if ("[object Window]" == c) return "object"; if ("[object Array]" == c || "number" == typeof a.length && "undefined" != typeof a.splice && "undefined" != typeof a.propertyIsEnumerable && !a.propertyIsEnumerable("splice")) return "array"; if ("[object Function]" == c || "undefined" != typeof a.call && "undefined" != typeof a.propertyIsEnumerable && !a.propertyIsEnumerable("call")) return "function" } else return "null"; else if ("function" == b && "undefined" == typeof a.call) return "object"; return b }, aa = function (a) { var b = r(a); return "array" == b || "object" == b && "number" == typeof a.length }, u = function (a) { return "string" == typeof a }, ba = function (a) { a = r(a); return "object" == a || "array" == a || "function" == a }, ca = function (a, b, c) { return a.call.apply(a.bind, arguments) }, da = function (a, b, c) { if (!a) throw Error(); if (2 < arguments.length) { var d = Array.prototype.slice.call(arguments, 2); return function () { var c = Array.prototype.slice.call(arguments); Array.prototype.unshift.apply(c, d); return a.apply(b, c) } } return function () { return a.apply(b, arguments) } }, v = function (a, b, c) { v = Function.prototype.bind && -1 != Function.prototype.bind.toString().indexOf("native code") ? ca : da; return v.apply(m, arguments) }, ea = function (a, b) { function c() {} c.prototype = b.prototype; a.Sa = b.prototype; a.prototype = new c }; Function.prototype.bind = Function.prototype.bind || function (a, b) { if (1 < arguments.length) { var c = Array.prototype.slice.call(arguments, 1); c.unshift(this, a); return v.apply(m, c) } return v(this, a) }; var w = function (a) { this.stack = Error().stack || ""; if (a) this.message = "" + a }; ea(w, Error); w.prototype.name = "CustomError"; var fa = function (a, b) { for (var c = 1; c < arguments.length; c++) var d = ("" + arguments[c]).replace(/\$/g, "$$$$"), a = a.replace(/\%s/, d); return a }, ma = function (a) { if (!ga.test(a)) return a; - 1 != a.indexOf("&") && (a = a.replace(ha, "&amp;")); - 1 != a.indexOf("<") && (a = a.replace(ia, "&lt;")); - 1 != a.indexOf(">") && (a = a.replace(ka, "&gt;")); - 1 != a.indexOf('"') && (a = a.replace(la, "&quot;")); return a }, ha = /&/g, ia = /</g, ka = />/g, la = /\"/g, ga = /[&<>\"]/; var x = function (a, b) { b.unshift(a); w.call(this, fa.apply(m, b)); b.shift(); this.Ra = a }; ea(x, w); x.prototype.name = "AssertionError"; var y = function (a, b, c) { if (!a) { var d = Array.prototype.slice.call(arguments, 2), f = "Assertion failed"; if (b) var f = f + (": " + b), e = d; throw new x("" + f, e || []); } }; var z = Array.prototype, na = z.indexOf ? function (a, b, c) { y(a.length != m); return z.indexOf.call(a, b, c) } : function (a, b, c) { c = c == m ? 0 : 0 > c ? Math.max(0, a.length + c) : c; if (u(a)) return !u(b) || 1 != b.length ? -1 : a.indexOf(b, c); for (; c < a.length; c++) if (c in a && a[c] === b) return c; return -1 }, oa = z.forEach ? function (a, b, c) { y(a.length != m); z.forEach.call(a, b, c) } : function (a, b, c) { for (var d = a.length, f = u(a) ? a.split("") : a, e = 0; e < d; e++) e in f && b.call(c, f[e], e, a) }, pa = function (a) { return z.concat.apply(z, arguments) }, qa = function (a) { if ("array" == r(a)) return pa(a); for (var b = [], c = 0, d = a.length; c < d; c++) b[c] = a[c]; return b }, ra = function (a, b, c) { y(a.length != m); return 2 >= arguments.length ? z.slice.call(a, b) : z.slice.call(a, b, c) }; var A = function (a, b) { this.x = a !== g ? a : 0; this.y = b !== g ? b : 0 }; A.prototype.toString = function () { return "(" + this.x + ", " + this.y + ")" }; var sa = function (a, b) { for (var c in a) b.call(g, a[c], c, a) }, ta = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","), ua = function (a, b) { for (var c, d, f = 1; f < arguments.length; f++) { d = arguments[f]; for (c in d) a[c] = d[c]; for (var e = 0; e < ta.length; e++) c = ta[e], Object.prototype.hasOwnProperty.call(d, c) && (a[c] = d[c]) } }; var B, va, C, wa, xa = function () { return q.navigator ? q.navigator.userAgent : m }; wa = C = va = B = o; var D; if (D = xa()) { var ya = q.navigator; B = 0 == D.indexOf("Opera"); va = !B && -1 != D.indexOf("MSIE"); C = !B && -1 != D.indexOf("WebKit"); wa = !B && !C && "Gecko" == ya.product } var za = B, E = va, F = wa, G = C, Aa; a: { var H = "", I; if (za && q.opera) var Ba = q.opera.version, H = "function" == typeof Ba ? Ba() : Ba; else if (F ? I = /rv\:([^\);]+)(\)|;)/ : E ? I = /MSIE\s+([^\);]+)(\)|;)/ : G && (I = /WebKit\/(\S+)/), I) var Ca = I.exec(xa()), H = Ca ? Ca[1] : ""; if (E) { var Da, Ea = q.document; Da = Ea ? Ea.documentMode : g; if (Da > parseFloat(H)) { Aa = "" + Da; break a } } Aa = H } var Fa = Aa, Ga = {}, Ha = function (a) { var b; if (!(b = Ga[a])) { b = 0; for (var c = ("" + Fa).replace(/^[\s\xa0]+|[\s\xa0]+$/g, "").split("."), d = ("" + a).replace(/^[\s\xa0]+|[\s\xa0]+$/g, "").split("."), f = Math.max(c.length, d.length), e = 0; 0 == b && e < f; e++) { var h = c[e] || "", n = d[e] || "", j = RegExp("(\\d*)(\\D*)", "g"), t = RegExp("(\\d*)(\\D*)", "g"); do { var i = j.exec(h) || ["", "", ""], l = t.exec(n) || ["", "", ""]; if (0 == i[0].length && 0 == l[0].length) break; b = ((0 == i[1].length ? 0 : parseInt(i[1], 10)) < (0 == l[1].length ? 0 : parseInt(l[1], 10)) ? -1 : (0 == i[1].length ? 0 : parseInt(i[1], 10)) > (0 == l[1].length ? 0 : parseInt(l[1], 10)) ? 1 : 0) || ((0 == i[2].length) < (0 == l[2].length) ? -1 : (0 == i[2].length) > (0 == l[2].length) ? 1 : 0) || (i[2] < l[2] ? -1 : i[2] > l[2] ? 1 : 0) } while (0 == b) } b = Ga[a] = 0 <= b } return b }, Ia = {}, J = function (a) { return Ia[a] || (Ia[a] = E && document.documentMode && document.documentMode >= a) }; var Ja, Ka = !E || J(9); !F && !E || E && J(9) || F && Ha("1.9.1"); E && Ha("9"); var La = function (a, b) { var c; c = (c = a.className) && "function" == typeof c.split ? c.split(/\s+/) : []; var d = ra(arguments, 1), f; f = c; for (var e = 0, h = 0; h < d.length; h++) 0 <= na(f, d[h]) || (f.push(d[h]), e++); f = e == d.length; a.className = c.join(" "); return f }; var Ma = function (a) { return a ? new K(L(a)) : Ja || (Ja = new K) }, Na = function (a, b) { var c = b && "*" != b ? b.toUpperCase() : ""; return a.querySelectorAll && a.querySelector && (!G || "CSS1Compat" == document.compatMode || Ha("528")) && c ? a.querySelectorAll(c + "") : a.getElementsByTagName(c || "*") }, Pa = function (a, b) { sa(b, function (b, d) { "style" == d ? a.style.cssText = b : "class" == d ? a.className = b : "for" == d ? a.htmlFor = b : d in Oa ? a.setAttribute(Oa[d], b) : 0 == d.lastIndexOf("aria-", 0) ? a.setAttribute(d, b) : a[d] = b }) }, Oa = { cellpadding: "cellPadding", cellspacing: "cellSpacing", colspan: "colSpan", rowspan: "rowSpan", valign: "vAlign", height: "height", width: "width", usemap: "useMap", frameborder: "frameBorder", maxlength: "maxLength", type: "type" }, Qa = function (a, b, c) { function d(c) { c && b.appendChild(u(c) ? a.createTextNode(c) : c) } for (var f = 2; f < c.length; f++) { var e = c[f]; if (aa(e) && !(ba(e) && 0 < e.nodeType)) { var h; a: { if (e && "number" == typeof e.length) { if (ba(e)) { h = "function" == typeof e.item || "string" == typeof e.item; break a } if ("function" == r(e)) { h = "function" == typeof e.item; break a } } h = o } oa(h ? qa(e) : e, d) } else d(e) } }, L = function (a) { return 9 == a.nodeType ? a : a.ownerDocument || a.document }, K = function (a) { this.C = a || q.document || document }; K.prototype.za = function (a, b, c) { var d = this.C, f = arguments, e = f[0], h = f[1]; if (!Ka && h && (h.name || h.type)) { e = ["<", e]; h.name && e.push(' name="', ma(h.name), '"'); if (h.type) { e.push(' type="', ma(h.type), '"'); var n = {}; ua(n, h); h = n; delete h.type } e.push(">"); e = e.join("") } e = d.createElement(e); if (h) u(h) ? e.className = h : "array" == r(h) ? La.apply(m, [e].concat(h)) : Pa(e, h); 2 < f.length && Qa(d, e, f); return e }; K.prototype.createElement = function (a) { return this.C.createElement(a) }; K.prototype.createTextNode = function (a) { return this.C.createTextNode(a) }; K.prototype.appendChild = function (a, b) { a.appendChild(b) }; var M = function (a) { var b; a: { b = L(a); if (b.defaultView && b.defaultView.getComputedStyle && (b = b.defaultView.getComputedStyle(a, m))) { b = b.position || b.getPropertyValue("position"); break a } b = "" } return b || (a.currentStyle ? a.currentStyle.position : m) || a.style && a.style.position }, Ra = function (a) { if (E && !J(8)) return a.offsetParent; for (var b = L(a), c = M(a), d = "fixed" == c || "absolute" == c, a = a.parentNode; a && a != b; a = a.parentNode) if (c = M(a), d = d && "static" == c && a != b.documentElement && a != b.body, !d && (a.scrollWidth > a.clientWidth || a.scrollHeight > a.clientHeight || "fixed" == c || "absolute" == c || "relative" == c)) return a; return m }, N = function (a) { var b, c = L(a), d = M(a), f = F && c.getBoxObjectFor && !a.getBoundingClientRect && "absolute" == d && (b = c.getBoxObjectFor(a)) && (0 > b.screenX || 0 > b.screenY), e = new A(0, 0), h; b = c ? 9 == c.nodeType ? c : L(c) : document; if (h = E) if (h = !J(9)) h = "CSS1Compat" != Ma(b).C.compatMode; h = h ? b.body : b.documentElement; if (a == h) return e; if (a.getBoundingClientRect) { b = a.getBoundingClientRect(); if (E) a = a.ownerDocument, b.left -= a.documentElement.clientLeft + a.body.clientLeft, b.top -= a.documentElement.clientTop + a.body.clientTop; a = Ma(c).C; c = !G && "CSS1Compat" == a.compatMode ? a.documentElement : a.body; a = a.parentWindow || a.defaultView; c = new A(a.pageXOffset || c.scrollLeft, a.pageYOffset || c.scrollTop); e.x = b.left + c.x; e.y = b.top + c.y } else if (c.getBoxObjectFor && !f) b = c.getBoxObjectFor(a), c = c.getBoxObjectFor(h), e.x = b.screenX - c.screenX, e.y = b.screenY - c.screenY; else { b = a; do { e.x += b.offsetLeft; e.y += b.offsetTop; b != a && (e.x += b.clientLeft || 0, e.y += b.clientTop || 0); if (G && "fixed" == M(b)) { e.x += c.body.scrollLeft; e.y += c.body.scrollTop; break } b = b.offsetParent } while (b && b != a); if (za || G && "absolute" == d) e.y -= c.body.offsetTop; for (b = a; (b = Ra(b)) && b != c.body && b != h;) if (e.x -= b.scrollLeft, !za || "TR" != b.tagName) e.y -= b.scrollTop } return e }, Ta = function () { var a = Ma(g), b = m; if (E) b = a.C.createStyleSheet(), Sa(b); else { var c = Na(a.C, "head")[0]; c || (b = Na(a.C, "body")[0], c = a.za("head"), b.parentNode.insertBefore(c, b)); b = a.za("style"); Sa(b); a.appendChild(c, b) } }, Sa = function (a) { E ? a.cssText = "canvas:active{cursor:pointer}" : a[G ? "innerText" : "innerHTML"] = "canvas:active{cursor:pointer}" }; var O = function (a, b) { var c = {}, d; for (d in b) c[d] = a.style[d], a.style[d] = b[d]; return c }, P = function (a, b) { this.M = a || m; this.fa = m; this.ya = b || function () {}; this.Q = 0; this.ta = 0.05 }, Ua = function (a, b) { a.ya = b }; P.prototype.s = function () { if (this.M && this.ta) { this.Q += this.ta; if (1 < this.Q) this.Q = 1, this.ta = 0, this.ya(); var a = "0 0 2px rgba(255,0,0," + this.Q + ")", a = O(this.M, { boxShadow: a, MozBoxShadow: a, webkitBoxShadow: a, oBoxShadow: a, msBoxShadow: a, opacity: this.Q }); if (!this.fa) this.fa = a } }; P.prototype.restore = function () { this.M && this.fa && O(this.M, this.fa) }; var Va = function () { this.H = [] }; Va.prototype.k = function (a, b, c) { if (a) { this.H.push(arguments); var d = a, f = b, e = c; d.addEventListener ? d.addEventListener(f, e, o) : d.attachEvent("on" + f, e) } }; var Wa = function (a, b, c) { a && (a.removeEventListener ? a.removeEventListener(b, c, o) : a.detachEvent("on" + b, c)) }; var Xa = Math.PI / 2, Q = function (a, b, c) { this.ca = a; this.P = document.createElement("div"); this.P.style.position = "absolute"; var a = Math.floor(3 * Math.random() + 0), d = "\u2744"; 1 < a ? d = "\u2745" : 2 < a && (d = "\u2746"); this.P.innerHTML = d; this.ca.appendChild(this.P); this.Y = c; this.X = b; this.reset() }; Q.prototype.reset = function () { this.x = Math.random() * this.X; this.ea = 4.5 * Math.random() + 1; this.y = -this.ea; this.B = 2 * Math.random() + -1; this.xa = this.ea; var a = Math.floor(255 * (0.4 * Math.random() + 0.5)).toString(16); O(this.P, { fontSize: 2.5 * this.ea + "px", left: this.x + "px", top: this.y + "px", color: "#" + a + a + a }) }; Q.prototype.move = function (a, b) { this.y += this.B * b + this.xa * a; this.B += 0.2 * Math.random() + -0.1; if (-1 > this.B) this.B = -1; else if (1 < this.B) this.B = 1; this.x += this.B * a + this.xa * b; this.y > this.Y + this.ea && this.reset() }; Q.prototype.s = function () { this.P.style.left = this.x + "px"; this.P.style.top = this.y + "px" }; var R = function (a) { this.ca = a; this.X = a.offsetWidth; this.Y = a.offsetHeight; this.da = []; this.ra = 1; this.sa = 0; this.Ma = !! navigator.userAgent.match(/(iPod|iPhone|iPad)/) }; R.prototype.s = function () { 200 > this.da.length && 0.5 > Math.random() && this.da.push(new Q(this.ca, this.X, this.Y)); for (var a = 0, b; b = this.da[a]; a++) b.move(this.ra, this.sa), b.s() }; R.prototype.Ca = function (a) { if (this.Ma) { var b = window.orientation & 2, c = b ? a.beta : a.gamma / 2, a = b ? 0 > a.gamma ? 1 : -1 : 0 > a.beta ? -1 : 1; if (c && 45 > Math.abs(c)) c = a * Xa * (c / 45), this.ra = Math.cos(c), this.sa = Math.sin(c) } else { if (!a.gamma && a.x) a.gamma = -(a.x * (180 / Math.PI)); if (a.gamma && 90 > Math.abs(a.gamma)) c = Xa * (a.gamma / 90), this.ra = Math.cos(c), this.sa = Math.sin(c) } }; R.prototype.N = function (a, b) { O(this.ca, { width: a + "px", height: b + "px" }); this.X = a; this.Y = b; for (var c = 0, d; d = this.da[c]; c++) { var f = b; d.X = a; d.Y = f } }; var Ya = function (a, b, c, d) { this.oa = b; this.g = a; this.x = c; this.y = d; this.width = b.width; this.height = b.height; this.la = (this.width + 120) / 88; this.Ea = (this.height + 120) / 66; this.ga = 0; this.$ = o; this.w = []; this.G = []; for (a = 0; 66 > a; a++) { this.w[a] = []; this.G[a] = []; b = Math.min(a, 65 - a); for (c = 0; 88 > c; c++) d = Math.min(c, 87 - c), 8 > d || 8 > b ? (d = 1 - Math.min(d, b) / 8, this.G[a].push(4 * Math.random() * d * d)) : this.G[a].push(0), this.w[a].push(0) } this.S = 0; this.L = []; this.v = m; this.ka = []; this.W = this.aa = 0; this.I = m; this.ma = o }, Za = function (a, b, c) { b = (b + 60) / a.la | 0; c = (c + 60) / a.Ea | 0; return [b, c] }, $a = function (a, b, c) { for (var d = 0, f = c - 1; f <= c + 1; f++) for (var e = b - 1; e <= b + 1; e++) var h = a, n = e, j = f, n = Math.max(0, Math.min(87, n)), j = Math.max(0, Math.min(65, j)), d = d + h.w[j][n]; return d / 9 }, ab = function (a, b) { a.$ = k; b.fillStyle = "rgba(240,246,246,0.8)"; b.fillRect(0, 0, b.canvas.width, b.canvas.height) }; Ya.prototype.s = function (a) { if (!(this.$ || 88 < this.ga || 5808 < this.S)) { a.fillStyle = "rgba(240,246,246,0.08)"; for (var b = 0; 200 > b; b++) { var c = Math.random() * (this.width + 120) - 60, d = Math.random() * (this.height + 120) - 60, f = Za(this, c, d), e = this.w[f[1]][f[0]]; e >= 4 * (1 + Math.random()) / 2 && (c |= 0, d |= 0, a.beginPath(), a.arc(c, d, e / 4 * this.la | 0, 0, 2 * Math.PI, k), a.fill(), a.closePath(), this.S++) } for (b = 0; 200 > b; b++) if (c = Math.random() * (this.width + 120) - 60, d = Math.random() * (this.height + 120) - 60, f = Za(this, c, d), e = this.w[f[1]][f[0]], f = this.G[f[1]][f[0]], e = 2 > e ? Math.max(e, f) : f, e >= Math.random()) e = 3 * Math.min(1, e) * this.la | 0, c |= 0, d |= 0, f = a.createRadialGradient(c, d, 0, c, d, e), f.addColorStop(0, "rgba(240,246,246,0.16)"), f.addColorStop(1, "rgba(240,246,246,0)"), a.fillStyle = f, a.fillRect(c - e + 1, d - e + 1, 2 * e - 1, 2 * e - 1), this.S++ } bb(this); bb(this); for (b = 0; b < this.L.length; b++) this.L[b].s(a) }; var cb = function (a, b) { a.ka = b; a.aa = 0; a.W = 0; a.I = m }, bb = function (a) { if (!(a.v || a.aa >= a.ka.length)) { var b = a.ka[a.aa].O; if (!a.I) a.I = new S, a.L.push(a.I); a.I.ba.apply(a.I, b[a.W]); a.W++; if (a.W >= b.length) a.W = 0, a.aa++, a.I = m } }, T = function (a, b) { a.v && a.v.ba(b[0], b[1]) }, db = function (a) { a.g.k(window, "touchmove", v(a.Ka, a)); a.g.k(window, "touchstart", v(a.La, a)); a.g.k(window, "touchend", v(a.Ja, a)); a.g.k(window, "mousemove", v(a.Ha, a)); a.g.k(window, "mousedown", v(a.Ga, a)); a.g.k(window, "mouseup", v(a.Ia, a)) }; p = Ya.prototype; p.Ha = function (a) { this.v && !this.ma && T(this, [a.clientX - this.x | 0, a.clientY - this.y | 0]) }; p.Ga = function (a) { if ((a.target || a.srcElement) == this.oa && (0 == a.button || 1 == a.button)) { var b = [a.clientX - this.x | 0, a.clientY - this.y | 0]; this.v = new S; this.L.push(this.v); T(this, b); a.preventDefault(); return o } }; p.Ia = function () { this.v = m }; p.La = function (a) { this.ma = k; a = a.touches.item(0); a = [a.clientX - this.x | 0, a.clientY - this.y | 0]; this.v = new S; this.L.push(this.v); T(this, a) }; p.Ja = function (a) { this.ma = o; this.v = m; a.preventDefault(); return o }; p.Ka = function (a) { var b = a.touches.item(0); T(this, [b.clientX - this.x | 0, b.clientY - this.y | 0]); a.preventDefault(); return o }; p.N = function (a, b, c) { this.oa.width = a; this.oa.height = b; this.width = a; this.height = b; ab(this, c) }; var S = function () { this.Qa = this.Oa = 30; this.O = [] }; S.prototype.ba = function (a, b) { this.O.push([a, b]) }; S.prototype.s = function (a) { if (0 != this.O.length) { var b = a.globalCompositeOperation; a.globalCompositeOperation = "destination-out"; a.lineWidth = this.Oa; a.lineCap = "round"; a.lineJoin = "round"; a.beginPath(); var c = this.O[0]; a.moveTo(c[0], c[1] - 1); for (var d = 0; c = this.O[d]; d++) a.lineTo(c[0], c[1]); a.stroke(); a.globalCompositeOperation = b } }; var U = function (a) { this.n = this.o = m; this.g = a; this.D = new P }, eb = function (a) { if (!a.o) return m; var b = document.createElement("button"), c = N(a.o), d = a.o.offsetWidth, a = a.o.offsetHeight; navigator.userAgent.match(/iPad/) && (d = 86, a = 40); document.getElementById("skb") ? (b.className = "lsbb", O(b, { fontSize: "15px", background: "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAmCAYAAAAFvPEHAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAl2cEFnAAAAJgAAACYAB/nYBgAAADFJREFUCNd9jDEKACAQw0L//17BKW4iR3ErbVL20ihE4EkgdVAIo7swBe6av7+pWYcD6Xg4BFIWHrsAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTEtMTItMTNUMTA6MTE6MjctMDg6MDD1wN6AAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDExLTEyLTEzVDEwOjExOjI3LTA4OjAwhJ1mPAAAAABJRU5ErkJggg==') repeat-x", color: "#374A82" }), b.innerHTML = "\u2652", c.y -= 1) : (b.innerHTML = "Defrost", O(b, { backgroundColor: "#4d90fe", backgroundImage: "-webkit-,-moz-,-ms-,-o-,,".split(",").join("linear-gradient(top,#4d90fe,#4787ed);"), filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#4d90fe',EndColorStr='#4787ed')", border: "1px solid #3079ed", borderRadius: "2px", webkitBorderRadius: "2px", mozBorderRadius: "2px", color: "white", fontSize: "11px", fontWeight: "bold", textAlign: "center", position: "fixed", top: c.y + "px", left: c.x + "px", width: d + "px", height: a + "px", padding: "0 8px", zIndex: 1201, opacity: 0 }), 30 < a && O(b, { fontSize: "15px" })); return b }; U.prototype.qa = function (a) { var b = this.o = document.getElementById("gbqfb") || document.getElementById("sblsbb") || document.getElementsByName("btnG")[0]; if (this.o) { this.n = eb(this); this.D.M = this.n; Ua(this.D, function () { b.style.visibility = "hidden" }); var c = this.o.parentNode; if (c && "sbds" == c.id) c.style.width = c.offsetWidth + "px"; this.g.k(this.n, "click", a); document.body.insertBefore(this.n, document.body.firstChild) } }; U.prototype.detach = function () { if (this.o && this.n) this.n.parentNode.removeChild(this.n), this.n = m, this.o.style.visibility = "visible" }; U.prototype.pa = function () { if (this.o && this.n) { var a = N(this.o); this.n.style.top = a.y + "px"; this.n.style.left = a.x + "px" } }; var V = function (a, b) { this.i = b; this.g = a; this.U = this.V = this.a = m; this.va = {}; this.ua = {}; this.p = m; this.D = new P; this.m = m }, fb = function (a) { function b(a) { return d.charAt(a >> 6 & 63) + d.charAt(a & 63) } function c(a) { var c = 0; 0 > a && (c = 32, a = -a); return b(c | a & 31).charAt(1) } for (var d = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_", a = a.i.L, f = [], e = 0, h; h = a[e]; ++e) { var n = []; h = h.O; for (var j = m, t = 0, i; i = h[t]; t++) j && 32 > Math.abs(i[0] - j[0]) && 32 > Math.abs(i[1] - j[1]) ? (j = [i[0] - j[0], i[1] - j[1]], n.push(c(j[0]) + c(j[1]))) : n.push((0 == t ? "" : ";") + (b(i[0]) + b(i[1]))), j = i; f.push(n.join("")) } return "1;" + f.join("!") }, gb = function (a) { function b(a) { var b = String.fromCharCode(a); return "A" <= b && "Z" >= b ? a - 65 : "a" <= b && "z" >= b ? a - 97 + 26 : "0" <= b && "9" >= b ? a - 48 + 52 : "-" == b ? 62 : "_" == b ? 63 : m } function c(a, c) { var d = b(a.charCodeAt(c)), e = b(a.charCodeAt(c + 1)); return d === m || e === m ? m : d << 6 | e } function d(a, c) { var d = b(a.charCodeAt(c)); if (d === m) return m; d & 32 && (d = -(d & 31)); return d } var f = /&frostwriting=([A-Za-z0-9-_!;]+)/.exec(window.location.href); if (!f) return o; var f = f[1].split("!"), e = [], h = 0; 0 < f.length && "1;" == f[0].substr(0, 2) && (f[0] = f[0].substr(2), h = 1); for (var n = 0, j; j = f[n]; ++n) { for (var t = new S, i = m, l = 0; l < j.length;) { var s = o; if (";" == j.charAt(l)) { if (0 == h) return o; l++; s = k } if (0 == h || !i || s) { if (l + 3 >= j.length) return o; i = c(j, l); s = c(j, l + 2); if (i === m || s === m) return o; t.ba(i, s); i = [i, s]; l += 4 } else { if (l + 1 >= j.length) return o; var s = d(j, l), ja = d(j, l + 1); if (s === m || ja === m) return o; t.ba(i[0] + s, i[1] + ja); i = [i[0] + s, i[1] + ja]; l += 2 } } e.push(t) } cb(a.i, e); return k }, hb = function () { return -1 == window.location.hash.indexOf("&fp=") ? window.location.href : window.location.protocol + "//" + window.location.host + "/search?" + window.location.hash.substr(1).replace(/&fp=[0-9a-z]+/, "") }; V.prototype.wa = function (a) { a.stopPropagation(); a.preventDefault(); return o }; V.prototype.Fa = function (a) { var b = fb(this), c = hb() + "&frostwriting=" + b; if ("1;" == b) W(this, hb(), "Draw something on your window. #letitsnow"); else if (480 < c.length) { if (this.m !== m) clearTimeout(this.m), this.m = m; google.letitsnowGCO = v(this.Na, this); ib(c); this.m = setTimeout(v(function () { W(this, window.location.href, "My drawing is too complex to share, but you should try this out and have fun, anyway. #letitsnow"); this.m = m }, this), 5E3) } else W(this, c, "Check out what I drew. #letitsnow"); return this.wa(a) }; var W = function (a, b, c) { if (a.m !== m) clearTimeout(a.m), a.m = m; gbar.asmc(function () { return { items: [{ properties: { url: [b], name: ["Google - Let it snow!"], image: ["http://www.google.com/images/logos/google_logo_41.png"], description: [c] } }] } }); if (document.createEvent) { var d = document.createEvent("MouseEvents"); d.initEvent("click", k, o); a.V.dispatchEvent(d) } else a.V.fireEvent && a.V.fireEvent("onclick") }; V.prototype.qa = function () { this.a = document.getElementById("gbgs3"); this.U = document.getElementById("gbwc"); this.V = document.getElementById("gbg3"); if (this.a && this.U && this.V) { this.p = document.createElement("div"); O(this.p, { height: this.a.offsetHeight + "px", width: this.a.offsetWidth + "px" }); this.a.parentNode.insertBefore(this.p, this.a); var a = N(this.a); this.va = O(this.a, { font: "13px/27px Arial,sans-serif", left: a.x + "px", position: "fixed", top: a.y - this.a.offsetHeight + "px", zIndex: 1201 }); this.ua = O(this.U, { background: "#fff", zIndex: 1201 }); this.a.parentNode.removeChild(this.a); document.body.appendChild(this.a); "SPAN" == this.a.tagName ? this.a.style.lineHeight = "20px" : this.D.M = this.a; this.g.k(this.a, "click", v(this.Fa, this)); this.g.k(this.a, "mousedown", v(this.wa, this)) } }; V.prototype.detach = function () { if (this.a && this.U) { this.m !== m && clearTimeout(this.m); O(this.a, this.va); O(this.U, this.ua); this.D.restore(); for (var a = this.g, b = this.a, c = 0; c < a.H.length; ++c) { var d = a.H[c]; d && d[0] == b && (Wa.apply(m, d), a.H[c] = m) } this.a.parentNode.removeChild(this.a); this.p.parentNode.insertBefore(this.a, this.p); this.p.parentNode.removeChild(this.p); this.p = this.a = m } }; V.prototype.pa = function () { if (this.a && this.p) this.a.style.left = N(this.p).x + "px" }; V.prototype.Na = function (a) { a && "OK" == a.status && !a.error && a.id && (clearTimeout(this.m), W(this, a.id, "Check out what I drew. #letitsnow")) }; var ib = function (a) { var a = a.replace(window.location.host, "www.google.com"), b = document.createElement("script"); b.src = "//google-doodles.appspot.com/?callback=google.letitsnowGCO&url=" + encodeURIComponent(a); document.body.appendChild(b) }; var jb = Math.floor(60), kb = Math.floor(300), X = function () { this.J = this.i = this.K = this.h = this.A = m; this.Z = this.ia = o; this.g = this.F = m; this.ha = o; this.T = 0; this.ja = this.R = m; this.Da = window.opera || navigator.userAgent.match(/MSIE/) ? jb : kb }, Y = "goog.egg.snowyfog.Snowyfog".split("."), Z = q; !(Y[0] in Z) && Z.execScript && Z.execScript("var " + Y[0]); for (var $; Y.length && ($ = Y.shift());)!Y.length && X !== g ? Z[$] = X : Z = Z[$] ? Z[$] : Z[$] = {}; X.prototype.init = function () { var a = this, b = function () { document.getElementById("snfloader_script") && (!document.getElementById("foot") && !document.getElementById("bfoot") ? window.setTimeout(b, 50) : (google.rein && google.dstr && (google.rein.push(v(a.Aa, a)), google.dstr.push(v(a.Pa, a))), a.Aa())) }; b() }; X.prototype.init = X.prototype.init; X.prototype.Aa = function () { if (!google || !google.snowyfogInited) { google.snowyfogInited = k; var a = document.createElement("canvas"); document.body.insertBefore(a, document.body.firstChild); this.h = a; O(this.h, { pointerEvents: "none", position: "fixed", top: "0", left: "0", zIndex: 1200 }); this.h.width = window.innerWidth; this.h.height = window.innerHeight; this.T = 0; this.ha = this.Z = this.ia = o; this.g = new Va; this.A = document.createElement("div"); a = window.opera || navigator.userAgent.match(/MSIE/) ? 0 : 800; O(this.A, { pointerEvents: "none", position: "absolute", zIndex: a, width: document.body.clientWidth + "px", height: Math.max(window.innerHeight, document.body.clientHeight) + "px", overflow: "hidden" }); document.body.insertBefore(this.A, document.body.firstChild); this.K = new R(this.A); this.i = new Ya(this.g, this.h, 0, 0); this.F = new V(this.g, this.i); this.J = new U(this.g); a = v(this.K.Ca, this.K); this.g.k(window, "resize", v(this.N, this)); this.g.k(window, "deviceorientation", a); this.g.k(window, "MozOrientation", a); this.R = this.h.getContext("2d"); gb(this.F) && (ab(this.i, this.R), lb(this)); this.ja = v(this.Ba, this); window.setTimeout(this.ja, 50) } }; X.prototype.Pa = function () { this.ha = k; for (var a = this.g, b = 0; b < a.H.length; ++b) { var c = a.H[b]; c && (Wa.apply(m, c), a.H[b] = m) } this.J.detach(); this.F.detach(); if (this.h) this.h.parentNode.removeChild(this.h), this.h = m; if (this.A) this.A.parentNode.removeChild(this.A), this.A = m }; var lb = function (a) { if (!a.ia) a.ia = k, a.h.style.pointerEvents = "auto", Ta(), db(a.i), a.F.qa(), a.J.qa(v(function (a) { this.Z = o; this.i = m; this.h && this.h.parentNode.removeChild(this.h); this.h = m; this.J.detach(); this.F.detach(); a.stopPropagation() }, a)) }, mb = function (a) { a.K.s(); if (a.Z) { var b = a.i; if (!(580.8 > b.S) && !(b.$ || 88 < b.ga)) { for (var c = b.S = 0, d = 0; 66 > d; d++) for (var f = 0; 88 > f; f++) b.w[d][f] += b.G[d][f], 3.5 <= b.w[d][f] && c++; b.ga++; if (c >= 70.4 * 66) b.$ = k; else for (d = 0; 66 > d; d++) for (f = 0; 88 > f; f++) if (c = 4 - b.w[d][f], c > 4 * Math.random() && 0.7 < Math.random()) { var e = Math.min(1, 3 * $a(b, f, d)) * Math.random(); b.G[d][f] = c * e } else b.G[d][f] = 0 } a.i.s(a.R); a.J.D.s(); a.F.D.s() } }; X.prototype.Ba = function () { if (!this.ha) { window.setTimeout(this.ja, 50); this.T++; if (this.T == jb) this.Z = k; this.T == this.Da && lb(this); mb(this) } }; X.prototype.N = function () { this.K && this.K.N(document.body.offsetWidth, Math.max(document.body.offsetHeight, window.innerHeight)); this.i && (!navigator.userAgent.match(/iPad/) || this.T > jb) && this.i.N(window.innerWidth, window.innerHeight, this.R); lb(this); this.J.pa(); this.F.pa(); this.A && this.R && mb(this) }; X.prototype.resize = X.prototype.N; })();
Java
import { Type } from '@ephox/katamari'; // some elements, such as mathml, don't have style attributes // others, such as angular elements, have style attributes that aren't a CSSStyleDeclaration const isSupported = (dom: Node): dom is HTMLStyleElement => // eslint-disable-next-line @typescript-eslint/unbound-method (dom as HTMLStyleElement).style !== undefined && Type.isFunction((dom as HTMLStyleElement).style.getPropertyValue); export { isSupported };
Java
del *.o fasm asm_code.asm asm_code.o gcc -c mcities.c gcc -c system/kolibri.c gcc -c system/stdlib.c gcc -c system/string.c gcc -c system/ctype.c ld -nostdlib -T kolibri.ld -o mcities asm_code.o kolibri.o stdlib.o string.o ctype.o mcities.o objcopy mcities -O binary kpack mcities del *.o pause
Java
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_66-internal) on Tue Dec 08 09:26:31 GMT 2015 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Uses of Class org.apache.jena.vocabulary.TestManifest (Apache Jena)</title> <meta name="date" content="2015-12-08"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.apache.jena.vocabulary.TestManifest (Apache Jena)"; } } catch(err) { } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../org/apache/jena/vocabulary/TestManifest.html" title="class in org.apache.jena.vocabulary">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/apache/jena/vocabulary/class-use/TestManifest.html" target="_top">Frames</a></li> <li><a href="TestManifest.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Class org.apache.jena.vocabulary.TestManifest" class="title">Uses of Class<br>org.apache.jena.vocabulary.TestManifest</h2> </div> <div class="classUseContainer">No usage of org.apache.jena.vocabulary.TestManifest</div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../org/apache/jena/vocabulary/TestManifest.html" title="class in org.apache.jena.vocabulary">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/apache/jena/vocabulary/class-use/TestManifest.html" target="_top">Frames</a></li> <li><a href="TestManifest.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small>Licenced under the Apache License, Version 2.0</small></p> </body> </html>
Java
<?php namespace Backend\Modules\MediaLibrary\Actions; use Backend\Core\Language\Language; use Backend\Modules\MediaLibrary\Domain\MediaFolder\MediaFolder; use Backend\Modules\MediaLibrary\Domain\MediaGroup\MediaGroupType; use Backend\Modules\MediaLibrary\Domain\MediaItem\MediaItemSelectionDataGrid; use Backend\Modules\MediaLibrary\Domain\MediaItem\Type; class MediaBrowserImages extends MediaBrowser { public function display(string $template = null): void { parent::display($template ?? '/' . $this->getModule() . '/Layout/Templates/MediaBrowser.html.twig'); } protected function parse(): void { // Parse files necessary for the media upload helper MediaGroupType::parseFiles(); parent::parseDataGrids($this->mediaFolder); /** @var int|null $mediaFolderId */ $mediaFolderId = ($this->mediaFolder instanceof MediaFolder) ? $this->mediaFolder->getId() : null; $this->template->assign('folderId', $mediaFolderId); $this->template->assign('tree', $this->get('media_library.manager.tree_media_browser_images')->getHTML()); $this->header->addJsData('MediaLibrary', 'openedFolderId', $mediaFolderId); } protected function getDataGrids(MediaFolder $mediaFolder = null): array { return array_map( function ($type) use ($mediaFolder) { $dataGrid = MediaItemSelectionDataGrid::getDataGrid( Type::fromString($type), ($mediaFolder !== null) ? $mediaFolder->getId() : null ); return [ 'label' => Language::lbl('MediaMultiple' . ucfirst($type)), 'tabName' => 'tab' . ucfirst($type), 'mediaType' => $type, 'html' => $dataGrid->getContent(), 'numberOfResults' => $dataGrid->getNumResults(), ]; }, [Type::IMAGE] ); } }
Java
import HomeRoute from 'routes/Home'; describe('(Route) Home', () => { let _component; beforeEach(() => { _component = HomeRoute.component(); }); it('Should return a route configuration object', () => { expect(typeof HomeRoute).to.equal('object'); }); it('Should define a route component', () => { expect(_component.type).to.equal('div'); }); });
Java
using GE.WebUI.ViewModels.Abstracts; using SX.WebCore.MvcControllers; namespace GE.WebUI.Controllers { public sealed class RssController : SxRssController<VMMaterial> { } }
Java
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.9.1"/> <title>MagicMirror: Member List</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { init_search(); }); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">MagicMirror &#160;<span id="projectnumber">0.1</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.9.1 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="pages.html"><span>Related&#160;Pages</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class&#160;List</span></a></li> <li><a href="classes.html"><span>Class&#160;Index</span></a></li> <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li> <li><a href="functions.html"><span>Class&#160;Members</span></a></li> </ul> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><b>testing</b></li><li class="navelem"><b>internal2</b></li><li class="navelem"><a class="el" href="classtesting_1_1internal2_1_1_type_without_formatter.html">TypeWithoutFormatter</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="headertitle"> <div class="title">testing::internal2::TypeWithoutFormatter&lt; T, kTypeKind &gt; Member List</div> </div> </div><!--header--> <div class="contents"> <p>This is the complete list of members for <a class="el" href="classtesting_1_1internal2_1_1_type_without_formatter.html">testing::internal2::TypeWithoutFormatter&lt; T, kTypeKind &gt;</a>, including all inherited members.</p> <table class="directory"> <tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>PrintValue</b>(const T &amp;value,::std::ostream *os) (defined in <a class="el" href="classtesting_1_1internal2_1_1_type_without_formatter.html">testing::internal2::TypeWithoutFormatter&lt; T, kTypeKind &gt;</a>)</td><td class="entry"><a class="el" href="classtesting_1_1internal2_1_1_type_without_formatter.html">testing::internal2::TypeWithoutFormatter&lt; T, kTypeKind &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr> <tr bgcolor="#f0f0f0"><td class="entry"><b>PrintValue</b>(const T &amp;value,::std::ostream *os) (defined in <a class="el" href="classtesting_1_1internal2_1_1_type_without_formatter.html">testing::internal2::TypeWithoutFormatter&lt; T, kTypeKind &gt;</a>)</td><td class="entry"><a class="el" href="classtesting_1_1internal2_1_1_type_without_formatter.html">testing::internal2::TypeWithoutFormatter&lt; T, kTypeKind &gt;</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr> </table></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Tue Aug 25 2015 01:03:00 for MagicMirror by &#160;<a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.9.1 </small></address> </body> </html>
Java
#ifndef __TYPES_H__ #define __TYPES_H__ typedef unsigned char byte; typedef signed long int intsize; typedef signed char int8; typedef signed short int16; typedef signed int int32; typedef signed long int int64; typedef unsigned long int uintsize; typedef unsigned char uint8; typedef unsigned short uint16; typedef unsigned int uint32; typedef unsigned long int uint64; typedef float float32; typedef double float64; #if !defined(__cplusplus) && !defined(__bool_true_false_are_defined) #define __bool_true_false_are_defined typedef byte bool; #define true ((bool) 1) #define false ((bool) 0) #endif #ifndef NULL #define NULL ((void*) 0) #endif #endif
Java
import 'docs/src/modules/components/bootstrap'; // --- Post bootstrap ----- import React from 'react'; import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import markdown from './input.md'; function Page() { return <MarkdownDocs markdown={markdown} />; } export default Page;
Java
<script type="text/stache"> <input value:to="H1" value:from="H2" value:bind="H3" on:value="H4" value:to="H1" value:from="H2" value:bind="H3" on:value="H4"> </script> <script src="../foo/bar/steal/steal.js"> Component.extend({ tag: 'my-tag', template: stache( '<input value:to="H1" value:from="H2" value:bind="H3" on:value="H4" ' + 'value:to="H1" value:from="H2" value:bind="H3" on:value="H4">' ) }); </script>
Java
/**************************************************************************** ** ** Name: MicoFileStat.c ** ** Description: ** Implements _fstat, called by Newlib C library file functions ** ** $Revision: $ ** ** Disclaimer: ** ** This source code is intended as a design reference which ** illustrates how these types of functions can be implemented. It ** is the user's responsibility to verify their design for ** consistency and functionality through the use of formal ** verification methods. Lattice Semiconductor provides no warranty ** regarding the use or functionality of this code. ** ** -------------------------------------------------------------------- ** ** Lattice Semiconductor Corporation ** 5555 NE Moore Court ** Hillsboro, OR 97214 ** U.S.A ** ** TEL: 1-800-Lattice (USA and Canada) ** (503)268-8001 (other locations) ** ** web: http://www.latticesemi.com ** email: techsupport@latticesemi.com ** ** -------------------------------------------------------------------------- ** ** Change History (Latest changes on top) ** ** Ver Date Description ** -------------------------------------------------------------------------- ** ** 3.0 Mar-25-2008 Added Header ** **--------------------------------------------------------------------------- *****************************************************************************/ #include <_ansi.h> #include <_syslist.h> #include <sys/types.h> #include <sys/stat.h> #include <errno.h> #include "MicoFileDevices.h" #ifdef __cplusplus extern "C" { #endif /****************************************************************** * * * Implements _read required by NewLibC's _read_r function * * * ******************************************************************/ int _fstat(int fd, struct stat *pstat) { MicoFileDesc_t *pFD; int retValue =-1; /* given the file-id, fetch the associated file-descriptor */ if(MicoGetFDEntry(fd, &pFD) != 0) return(-1); /* ask the device to write the data if it is capable of writing data */ if(pFD->pFileOpsTable->stat) retValue = pFD->pFileOpsTable->stat(pFD, pstat); /* all done */ return(retValue); } #ifdef __cplusplus } #endif
Java
package uk.org.fyodor.generators; import com.google.common.collect.HashMultiset; import com.google.common.collect.Multiset; import org.junit.Test; import uk.org.fyodor.BaseTest; public class PercentageChanceGeneratorTest extends BaseTest { Multiset<Boolean> results = HashMultiset.create(); @Test public void percentageChances(){ for (int p = 1; p < 100; p++) { Generator<Boolean> percentageChance = RDG.percentageChanceOf(p); for (int i = 0; i < 10000; i++) { results.add(percentageChance.next()); } print(p); print("True: " + results.count(Boolean.TRUE)); print("False: " + results.count(Boolean.FALSE)); results.clear(); } } }
Java
var searchData= [ ['clear',['clear',['../d8/d84/a00001.html#a11dc3b617f2fedbb3b499971493b9c4f',1,'ArrayBase']]] ];
Java
// // VTDNearTermDateRelation.h // // Copyright (c) 2014 Mutual Mobile (http://www.mutualmobile.com/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. #import <Foundation/Foundation.h> typedef NS_ENUM(NSUInteger, VTDNearTermDateRelation) { VTDNearTermDateRelationOutOfRange, VTDNearTermDateRelationToday, VTDNearTermDateRelationTomorrow, VTDNearTermDateRelationLaterThisWeek, VTDNearTermDateRelationNextWeek };
Java
<h1>Chat</h1>
Java
h1 { font-family: 'Noto Sans', sans-serif; font-size: 30px; margin: 5px 0px 5px 0px; color: #444444; } h4 { font-family: 'Noto Sans', sans-serif; color: #444444; font-size: 16px; padding-top: 0; margin-top: 0; } .header { margin-top: 10px; margin-bottom: 30px; } .ursar-logo { margin-right: 20px; width: 70px; float:left; } .form-control { background: #f7f7f7; margin-top: 30px; border: 1px solid #F7F7F7; box-shadow: none; } .link-list { list-style: none; margin: 0; padding: 0; } .link-container { margin-top: 10px; background-color: #eee; border-radius: 10px; width: 100%; } .link { margin-bottom: 20px; background: #f7f7f7; width: 100%; } .link:hover { background: #E6E6E6; } .link .url { font-size: 18px; margin: 10px 0px 0px 0px; } .link .url img { max-width: 100%; width: auto; } .link .metadata { font-size: 11px; color: #aea8a8; margin: 5px 0px 5px 0px; text-transform: uppercase; } .link .metadata span { margin-right: 5px; } .link .description { color: #444444; } .link a { color: #444444; } #spinner { position: relative; margin-top: 50px; } .spinner { top: 0; left: 0; bottom: 0; right: 0; } @media (max-width: 400px) { h1, h4 { display: none; } .ursar-logo { width: 100%; } } @media (min-width: 401px) and (max-width: 450px) { h1 { font-size: 27px; } h4 { font-size: 12px; } }
Java
/* Copyright 2006 by Sean Luke Licensed under the Academic Free License version 3.0 See the file "LICENSE" for more information */ package ec.app.parity.func; import ec.*; import ec.app.parity.*; import ec.gp.*; import ec.util.*; /* * D31.java * * Created: Wed Nov 3 18:31:38 1999 * By: Sean Luke */ /** * @author Sean Luke * @version 1.0 */ public class D31 extends GPNode { public String toString() { return "D31"; } /* public void checkConstraints(final EvolutionState state, final int tree, final GPIndividual typicalIndividual, final Parameter individualBase) { super.checkConstraints(state,tree,typicalIndividual,individualBase); if (children.length!=0) state.output.error("Incorrect number of children for node " + toStringForError() + " at " + individualBase); } */ public int expectedChildren() { return 0; } public void eval(final EvolutionState state, final int thread, final GPData input, final ADFStack stack, final GPIndividual individual, final Problem problem) { ((ParityData)input).x = ((((Parity)problem).bits >>> 31 ) & 1); } }
Java
<!DOCTYPE html> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta name="robots" content="noindex, nofollow"/> <script src="../internal.js"></script> <link rel="stylesheet" href="scrawl.css"> </head> <body> <div class="main" id="J_wrap"> <div class="hot"> <div class="drawBoard border_style1"> <canvas id="J_brushBoard" class="brushBorad" width="360" height="300"></canvas> <div id="J_picBoard" class="picBoard" style="width: 360px;height: 300px"></div> </div> <div id="J_operateBar" class="operateBar"> <span id="J_previousStep" class="previousStep"> <em class="icon"></em> <em class="text"><var id="lang_input_previousStep"></var></em> </span> <span id="J_nextStep" class="nextStep"> <em class="icon"></em> <em class="text"><var id="lang_input_nextsStep"></var></em> </span> <span id="J_clearBoard" class="clearBoard"> <em class="icon"></em> <em class="text"><var id="lang_input_clear"></var></em> </span> <span id="J_sacleBoard" class="scaleBoard"> <em class="icon"></em> <em class="text"><var id="lang_input_ScalePic"></var></em> </span> </div> </div> <div class="drawToolbar border_style1"> <div id="J_colorBar" class="colorBar"></div> <div id="J_brushBar" class="sectionBar"> <em class="brushIcon"></em> <a href="javascript:void(0)" class="size1">1</a> <a href="javascript:void(0)" class="size2">3</a> <a href="javascript:void(0)" class="size3">5</a> <a href="javascript:void(0)" class="size4">7</a> </div> <div id="J_eraserBar" class="sectionBar"> <em class="eraserIcon"></em> <a href="javascript:void(0)" class="size1">1</a> <a href="javascript:void(0)" class="size2">3</a> <a href="javascript:void(0)" class="size3">5</a> <a href="javascript:void(0)" class="size4">7</a> </div> <div class="sectionBar"> <div id="J_addImg" class="addImgH"> <em class="icon"></em> <em class="text"><var id="lang_input_addPic"></var></em> <form method="post" id="fileForm" enctype="multipart/form-data" class="addImgH_form" target="up"> <input type="file" name="upfile" id="J_imgTxt" accept="image/gif,image/jpeg,image/png,image/jpg,image/bmp"/> </form> <iframe name="up" style="display: none"></iframe> </div> </div> <div class="sectionBar"> <span id="J_removeImg" class="removeImg"> <em class="icon"></em> <em class="text"><var id="lang_input_removePic"></var></em> </span> </div> </div> </div> <div id="J_maskLayer" class="maskLayerNull"></div> <script src="scrawl.js"></script> <script> var settings = { drawBrushSize:3, //画笔初始大小 drawBrushColor:"#4bacc6", //画笔初始颜色 colorList:['c00000', 'ff0000', 'ffc000', 'ffff00', '92d050', '00b050', '00b0f0', '0070c0', '002060', '7030a0', 'ffffff', '000000', 'eeece1', '1f497d', '4f81bd', 'c0504d', '9bbb59', '8064a2', '4bacc6', 'f79646'], //画笔选择颜色 saveNum:10 //撤销次数 }; var scrawlObj = new scrawl( settings ); scrawlObj.isCancelScrawl = false; dialog.onok = function () { exec( scrawlObj ); return false; }; dialog.oncancel = function () { scrawlObj.isCancelScrawl = true; }; </script> </body> </html>
Java
/* * @require ../../bower_components/html5-boilerplate/dist/css/normalize.css * @require ../../bower_components/html5-boilerplate/dist/css/main.css * @require ../../bower_components/bootstrap/dist/css/bootstrap.css * @require ../iconfont/iconfont.css * */ /* cover bootstrap style * ===================== */ .y-text-red { color: #f25050; } .y-color-red { color: #f25050; } .y-text-blue { color: #099fdd; } .y-color-blue { color: #099fdd; } body { /*background-color: #e6e6e6;*/ font-family: "microsoft yahei", "Helvetica Neue", Helvetica, Arial, sans-serif; } .list-group-item.active, .list-group-item.active:focus, .list-group-item.active:hover { background-color: #099fdd; border-color: #099fdd; } .modal-content .close { font-size: 30px; } .panel-default .panel-heading { color: #333; background-color: #f5f5f5; border-color: #ddd; } /* Expand bootstrap style * ====================== */ .y-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: normal; } .text-indent2 { text-indent: 2em; } .text-xs-left { text-align: left !important; } .text-xs-right { text-align: right !important; } .text-xs-center { text-align: center !important; } @media (min-width: 544px) { .text-sm-left { text-align: left !important; } .text-sm-right { text-align: right !important; } .text-sm-center { text-align: center !important; } } @media (min-width: 768px) { .text-md-left { text-align: left !important; } .text-md-right { text-align: right !important; } .text-md-center { text-align: center !important; } } @media (min-width: 992px) { .text-lg-left { text-align: left !important; } .text-lg-right { text-align: right !important; } .text-lg-center { text-align: center !important; } } @media (min-width: 1200px) { .text-xl-left { text-align: left !important; } .text-xl-right { text-align: right !important; } .text-xl-center { text-align: center !important; } } .sidebar { position: fixed; top: 90px; bottom: 0; left: 0; z-index: 1000; display: block; padding: 20px; overflow-x: hidden; overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */ background-color: #fff; border-right: 1px solid #eee; min-width: 200px; } /* Sidebar navigation */ .nav-sidebar { margin-right: -21px; margin-bottom: 20px; margin-left: -20px; } .nav-sidebar li { border-top: 1px solid #dfdfdf; border-bottom: 1px solid #dfdfdf; margin-top: -1px; } .nav-sidebar > li > a { color: #7f7f7f; padding-right: 20px; padding-left: 20px; font-size: 16px; } .nav-sidebar > .active > a, .nav-sidebar > .active > a:hover, .nav-sidebar > .active > a:focus { color: #fff; background-color: #099fdd; } /*y-navbar*/ .y-navbar-info {} .y-navbar-info .navbar-nav > li > a { color: #333; border-radius: 6px; font-size: 16px; } .y-navbar-info .navbar-nav > li > a:hover, .y-navbar-info .navbar-nav > li > a:focus { color: #099fdd; background-color: transparent; } .y-navbar-info .navbar-nav > .active > a, .y-navbar-info .navbar-nav > .active > a:hover, .y-navbar-info .navbar-nav > .active > a:focus { color: #fff; background-color: #099fdd; } .y-navbar-info .navbar-toggle { border-color: #099fdd; } .y-navbar-info .navbar-toggle:hover, .y-navbar-info .navbar-toggle:focus { background-color: #f9f9f9; } .y-navbar-info .navbar-toggle .icon-bar { background-color: #099fdd; } .y-navbar-info .navbar-collapse, .y-navbar-info .navbar-form { border-color: #e7e7e7; } .y-btn-blue { color: #fff; background-color: #099fdd; border-color: #0799d9; } .y-btn-blue:focus, .y-btn-blue.focus, .y-btn-blue:hover { color: #fff; background-color: #0996d2; border-color: #0794d1; } .y-btn-blue:active, .y-btn-blue.active, .open > .dropdown-toggle.y-btn-blue { color: #fff; background-color: #0996d2; border-color: #0e5aa7; } .y-btn-blue:active:hover, .y-btn-blue.active:hover, .open > .dropdown-toggle.y-btn-blue:hover, .y-btn-blue:active:focus, .y-btn-blue.active:focus, .open > .dropdown-toggle.y-btn-blue:focus, .y-btn-blue:active.focus, .y-btn-blue.active.focus, .open > .dropdown-toggle.y-btn-blue.focus { color: #fff; background-color: #0794d0; border-color: #1b6d85; } .y-btn-blue:active, .y-btn-blue.active, .open > .dropdown-toggle.y-btn-blue { background-image: none; } .y-btn-blue.disabled:hover, .y-btn-blue[disabled]:hover, fieldset[disabled] .y-btn-blue:hover, .y-btn-blue.disabled:focus, .y-btn-blue[disabled]:focus, fieldset[disabled] .y-btn-blue:focus, .y-btn-blue.disabled.focus, .y-btn-blue[disabled].focus, fieldset[disabled] .y-btn-blue.focus { background-color: #099fdd; border-color: #0799d9; } .y-btn-blue .badge { color: #099fdd; background-color: #fff; } .y-btn-red { color: #fff; background-color: #099fdd; border-color: #0799d9; } .y-btn-red:focus, .y-btn-red.focus, .y-btn-red:hover { color: #fff; background-color: #0996d2; border-color: #0794d1; } .y-btn-red:active, .y-btn-red.active, .open > .dropdown-toggle.y-btn-red { color: #fff; background-color: #0996d2; border-color: #0e5aa7; } .y-btn-red:active:hover, .y-btn-red.active:hover, .open > .dropdown-toggle.y-btn-red:hover, .y-btn-red:active:focus, .y-btn-red.active:focus, .open > .dropdown-toggle.y-btn-red:focus, .y-btn-red:active.focus, .y-btn-red.active.focus, .open > .dropdown-toggle.y-btn-red.focus { color: #fff; background-color: #0794d0; border-color: #1b6d85; } .y-btn-red:active, .y-btn-red.active, .open > .dropdown-toggle.y-btn-red { background-image: none; } .y-btn-red.disabled:hover, .y-btn-red[disabled]:hover, fieldset[disabled] .y-btn-red:hover, .y-btn-red.disabled:focus, .y-btn-red[disabled]:focus, fieldset[disabled] .y-btn-red:focus, .y-btn-red.disabled.focus, .y-btn-red[disabled].focus, fieldset[disabled] .y-btn-red.focus { background-color: #099fdd; border-color: #0799d9; } .y-btn-red .badge { color: #099fdd; background-color: #fff; } /*progressbar*/ .y-progress-step { max-width: 1600px; margin-left: auto; margin-right: auto; margin-bottom: 30px; overflow: hidden; padding-left: 0; /*CSS counters to number the steps*/ counter-reset: step; } .y-progress-step li { list-style-type: none; color: #a9a9a9; text-transform: uppercase; font-size: 18px; width: 33.33%; float: left; position: relative; text-align: center; } .y-progress-step li:before { content: counter(step); counter-increment: step; width: 30px; line-height: 30px; display: block; font-size: 16px; color: #fff; background: #a9a9a9; border-radius: 50%; margin: 0 auto 5px auto; } /*progressbar connectors*/ .y-progress-step li:after { content: ''; width: 100%; height: 2px; background: #a9a9a9; position: absolute; left: -50%; top: 14px; z-index: -1; /*put it behind the numbers*/ } .y-progress-step li:first-child:after { /*connector not needed before the first step*/ content: none; } /*marking active/completed steps green*/ /*The number of the step and the connector before it = green*/ .y-progress-step li.active:before, .y-progress-step li.active:after { background: #099fdd; color: white; } .y-progress-step li.active:before, .y-progress-step li.active:after { background: #099fdd; color: white; } .y-progress-step .active .y-turn-blue { color: #099fdd; } /* base style * ========== */ .y-box-sm { width: 90%; max-width: 120px; margin: auto; padding: 8px; border: solid 1px #666; border-radius: 4px; } .y-color-white { color: #fff } .y-color-default { color: #666; } .y-color-silver { color: #c0c0c0 } .y-color-lightGray { color: #d3d3d3 } .y-color-whiteSmoke { color: #f5f5f5 } .y-bg-fff { background-color: #fff; } .y-bg-ebebeb { background-color: #ebebeb; } .y-iconfont-xs { position: relative; font-size: 30px; } .y-iconfont-sm { position: relative; font-size: 60px; } .y-iconfont-md { position: relative; font-size: 100px; } .y-hide { display: none; } .y-font-sm { font-size: 18px; } .y-font-b { font-weight: 700; } .y-fs16 { font-size: 16px; } .y-fs18 { font-size: 18px; } .y-fs26 { font-size: 26px; } .y-hl36 { height: 36px } .y-lh52 { line-height: 52px; } .y-mb0 { margin-bottom: 0px; } .y-mb10 { margin-bottom: 10px; } .y-mb20 { margin-bottom: 20px; } .y-mb40 { margin-bottom: 40px; } .y-mg0 { margin: 0px; } .y-mb60 { margin-bottom: 60px; } .y-mlr0 { margin-left: 0 !important; margin-right: 0 !important; } .y-ml2 { margin-left: 2px; } .y-ml20 { margin-left: 20px; } .y-mlr10 { margin-left: 10px; margin-right: 10px; } .y-mr20 { margin-right: 20px; } .y-mt-10 { margin-top: -10px; } .y-mt-30 { margin-top: -30px; } .y-mt6 { margin-top: 6px; } .y-mt15 { margin-top: 15px; } .y-mt30 { margin-top: 30px; } .y-mt34 { margin-top: 34px; } .y-mt40 { margin-top: 40px; } .y-mt60 { margin-top: 60px; } .y-mt90 { margin-top: 90px; } .y-mt120 { margin-top: 120px; } .y-mt160 { margin-top: 160px; } .y-min-h300 { min-height: 300px; } .y-pd30 { padding: 30px; } .y-pt20 { padding-top: 20px; } .y-pt30 { padding-top: 30px; } .y-pt40 { padding-top: 40px; } .y-pt60 { padding-top: 60px; } .y-pb20 { padding-bottom: 20px; } .y-pb40 { padding-bottom: 40px; } .y-pb60 { padding-bottom: 60px; } .y-wd60 { width: 60%; } .y-wd80 { width: 80%; } .y-input-md { margin-top: 10px; margin-bottom: 24px; } .y-modal-header-default { background: #f5f5f5; border-top-left-radius: 5px; border-top-right-radius: 5px; } .y-notice { text-align: left; margin-top: 8px; color: #f25050; } .y-card-md { width: 80%; max-width: 720px; margin-left: auto; margin-right: auto; } @media (max-width:420px) { .y-card-md { width: 100%; } } .y-card-body-sm { width: 80%; margin: 10px auto; } .y-card-empty-md { padding: 40px 40px 60px 40px; } .y-l-sm { left: 15%; } @media (min-width:420px) { .y-l-sm { left: 15%; } } .y-scroll-y-md { max-height: 480px; overflow-y: scroll; } .y-modal-footer-default { background: #f5f5f5; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; } .y-panel-title { line-height: 52px; text-align: center; font-size: 20px; font-weight: bold; } .y-panel-btn { line-height: 52px; text-align: center; } .y-table-md > thead > tr > th { line-height: 36px; font-size: 16px; text-align: center; } .y-table-md > tbody > tr > td { line-height: 36px; } .y-btn-sm-sm { padding: 6px 12px; font-size: 14px; } @media (min-width:768px) and (max-width:991px) { .y-btn-sm-sm { padding: 4px 8px !important; font-size: 12px !important; } } @media (max-width:768px) { .y-border-none-xs { border: none !important; } } .y-transition-border-color-info { -webkit-transition: border-color 0.4s ease-out 0s; -moz-transition: border-color 0.4s ease-out 0s; transition: border-color 0.4s ease-out 0s; } .y-transition-border-color-info:hover, .y-transition-border-color-info:focus { border-color: #099fdd; } .y-transition-color-info { -webkit-transition: color 0.4s ease-out 0s; -moz-transition: color 0.4s ease-out 0s; transition: color 0.4s ease-out 0s; } .y-transition-color-info:hover, .y-transition-color-info:focus { color: #099fdd; } .y-panel-display h3, .y-panel-display-money p, .y-panel-display-user p, .y-panel-display-money i, .y-panel-display .y-num, .y-panel-display-set i, .y-panel-display-set p, .y-panel-display-user i, .y-dashboard-set-platform i, .y-dashboard-set-demo i, .y-undeveloped i { -webkit-transition: color 0.4s ease-out 0s; -moz-transition: color 0.4s ease-out 0s; transition: color 0.4s ease-out 0s; } .y-panel-display h3:hover, .y-panel-display h3:focus, .y-panel-display .y-num:hover, .y-panel-display .y-num:focus, .y-panel-display-money i:hover, .y-panel-display-money i:focus, .y-panel-display-user i:hover, .y-panel-display-user i:focus, .y-panel-display-money p:hover, .y-panel-display-money p:focus, .y-panel-display-user p:hover, .y-panel-display-user p:focus, .y-dashboard-set-platform i:hover, .y-dashboard-set-platform i:focus, .y-dashboard-set-demo i:hover, .y-dashboard-set-demo i:focus, .y-undeveloped i:hover, .y-undeveloped i:focus { color: #099fdd; } .y-panel-display-set i:hover, .y-panel-display-set i:focus, .y-panel-display-set p:hover, .y-panel-display-set p:focus { color: #3a3a3a; } /* header style * ============ */ .y-header .navbar-collapse { margin-top: 15px; } .y-header .navbar { background: #fff; box-shadow: 2px 3px 9px 0 rgba(0, 0, 0, 0.06); border-color: #e7e7e7; } .y-header .navbar-toggle { margin-top: 24px; margin-right: 18px; } .y-header .y-header-logo img { height: 100%; width: auto; margin-left: 10px; } .y-header-logo { float: left; height: 80px; margin-right: 20px; } .y-header-search { color: #099fdd; } .y-header-search input { height: 36px; } @media (max-width: 768px) { .y-header-close { width: 100%; text-align: center; } } .y-header-close { color: #777; } .y-header-close:hover, .y-header-close:focus { color: #f25050; background-color: transparent; } .y-header-close i { font-size: 40px; margin: auto 20px; } .y-header-help { border: solid 1px #099fdd; color: #099fdd; } @media (min-width: 768px) { .y-header-help { margin-left: 20px; } } .y-header-help i { font-size: 22px; margin-left: 8px; } .y-header-help i, .y-header-help span { color: #099fdd; } .y-header-search { height: 36px; } /* body style * ============ */ .y-body { margin-top: 130px; text-align: center; } .y-body .panel { box-shadow: 0 0 9px 5px rgba(255, 255, 255, 0.04); -webkit-box-shadow: 0 0 9px 5px rgba(255, 255, 255, 0.04); -webkit-transition: box-shadow 0.3s ease-out 0s; -moz-transition: box-shadow 0.3s ease-out 0s; transition: box-shadow 0.3s ease-out 0s; } .y-body .panel:hover, .y-body .panel:focus { -webkit-box-shadow: 0 0 11px 7px rgba(0, 0, 0, 0.2); box-shadow: 0 0 11px 7px rgba(0, 0, 0, 0.1); }
Java
If you are reporting bug/issue, please provide detailed Repro instructions. ## Repro Steps 1. 2. ## Actual Behavior ## Expected Behavior ## Version Info SDK Version (version of https://www.nuget.org/packages/Microsoft.ApplicationInsights.AspNetCore) : .NET Core Version (TargetFramework in your .csproj file) : How Application was onboarded with SDK(Installed Nugets/VisualStudio/Azure WebAppExtension) : OS : Hosting Info (IIS/Azure Web Apps/Running From Visual Studio etc) :
Java
// Copyright (c) 2015 ZZZ Projects. All rights reserved // Licensed under MIT License (MIT) (https://github.com/zzzprojects/Z.ExtensionMethods) // Website: http://www.zzzprojects.com/ // Feedback / Feature Requests / Issues : http://zzzprojects.uservoice.com/forums/283927 // All ZZZ Projects products: Entity Framework Extensions / Bulk Operations / Extension Methods /Icon Library public static partial class Extensions { /// <summary> /// A string extension method that get the string between the two specified string. /// </summary> /// <param name="this">The @this to act on.</param> /// <param name="before">The string before to search.</param> /// <param name="after">The string after to search.</param> /// <returns>The string between the two specified string.</returns> public static string GetBetween(this string @this, string before, string after) { int beforeStartIndex = @this.IndexOf(before); int startIndex = beforeStartIndex + before.Length; int afterStartIndex = @this.IndexOf(after, startIndex); if (beforeStartIndex == -1 || afterStartIndex == -1) { return ""; } return @this.Substring(startIndex, afterStartIndex - startIndex); } }
Java
using System; using System.Threading.Tasks; using Orleans; using Tester.CodeGenTests; using TestExtensions; using UnitTests.GrainInterfaces; using Xunit; namespace DefaultCluster.Tests.General { [TestCategory("CodeGen")] public class CodeGeneratorTests_AccessibilityChecks : HostedTestClusterEnsureDefaultStarted { /// <summary> /// Tests that compile-time code generation supports classes marked as internal and that /// runtime code generation does not. /// </summary> /// <returns>A <see cref="Task"/> representing the work performed.</returns> [Fact, TestCategory("BVT")] public async Task CodeGenInterfaceAccessibilityCheckTest() { // Runtime codegen does not support internal interfaces. Assert.Throws<InvalidOperationException>(() => GrainFactory.GetGrain<IRuntimeInternalPingGrain>(9)); // Compile-time codegen supports internal interfaces. var grain = GrainFactory.GetGrain<IInternalPingGrain>(0); await grain.Ping(); } } internal interface IRuntimeInternalPingGrain : IGrainWithIntegerKey { Task Ping(); } internal class InternalPingGrain : Grain, IInternalPingGrain, IRuntimeInternalPingGrain { public Task Ping() => Task.FromResult(0); } }
Java
#include "macros.h" #include "thread.h" using namespace std; ndb_thread::~ndb_thread() { } void ndb_thread::start() { thd_ = std::move(thread(&ndb_thread::run, this)); if (daemon_) thd_.detach(); } void ndb_thread::join() { ALWAYS_ASSERT(!daemon_); thd_.join(); } // can be overloaded by subclasses void ndb_thread::run() { ALWAYS_ASSERT(body_); body_(); }
Java
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <base data-ice="baseUrl" href="../../../../"> <title data-ice="title">src/middle_level/shaders/HalfLambertAndWrapLightingShader.js | glboost</title> <link type="text/css" rel="stylesheet" href="css/style.css"> <link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css"> <script src="script/prettify/prettify.js"></script> <script src="script/manual.js"></script> <meta name="description" content="A New WebGL Rendering Library for 3D Graphics Geeks"><meta property="twitter:card" content="summary"><meta property="twitter:title" content="glboost"><meta property="twitter:description" content="A New WebGL Rendering Library for 3D Graphics Geeks"></head> <body class="layout-container" data-ice="rootContainer"> <header> <a href="./">Home</a> <a href="identifiers.html">Reference</a> <a href="source.html">Source</a> <div class="search-box"> <span> <img src="./image/search.png"> <span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span> </span> <ul class="search-result"></ul> </div> <a style="position:relative; top:3px;" href="https://github.com/emadurandal/GLBoost"><img width="20px" src="./image/github.png"></a></header> <nav class="navigation" data-ice="nav"><div> <ul> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#auxiliaries">auxiliaries</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/auxiliaries/AnimationPlayer.js~AnimationPlayer.html">AnimationPlayer</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#low-level-auxiliaries-camera-controllers">low_level/auxiliaries/camera_controllers</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/auxiliaries/camera_controllers/L_CameraController.js~L_CameraController.html">L_CameraController</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/auxiliaries/camera_controllers/L_WalkThroughCameraController.js~L_WalkThroughCameraController.html">L_WalkThroughCameraController</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#low-level-components">low_level/components</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/components/AnimationComponent.js~AnimationComponent.html">AnimationComponent</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/components/SceneGraphComponent.js~SceneGraphComponent.html">SceneGraphComponent</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/components/TransformComponent.js~TransformComponent.html">TransformComponent</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#low-level-core">low_level/core</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/core/Component.js~Component.html">Component</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/core/ComponentRepository.js~ComponentRepository.html">ComponentRepository</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/core/Entity.js~Entity.html">Entity</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/core/EntityRepository.js~EntityRepository.html">EntityRepository</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/core/GLBoostLowContext.js~GLBoostLowContext.html">GLBoostLowContext</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/core/GLBoostObject.js~GLBoostObject.html">GLBoostObject</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/core/GLBoostSystem.js~GLBoostSystem.html">GLBoostSystem</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/core/GLContext.js~GLContext.html">GLContext</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/core/GLExtensionsManager.js~GLExtensionsManager.html">GLExtensionsManager</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/core/L_GLBoostMonitor.js~L_GLBoostMonitor.html">L_GLBoostMonitor</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/core/MemoryManager.js~MemoryManager.html">MemoryManager</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#low-level-elements">low_level/elements</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/elements/L_Element.js~L_Element.html">L_Element</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#low-level-elements-cameras">low_level/elements/cameras</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/elements/cameras/L_AbstractCamera.js~L_AbstractCamera.html">L_AbstractCamera</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/elements/cameras/L_FrustumCamera.js~L_FrustumCamera.html">L_FrustumCamera</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/elements/cameras/L_OrthoCamera.js~L_OrthoCamera.html">L_OrthoCamera</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/elements/cameras/L_PerspectiveCamera.js~L_PerspectiveCamera.html">L_PerspectiveCamera</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#low-level-geometries">low_level/geometries</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/geometries/BlendShapeGeometry.js~BlendShapeGeometry.html">BlendShapeGeometry</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/geometries/Geometry.js~Geometry.html">Geometry</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#low-level-impl">low_level/impl</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/impl/GLContextImpl.js~GLContextImpl.html">GLContextImpl</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/impl/GLContextWebGL1Impl.js~GLContextWebGL1Impl.html">GLContextWebGL1Impl</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/impl/GLContextWebGL2Impl.js~GLContextWebGL2Impl.html">GLContextWebGL2Impl</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#low-level-materials">low_level/materials</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/materials/ClassicMaterial.js~ClassicMaterial.html">ClassicMaterial</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/materials/L_AbstractMaterial.js~L_AbstractMaterial.html">L_AbstractMaterial</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/materials/PBRMetallicRoughnessMaterial.js~PBRMetallicRoughnessMaterial.html">PBRMetallicRoughnessMaterial</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#low-level-math">low_level/math</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/math/AABB.js~AABB.html">AABB</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/math/MathClassUtil.js~MathClassUtil.html">MathClassUtil</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/math/MathUtil.js~MathUtil.html">MathUtil</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/math/Matrix33.js~Matrix33.html">Matrix33</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/math/Matrix44.js~Matrix44.html">Matrix44</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/math/Quaternion.js~Quaternion.html">Quaternion</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/math/Vector2.js~Vector2.html">Vector2</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/math/Vector3.js~Vector3.html">Vector3</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/math/Vector4.js~Vector4.html">Vector4</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#low-level-misc">low_level/misc</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/misc/AnimationUtil.js~AnimationUtil.html">AnimationUtil</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/misc/ArrayUtil.js~ArrayUtil.html">ArrayUtil</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/misc/DataUtil.js~DataUtil.html">DataUtil</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/misc/Hash.js~Hash.html">Hash</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/misc/InputUtil.js~InputUtil.html">InputUtil</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/misc/MiscUtil.js~MiscUtil.html">MiscUtil</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/misc/TypedArrayWrapper.js~TypedArrayWrapper.html">TypedArrayWrapper</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-IsUtil">IsUtil</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#low-level-primitives">low_level/primitives</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/primitives/Arrow.js~Arrow.html">Arrow</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/primitives/Axis.js~Axis.html">Axis</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/primitives/Cube.js~Cube.html">Cube</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/primitives/CubeAbsolute.js~CubeAbsolute.html">CubeAbsolute</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/primitives/Grid.js~Grid.html">Grid</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/primitives/JointPrimitive.js~JointPrimitive.html">JointPrimitive</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/primitives/Line.js~Line.html">Line</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/primitives/Particle.js~Particle.html">Particle</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/primitives/Plane.js~Plane.html">Plane</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/primitives/Screen.js~Screen.html">Screen</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/primitives/Sphere.js~Sphere.html">Sphere</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#low-level-shaders">low_level/shaders</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/shaders/Shader.js~Shader.html">Shader</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#low-level-textures">low_level/textures</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/textures/AbstractTexture.js~AbstractTexture.html">AbstractTexture</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/textures/CubeTexture.js~CubeTexture.html">CubeTexture</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/textures/InternalDataTexture.js~InternalDataTexture.html">InternalDataTexture</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/textures/MutableTexture.js~MutableTexture.html">MutableTexture</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/textures/PhinaTexture.js~PhinaTexture.html">PhinaTexture</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/low_level/textures/Texture.js~Texture.html">Texture</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#middle-level">middle_level</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/Renderer.js~Renderer.html">Renderer</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#middle-level-core">middle_level/core</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/core/GLBoostMiddleContext.js~GLBoostMiddleContext.html">GLBoostMiddleContext</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/core/M_GLBoostMonitor.js~M_GLBoostMonitor.html">M_GLBoostMonitor</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#middle-level-draw-kickers">middle_level/draw_kickers</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/draw_kickers/DrawKickerWorld.js~DrawKickerWorld.html">DrawKickerWorld</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#middle-level-elements">middle_level/elements</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/M_Element.js~M_Element.html">M_Element</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/M_Group.js~M_Group.html">M_Group</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/M_Scene.js~M_Scene.html">M_Scene</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#middle-level-elements-cameras">middle_level/elements/cameras</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/cameras/M_AbstractCamera.js~M_AbstractCamera.html">M_AbstractCamera</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/cameras/M_FrustumCamera.js~M_FrustumCamera.html">M_FrustumCamera</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/cameras/M_OrthoCamera.js~M_OrthoCamera.html">M_OrthoCamera</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/cameras/M_PerspectiveCamera.js~M_PerspectiveCamera.html">M_PerspectiveCamera</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#middle-level-elements-gizmos">middle_level/elements/gizmos</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/gizmos/M_AABBGizmo.js~M_AABBGizmo.html">M_AABBGizmo</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/gizmos/M_AxisGizmo.js~M_AxisGizmo.html">M_AxisGizmo</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/gizmos/M_DirectionalLightGizmo.js~M_DirectionalLightGizmo.html">M_DirectionalLightGizmo</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/gizmos/M_Gizmo.js~M_Gizmo.html">M_Gizmo</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/gizmos/M_GridGizmo.js~M_GridGizmo.html">M_GridGizmo</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/gizmos/M_HeightLineGizmo.js~M_HeightLineGizmo.html">M_HeightLineGizmo</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/gizmos/M_JointGizmo.js~M_JointGizmo.html">M_JointGizmo</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/gizmos/M_OutlineGizmo.js~M_OutlineGizmo.html">M_OutlineGizmo</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/gizmos/M_PointLightGizmo.js~M_PointLightGizmo.html">M_PointLightGizmo</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#middle-level-elements-lights">middle_level/elements/lights</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/lights/M_AbstractLight.js~M_AbstractLight.html">M_AbstractLight</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/lights/M_AmbientLight.js~M_AmbientLight.html">M_AmbientLight</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/lights/M_DirectionalLight.js~M_DirectionalLight.html">M_DirectionalLight</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/lights/M_PointLight.js~M_PointLight.html">M_PointLight</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/lights/M_SpotLight.js~M_SpotLight.html">M_SpotLight</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#middle-level-elements-meshes">middle_level/elements/meshes</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/meshes/M_Mesh.js~M_Mesh.html">M_Mesh</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/meshes/M_ScreenMesh.js~M_ScreenMesh.html">M_ScreenMesh</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/meshes/M_SkeletalMesh.js~M_SkeletalMesh.html">M_SkeletalMesh</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#middle-level-elements-skeletons">middle_level/elements/skeletons</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/skeletons/JointGizmoUpdater.js~JointGizmoUpdater.html">JointGizmoUpdater</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/elements/skeletons/M_Joint.js~M_Joint.html">M_Joint</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#middle-level-expressions">middle_level/expressions</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/expressions/Expression.js~Expression.html">Expression</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/expressions/RenderPass.js~RenderPass.html">RenderPass</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#middle-level-geometries">middle_level/geometries</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/geometries/M_SkeletalGeometry.js~M_SkeletalGeometry.html">M_SkeletalGeometry</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#middle-level-loader">middle_level/loader</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/loader/GLBoostGLTFLoaderExtension.js~GLBoostGLTFLoaderExtension.html">GLBoostGLTFLoaderExtension</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/loader/GLTF2Exporter.js~GLTF2Exporter.html">GLTF2Exporter</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/loader/GLTF2Loader.js~GLTF2Loader.html">GLTF2Loader</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/loader/GLTFLoader.js~GLTFLoader.html">GLTFLoader</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/loader/ModelConverter.js~ModelConverter.html">ModelConverter</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/loader/ObjLoader.js~ObjLoader.html">ObjLoader</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-formatDetector">formatDetector</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#middle-level-plugins">middle_level/plugins</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/plugins/EffekseerElement.js~EffekseerElement.html">EffekseerElement</a></span></span></li> <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#middle-level-shaders">middle_level/shaders</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/BlendShapeShader.js~BlendShapeShaderSource.html">BlendShapeShaderSource</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/BlinnPhongShader.js~BlinnPhongShader.html">BlinnPhongShader</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/BlinnPhongShader.js~BlinnPhongShaderSource.html">BlinnPhongShaderSource</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/DecalShader.js~DecalShader.html">DecalShader</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/DecalShader.js~DecalShaderSource.html">DecalShaderSource</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/DepthDisplayShader.js~DepthDisplayShader.html">DepthDisplayShader</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/DepthDisplayShader.js~DepthDisplayShaderSource.html">DepthDisplayShaderSource</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/EnvironmentMapShader.js~EnvironmentMapShader.html">EnvironmentMapShader</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/EnvironmentMapShader.js~EnvironmentMapShaderSource.html">EnvironmentMapShaderSource</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/FragmentSimpleShader.js~FragmentSimpleShader.html">FragmentSimpleShader</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/FragmentSimpleShader.js~FragmentSimpleShaderSource.html">FragmentSimpleShaderSource</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/FreeShader.js~FreeShader.html">FreeShader</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/HalfLambertAndWrapLightingShader.js~HalfLambertAndWrapLightingShader.html">HalfLambertAndWrapLightingShader</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/HalfLambertAndWrapLightingShader.js~HalfLambertAndWrapLightingShaderSource.html">HalfLambertAndWrapLightingShaderSource</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/HalfLambertShader.js~HalfLambertShader.html">HalfLambertShader</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/HalfLambertShader.js~HalfLambertShaderSource.html">HalfLambertShaderSource</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/LambertShader.js~LambertShader.html">LambertShader</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/LambertShader.js~LambertShaderSource.html">LambertShaderSource</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/PBRPrincipledShader.js~PBRPrincipledShader.html">PBRPrincipledShader</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/PBRPrincipledShader.js~PBRPrincipledShaderSource.html">PBRPrincipledShaderSource</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/ParticleShader.js~ParticleShaderSource.html">ParticleShaderSource</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/PassThroughShader.js~PassThroughShader.html">PassThroughShader</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/PassThroughShader.js~PassThroughShaderSource.html">PassThroughShaderSource</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/PhongShader.js~PhongShader.html">PhongShader</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/PhongShader.js~PhongShaderSource.html">PhongShaderSource</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/SkeletalShader.js~SkeletalShaderSource.html">SkeletalShaderSource</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/VertexWorldShader.js~VertexWorldShaderSource.html">VertexWorldShaderSource</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/VertexWorldShadowShader.js~VertexWorldShadowShaderSource.html">VertexWorldShadowShaderSource</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/WireframeShader.js~WireframeShader.html">WireframeShader</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/middle_level/shaders/WireframeShader.js~WireframeShaderSource.html">WireframeShaderSource</a></span></span></li> </ul> </div> </nav> <div class="content" data-ice="content"><h1 data-ice="title">src/middle_level/shaders/HalfLambertAndWrapLightingShader.js</h1> <pre class="source-code line-number raw-source-code"><code class="prettyprint linenums" data-ice="content">import Shader from &apos;../../low_level/shaders/Shader&apos;; import DecalShader from &apos;./DecalShader&apos;; import Vector3 from &apos;../../low_level/math/Vector3&apos;; import Vector4 from &apos;../../low_level/math/Vector4&apos;; export class HalfLambertAndWrapLightingShaderSource { FSDefine_HalfLambertAndWrapLightingShaderSource(in_, f, lights) { var sampler2D = this._sampler2DShadow_func(); var shaderText = &apos;&apos;; shaderText += `uniform vec4 Kd;\n`; shaderText += `uniform vec3 wrap;\n`; shaderText += &apos;uniform vec4 ambient;\n&apos;; // Ka * amount of ambient lights let lightNumExceptAmbient = lights.filter((light)=&gt;{return !light.isTypeAmbient();}).length; if (lightNumExceptAmbient &gt; 0) { shaderText += `uniform highp ${sampler2D} uDepthTexture[${lightNumExceptAmbient}];\n`; shaderText += `${in_} vec4 v_shadowCoord[${lightNumExceptAmbient}];\n`; shaderText += `uniform int isShadowCasting[${lightNumExceptAmbient}];\n`; } return shaderText; } FSShade_HalfLambertAndWrapLightingShaderSource(f, gl, lights) { var shaderText = &apos;&apos;; shaderText += &apos; vec4 surfaceColor = rt0;\n&apos;; shaderText += &apos; rt0 = vec4(0.0, 0.0, 0.0, 0.0);\n&apos;; for (let i=0; i&lt;lights.length; i++) { let light = lights[i]; let isShadowEnabledAsTexture = (light.camera &amp;&amp; light.camera.texture) ? true:false; shaderText += &apos; {\n&apos;; shaderText += Shader._generateLightStr(i); shaderText += Shader._generateShadowingStr(gl, i, isShadowEnabledAsTexture); shaderText += &apos; float diffuse = max(dot(lightDirection, normal), 0.0)*0.5+0.5;\n&apos;; shaderText += &apos; diffuse *= diffuse;\n&apos;; shaderText += &apos; vec3 diffuseVec = vec3(diffuse, diffuse, diffuse);\n&apos;; shaderText += &apos; diffuseVec = (diffuseVec+wrap) / (1.0 + wrap);\n&apos;; shaderText += ` rt0 += spotEffect * vec4(visibility, visibility, visibility, 1.0) * Kd * lightDiffuse[${i}] * vec4(diffuseVec, 1.0) * surfaceColor;\n`; shaderText += &apos; }\n&apos;; } shaderText += &apos; rt0.xyz += ambient.xyz;\n&apos;; return shaderText; } prepare_HalfLambertAndWrapLightingShaderSource(gl, shaderProgram, expression, vertexAttribs, existCamera_f, lights, material, extraData) { var vertexAttribsAsResult = []; material.setUniform(shaderProgram, &apos;uniform_Kd&apos;, this._glContext.getUniformLocation(shaderProgram, &apos;Kd&apos;)); material.setUniform(shaderProgram, &apos;uniform_wrap&apos;, this._glContext.getUniformLocation(shaderProgram, &apos;wrap&apos;)); material.setUniform(shaderProgram, &apos;uniform_ambient&apos;, this._glContext.getUniformLocation(shaderProgram, &apos;ambient&apos;)); return vertexAttribsAsResult; } } export default class HalfLambertAndWrapLightingShader extends DecalShader { constructor(glBoostContext, basicShader) { super(glBoostContext, basicShader); HalfLambertAndWrapLightingShader.mixin(HalfLambertAndWrapLightingShaderSource); this._wrap = new Vector3(0.6, 0.3, 0.0); } setUniforms(gl, glslProgram, scene, material, camera, mesh, lights) { super.setUniforms(gl, glslProgram, scene, material, camera, mesh, lights); var Kd = material.diffuseColor; let Ka = material.ambientColor; this._glContext.uniform4f(material.getUniform(glslProgram, &apos;uniform_Kd&apos;), Kd.x, Kd.y, Kd.z, Kd.w, true); this._glContext.uniform3f(material.getUniform(glslProgram, &apos;uniform_wrap&apos;), this._wrap.x, this._wrap.y, this._wrap.z, true); let ambient = Vector4.multiplyVector(Ka, scene.getAmountOfAmbientLightsIntensity()); this._glContext.uniform4f(material.getUniform(glslProgram, &apos;uniform_ambient&apos;), ambient.x, ambient.y, ambient.z, ambient.w, true); } set wrap(value) { this._wrap = value; } get wrap() { return this._wrap; } } GLBoost[&apos;HalfLambertAndWrapLightingShader&apos;] = HalfLambertAndWrapLightingShader; </code></pre> </div> <footer class="footer"> Generated by <a href="https://esdoc.org">ESDoc<span data-ice="esdocVersion">(1.1.0)</span><img src="./image/esdoc-logo-mini-black.png"></a> </footer> <script src="script/search_index.js"></script> <script src="script/search.js"></script> <script src="script/pretty-print.js"></script> <script src="script/inherited-summary.js"></script> <script src="script/test-summary.js"></script> <script src="script/inner-link.js"></script> <script src="script/patch-for-local.js"></script> </body> </html>
Java
/*jslint node: true, vars: true, plusplus: true, devel: true, nomen: true, regexp: true, indent: 2, maxerr: 50*/ /*global define, $, brackets, Mustache, window, appshell*/ define(function (require, exports, module) { "use strict"; // HEADER >> var NodeConnection = brackets.getModule("utils/NodeConnection"), Menus = brackets.getModule("command/Menus"), CommandManager = brackets.getModule("command/CommandManager"), Commands = brackets.getModule("command/Commands"), PreferencesManager = brackets.getModule("preferences/PreferencesManager"), _ = brackets.getModule("thirdparty/lodash"), KeyBindingManager = brackets.getModule("command/KeyBindingManager"); var ExtensionDiagnosis = require("modules/ExtensionDiagnosis"), Log = require("modules/Log"), Panel = require("modules/Panel"), FileTreeView = require("modules/FileTreeView"), Strings = require("strings"); var treeViewContextMenu = null; var _nodeConnection = null; var showMainPanel, initTreeViewContextMenu, setRootMenu, setDebugMenu, reloadBrackets, treeViewContextMenuState; var _disableTreeViewContextMenuAllItem; //<< var ContextMenuIds = { TREEVIEW_CTX_MENU: "kohei-synapse-treeview-context-menu" }; var ContextMenuCommandIds = { SYNAPSE_FILE_NEW: "kohei.synapse.file_new", SYNAPSE_DIRECTORY_NEW: "kohei.synapse.directory_new", SYNAPSE_FILE_REFRESH: "kohei.synapse.file_refresh", SYNAPSE_FILE_RENAME: "kohei.synapse.file_rename", SYNAPSE_DELETE: "kohei.synapse.delete" }; var MenuText = { SYNAPSE_CTX_FILE_NEW: Strings.SYNAPSE_CTX_FILE_NEW, SYNAPSE_CTX_DIRECTORY_NEW: Strings.SYNAPSE_CTX_DIRECTORY_NEW, SYNAPSE_CTX_FILE_REFRESH: Strings.SYNAPSE_CTX_FILE_REFRESH, SYNAPSE_CTX_FILE_RENAME: Strings.SYNAPSE_CTX_FILE_RENAME, SYNAPSE_CTX_DELETE: Strings.SYNAPSE_CTX_DELETE }; var Open_TreeView_Context_Menu_On_Directory_State = [ ContextMenuCommandIds.SYNAPSE_FILE_NEW, ContextMenuCommandIds.SYNAPSE_DIRECTORY_NEW, ContextMenuCommandIds.SYNAPSE_DELETE, ContextMenuCommandIds.SYNAPSE_FILE_REFRESH, ContextMenuCommandIds.SYNAPSE_FILE_RENAME ]; var Open_TreeView_Context_Menu_On_Linked_Directory_State = [ ContextMenuCommandIds.SYNAPSE_FILE_NEW, ContextMenuCommandIds.SYNAPSE_DIRECTORY_NEW, ContextMenuCommandIds.SYNAPSE_DELETE, ContextMenuCommandIds.SYNAPSE_FILE_REFRESH ]; var Open_TreeView_Context_Menu_On_File_State = [ ContextMenuCommandIds.SYNAPSE_FILE_RENAME, ContextMenuCommandIds.SYNAPSE_DELETE ]; var Open_TreeView_Context_Menu_On_Linked_File_State = [ ContextMenuCommandIds.SYNAPSE_FILE_RENAME, ContextMenuCommandIds.SYNAPSE_DELETE ]; var Open_TreeView_Context_Menu_On_Root_State = [ ContextMenuCommandIds.SYNAPSE_FILE_NEW, ContextMenuCommandIds.SYNAPSE_DIRECTORY_NEW, ContextMenuCommandIds.SYNAPSE_FILE_REFRESH ]; showMainPanel = function () { CommandManager.execute("kohei.synapse.mainPanel"); }; treeViewContextMenuState = function (entity) { _disableTreeViewContextMenuAllItem(); if (entity.class === "treeview-root") { Open_TreeView_Context_Menu_On_Root_State.forEach(function (id) { CommandManager.get(id).setEnabled(true); }); return; } if (entity.class === "treeview-directory") { Open_TreeView_Context_Menu_On_Directory_State.forEach(function (id) { CommandManager.get(id).setEnabled(true); }); return; } else if (entity.class === "treeview-ldirectory") { Open_TreeView_Context_Menu_On_Linked_Directory_State.forEach(function (id) { CommandManager.get(id).setEnabled(true); }); return; } else if (entity.class === "treeview-file") { Open_TreeView_Context_Menu_On_File_State.forEach(function (id) { CommandManager.get(id).setEnabled(true); }); return; } }; setRootMenu = function (domain) { var menu = CommandManager.register( "Synapse", "kohei.synapse.mainPanel", Panel.showMain); var topMenu = Menus.getMenu(Menus.AppMenuBar.VIEW_MENU); topMenu.addMenuDivider(); topMenu.addMenuItem(menu, { key: "Ctrl-Shift-Alt-Enter", displayKey: "Ctrl-Shift-Alt-Enter" }); //For Debug > //Panel.showMain(); setDebugMenu(); return new $.Deferred().resolve(domain).promise(); }; setDebugMenu = function () { var menu = CommandManager.register( "Reload App wiz Node", "kohei.syanpse.reloadBrackets", reloadBrackets); var topMenu = Menus.getMenu(Menus.AppMenuBar.VIEW_MENU); topMenu.addMenuDivider(); topMenu.addMenuItem(menu, { key: "Ctrl-Shift-F6", displeyKey: "Ctrl-Shift-F6" }); }; reloadBrackets = function () { try { _nodeConnection.domains.base.restartNode(); CommandManager.execute(Commands.APP_RELOAD); } catch (e) { console.log("SYNAPSE ERROR - Failed trying to restart Node", e); } }; initTreeViewContextMenu = function () { var d = new $.Deferred(); CommandManager .register(MenuText.SYNAPSE_CTX_FILE_REFRESH, ContextMenuCommandIds.SYNAPSE_FILE_REFRESH, FileTreeView.refresh); CommandManager .register(MenuText.SYNAPSE_CTX_FILE_RENAME, ContextMenuCommandIds.SYNAPSE_FILE_RENAME, FileTreeView.rename); CommandManager .register(MenuText.SYNAPSE_CTX_FILE_NEW, ContextMenuCommandIds.SYNAPSE_FILE_NEW, FileTreeView.newFile); CommandManager .register(MenuText.SYNAPSE_CTX_DIRECTORY_NEW, ContextMenuCommandIds.SYNAPSE_DIRECTORY_NEW, FileTreeView.newDirectory); CommandManager .register(MenuText.SYNAPSE_CTX_DELETE, ContextMenuCommandIds.SYNAPSE_DELETE, FileTreeView.removeFile); treeViewContextMenu = Menus.registerContextMenu(ContextMenuIds.TREEVIEW_CTX_MENU); treeViewContextMenu .addMenuItem(ContextMenuCommandIds.SYNAPSE_FILE_REFRESH); treeViewContextMenu .addMenuItem(ContextMenuCommandIds.SYNAPSE_FILE_RENAME, null, Menus.LAST, null); treeViewContextMenu .addMenuDivider(); treeViewContextMenu .addMenuItem(ContextMenuCommandIds.SYNAPSE_FILE_NEW, null, Menus.LAST, null); treeViewContextMenu .addMenuItem(ContextMenuCommandIds.SYNAPSE_DIRECTORY_NEW, null, Menus.LAST, null); treeViewContextMenu .addMenuDivider(); treeViewContextMenu .addMenuItem(ContextMenuCommandIds.SYNAPSE_DELETE, null, Menus.LAST, null); $("#synapse-treeview-container").contextmenu(function (e) { FileTreeView.onTreeViewContextMenu(e, treeViewContextMenu); }); return d.resolve().promise(); }; /* Private Methods */ _disableTreeViewContextMenuAllItem = function () { if (treeViewContextMenu === null) { return; } _.forIn(ContextMenuCommandIds, function (val, key) { CommandManager.get(val).setEnabled(false); }); }; /* for Debug */ _nodeConnection = new NodeConnection(); _nodeConnection.connect(true); exports.showMainPanel = showMainPanel; exports.setRootMenu = setRootMenu; exports.initTreeViewContextMenu = initTreeViewContextMenu; exports.ContextMenuCommandIds = ContextMenuCommandIds; exports.ContextMenuIds = ContextMenuIds; exports.treeViewContextMenuState = treeViewContextMenuState; exports.getModuleName = function () { return module.id; }; });
Java
{% load crispy_forms_tags %} <div class="auth-wrapper signup-wrapper"> <form role="form" method="post" action="{% url 'create_user' %}"> {% csrf_token %} <h2>Sign Up</h2> {{form | crispy }} <div class="extra-errors"></div> <button type="submit" class="btn btn-primary" data-disable-with="Signing Up…"> Sign Up </button> <span class="pull-right auth-alt-method"><a href="{% url 'my_profile' %}">Log In</a></span> <input type="hidden" name="next" value="{{ request.GET.next }}" /> </form> </div>
Java
'output dimensionalities for each column' import csv import sys import re import math from collections import defaultdict def get_words( text ): text = text.replace( "'", "" ) text = re.sub( r'\W+', ' ', text ) text = text.lower() text = text.split() words = [] for w in text: if w in words: continue words.append( w ) return words ### csv.field_size_limit( 1000000 ) input_file = sys.argv[1] target_col = 'SalaryNormalized' cols2tokenize = [ 'Title', 'FullDescription' ] cols2binarize = [ 'Loc1', 'Loc2', 'Loc3', 'Loc4', 'ContractType', 'ContractTime', 'Company', 'Category', 'SourceName' ] cols2drop = [ 'SalaryRaw' ] ### i_f = open( input_file ) reader = csv.reader( i_f ) headers = reader.next() target_index = headers.index( target_col ) indexes2tokenize = map( lambda x: headers.index( x ), cols2tokenize ) indexes2binarize = map( lambda x: headers.index( x ), cols2binarize ) indexes2drop = map( lambda x: headers.index( x ), cols2drop ) n = 0 unique_values = defaultdict( set ) for line in reader: for i in indexes2binarize: value = line[i] unique_values[i].add( value ) for i in indexes2tokenize: words = get_words( line[i] ) unique_values[i].update( words ) n += 1 if n % 10000 == 0: print n # print counts for i in sorted( unique_values ): l = len( unique_values[i] ) print "index: %s, count: %s" % ( i, l ) if l < 100: pass # print unique_values[i]
Java
#include <seqan/sequence.h> #include <seqan/basic.h> #include <seqan/find_motif.h> #include <seqan/file.h> #include <iostream> using namespace seqan; template<typename TString>//String<char> void countOneMers(TString const& str){ Iterator<TString>::Type StringIterator = begin(str); Iterator<TString>::Type EndIterator = end(str); String<unsigned int> counter; resize(counter, 26,0);//26 = AlphSize unsigned int normalize =ordValue('a'); unsigned int a=0; while(StringIterator != EndIterator){ a= ordValue(*StringIterator); std::cout<<a-normalize<<std::endl; ++value(counter,(a-normalize)); ++StringIterator; } StringIterator = begin(str); //Iterator<String<unsigned int> >::Type countIterator = begin(counter); int i=0; while(i<26){ if(counter[i]>0) std::cout<<char(i+'a')<<" "<<counter[i]<<std::endl; ++i; } } void replaceAs(String<char>& str){ str="hi"; } int main(){ String<char> str = "helloworld"; //countOneMers(str); replaceAs(str); std::cout<<str; return 0; }
Java
/* Default MDL font size */ .wj-control, .wj-control input { font-size: 16px; } /* Extra padding in grids and listboxes */ .wj-flexgrid .wj-cell { padding: 6px; } .wj-listbox-item { padding: 6px 10px; } /* Backgrounds */ .wj-content, div[wj-part='cells'] { background: #ffffff; color: #212121; } .wj-content .wj-input-group .wj-form-control { background: #ffffff; color: #212121; } /* Headers */ .wj-header { background: #e8e8e8; color: black; } /* FlexGrid */ div[wj-part='root'] { background: #ffffff; } .wj-state-selected { background: #e91e63; color: #ffffff; } .wj-state-multi-selected { background: #f06493; color: #ffffff; } .wj-input-group .wj-form-control, .wj-grid-editor { background: #ffffff; color: #212121; } .wj-flexgrid .wj-cell { border-right: none; border-bottom: 1px solid rgba(0, 0, 0, 0.1); } [dir="rtl"] .wj-cell { border-left: 1px solid rgba(0, 0, 0, 0.1); } /* Default grid cell color */ .wj-flexgrid .wj-cell:not(.wj-header):not(.wj-group):not(.wj-alt):not(.wj-state-selected):not(.wj-state-multi-selected) { background: #ffffff; } /* Alternate grid cell color */ .wj-flexgrid .wj-alt:not(.wj-header):not(.wj-group):not(.wj-state-selected):not(.wj-state-multi-selected) { background: #ffffff; } /* Group row background */ .wj-flexgrid .wj-group:not(.wj-state-selected):not(.wj-state-multi-selected) { background: #aa1145; color: #ffffff; } /* Default frozen boundaries */ .wj-flexgrid .wj-cell.wj-frozen-row { border-bottom-color: black; border-width: 1px; } .wj-flexgrid .wj-cell.wj-frozen-col { border-right-color: black; border-width: 1px; } /* Grid headers */ .wj-flexgrid .wj-header.wj-state-multi-selected { background: #d5d5d5; } .wj-flexgrid .wj-colheaders .wj-header.wj-state-multi-selected { border-bottom: 3px solid #e91e63; } .wj-flexgrid .wj-rowheaders .wj-header.wj-state-multi-selected { border-right: 3px solid #e91e63; } /* Marquee */ .wj-flexgrid .wj-marquee { position: absolute; box-sizing: border-box; border: 2px solid #e91e63; } .wj-flexsheet .wj-marquee { border: 2px solid #e91e63; } /* Drag marker */ .wj-flexgrid .wj-marker { background: #f44336; } /* Input Controls */ .wj-control.wj-content.wj-dropdown, .wj-inputnumber { background-color: transparent; border: none; border-bottom: 1px solid rgba(0, 0, 0, 0.12); } .wj-control.wj-content .wj-input-group input.wj-form-control { background-color: transparent; padding-bottom: 0; padding-top: 0; } .wj-content .wj-input-group-btn > .wj-btn:hover, .wj-content .wj-btn-group > .wj-btn:hover { background-color: rgba(0, 0, 0, 0.1); } .wj-content .wj-input-group-btn > .wj-btn, .wj-content .wj-btn-group > .wj-btn { border-style: none; border-radius: 2px; background-color: rgba(0, 0, 0, 0.02); color: rgba(0, 0, 0, 0.8); min-width: 32px; } /* Border Radii */ .wj-content, .wj-input-group, .wj-btn-group, .wj-btn-group-vertical, .wj-tooltip { border-radius: 0; } /* Tooltip */ /* style tooltips like https://www.getmdl.io/customize/index.html */ .wj-tooltip { padding: 20px; color: white; font-weight: bold; background-color: rgba(128, 128, 128, 0.85); border: none; } /* Gauges */ .wj-gauge .wj-pointer { fill: #e91e63; } .wj-gauge.wj-state-focused circle.wj-pointer { fill: #f44336; transition: fill .2s; /* delay used in MDL */ }
Java
package dbfiles import ( "encoding/csv" "io" "github.com/juju/errgo" ) type Driver interface { Extention() string Write(io.Writer, []string) error Read(io.Reader) ([][]string, error) } type CSV struct{} func (driver CSV) Extention() string { return "csv" } func (driver CSV) Write(writer io.Writer, values []string) error { csvwriter := csv.NewWriter(writer) err := csvwriter.WriteAll([][]string{values}) if err != nil { return errgo.Notef(err, "can not write to csv writer") } return nil } func (driver CSV) Read(reader io.Reader) ([][]string, error) { csvreader := csv.NewReader(reader) csvreader.FieldsPerRecord = -1 var values [][]string values, err := csvreader.ReadAll() if err != nil { return nil, errgo.Notef(err, "can not read all records from file") } return values, nil }
Java
const ASSETS_MODS_LENGTH = 13;//'/assets/mods/'.length; const CONTENT_TYPES = { 'css': 'text/css', 'js': 'text/javascript', 'json': 'application/json', 'png': 'image/png', 'jpg': 'image/jpeg', 'jpeg': 'image/jpeg', 'html': 'text/html', 'htm': 'text/html' }; /** * @type {Map<string, JSZip>} */ const jszipCache = new Map(); //Not exported because serviceworkers can't use es6 modules // eslint-disable-next-line no-unused-vars class PackedManager { /** * * @param {string} url */ async get(url) { try { const zip = await this._openZip(url); const file = zip.file(this._assetPath(url)); if (file === null) { return new Response(new Blob(), { status: 404, statusText: 'not found' }); } return new Response(await file.async('blob'), { headers: { 'Content-Type': this._contentType(url) }, status: 200, statusText: 'ok' }); } catch (e) { console.error('An error occured while reading a packed mod', e); return e; } } /** * * @param {string} url * @returns {Promise<string[]>} */ async getFiles(url) { const zip = await this._openZip(url); const folder = this._openFolder(zip, this._assetPath(url)); const result = []; folder.forEach((relativePath, file) => { if (!file.dir) { result.push(relativePath); } }); return result; } /** * * @param {string} url * @returns {Promise<boolean>} */ async isDirectory(url) { const zip = await this._openZip(url); const file = zip.file(this._assetPath(url)); return file && file.dir; } /** * * @param {string} url * @returns {Promise<boolean>} */ async isFile(url) { const zip = await this._openZip(url); const file = zip.file(this._assetPath(url)); return !!file; } /** * * @param {string} url */ packedName(url) { url = this._normalize(url); return decodeURIComponent(url.substring(ASSETS_MODS_LENGTH, url.indexOf('/', ASSETS_MODS_LENGTH))); } /** * * @param {string} url */ async _openZip(url) { const zip = this._zipPath(url); const cached = jszipCache.get(zip); if (cached) { return cached; } const request = new Request('http://' + location.hostname + '.cc' + zip); const cache = await caches.open('zips'); let response = await cache.match(request); if (!response) { response = await fetch(zip); cache.put(request, response.clone()); } const result = await JSZip.loadAsync(response.blob()); jszipCache.set(zip, result); return result; } /** * * @param {JSZip} root * @param {string} path */ _openFolder(root, path) { const folders = path.split(/\//g); for (const folder of folders) { root = root.folder(folder); } return root; } /** * @param {string} url * @returns {string} */ _contentType(url) { url = this._normalize(url); return CONTENT_TYPES[url.substr(url.lastIndexOf('.') + 1)] || 'text/plain'; } /** * * @param {string} url */ _zipPath(url) { url = this._normalize(url); return url.substr(0, url.indexOf('/', ASSETS_MODS_LENGTH)); } /** * * @param {string} url */ _assetPath(url) { url = this._normalize(url); return url.substr(url.indexOf('/', ASSETS_MODS_LENGTH) + 1); } /** * * @param {string} url */ _normalize(url) { url = url.replace(/\\/g, '/').replace(/\/\//, '/'); //TODO: resolve absolute paths if (!url.startsWith('/')) { url = '/' + url; } if (url.startsWith('/ccloader')) { url = url.substr(9); // '/ccloader'.length } return url; } }
Java
## # This code was generated by # \ / _ _ _| _ _ # | (_)\/(_)(_|\/| |(/_ v1.0.0 # / / # # frozen_string_literal: true require 'spec_helper.rb' describe 'ExportConfiguration' do it "can fetch" do @holodeck.mock(Twilio::Response.new(500, '')) expect { @client.bulkexports.v1.export_configuration('resource_type').fetch() }.to raise_exception(Twilio::REST::TwilioError) expect( @holodeck.has_request?(Holodeck::Request.new( method: 'get', url: 'https://bulkexports.twilio.com/v1/Exports/resource_type/Configuration', ))).to eq(true) end it "receives fetch responses" do @holodeck.mock(Twilio::Response.new( 200, %q[ { "url": "https://bulkexports.twilio.com/v1/Exports/Messages/Configuration", "enabled": true, "webhook_url": "", "webhook_method": "", "resource_type": "Messages" } ] )) actual = @client.bulkexports.v1.export_configuration('resource_type').fetch() expect(actual).to_not eq(nil) end it "can update" do @holodeck.mock(Twilio::Response.new(500, '')) expect { @client.bulkexports.v1.export_configuration('resource_type').update() }.to raise_exception(Twilio::REST::TwilioError) expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', url: 'https://bulkexports.twilio.com/v1/Exports/resource_type/Configuration', ))).to eq(true) end it "receives update responses" do @holodeck.mock(Twilio::Response.new( 200, %q[ { "url": "https://bulkexports.twilio.com/v1/Exports/Messages/Configuration", "enabled": true, "webhook_url": "", "resource_type": "Messages", "webhook_method": "" } ] )) actual = @client.bulkexports.v1.export_configuration('resource_type').update() expect(actual).to_not eq(nil) end end
Java
<?php /** * Author: Nil Portugués Calderó <contact@nilportugues.com> * Date: 12/18/15 * Time: 11:36 PM. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace NilPortugues\SchemaOrg\Classes; use NilPortugues\SchemaOrg\SchemaClass; /** * METHODSTART. * * @method static \NilPortugues\SchemaOrg\Properties\BranchOfProperty branchOf() * @method static \NilPortugues\SchemaOrg\Properties\BranchCodeProperty branchCode() * @method static \NilPortugues\SchemaOrg\Properties\CurrenciesAcceptedProperty currenciesAccepted() * @method static \NilPortugues\SchemaOrg\Properties\OpeningHoursProperty openingHours() * @method static \NilPortugues\SchemaOrg\Properties\PaymentAcceptedProperty paymentAccepted() * @method static \NilPortugues\SchemaOrg\Properties\PriceRangeProperty priceRange() * @method static \NilPortugues\SchemaOrg\Properties\HasOfferCatalogProperty hasOfferCatalog() * @method static \NilPortugues\SchemaOrg\Properties\AddressProperty address() * @method static \NilPortugues\SchemaOrg\Properties\AggregateRatingProperty aggregateRating() * @method static \NilPortugues\SchemaOrg\Properties\AlumniProperty alumni() * @method static \NilPortugues\SchemaOrg\Properties\AreaServedProperty areaServed() * @method static \NilPortugues\SchemaOrg\Properties\AwardProperty award() * @method static \NilPortugues\SchemaOrg\Properties\AwardsProperty awards() * @method static \NilPortugues\SchemaOrg\Properties\ParentOrganizationProperty parentOrganization() * @method static \NilPortugues\SchemaOrg\Properties\BrandProperty brand() * @method static \NilPortugues\SchemaOrg\Properties\ContactPointProperty contactPoint() * @method static \NilPortugues\SchemaOrg\Properties\ContactPointsProperty contactPoints() * @method static \NilPortugues\SchemaOrg\Properties\DepartmentProperty department() * @method static \NilPortugues\SchemaOrg\Properties\DunsProperty duns() * @method static \NilPortugues\SchemaOrg\Properties\EmailProperty email() * @method static \NilPortugues\SchemaOrg\Properties\EmployeeProperty employee() * @method static \NilPortugues\SchemaOrg\Properties\EmployeesProperty employees() * @method static \NilPortugues\SchemaOrg\Properties\EventProperty event() * @method static \NilPortugues\SchemaOrg\Properties\EventsProperty events() * @method static \NilPortugues\SchemaOrg\Properties\FaxNumberProperty faxNumber() * @method static \NilPortugues\SchemaOrg\Properties\FounderProperty founder() * @method static \NilPortugues\SchemaOrg\Properties\FoundersProperty founders() * @method static \NilPortugues\SchemaOrg\Properties\DissolutionDateProperty dissolutionDate() * @method static \NilPortugues\SchemaOrg\Properties\FoundingDateProperty foundingDate() * @method static \NilPortugues\SchemaOrg\Properties\GlobalLocationNumberProperty globalLocationNumber() * @method static \NilPortugues\SchemaOrg\Properties\HasPOSProperty hasPOS() * @method static \NilPortugues\SchemaOrg\Properties\IsicV4Property isicV4() * @method static \NilPortugues\SchemaOrg\Properties\LegalNameProperty legalName() * @method static \NilPortugues\SchemaOrg\Properties\LocationProperty location() * @method static \NilPortugues\SchemaOrg\Properties\LogoProperty logo() * @method static \NilPortugues\SchemaOrg\Properties\MakesOfferProperty makesOffer() * @method static \NilPortugues\SchemaOrg\Properties\MemberProperty member() * @method static \NilPortugues\SchemaOrg\Properties\MemberOfProperty memberOf() * @method static \NilPortugues\SchemaOrg\Properties\MembersProperty members() * @method static \NilPortugues\SchemaOrg\Properties\NaicsProperty naics() * @method static \NilPortugues\SchemaOrg\Properties\NumberOfEmployeesProperty numberOfEmployees() * @method static \NilPortugues\SchemaOrg\Properties\OwnsProperty owns() * @method static \NilPortugues\SchemaOrg\Properties\ReviewProperty review() * @method static \NilPortugues\SchemaOrg\Properties\ReviewsProperty reviews() * @method static \NilPortugues\SchemaOrg\Properties\SeeksProperty seeks() * @method static \NilPortugues\SchemaOrg\Properties\ServiceAreaProperty serviceArea() * @method static \NilPortugues\SchemaOrg\Properties\SubOrganizationProperty subOrganization() * @method static \NilPortugues\SchemaOrg\Properties\TaxIDProperty taxID() * @method static \NilPortugues\SchemaOrg\Properties\TelephoneProperty telephone() * @method static \NilPortugues\SchemaOrg\Properties\VatIDProperty vatID() * @method static \NilPortugues\SchemaOrg\Properties\AdditionalTypeProperty additionalType() * @method static \NilPortugues\SchemaOrg\Properties\AlternateNameProperty alternateName() * @method static \NilPortugues\SchemaOrg\Properties\DescriptionProperty description() * @method static \NilPortugues\SchemaOrg\Properties\ImageProperty image() * @method static \NilPortugues\SchemaOrg\Properties\MainEntityOfPageProperty mainEntityOfPage() * @method static \NilPortugues\SchemaOrg\Properties\NameProperty name() * @method static \NilPortugues\SchemaOrg\Properties\SameAsProperty sameAs() * @method static \NilPortugues\SchemaOrg\Properties\UrlProperty url() * @method static \NilPortugues\SchemaOrg\Properties\PotentialActionProperty potentialAction() * @method static \NilPortugues\SchemaOrg\Properties\ContainedInPlaceProperty containedInPlace() * @method static \NilPortugues\SchemaOrg\Properties\ContainsPlaceProperty containsPlace() * @method static \NilPortugues\SchemaOrg\Properties\ContainedInProperty containedIn() * @method static \NilPortugues\SchemaOrg\Properties\GeoProperty geo() * @method static \NilPortugues\SchemaOrg\Properties\HasMapProperty hasMap() * @method static \NilPortugues\SchemaOrg\Properties\MapProperty map() * @method static \NilPortugues\SchemaOrg\Properties\MapsProperty maps() * @method static \NilPortugues\SchemaOrg\Properties\OpeningHoursSpecificationProperty openingHoursSpecification() * @method static \NilPortugues\SchemaOrg\Properties\PhotoProperty photo() * @method static \NilPortugues\SchemaOrg\Properties\PhotosProperty photos() * @method static \NilPortugues\SchemaOrg\Properties\AdditionalPropertyProperty additionalProperty() * METHODEND. * * An electrician. */ class Electrician extends SchemaClass { /** * @var string */ protected static $schemaUrl = 'http://schema.org/Electrician'; /** * @var array */ protected static $supportedMethods = [ 'additionalProperty' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\AdditionalPropertyProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'additionalType' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\AdditionalTypeProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Thing', ], 'address' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\AddressProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'aggregateRating' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\AggregateRatingProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'alternateName' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\AlternateNameProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Thing', ], 'alumni' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\AlumniProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'areaServed' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\AreaServedProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'award' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\AwardProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'awards' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\AwardsProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'branchCode' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\BranchCodeProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'branchOf' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\BranchOfProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\LocalBusiness', ], 'brand' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\BrandProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'contactPoint' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\ContactPointProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'contactPoints' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\ContactPointsProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'containedIn' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\ContainedInProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'containedInPlace' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\ContainedInPlaceProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'containsPlace' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\ContainsPlaceProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'currenciesAccepted' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\CurrenciesAcceptedProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\LocalBusiness', ], 'department' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\DepartmentProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'description' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\DescriptionProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Thing', ], 'dissolutionDate' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\DissolutionDateProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'duns' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\DunsProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'email' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\EmailProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'employee' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\EmployeeProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'employees' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\EmployeesProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'event' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\EventProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'events' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\EventsProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'faxNumber' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\FaxNumberProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'founder' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\FounderProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'founders' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\FoundersProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'foundingDate' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\FoundingDateProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'geo' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\GeoProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'globalLocationNumber' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\GlobalLocationNumberProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'hasMap' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\HasMapProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'hasOfferCatalog' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\HasOfferCatalogProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'hasPOS' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\HasPOSProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'image' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\ImageProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Thing', ], 'isicV4' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\IsicV4Property', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'legalName' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\LegalNameProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'location' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\LocationProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'logo' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\LogoProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'mainEntityOfPage' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\MainEntityOfPageProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Thing', ], 'makesOffer' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\MakesOfferProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'map' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\MapProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'maps' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\MapsProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'member' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\MemberProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'memberOf' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\MemberOfProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'members' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\MembersProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'naics' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\NaicsProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'name' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\NameProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Thing', ], 'numberOfEmployees' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\NumberOfEmployeesProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'openingHours' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\OpeningHoursProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\LocalBusiness', ], 'openingHoursSpecification' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\OpeningHoursSpecificationProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'owns' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\OwnsProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'parentOrganization' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\ParentOrganizationProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'paymentAccepted' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\PaymentAcceptedProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\LocalBusiness', ], 'photo' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\PhotoProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'photos' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\PhotosProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'potentialAction' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\PotentialActionProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Thing', ], 'priceRange' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\PriceRangeProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\LocalBusiness', ], 'review' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\ReviewProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'reviews' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\ReviewsProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'sameAs' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\SameAsProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Thing', ], 'seeks' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\SeeksProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'serviceArea' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\ServiceAreaProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'subOrganization' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\SubOrganizationProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'taxID' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\TaxIDProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], 'telephone' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\TelephoneProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Place', ], 'url' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\UrlProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Thing', ], 'vatID' => [ 'propertyClass' => '\NilPortugues\SchemaOrg\Properties\VatIDProperty', 'schemaClass' => '\NilPortugues\SchemaOrg\Classes\Organization', ], ]; }
Java
/* micropolisJS. Adapted by Graeme McCutcheon from Micropolis. * * This code is released under the GNU GPL v3, with some additional terms. * Please see the files LICENSE and COPYING for details. Alternatively, * consult http://micropolisjs.graememcc.co.uk/LICENSE and * http://micropolisjs.graememcc.co.uk/COPYING * */ Micro.GameTools = function (map) { return { airport: new Micro.BuildingTool(10000, Tile.AIRPORT, map, 6, false), bulldozer: new Micro.BulldozerTool(map), coal: new Micro.BuildingTool(3000, Tile.POWERPLANT, map, 4, false), commercial: new Micro.BuildingTool(100, Tile.COMCLR, map, 3, false), fire: new Micro.BuildingTool(500, Tile.FIRESTATION, map, 3, false), industrial: new Micro.BuildingTool(100, Tile.INDCLR, map, 3, false), nuclear: new Micro.BuildingTool(5000, Tile.NUCLEAR, map, 4, true), park: new Micro.ParkTool(map), police: new Micro.BuildingTool(500, Tile.POLICESTATION, map, 3, false), port: new Micro.BuildingTool(3000, Tile.PORT, map, 4, false), rail: new Micro.RailTool(map), residential: new Micro.BuildingTool(100, Tile.FREEZ, map, 3, false), road: new Micro.RoadTool(map), query: new Micro.QueryTool(map), stadium: new Micro.BuildingTool(5000, Tile.STADIUM, map, 4, false), wire: new Micro.WireTool(map), }; };
Java
/**************************************************************************************** Copyright (C) 2013 Autodesk, Inc. All rights reserved. Use of this software is subject to the terms of the Autodesk license agreement provided at the time of installation or download, or which otherwise accompanies this software in either electronic or hard copy form. ****************************************************************************************/ //! \file fbxstatus.h #ifndef _FBXSDK_CORE_BASE_STATUS_H_ #define _FBXSDK_CORE_BASE_STATUS_H_ #include <fbxsdk/fbxsdk_def.h> #include <fbxsdk/core/base/fbxstring.h> #include <fbxsdk/fbxsdk_nsbegin.h> /** This class facilitates the testing/reporting of errors. It encapsulates the * status code and the internal FBXSDK error code as returned by the API functions. * \nosubgrouping */ class FBXSDK_DLL FbxStatus { public: //! Available status codes. enum EStatusCode { eSuccess = 0, //!< Operation was successful eFailure, //!< Operation failed eInsufficientMemory, //!< Operation failed due to insufficient memory eInvalidParameter, //!< An invalid parameter was provided eIndexOutOfRange, //!< Index value outside the valid range ePasswordError, //!< Operation on FBX file password failed eInvalidFileVersion, //!< File version not supported (anymore or yet) eInvalidFile //!< Operation on the file access failed }; //! Default constructor. FbxStatus(); FbxStatus(EStatusCode pCode); FbxStatus(const FbxStatus& rhs); FbxStatus& operator=(const FbxStatus& rhs); /** Equivalence operator. * \param rhs Status object to compare. * \return \c True if all the members of \e rhs are equal to this instance members and \c False otherwise. */ bool operator==(const FbxStatus& rhs) const { return (mCode == rhs.mCode); } /** Equivalence operator. * \param pCode Status code to compare. * \return \c True if the code member of this instance equals \e pCode and \c False otherwise. */ bool operator==(const EStatusCode pCode) const { return (mCode == pCode); } /** Non-Equivalence operator. * \param rhs Status object to compare. * \return \c True if at least one member of \e rhs is not equal to this instance member and \c True otherwise. */ bool operator!=(const FbxStatus& rhs) const { return (mCode != rhs.mCode); } /** Non-Equivalence operator. * \param rhs Status code to compare. * \return \c True if the code member of this instance equals \e rhs and \c False otherwise. */ bool operator!=(const EStatusCode rhs) const { return (mCode != rhs); } /** The conversion operator that converts a FbxStatus object to bool. * The result it returns will be \c True if the FbxStatus does not contain * an error, and \c False if it does. */ operator bool() const { return mCode==eSuccess; } /** Determines whether there is an error. * \return \c True if an error occured and \c False if the operation was sucessful. */ bool Error() const { return !this->operator bool(); } //! Clear error code and message from the instance. After this call, it will behave as if it contained eSuccess. void Clear(); //! Retrieve the type of error that occurred, as specified in the enumeration. EStatusCode GetCode() const { return mCode; } /** Change the current code of the instance. * \param rhs New code value. */ void SetCode(const EStatusCode rhs); /** Change the current code of the instance. * \param rhs New code value. * \param pErrorMsg Optional error description string. This string can have formatting characters * The function will use the vsnprintf function to assemble the final string * using an internal buffer of 4096 characters. */ void SetCode(const EStatusCode rhs, const char* pErrorMsg, ...); //! Get the error message string corresponding to the current code. const char* GetErrorString() const; /***************************************************************************************************************************** ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! ** *****************************************************************************************************************************/ #ifndef DOXYGEN_SHOULD_SKIP_THIS private: EStatusCode mCode; FbxString mErrorString; #endif /* !DOXYGEN_SHOULD_SKIP_THIS */ }; #include <fbxsdk/fbxsdk_nsend.h> #endif /* _FBXSDK_CORE_BASE_STATUS_H_ */
Java
export { default as createShallow } from './createShallow'; export { default as createMount } from './createMount'; export { default as createRender } from './createRender'; export { default as findOutermostIntrinsic, wrapsIntrinsicElement } from './findOutermostIntrinsic'; export { default as getClasses } from './getClasses'; export { default as unwrap } from './unwrap';
Java
var expect = require("chai").expect; var reindeerRace = require("../../src/day-14/reindeer-race"); describe("--- Day 14: (1/2) distance traveled --- ", () => { it("counts the distance traveled after 1000s", () => { var reindeerSpecs = [ "Comet can fly 14 km/s for 10 seconds, but then must rest for 127 seconds.", "Dancer can fly 16 km/s for 11 seconds, but then must rest for 162 seconds." ]; expect(reindeerRace.race(reindeerSpecs, 1000).winnerByDistance.distanceTraveled).to.equal(1120); }); }); describe("--- Day 14: (2/2) points awarded --- ", () => { it("counts the points awarded for being in the lead after 1000s", () => { var reindeerSpecs = [ "Comet can fly 14 km/s for 10 seconds, but then must rest for 127 seconds.", "Dancer can fly 16 km/s for 11 seconds, but then must rest for 162 seconds." ]; expect(reindeerRace.race(reindeerSpecs, 1000).winnerByPoints.pointsAwarded).to.equal(689); }); });
Java
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var jsdom = require("jsdom"); var chai_1 = require("chai"); var ColorManager_1 = require("./ColorManager"); describe('ColorManager', function () { var cm; var dom; var document; var window; beforeEach(function () { dom = new jsdom.JSDOM(''); window = dom.window; document = window.document; window.HTMLCanvasElement.prototype.getContext = function () { return ({ createLinearGradient: function () { return null; }, fillRect: function () { }, getImageData: function () { return { data: [0, 0, 0, 0xFF] }; } }); }; cm = new ColorManager_1.ColorManager(document, false); }); describe('constructor', function () { it('should fill all colors with values', function () { for (var _i = 0, _a = Object.keys(cm.colors); _i < _a.length; _i++) { var key = _a[_i]; if (key !== 'ansi') { chai_1.assert.ok(cm.colors[key].css.length >= 7); } } chai_1.assert.equal(cm.colors.ansi.length, 256); }); it('should fill 240 colors with expected values', function () { chai_1.assert.equal(cm.colors.ansi[16].css, '#000000'); chai_1.assert.equal(cm.colors.ansi[17].css, '#00005f'); chai_1.assert.equal(cm.colors.ansi[18].css, '#000087'); chai_1.assert.equal(cm.colors.ansi[19].css, '#0000af'); chai_1.assert.equal(cm.colors.ansi[20].css, '#0000d7'); chai_1.assert.equal(cm.colors.ansi[21].css, '#0000ff'); chai_1.assert.equal(cm.colors.ansi[22].css, '#005f00'); chai_1.assert.equal(cm.colors.ansi[23].css, '#005f5f'); chai_1.assert.equal(cm.colors.ansi[24].css, '#005f87'); chai_1.assert.equal(cm.colors.ansi[25].css, '#005faf'); chai_1.assert.equal(cm.colors.ansi[26].css, '#005fd7'); chai_1.assert.equal(cm.colors.ansi[27].css, '#005fff'); chai_1.assert.equal(cm.colors.ansi[28].css, '#008700'); chai_1.assert.equal(cm.colors.ansi[29].css, '#00875f'); chai_1.assert.equal(cm.colors.ansi[30].css, '#008787'); chai_1.assert.equal(cm.colors.ansi[31].css, '#0087af'); chai_1.assert.equal(cm.colors.ansi[32].css, '#0087d7'); chai_1.assert.equal(cm.colors.ansi[33].css, '#0087ff'); chai_1.assert.equal(cm.colors.ansi[34].css, '#00af00'); chai_1.assert.equal(cm.colors.ansi[35].css, '#00af5f'); chai_1.assert.equal(cm.colors.ansi[36].css, '#00af87'); chai_1.assert.equal(cm.colors.ansi[37].css, '#00afaf'); chai_1.assert.equal(cm.colors.ansi[38].css, '#00afd7'); chai_1.assert.equal(cm.colors.ansi[39].css, '#00afff'); chai_1.assert.equal(cm.colors.ansi[40].css, '#00d700'); chai_1.assert.equal(cm.colors.ansi[41].css, '#00d75f'); chai_1.assert.equal(cm.colors.ansi[42].css, '#00d787'); chai_1.assert.equal(cm.colors.ansi[43].css, '#00d7af'); chai_1.assert.equal(cm.colors.ansi[44].css, '#00d7d7'); chai_1.assert.equal(cm.colors.ansi[45].css, '#00d7ff'); chai_1.assert.equal(cm.colors.ansi[46].css, '#00ff00'); chai_1.assert.equal(cm.colors.ansi[47].css, '#00ff5f'); chai_1.assert.equal(cm.colors.ansi[48].css, '#00ff87'); chai_1.assert.equal(cm.colors.ansi[49].css, '#00ffaf'); chai_1.assert.equal(cm.colors.ansi[50].css, '#00ffd7'); chai_1.assert.equal(cm.colors.ansi[51].css, '#00ffff'); chai_1.assert.equal(cm.colors.ansi[52].css, '#5f0000'); chai_1.assert.equal(cm.colors.ansi[53].css, '#5f005f'); chai_1.assert.equal(cm.colors.ansi[54].css, '#5f0087'); chai_1.assert.equal(cm.colors.ansi[55].css, '#5f00af'); chai_1.assert.equal(cm.colors.ansi[56].css, '#5f00d7'); chai_1.assert.equal(cm.colors.ansi[57].css, '#5f00ff'); chai_1.assert.equal(cm.colors.ansi[58].css, '#5f5f00'); chai_1.assert.equal(cm.colors.ansi[59].css, '#5f5f5f'); chai_1.assert.equal(cm.colors.ansi[60].css, '#5f5f87'); chai_1.assert.equal(cm.colors.ansi[61].css, '#5f5faf'); chai_1.assert.equal(cm.colors.ansi[62].css, '#5f5fd7'); chai_1.assert.equal(cm.colors.ansi[63].css, '#5f5fff'); chai_1.assert.equal(cm.colors.ansi[64].css, '#5f8700'); chai_1.assert.equal(cm.colors.ansi[65].css, '#5f875f'); chai_1.assert.equal(cm.colors.ansi[66].css, '#5f8787'); chai_1.assert.equal(cm.colors.ansi[67].css, '#5f87af'); chai_1.assert.equal(cm.colors.ansi[68].css, '#5f87d7'); chai_1.assert.equal(cm.colors.ansi[69].css, '#5f87ff'); chai_1.assert.equal(cm.colors.ansi[70].css, '#5faf00'); chai_1.assert.equal(cm.colors.ansi[71].css, '#5faf5f'); chai_1.assert.equal(cm.colors.ansi[72].css, '#5faf87'); chai_1.assert.equal(cm.colors.ansi[73].css, '#5fafaf'); chai_1.assert.equal(cm.colors.ansi[74].css, '#5fafd7'); chai_1.assert.equal(cm.colors.ansi[75].css, '#5fafff'); chai_1.assert.equal(cm.colors.ansi[76].css, '#5fd700'); chai_1.assert.equal(cm.colors.ansi[77].css, '#5fd75f'); chai_1.assert.equal(cm.colors.ansi[78].css, '#5fd787'); chai_1.assert.equal(cm.colors.ansi[79].css, '#5fd7af'); chai_1.assert.equal(cm.colors.ansi[80].css, '#5fd7d7'); chai_1.assert.equal(cm.colors.ansi[81].css, '#5fd7ff'); chai_1.assert.equal(cm.colors.ansi[82].css, '#5fff00'); chai_1.assert.equal(cm.colors.ansi[83].css, '#5fff5f'); chai_1.assert.equal(cm.colors.ansi[84].css, '#5fff87'); chai_1.assert.equal(cm.colors.ansi[85].css, '#5fffaf'); chai_1.assert.equal(cm.colors.ansi[86].css, '#5fffd7'); chai_1.assert.equal(cm.colors.ansi[87].css, '#5fffff'); chai_1.assert.equal(cm.colors.ansi[88].css, '#870000'); chai_1.assert.equal(cm.colors.ansi[89].css, '#87005f'); chai_1.assert.equal(cm.colors.ansi[90].css, '#870087'); chai_1.assert.equal(cm.colors.ansi[91].css, '#8700af'); chai_1.assert.equal(cm.colors.ansi[92].css, '#8700d7'); chai_1.assert.equal(cm.colors.ansi[93].css, '#8700ff'); chai_1.assert.equal(cm.colors.ansi[94].css, '#875f00'); chai_1.assert.equal(cm.colors.ansi[95].css, '#875f5f'); chai_1.assert.equal(cm.colors.ansi[96].css, '#875f87'); chai_1.assert.equal(cm.colors.ansi[97].css, '#875faf'); chai_1.assert.equal(cm.colors.ansi[98].css, '#875fd7'); chai_1.assert.equal(cm.colors.ansi[99].css, '#875fff'); chai_1.assert.equal(cm.colors.ansi[100].css, '#878700'); chai_1.assert.equal(cm.colors.ansi[101].css, '#87875f'); chai_1.assert.equal(cm.colors.ansi[102].css, '#878787'); chai_1.assert.equal(cm.colors.ansi[103].css, '#8787af'); chai_1.assert.equal(cm.colors.ansi[104].css, '#8787d7'); chai_1.assert.equal(cm.colors.ansi[105].css, '#8787ff'); chai_1.assert.equal(cm.colors.ansi[106].css, '#87af00'); chai_1.assert.equal(cm.colors.ansi[107].css, '#87af5f'); chai_1.assert.equal(cm.colors.ansi[108].css, '#87af87'); chai_1.assert.equal(cm.colors.ansi[109].css, '#87afaf'); chai_1.assert.equal(cm.colors.ansi[110].css, '#87afd7'); chai_1.assert.equal(cm.colors.ansi[111].css, '#87afff'); chai_1.assert.equal(cm.colors.ansi[112].css, '#87d700'); chai_1.assert.equal(cm.colors.ansi[113].css, '#87d75f'); chai_1.assert.equal(cm.colors.ansi[114].css, '#87d787'); chai_1.assert.equal(cm.colors.ansi[115].css, '#87d7af'); chai_1.assert.equal(cm.colors.ansi[116].css, '#87d7d7'); chai_1.assert.equal(cm.colors.ansi[117].css, '#87d7ff'); chai_1.assert.equal(cm.colors.ansi[118].css, '#87ff00'); chai_1.assert.equal(cm.colors.ansi[119].css, '#87ff5f'); chai_1.assert.equal(cm.colors.ansi[120].css, '#87ff87'); chai_1.assert.equal(cm.colors.ansi[121].css, '#87ffaf'); chai_1.assert.equal(cm.colors.ansi[122].css, '#87ffd7'); chai_1.assert.equal(cm.colors.ansi[123].css, '#87ffff'); chai_1.assert.equal(cm.colors.ansi[124].css, '#af0000'); chai_1.assert.equal(cm.colors.ansi[125].css, '#af005f'); chai_1.assert.equal(cm.colors.ansi[126].css, '#af0087'); chai_1.assert.equal(cm.colors.ansi[127].css, '#af00af'); chai_1.assert.equal(cm.colors.ansi[128].css, '#af00d7'); chai_1.assert.equal(cm.colors.ansi[129].css, '#af00ff'); chai_1.assert.equal(cm.colors.ansi[130].css, '#af5f00'); chai_1.assert.equal(cm.colors.ansi[131].css, '#af5f5f'); chai_1.assert.equal(cm.colors.ansi[132].css, '#af5f87'); chai_1.assert.equal(cm.colors.ansi[133].css, '#af5faf'); chai_1.assert.equal(cm.colors.ansi[134].css, '#af5fd7'); chai_1.assert.equal(cm.colors.ansi[135].css, '#af5fff'); chai_1.assert.equal(cm.colors.ansi[136].css, '#af8700'); chai_1.assert.equal(cm.colors.ansi[137].css, '#af875f'); chai_1.assert.equal(cm.colors.ansi[138].css, '#af8787'); chai_1.assert.equal(cm.colors.ansi[139].css, '#af87af'); chai_1.assert.equal(cm.colors.ansi[140].css, '#af87d7'); chai_1.assert.equal(cm.colors.ansi[141].css, '#af87ff'); chai_1.assert.equal(cm.colors.ansi[142].css, '#afaf00'); chai_1.assert.equal(cm.colors.ansi[143].css, '#afaf5f'); chai_1.assert.equal(cm.colors.ansi[144].css, '#afaf87'); chai_1.assert.equal(cm.colors.ansi[145].css, '#afafaf'); chai_1.assert.equal(cm.colors.ansi[146].css, '#afafd7'); chai_1.assert.equal(cm.colors.ansi[147].css, '#afafff'); chai_1.assert.equal(cm.colors.ansi[148].css, '#afd700'); chai_1.assert.equal(cm.colors.ansi[149].css, '#afd75f'); chai_1.assert.equal(cm.colors.ansi[150].css, '#afd787'); chai_1.assert.equal(cm.colors.ansi[151].css, '#afd7af'); chai_1.assert.equal(cm.colors.ansi[152].css, '#afd7d7'); chai_1.assert.equal(cm.colors.ansi[153].css, '#afd7ff'); chai_1.assert.equal(cm.colors.ansi[154].css, '#afff00'); chai_1.assert.equal(cm.colors.ansi[155].css, '#afff5f'); chai_1.assert.equal(cm.colors.ansi[156].css, '#afff87'); chai_1.assert.equal(cm.colors.ansi[157].css, '#afffaf'); chai_1.assert.equal(cm.colors.ansi[158].css, '#afffd7'); chai_1.assert.equal(cm.colors.ansi[159].css, '#afffff'); chai_1.assert.equal(cm.colors.ansi[160].css, '#d70000'); chai_1.assert.equal(cm.colors.ansi[161].css, '#d7005f'); chai_1.assert.equal(cm.colors.ansi[162].css, '#d70087'); chai_1.assert.equal(cm.colors.ansi[163].css, '#d700af'); chai_1.assert.equal(cm.colors.ansi[164].css, '#d700d7'); chai_1.assert.equal(cm.colors.ansi[165].css, '#d700ff'); chai_1.assert.equal(cm.colors.ansi[166].css, '#d75f00'); chai_1.assert.equal(cm.colors.ansi[167].css, '#d75f5f'); chai_1.assert.equal(cm.colors.ansi[168].css, '#d75f87'); chai_1.assert.equal(cm.colors.ansi[169].css, '#d75faf'); chai_1.assert.equal(cm.colors.ansi[170].css, '#d75fd7'); chai_1.assert.equal(cm.colors.ansi[171].css, '#d75fff'); chai_1.assert.equal(cm.colors.ansi[172].css, '#d78700'); chai_1.assert.equal(cm.colors.ansi[173].css, '#d7875f'); chai_1.assert.equal(cm.colors.ansi[174].css, '#d78787'); chai_1.assert.equal(cm.colors.ansi[175].css, '#d787af'); chai_1.assert.equal(cm.colors.ansi[176].css, '#d787d7'); chai_1.assert.equal(cm.colors.ansi[177].css, '#d787ff'); chai_1.assert.equal(cm.colors.ansi[178].css, '#d7af00'); chai_1.assert.equal(cm.colors.ansi[179].css, '#d7af5f'); chai_1.assert.equal(cm.colors.ansi[180].css, '#d7af87'); chai_1.assert.equal(cm.colors.ansi[181].css, '#d7afaf'); chai_1.assert.equal(cm.colors.ansi[182].css, '#d7afd7'); chai_1.assert.equal(cm.colors.ansi[183].css, '#d7afff'); chai_1.assert.equal(cm.colors.ansi[184].css, '#d7d700'); chai_1.assert.equal(cm.colors.ansi[185].css, '#d7d75f'); chai_1.assert.equal(cm.colors.ansi[186].css, '#d7d787'); chai_1.assert.equal(cm.colors.ansi[187].css, '#d7d7af'); chai_1.assert.equal(cm.colors.ansi[188].css, '#d7d7d7'); chai_1.assert.equal(cm.colors.ansi[189].css, '#d7d7ff'); chai_1.assert.equal(cm.colors.ansi[190].css, '#d7ff00'); chai_1.assert.equal(cm.colors.ansi[191].css, '#d7ff5f'); chai_1.assert.equal(cm.colors.ansi[192].css, '#d7ff87'); chai_1.assert.equal(cm.colors.ansi[193].css, '#d7ffaf'); chai_1.assert.equal(cm.colors.ansi[194].css, '#d7ffd7'); chai_1.assert.equal(cm.colors.ansi[195].css, '#d7ffff'); chai_1.assert.equal(cm.colors.ansi[196].css, '#ff0000'); chai_1.assert.equal(cm.colors.ansi[197].css, '#ff005f'); chai_1.assert.equal(cm.colors.ansi[198].css, '#ff0087'); chai_1.assert.equal(cm.colors.ansi[199].css, '#ff00af'); chai_1.assert.equal(cm.colors.ansi[200].css, '#ff00d7'); chai_1.assert.equal(cm.colors.ansi[201].css, '#ff00ff'); chai_1.assert.equal(cm.colors.ansi[202].css, '#ff5f00'); chai_1.assert.equal(cm.colors.ansi[203].css, '#ff5f5f'); chai_1.assert.equal(cm.colors.ansi[204].css, '#ff5f87'); chai_1.assert.equal(cm.colors.ansi[205].css, '#ff5faf'); chai_1.assert.equal(cm.colors.ansi[206].css, '#ff5fd7'); chai_1.assert.equal(cm.colors.ansi[207].css, '#ff5fff'); chai_1.assert.equal(cm.colors.ansi[208].css, '#ff8700'); chai_1.assert.equal(cm.colors.ansi[209].css, '#ff875f'); chai_1.assert.equal(cm.colors.ansi[210].css, '#ff8787'); chai_1.assert.equal(cm.colors.ansi[211].css, '#ff87af'); chai_1.assert.equal(cm.colors.ansi[212].css, '#ff87d7'); chai_1.assert.equal(cm.colors.ansi[213].css, '#ff87ff'); chai_1.assert.equal(cm.colors.ansi[214].css, '#ffaf00'); chai_1.assert.equal(cm.colors.ansi[215].css, '#ffaf5f'); chai_1.assert.equal(cm.colors.ansi[216].css, '#ffaf87'); chai_1.assert.equal(cm.colors.ansi[217].css, '#ffafaf'); chai_1.assert.equal(cm.colors.ansi[218].css, '#ffafd7'); chai_1.assert.equal(cm.colors.ansi[219].css, '#ffafff'); chai_1.assert.equal(cm.colors.ansi[220].css, '#ffd700'); chai_1.assert.equal(cm.colors.ansi[221].css, '#ffd75f'); chai_1.assert.equal(cm.colors.ansi[222].css, '#ffd787'); chai_1.assert.equal(cm.colors.ansi[223].css, '#ffd7af'); chai_1.assert.equal(cm.colors.ansi[224].css, '#ffd7d7'); chai_1.assert.equal(cm.colors.ansi[225].css, '#ffd7ff'); chai_1.assert.equal(cm.colors.ansi[226].css, '#ffff00'); chai_1.assert.equal(cm.colors.ansi[227].css, '#ffff5f'); chai_1.assert.equal(cm.colors.ansi[228].css, '#ffff87'); chai_1.assert.equal(cm.colors.ansi[229].css, '#ffffaf'); chai_1.assert.equal(cm.colors.ansi[230].css, '#ffffd7'); chai_1.assert.equal(cm.colors.ansi[231].css, '#ffffff'); chai_1.assert.equal(cm.colors.ansi[232].css, '#080808'); chai_1.assert.equal(cm.colors.ansi[233].css, '#121212'); chai_1.assert.equal(cm.colors.ansi[234].css, '#1c1c1c'); chai_1.assert.equal(cm.colors.ansi[235].css, '#262626'); chai_1.assert.equal(cm.colors.ansi[236].css, '#303030'); chai_1.assert.equal(cm.colors.ansi[237].css, '#3a3a3a'); chai_1.assert.equal(cm.colors.ansi[238].css, '#444444'); chai_1.assert.equal(cm.colors.ansi[239].css, '#4e4e4e'); chai_1.assert.equal(cm.colors.ansi[240].css, '#585858'); chai_1.assert.equal(cm.colors.ansi[241].css, '#626262'); chai_1.assert.equal(cm.colors.ansi[242].css, '#6c6c6c'); chai_1.assert.equal(cm.colors.ansi[243].css, '#767676'); chai_1.assert.equal(cm.colors.ansi[244].css, '#808080'); chai_1.assert.equal(cm.colors.ansi[245].css, '#8a8a8a'); chai_1.assert.equal(cm.colors.ansi[246].css, '#949494'); chai_1.assert.equal(cm.colors.ansi[247].css, '#9e9e9e'); chai_1.assert.equal(cm.colors.ansi[248].css, '#a8a8a8'); chai_1.assert.equal(cm.colors.ansi[249].css, '#b2b2b2'); chai_1.assert.equal(cm.colors.ansi[250].css, '#bcbcbc'); chai_1.assert.equal(cm.colors.ansi[251].css, '#c6c6c6'); chai_1.assert.equal(cm.colors.ansi[252].css, '#d0d0d0'); chai_1.assert.equal(cm.colors.ansi[253].css, '#dadada'); chai_1.assert.equal(cm.colors.ansi[254].css, '#e4e4e4'); chai_1.assert.equal(cm.colors.ansi[255].css, '#eeeeee'); }); }); describe('setTheme', function () { it('should not throw when not setting all colors', function () { chai_1.assert.doesNotThrow(function () { cm.setTheme({}); }); }); it('should set a partial set of colors, using the default if not present', function () { chai_1.assert.equal(cm.colors.background.css, '#000000'); chai_1.assert.equal(cm.colors.foreground.css, '#ffffff'); cm.setTheme({ background: '#FF0000', foreground: '#00FF00' }); chai_1.assert.equal(cm.colors.background.css, '#FF0000'); chai_1.assert.equal(cm.colors.foreground.css, '#00FF00'); cm.setTheme({ background: '#0000FF' }); chai_1.assert.equal(cm.colors.background.css, '#0000FF'); chai_1.assert.equal(cm.colors.foreground.css, '#ffffff'); }); }); }); //# sourceMappingURL=ColorManager.test.js.map
Java
/** * Copyright 2014 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* jshint maxlen: false */ 'use strict'; var createAPIRequest = require('../../lib/apirequest'); /** * Admin Directory API * * @classdesc The Admin SDK Directory API lets you view and manage enterprise resources such as users and groups, administrative notifications, security features, and more. * @namespace admin * @version directory_v1 * @variation directory_v1 * @this Admin * @param {object=} options Options for Admin */ function Admin(options) { var self = this; this._options = options || {}; this.asps = { /** * directory.asps.delete * * @desc Delete an ASP issued by a user. * * @alias directory.asps.delete * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {integer} params.codeId - The unique ID of the ASP to be deleted. * @param {string} params.userKey - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ delete: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}/asps/{codeId}', method: 'DELETE' }, params: params, requiredParams: ['userKey', 'codeId'], pathParams: ['codeId', 'userKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.asps.get * * @desc Get information about an ASP issued by a user. * * @alias directory.asps.get * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {integer} params.codeId - The unique ID of the ASP. * @param {string} params.userKey - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ get: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}/asps/{codeId}', method: 'GET' }, params: params, requiredParams: ['userKey', 'codeId'], pathParams: ['codeId', 'userKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.asps.list * * @desc List the ASPs issued by a user. * * @alias directory.asps.list * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.userKey - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ list: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}/asps', method: 'GET' }, params: params, requiredParams: ['userKey'], pathParams: ['userKey'], context: self }; return createAPIRequest(parameters, callback); } }; this.channels = { /** * admin.channels.stop * * @desc Stop watching resources through this channel * * @alias admin.channels.stop * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ stop: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/admin/directory_v1/channels/stop', method: 'POST' }, params: params, requiredParams: [], pathParams: [], context: self }; return createAPIRequest(parameters, callback); } }; this.chromeosdevices = { /** * directory.chromeosdevices.get * * @desc Retrieve Chrome OS Device * * @alias directory.chromeosdevices.get * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customerId - Immutable id of the Google Apps account * @param {string} params.deviceId - Immutable id of Chrome OS Device * @param {string=} params.projection - Restrict information returned to a set of selected fields. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ get: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}', method: 'GET' }, params: params, requiredParams: ['customerId', 'deviceId'], pathParams: ['customerId', 'deviceId'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.chromeosdevices.list * * @desc Retrieve all Chrome OS Devices of a customer (paginated) * * @alias directory.chromeosdevices.list * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customerId - Immutable id of the Google Apps account * @param {integer=} params.maxResults - Maximum number of results to return. Default is 100 * @param {string=} params.orderBy - Column to use for sorting results * @param {string=} params.pageToken - Token to specify next page in the list * @param {string=} params.projection - Restrict information returned to a set of selected fields. * @param {string=} params.query - Search string in the format given at http://support.google.com/chromeos/a/bin/answer.py?hl=en&answer=1698333 * @param {string=} params.sortOrder - Whether to return results in ascending or descending order. Only of use when orderBy is also used * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ list: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customerId}/devices/chromeos', method: 'GET' }, params: params, requiredParams: ['customerId'], pathParams: ['customerId'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.chromeosdevices.patch * * @desc Update Chrome OS Device. This method supports patch semantics. * * @alias directory.chromeosdevices.patch * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customerId - Immutable id of the Google Apps account * @param {string} params.deviceId - Immutable id of Chrome OS Device * @param {string=} params.projection - Restrict information returned to a set of selected fields. * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ patch: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}', method: 'PATCH' }, params: params, requiredParams: ['customerId', 'deviceId'], pathParams: ['customerId', 'deviceId'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.chromeosdevices.update * * @desc Update Chrome OS Device * * @alias directory.chromeosdevices.update * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customerId - Immutable id of the Google Apps account * @param {string} params.deviceId - Immutable id of Chrome OS Device * @param {string=} params.projection - Restrict information returned to a set of selected fields. * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ update: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}', method: 'PUT' }, params: params, requiredParams: ['customerId', 'deviceId'], pathParams: ['customerId', 'deviceId'], context: self }; return createAPIRequest(parameters, callback); } }; this.groups = { /** * directory.groups.delete * * @desc Delete Group * * @alias directory.groups.delete * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.groupKey - Email or immutable Id of the group * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ delete: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/groups/{groupKey}', method: 'DELETE' }, params: params, requiredParams: ['groupKey'], pathParams: ['groupKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.groups.get * * @desc Retrieve Group * * @alias directory.groups.get * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.groupKey - Email or immutable Id of the group * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ get: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/groups/{groupKey}', method: 'GET' }, params: params, requiredParams: ['groupKey'], pathParams: ['groupKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.groups.insert * * @desc Create Group * * @alias directory.groups.insert * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ insert: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/groups', method: 'POST' }, params: params, requiredParams: [], pathParams: [], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.groups.list * * @desc Retrieve all groups in a domain (paginated) * * @alias directory.groups.list * @memberOf! admin(directory_v1) * * @param {object=} params - Parameters for request * @param {string=} params.customer - Immutable id of the Google Apps account. In case of multi-domain, to fetch all groups for a customer, fill this field instead of domain. * @param {string=} params.domain - Name of the domain. Fill this field to get groups from only this domain. To return all groups in a multi-domain fill customer field instead. * @param {integer=} params.maxResults - Maximum number of results to return. Default is 200 * @param {string=} params.pageToken - Token to specify next page in the list * @param {string=} params.userKey - Email or immutable Id of the user if only those groups are to be listed, the given user is a member of. If Id, it should match with id of user object * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ list: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/groups', method: 'GET' }, params: params, requiredParams: [], pathParams: [], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.groups.patch * * @desc Update Group. This method supports patch semantics. * * @alias directory.groups.patch * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.groupKey - Email or immutable Id of the group. If Id, it should match with id of group object * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ patch: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/groups/{groupKey}', method: 'PATCH' }, params: params, requiredParams: ['groupKey'], pathParams: ['groupKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.groups.update * * @desc Update Group * * @alias directory.groups.update * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.groupKey - Email or immutable Id of the group. If Id, it should match with id of group object * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ update: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/groups/{groupKey}', method: 'PUT' }, params: params, requiredParams: ['groupKey'], pathParams: ['groupKey'], context: self }; return createAPIRequest(parameters, callback); }, aliases: { /** * directory.groups.aliases.delete * * @desc Remove a alias for the group * * @alias directory.groups.aliases.delete * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.alias - The alias to be removed * @param {string} params.groupKey - Email or immutable Id of the group * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ delete: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/aliases/{alias}', method: 'DELETE' }, params: params, requiredParams: ['groupKey', 'alias'], pathParams: ['alias', 'groupKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.groups.aliases.insert * * @desc Add a alias for the group * * @alias directory.groups.aliases.insert * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.groupKey - Email or immutable Id of the group * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ insert: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/aliases', method: 'POST' }, params: params, requiredParams: ['groupKey'], pathParams: ['groupKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.groups.aliases.list * * @desc List all aliases for a group * * @alias directory.groups.aliases.list * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.groupKey - Email or immutable Id of the group * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ list: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/aliases', method: 'GET' }, params: params, requiredParams: ['groupKey'], pathParams: ['groupKey'], context: self }; return createAPIRequest(parameters, callback); } } }; this.members = { /** * directory.members.delete * * @desc Remove membership. * * @alias directory.members.delete * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.groupKey - Email or immutable Id of the group * @param {string} params.memberKey - Email or immutable Id of the member * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ delete: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/members/{memberKey}', method: 'DELETE' }, params: params, requiredParams: ['groupKey', 'memberKey'], pathParams: ['groupKey', 'memberKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.members.get * * @desc Retrieve Group Member * * @alias directory.members.get * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.groupKey - Email or immutable Id of the group * @param {string} params.memberKey - Email or immutable Id of the member * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ get: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/members/{memberKey}', method: 'GET' }, params: params, requiredParams: ['groupKey', 'memberKey'], pathParams: ['groupKey', 'memberKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.members.insert * * @desc Add user to the specified group. * * @alias directory.members.insert * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.groupKey - Email or immutable Id of the group * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ insert: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/members', method: 'POST' }, params: params, requiredParams: ['groupKey'], pathParams: ['groupKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.members.list * * @desc Retrieve all members in a group (paginated) * * @alias directory.members.list * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.groupKey - Email or immutable Id of the group * @param {integer=} params.maxResults - Maximum number of results to return. Default is 200 * @param {string=} params.pageToken - Token to specify next page in the list * @param {string=} params.roles - Comma separated role values to filter list results on. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ list: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/members', method: 'GET' }, params: params, requiredParams: ['groupKey'], pathParams: ['groupKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.members.patch * * @desc Update membership of a user in the specified group. This method supports patch semantics. * * @alias directory.members.patch * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.groupKey - Email or immutable Id of the group. If Id, it should match with id of group object * @param {string} params.memberKey - Email or immutable Id of the user. If Id, it should match with id of member object * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ patch: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/members/{memberKey}', method: 'PATCH' }, params: params, requiredParams: ['groupKey', 'memberKey'], pathParams: ['groupKey', 'memberKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.members.update * * @desc Update membership of a user in the specified group. * * @alias directory.members.update * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.groupKey - Email or immutable Id of the group. If Id, it should match with id of group object * @param {string} params.memberKey - Email or immutable Id of the user. If Id, it should match with id of member object * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ update: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/members/{memberKey}', method: 'PUT' }, params: params, requiredParams: ['groupKey', 'memberKey'], pathParams: ['groupKey', 'memberKey'], context: self }; return createAPIRequest(parameters, callback); } }; this.mobiledevices = { /** * directory.mobiledevices.action * * @desc Take action on Mobile Device * * @alias directory.mobiledevices.action * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customerId - Immutable id of the Google Apps account * @param {string} params.resourceId - Immutable id of Mobile Device * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ action: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}/action', method: 'POST' }, params: params, requiredParams: ['customerId', 'resourceId'], pathParams: ['customerId', 'resourceId'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.mobiledevices.delete * * @desc Delete Mobile Device * * @alias directory.mobiledevices.delete * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customerId - Immutable id of the Google Apps account * @param {string} params.resourceId - Immutable id of Mobile Device * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ delete: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}', method: 'DELETE' }, params: params, requiredParams: ['customerId', 'resourceId'], pathParams: ['customerId', 'resourceId'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.mobiledevices.get * * @desc Retrieve Mobile Device * * @alias directory.mobiledevices.get * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customerId - Immutable id of the Google Apps account * @param {string=} params.projection - Restrict information returned to a set of selected fields. * @param {string} params.resourceId - Immutable id of Mobile Device * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ get: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}', method: 'GET' }, params: params, requiredParams: ['customerId', 'resourceId'], pathParams: ['customerId', 'resourceId'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.mobiledevices.list * * @desc Retrieve all Mobile Devices of a customer (paginated) * * @alias directory.mobiledevices.list * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customerId - Immutable id of the Google Apps account * @param {integer=} params.maxResults - Maximum number of results to return. Default is 100 * @param {string=} params.orderBy - Column to use for sorting results * @param {string=} params.pageToken - Token to specify next page in the list * @param {string=} params.projection - Restrict information returned to a set of selected fields. * @param {string=} params.query - Search string in the format given at http://support.google.com/a/bin/answer.py?hl=en&answer=1408863#search * @param {string=} params.sortOrder - Whether to return results in ascending or descending order. Only of use when orderBy is also used * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ list: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customerId}/devices/mobile', method: 'GET' }, params: params, requiredParams: ['customerId'], pathParams: ['customerId'], context: self }; return createAPIRequest(parameters, callback); } }; this.notifications = { /** * directory.notifications.delete * * @desc Deletes a notification * * @alias directory.notifications.delete * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customer - The unique ID for the customer's Google account. The customerId is also returned as part of the Users resource. * @param {string} params.notificationId - The unique ID of the notification. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ delete: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customer}/notifications/{notificationId}', method: 'DELETE' }, params: params, requiredParams: ['customer', 'notificationId'], pathParams: ['customer', 'notificationId'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.notifications.get * * @desc Retrieves a notification. * * @alias directory.notifications.get * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customer - The unique ID for the customer's Google account. The customerId is also returned as part of the Users resource. * @param {string} params.notificationId - The unique ID of the notification. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ get: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customer}/notifications/{notificationId}', method: 'GET' }, params: params, requiredParams: ['customer', 'notificationId'], pathParams: ['customer', 'notificationId'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.notifications.list * * @desc Retrieves a list of notifications. * * @alias directory.notifications.list * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customer - The unique ID for the customer's Google account. * @param {string=} params.language - The ISO 639-1 code of the language notifications are returned in. The default is English (en). * @param {integer=} params.maxResults - Maximum number of notifications to return per page. The default is 100. * @param {string=} params.pageToken - The token to specify the page of results to retrieve. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ list: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customer}/notifications', method: 'GET' }, params: params, requiredParams: ['customer'], pathParams: ['customer'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.notifications.patch * * @desc Updates a notification. This method supports patch semantics. * * @alias directory.notifications.patch * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customer - The unique ID for the customer's Google account. * @param {string} params.notificationId - The unique ID of the notification. * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ patch: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customer}/notifications/{notificationId}', method: 'PATCH' }, params: params, requiredParams: ['customer', 'notificationId'], pathParams: ['customer', 'notificationId'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.notifications.update * * @desc Updates a notification. * * @alias directory.notifications.update * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customer - The unique ID for the customer's Google account. * @param {string} params.notificationId - The unique ID of the notification. * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ update: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customer}/notifications/{notificationId}', method: 'PUT' }, params: params, requiredParams: ['customer', 'notificationId'], pathParams: ['customer', 'notificationId'], context: self }; return createAPIRequest(parameters, callback); } }; this.orgunits = { /** * directory.orgunits.delete * * @desc Remove Organization Unit * * @alias directory.orgunits.delete * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customerId - Immutable id of the Google Apps account * @param {string} params.orgUnitPath - Full path of the organization unit * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ delete: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customerId}/orgunits/{orgUnitPath}', method: 'DELETE' }, params: params, requiredParams: ['customerId', 'orgUnitPath'], pathParams: ['customerId', 'orgUnitPath'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.orgunits.get * * @desc Retrieve Organization Unit * * @alias directory.orgunits.get * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customerId - Immutable id of the Google Apps account * @param {string} params.orgUnitPath - Full path of the organization unit * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ get: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customerId}/orgunits/{orgUnitPath}', method: 'GET' }, params: params, requiredParams: ['customerId', 'orgUnitPath'], pathParams: ['customerId', 'orgUnitPath'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.orgunits.insert * * @desc Add Organization Unit * * @alias directory.orgunits.insert * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customerId - Immutable id of the Google Apps account * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ insert: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customerId}/orgunits', method: 'POST' }, params: params, requiredParams: ['customerId'], pathParams: ['customerId'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.orgunits.list * * @desc Retrieve all Organization Units * * @alias directory.orgunits.list * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customerId - Immutable id of the Google Apps account * @param {string=} params.orgUnitPath - the URL-encoded organization unit * @param {string=} params.type - Whether to return all sub-organizations or just immediate children * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ list: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customerId}/orgunits', method: 'GET' }, params: params, requiredParams: ['customerId'], pathParams: ['customerId'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.orgunits.patch * * @desc Update Organization Unit. This method supports patch semantics. * * @alias directory.orgunits.patch * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customerId - Immutable id of the Google Apps account * @param {string} params.orgUnitPath - Full path of the organization unit * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ patch: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customerId}/orgunits/{orgUnitPath}', method: 'PATCH' }, params: params, requiredParams: ['customerId', 'orgUnitPath'], pathParams: ['customerId', 'orgUnitPath'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.orgunits.update * * @desc Update Organization Unit * * @alias directory.orgunits.update * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customerId - Immutable id of the Google Apps account * @param {string} params.orgUnitPath - Full path of the organization unit * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ update: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customerId}/orgunits/{orgUnitPath}', method: 'PUT' }, params: params, requiredParams: ['customerId', 'orgUnitPath'], pathParams: ['customerId', 'orgUnitPath'], context: self }; return createAPIRequest(parameters, callback); } }; this.schemas = { /** * directory.schemas.delete * * @desc Delete schema * * @alias directory.schemas.delete * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customerId - Immutable id of the Google Apps account * @param {string} params.schemaKey - Name or immutable Id of the schema * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ delete: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customerId}/schemas/{schemaKey}', method: 'DELETE' }, params: params, requiredParams: ['customerId', 'schemaKey'], pathParams: ['customerId', 'schemaKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.schemas.get * * @desc Retrieve schema * * @alias directory.schemas.get * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customerId - Immutable id of the Google Apps account * @param {string} params.schemaKey - Name or immutable Id of the schema * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ get: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customerId}/schemas/{schemaKey}', method: 'GET' }, params: params, requiredParams: ['customerId', 'schemaKey'], pathParams: ['customerId', 'schemaKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.schemas.insert * * @desc Create schema. * * @alias directory.schemas.insert * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customerId - Immutable id of the Google Apps account * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ insert: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customerId}/schemas', method: 'POST' }, params: params, requiredParams: ['customerId'], pathParams: ['customerId'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.schemas.list * * @desc Retrieve all schemas for a customer * * @alias directory.schemas.list * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customerId - Immutable id of the Google Apps account * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ list: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customerId}/schemas', method: 'GET' }, params: params, requiredParams: ['customerId'], pathParams: ['customerId'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.schemas.patch * * @desc Update schema. This method supports patch semantics. * * @alias directory.schemas.patch * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customerId - Immutable id of the Google Apps account * @param {string} params.schemaKey - Name or immutable Id of the schema. * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ patch: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customerId}/schemas/{schemaKey}', method: 'PATCH' }, params: params, requiredParams: ['customerId', 'schemaKey'], pathParams: ['customerId', 'schemaKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.schemas.update * * @desc Update schema * * @alias directory.schemas.update * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.customerId - Immutable id of the Google Apps account * @param {string} params.schemaKey - Name or immutable Id of the schema. * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ update: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/customer/{customerId}/schemas/{schemaKey}', method: 'PUT' }, params: params, requiredParams: ['customerId', 'schemaKey'], pathParams: ['customerId', 'schemaKey'], context: self }; return createAPIRequest(parameters, callback); } }; this.tokens = { /** * directory.tokens.delete * * @desc Delete all access tokens issued by a user for an application. * * @alias directory.tokens.delete * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.clientId - The Client ID of the application the token is issued to. * @param {string} params.userKey - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ delete: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}/tokens/{clientId}', method: 'DELETE' }, params: params, requiredParams: ['userKey', 'clientId'], pathParams: ['clientId', 'userKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.tokens.get * * @desc Get information about an access token issued by a user. * * @alias directory.tokens.get * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.clientId - The Client ID of the application the token is issued to. * @param {string} params.userKey - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ get: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}/tokens/{clientId}', method: 'GET' }, params: params, requiredParams: ['userKey', 'clientId'], pathParams: ['clientId', 'userKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.tokens.list * * @desc Returns the set of tokens specified user has issued to 3rd party applications. * * @alias directory.tokens.list * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.userKey - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ list: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}/tokens', method: 'GET' }, params: params, requiredParams: ['userKey'], pathParams: ['userKey'], context: self }; return createAPIRequest(parameters, callback); } }; this.users = { /** * directory.users.delete * * @desc Delete user * * @alias directory.users.delete * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.userKey - Email or immutable Id of the user * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ delete: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}', method: 'DELETE' }, params: params, requiredParams: ['userKey'], pathParams: ['userKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.users.get * * @desc retrieve user * * @alias directory.users.get * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string=} params.customFieldMask - Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom. * @param {string=} params.projection - What subset of fields to fetch for this user. * @param {string} params.userKey - Email or immutable Id of the user * @param {string=} params.viewType - Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ get: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}', method: 'GET' }, params: params, requiredParams: ['userKey'], pathParams: ['userKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.users.insert * * @desc create user. * * @alias directory.users.insert * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ insert: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users', method: 'POST' }, params: params, requiredParams: [], pathParams: [], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.users.list * * @desc Retrieve either deleted users or all users in a domain (paginated) * * @alias directory.users.list * @memberOf! admin(directory_v1) * * @param {object=} params - Parameters for request * @param {string=} params.customFieldMask - Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom. * @param {string=} params.customer - Immutable id of the Google Apps account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain. * @param {string=} params.domain - Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead. * @param {string=} params.event - Event on which subscription is intended (if subscribing) * @param {integer=} params.maxResults - Maximum number of results to return. Default is 100. Max allowed is 500 * @param {string=} params.orderBy - Column to use for sorting results * @param {string=} params.pageToken - Token to specify next page in the list * @param {string=} params.projection - What subset of fields to fetch for this user. * @param {string=} params.query - Query string search. Should be of the form "". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-users * @param {string=} params.showDeleted - If set to true retrieves the list of deleted users. Default is false * @param {string=} params.sortOrder - Whether to return results in ascending or descending order. * @param {string=} params.viewType - Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ list: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users', method: 'GET' }, params: params, requiredParams: [], pathParams: [], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.users.makeAdmin * * @desc change admin status of a user * * @alias directory.users.makeAdmin * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.userKey - Email or immutable Id of the user as admin * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ makeAdmin: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}/makeAdmin', method: 'POST' }, params: params, requiredParams: ['userKey'], pathParams: ['userKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.users.patch * * @desc update user. This method supports patch semantics. * * @alias directory.users.patch * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.userKey - Email or immutable Id of the user. If Id, it should match with id of user object * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ patch: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}', method: 'PATCH' }, params: params, requiredParams: ['userKey'], pathParams: ['userKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.users.undelete * * @desc Undelete a deleted user * * @alias directory.users.undelete * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.userKey - The immutable id of the user * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ undelete: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}/undelete', method: 'POST' }, params: params, requiredParams: ['userKey'], pathParams: ['userKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.users.update * * @desc update user * * @alias directory.users.update * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.userKey - Email or immutable Id of the user. If Id, it should match with id of user object * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ update: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}', method: 'PUT' }, params: params, requiredParams: ['userKey'], pathParams: ['userKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.users.watch * * @desc Watch for changes in users list * * @alias directory.users.watch * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string=} params.customFieldMask - Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom. * @param {string=} params.customer - Immutable id of the Google Apps account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain. * @param {string=} params.domain - Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead. * @param {string=} params.event - Event on which subscription is intended (if subscribing) * @param {integer=} params.maxResults - Maximum number of results to return. Default is 100. Max allowed is 500 * @param {string=} params.orderBy - Column to use for sorting results * @param {string=} params.pageToken - Token to specify next page in the list * @param {string=} params.projection - What subset of fields to fetch for this user. * @param {string=} params.query - Query string search. Should be of the form "". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-users * @param {string=} params.showDeleted - If set to true retrieves the list of deleted users. Default is false * @param {string=} params.sortOrder - Whether to return results in ascending or descending order. * @param {string=} params.viewType - Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user. * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ watch: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/watch', method: 'POST' }, params: params, requiredParams: [], pathParams: [], context: self }; return createAPIRequest(parameters, callback); }, aliases: { /** * directory.users.aliases.delete * * @desc Remove a alias for the user * * @alias directory.users.aliases.delete * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.alias - The alias to be removed * @param {string} params.userKey - Email or immutable Id of the user * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ delete: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}/aliases/{alias}', method: 'DELETE' }, params: params, requiredParams: ['userKey', 'alias'], pathParams: ['alias', 'userKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.users.aliases.insert * * @desc Add a alias for the user * * @alias directory.users.aliases.insert * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.userKey - Email or immutable Id of the user * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ insert: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}/aliases', method: 'POST' }, params: params, requiredParams: ['userKey'], pathParams: ['userKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.users.aliases.list * * @desc List all aliases for a user * * @alias directory.users.aliases.list * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string=} params.event - Event on which subscription is intended (if subscribing) * @param {string} params.userKey - Email or immutable Id of the user * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ list: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}/aliases', method: 'GET' }, params: params, requiredParams: ['userKey'], pathParams: ['userKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.users.aliases.watch * * @desc Watch for changes in user aliases list * * @alias directory.users.aliases.watch * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string=} params.event - Event on which subscription is intended (if subscribing) * @param {string} params.userKey - Email or immutable Id of the user * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ watch: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}/aliases/watch', method: 'POST' }, params: params, requiredParams: ['userKey'], pathParams: ['userKey'], context: self }; return createAPIRequest(parameters, callback); } }, photos: { /** * directory.users.photos.delete * * @desc Remove photos for the user * * @alias directory.users.photos.delete * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.userKey - Email or immutable Id of the user * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ delete: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}/photos/thumbnail', method: 'DELETE' }, params: params, requiredParams: ['userKey'], pathParams: ['userKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.users.photos.get * * @desc Retrieve photo of a user * * @alias directory.users.photos.get * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.userKey - Email or immutable Id of the user * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ get: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}/photos/thumbnail', method: 'GET' }, params: params, requiredParams: ['userKey'], pathParams: ['userKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.users.photos.patch * * @desc Add a photo for the user. This method supports patch semantics. * * @alias directory.users.photos.patch * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.userKey - Email or immutable Id of the user * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ patch: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}/photos/thumbnail', method: 'PATCH' }, params: params, requiredParams: ['userKey'], pathParams: ['userKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.users.photos.update * * @desc Add a photo for the user * * @alias directory.users.photos.update * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.userKey - Email or immutable Id of the user * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ update: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}/photos/thumbnail', method: 'PUT' }, params: params, requiredParams: ['userKey'], pathParams: ['userKey'], context: self }; return createAPIRequest(parameters, callback); } } }; this.verificationCodes = { /** * directory.verificationCodes.generate * * @desc Generate new backup verification codes for the user. * * @alias directory.verificationCodes.generate * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.userKey - Email or immutable Id of the user * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ generate: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}/verificationCodes/generate', method: 'POST' }, params: params, requiredParams: ['userKey'], pathParams: ['userKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.verificationCodes.invalidate * * @desc Invalidate the current backup verification codes for the user. * * @alias directory.verificationCodes.invalidate * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.userKey - Email or immutable Id of the user * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ invalidate: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}/verificationCodes/invalidate', method: 'POST' }, params: params, requiredParams: ['userKey'], pathParams: ['userKey'], context: self }; return createAPIRequest(parameters, callback); }, /** * directory.verificationCodes.list * * @desc Returns the current set of valid backup verification codes for the specified user. * * @alias directory.verificationCodes.list * @memberOf! admin(directory_v1) * * @param {object} params - Parameters for request * @param {string} params.userKey - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ list: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/admin/directory/v1/users/{userKey}/verificationCodes', method: 'GET' }, params: params, requiredParams: ['userKey'], pathParams: ['userKey'], context: self }; return createAPIRequest(parameters, callback); } }; } /** * Exports Admin object * @type Admin */ module.exports = Admin;
Java
// sol2 // The MIT License (MIT) // Copyright (c) 2013-2021 Rapptz, ThePhD and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of // the Software, and to permit persons to whom the Software is furnished to do so, // subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <sol/protected_function_result.hpp>
Java
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; using System.Collections.Generic; using NUnit.Framework; using osu.Framework.Extensions.IEnumerableExtensions; using OpenTK; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Timing; using osu.Game.Rulesets.UI; using osu.Game.Rulesets.UI.Scrolling; namespace osu.Game.Tests.Visual { [TestFixture] public class TestCaseScrollingHitObjects : OsuTestCase { public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(Playfield) }; private readonly TestPlayfield[] playfields = new TestPlayfield[4]; public TestCaseScrollingHitObjects() { Add(new GridContainer { RelativeSizeAxes = Axes.Both, Content = new[] { new Drawable[] { playfields[0] = new TestPlayfield(ScrollingDirection.Up), playfields[1] = new TestPlayfield(ScrollingDirection.Down) }, new Drawable[] { playfields[2] = new TestPlayfield(ScrollingDirection.Left), playfields[3] = new TestPlayfield(ScrollingDirection.Right) } } }); AddSliderStep("Time range", 100, 10000, 5000, v => playfields.ForEach(p => p.VisibleTimeRange.Value = v)); AddStep("Add control point", () => addControlPoint(Time.Current + 5000)); } protected override void LoadComplete() { base.LoadComplete(); playfields.ForEach(p => p.HitObjects.AddControlPoint(new MultiplierControlPoint(0))); for (int i = 0; i <= 5000; i += 1000) addHitObject(Time.Current + i); Scheduler.AddDelayed(() => addHitObject(Time.Current + 5000), 1000, true); } private void addHitObject(double time) { playfields.ForEach(p => { var hitObject = new TestDrawableHitObject(time); setAnchor(hitObject, p); p.Add(hitObject); }); } private void addControlPoint(double time) { playfields.ForEach(p => { p.HitObjects.AddControlPoint(new MultiplierControlPoint(time) { DifficultyPoint = { SpeedMultiplier = 3 } }); p.HitObjects.AddControlPoint(new MultiplierControlPoint(time + 2000) { DifficultyPoint = { SpeedMultiplier = 2 } }); p.HitObjects.AddControlPoint(new MultiplierControlPoint(time + 3000) { DifficultyPoint = { SpeedMultiplier = 1 } }); TestDrawableControlPoint createDrawablePoint(double t) { var obj = new TestDrawableControlPoint(p.Direction, t); setAnchor(obj, p); return obj; } p.Add(createDrawablePoint(time)); p.Add(createDrawablePoint(time + 2000)); p.Add(createDrawablePoint(time + 3000)); }); } private void setAnchor(DrawableHitObject obj, TestPlayfield playfield) { switch (playfield.Direction) { case ScrollingDirection.Up: obj.Anchor = Anchor.TopCentre; break; case ScrollingDirection.Down: obj.Anchor = Anchor.BottomCentre; break; case ScrollingDirection.Left: obj.Anchor = Anchor.CentreLeft; break; case ScrollingDirection.Right: obj.Anchor = Anchor.CentreRight; break; } } private class TestPlayfield : ScrollingPlayfield { public readonly ScrollingDirection Direction; public TestPlayfield(ScrollingDirection direction) : base(direction) { Direction = direction; Padding = new MarginPadding(2); Content.Masking = true; AddInternal(new Box { RelativeSizeAxes = Axes.Both, Alpha = 0.5f, Depth = float.MaxValue }); } } private class TestDrawableControlPoint : DrawableHitObject<HitObject> { public TestDrawableControlPoint(ScrollingDirection direction, double time) : base(new HitObject { StartTime = time }) { Origin = Anchor.Centre; InternalChild = new Box { Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.Both }; switch (direction) { case ScrollingDirection.Up: case ScrollingDirection.Down: RelativeSizeAxes = Axes.X; Height = 2; break; case ScrollingDirection.Left: case ScrollingDirection.Right: RelativeSizeAxes = Axes.Y; Width = 2; break; } } protected override void UpdateState(ArmedState state) { } } private class TestDrawableHitObject : DrawableHitObject<HitObject> { public TestDrawableHitObject(double time) : base(new HitObject { StartTime = time }) { Origin = Anchor.Centre; AutoSizeAxes = Axes.Both; InternalChild = new Box { Size = new Vector2(75) }; } protected override void UpdateState(ArmedState state) { } } } }
Java
package no.nextgentel.oss.akkatools.aggregate import akka.actor.ActorPath import akka.persistence.AtLeastOnceDelivery.UnconfirmedWarning import akka.persistence.{DeleteMessagesFailure, DeleteMessagesSuccess, SaveSnapshotFailure, SaveSnapshotSuccess, SnapshotOffer} import no.nextgentel.oss.akkatools.persistence.{EnhancedPersistentShardingActor, GetState, SendAsDM} import scala.reflect.ClassTag /** * Dispatcher - When sending something to an ES, use its dispatcher * Command - Dispatchable message - When sent to the dispatcher, it will be sent to the correct ES. * * Event - Represents a change of state for an ES * * State is immutable. * Represents the full state of the entity. based on its state it can accept or reject an event. * Has with method transition(event) - if ok, it returns new state. If not, an error is thrown. * * Can be used to try an event (since it is mutable) * * DurableMessage: method of sending a message which with retry-mechanism until confirm() is called. * * GeneralAggregate pseudocode: * * for each received cmd: * convert it to event * try the event (by calling state.transition() ) * if it failed: maybe do something * if it works: * persist event * generate and send DurableMessages * change our current state (by calling state.transition() and keeping the result ) * * @param dmSelf dmSelf is used as the address where the DM-confirmation-messages should be sent. * In a sharding environment, this has to be our dispatcher which knows how to reach the sharding mechanism. * If null, we'll fallback to self - useful when testing * @tparam E Superclass/trait representing your events * @tparam S The type representing your state */ abstract class GeneralAggregateBase[E:ClassTag, S <: AggregateStateBase[E, S]:ClassTag] ( dmSelf:ActorPath ) extends EnhancedPersistentShardingActor[E, AggregateError](dmSelf) { var state:S private val defaultSuccessHandler = () => log.debug("No cmdSuccess-handler executed") private val defaultErrorHandler = (errorMsg:String) => log.debug("No cmdFailed-handler executed") protected override def onSnapshotOffer(offer : SnapshotOffer) : Unit = { state = offer.snapshot.asInstanceOf[S] } //Override to handle aggregate specific restriction on snapshots, accepts all by default protected def acceptSnapshotRequest(request : SaveSnapshotOfCurrentState) : Boolean = { true } def cmdToEvent:PartialFunction[AggregateCmd, ResultingEvent[E]] override protected def stateInfo(): String = state.toString override protected def onAlreadyProcessedCmdViaDMReceivedAgain(cmd: AnyRef): Unit = { super.onAlreadyProcessedCmdViaDMReceivedAgain(cmd) cmd match { case c:AggregateCmd => // Since the successHandler for receiving this cmd might resend the DM with new payload, // and in that way forward the confirm-responsibility, // we'll try to invoke the success-handler so that it might do that.. // If not, this duplicate DM will just be confirmed val defaultCmdToEvent:(AggregateCmd) => ResultingEvent[E] = {(q) => ResultingEvent(List[E]())} // Do nothing.. // Invoke cmdToEvent - not to use the event, but to try to invoke its successHandler. val eventResult:ResultingEvent[E] = cmdToEvent.applyOrElse(c, defaultCmdToEvent) Option(eventResult.successHandler).map( _.apply() ) case _ => Unit // Nothing we can do.. } } final def tryCommand = { case x: AggregateCmd => // Can't get pattern-matching to work with generics.. if (x.isInstanceOf[GetState]) { sender ! state } else if (x.isInstanceOf[SaveSnapshotOfCurrentState]) { val msg = x.asInstanceOf[SaveSnapshotOfCurrentState] val accepted = acceptSnapshotRequest(msg) if (accepted && this.isInSnapshottableState()) { saveSnapshot(state,msg.deleteEvents) } else { log.warning(s"Rejected snapshot request $msg when in state $state") sender ! AggregateRejectedSnapshotRequest(this.persistenceId, lastSequenceNr, state) } } else { val cmd = x val defaultCmdToEvent:(AggregateCmd) => ResultingEvent[E] = {(q) => throw new AggregateError("Do not know how to process cmd of type " + q.getClass)} val eventResult:ResultingEvent[E] = cmdToEvent.applyOrElse(cmd, defaultCmdToEvent) // Test the events try { var eventsToProcessList:List[E] = eventResult.events.apply() var testState = state var allEvents = List[E]() while( eventsToProcessList.nonEmpty ) { val nextEvent = eventsToProcessList.head if( log.isDebugEnabled ) log.debug("Trying event: " + nextEvent) allEvents = allEvents :+ nextEvent // Add this event to list of all events eventsToProcessList = eventsToProcessList.tail val stateTransition = testState.transitionState(nextEvent) testState = stateTransition.newState // If this stateTransition resulted in new event, we must add it to the front of eventsToProcessList eventsToProcessList = stateTransition.newEvent match { case Some(newEvent) => if( log.isDebugEnabled ) log.debug("Adding new event: " + newEvent) newEvent :: eventsToProcessList // add this new event to the front of eventsToProcessList case _ => eventsToProcessList // unchanged } } // it was valid Option(eventResult.afterValidationSuccessHandler).map(_.apply()) val runTheSuccessHandler = () => Option(eventResult.successHandler).getOrElse(defaultSuccessHandler).apply() if (allEvents.isEmpty) { // We have no events to persist - run the successHandler any way runTheSuccessHandler.apply() } else { // we can persist it persistAndApplyEvents(allEvents, successHandler = { () => // run the successHandler runTheSuccessHandler.apply() }) } } catch { case error:AggregateError => if ( error.skipErrorHandler ) { log.debug("Skipping eventResult-errorHandler") } else { Option(eventResult.errorHandler).getOrElse(defaultErrorHandler).apply(error.getMessage) } throw error } } case x:AnyRef => throw new AggregateError("Do not know how to process cmd of type " + x.getClass) } // Called AFTER event has been applied to state def generateDMs(event:E, previousState:S):ResultingDMs def onEvent = { case e:E => val resultingDMs: ResultingDMs = { val stateBackup = state try { val previousState:S = state state = state.transitionState(e).newState // make the new state current generateDMs(e, previousState) } catch { case e:Exception => state = stateBackup // Must revert changes to state throw e // rethrow it } } // From java resultingDMs might be null.. Wrap it optional Option(resultingDMs).map { rdm => rdm.list.foreach { msg => if(log.isDebugEnabled) log.debug(s"Sending generated DurableMessage: $msg") sendAsDM(msg) } } } private var tmpStateWhileProcessingUnconfirmedWarning:AggregateStateBase[E, S] = null.asInstanceOf[AggregateStateBase[E, S]] // We need to override this so that we can use a fresh copy of the state while we process // all the unconfirmed messages override protected def internalProcessUnconfirmedWarning(unconfirmedWarning: UnconfirmedWarning): Unit = { tmpStateWhileProcessingUnconfirmedWarning = state // since we're maybe goint to validate multiple events in a row, // we need to have a copy of the state that we can modify during the processing/validation super.internalProcessUnconfirmedWarning(unconfirmedWarning) tmpStateWhileProcessingUnconfirmedWarning = null.asInstanceOf[S] } /** * If doUnconfirmedWarningProcessing is turned on, then override this method * to try to do something useful before we give up * * @param originalPayload */ override protected def durableMessageNotDeliveredHandler(originalPayload: Any, errorMsg: String): Unit = { // call generateEventsForFailedDurableMessage to let the app decide if this should result in any events that should be persisted. val events = generateEventsForFailedDurableMessage(originalPayload, errorMsg) var tmpState = tmpStateWhileProcessingUnconfirmedWarning // we must validate that the events are valid events.foreach { e => tmpState = tmpState.transitionState(e).newState } // all events passed validation => we can persist them persistAndApplyEvents(events.toList) tmpStateWhileProcessingUnconfirmedWarning = tmpState } /** * Override this to decide if the failed outbound durableMessage should result in a persisted event. * If so, return these events. * When these have been persisted, generateDMs() will be called as usual enabling * you to perform some outbound action. * * @param originalPayload * @param errorMsg * @return */ def generateEventsForFailedDurableMessage(originalPayload: Any, errorMsg: String):Seq[E] = Seq() // default implementation } abstract class GeneralAggregateDMViaState[E:ClassTag, S <: AggregateStateBase[E, S]:ClassTag] ( dmSelf:ActorPath ) extends GeneralAggregateBase[E, S](dmSelf) { // Called AFTER event has been applied to state override def generateDMs(event: E, previousState: S): ResultingDMs = generateDMs.applyOrElse(state, (s:S) => ResultingDMs(List())) def generateDMs:PartialFunction[S, ResultingDMs] } abstract class GeneralAggregateDMViaStateAndEvent[E:ClassTag, S <: AggregateStateBase[E, S]:ClassTag] ( dmSelf:ActorPath ) extends GeneralAggregateBase[E, S](dmSelf) { // Called AFTER event has been applied to state override def generateDMs(event: E, previousState: S): ResultingDMs = generateDMs.applyOrElse((state,event), (t:(S,E)) => ResultingDMs(List())) def generateDMs:PartialFunction[(S,E), ResultingDMs] } abstract class GeneralAggregateDMViaEvent[E:ClassTag, S <: AggregateState[E, S]:ClassTag] ( dmSelf:ActorPath ) extends GeneralAggregateBase[E, S](dmSelf) { // Called AFTER event has been applied to state override def generateDMs(event: E, previousState: S): ResultingDMs = generateDMs.applyOrElse(event, (t:E) => ResultingDMs(List())) def generateDMs:PartialFunction[E, ResultingDMs] } case class ResultingDMs(list:List[SendAsDM]) object ResultingDMs { def apply(message:AnyRef, destination:ActorPath):ResultingDMs = ResultingDMs(List(SendAsDM(message, destination))) def apply(sendAsDM: SendAsDM):ResultingDMs = ResultingDMs(List(sendAsDM)) }
Java
<?php class Admin_Page_Scraper_Facebook extends Admin_Page_Abstract { public function prepare(CM_Frontend_Environment $environment, CM_Frontend_ViewResponse $viewResponse) { /** @var Denkmal_Site_Default $site */ $site = $environment->getSite(); $region = $site->hasRegion() ? $site->getRegion() : null; $page = $this->_params->getPage(); $facebookPageList = new Denkmal_Paging_FacebookPage_ListScraper($region); $facebookPageList->setPage($page, 50); $viewResponse->set('region', $region); $viewResponse->set('facebookPageList', $facebookPageList); } public function ajax_removeFacebookPage(CM_Params $params, CM_Frontend_JavascriptContainer_View $handler, CM_Http_Response_View_Ajax $response) { /** @var Denkmal_Params $params */ /** @var Denkmal_Site_Default $site */ $site = $response->getSite(); $region = $site->hasRegion() ? $site->getRegion() : null; $facebookPage = $params->getFacebookPage('facebookPage'); $facebookPageList = new Denkmal_Paging_FacebookPage_ListScraper($region); $facebookPageList->remove($facebookPage); $response->reloadComponent(); } }
Java
package mahout; /** * Date: 12/11/14 * Time: 8:33 PM * To change this template use File | Settings | File Templates. */ public class AppConstants { public static final String TEST_FILE = "dataset.csv"; }
Java
<!DOCTYPE html> <html> <head> <title>AngularJS</title> <meta charset="utf-8"> <link href="../content/shared/styles/examples-offline.css" rel="stylesheet"> <link href="../../styles/kendo.common.min.css" rel="stylesheet"> <link href="../../styles/kendo.rtl.min.css" rel="stylesheet"> <link href="../../styles/kendo.default.min.css" rel="stylesheet"> <link href="../../styles/kendo.default.mobile.min.css" rel="stylesheet"> <script src="../../js/jquery.min.js"></script> <script src="../../js/jszip.min.js"></script> <script src="../../js/angular.min.js"></script> <script src="../../js/kendo.all.min.js"></script> <script src="../content/shared/js/console.js"></script> <script> </script> </head> <body> <a class="offline-button" href="../index.html">Back</a> <div id="example" ng-app="KendoDemos"> <div class="demo-section k-content" ng-controller="MyCtrl"> <h4>Select time:</h4> <input kendo-time-picker ng-model="str" k-ng-model="obj" style="width: 100%;" /> <pre> str: {{ str }} obj: {{ obj }} typeof obj: {{ getType(obj) }} obj instanceof Date: {{ isDate(obj) }} </pre> </div> </div> <script> angular.module("KendoDemos", [ "kendo.directives" ]) .controller("MyCtrl", function($scope){ $scope.getType = function(x) { return typeof x; }; $scope.isDate = function(x) { return x instanceof Date; }; }) </script> </body> </html>
Java
package common import ( "testing" "github.com/stretchr/testify/assert" ) // Matasano 2.1 func Test_Pad_PKCS7(t *testing.T) { input := []byte("YELLOW SUBMARINE") received := Pad_PKCS7(input, 4) expected := []byte("YELLOW SUBMARINE\x04\x04\x04\x04") assert.Equal(t, expected, received) }
Java
using Scripts.Game.Defined.Characters; using Scripts.Game.Defined.Serialized.Statistics; using Scripts.Game.Dungeons; using Scripts.Game.Serialized; using Scripts.Game.Undefined.Characters; using Scripts.Model.Acts; using Scripts.Model.Buffs; using Scripts.Model.Characters; using Scripts.Model.Interfaces; using Scripts.Model.Pages; using Scripts.Model.Processes; using Scripts.Model.Spells; using Scripts.Model.Stats; using Scripts.Model.TextBoxes; using Scripts.Presenter; using System; using System.Collections.Generic; using System.Linq; using UnityEngine; namespace Scripts.Game.Pages { /// <summary> /// The hub of the game, from which all other parts can be visited. /// </summary> public class Camp : Model.Pages.PageGroup { /// <summary> /// Missing percentage to restore when resting /// </summary> private const float MISSING_REST_RESTORE_PERCENTAGE = .2f; private Flags flags; private Party party; /// <summary> /// Main /// </summary> /// <param name="party">Party for this particular game.</param> /// <param name="flags">Flags for this particular game.</param> public Camp(Party party, Flags flags) : base(new Page("Campsite")) { this.party = party; this.flags = flags; SetupCamp(); } /// <summary> /// Setup on enter events. /// </summary> private void SetupCamp() { Page root = Get(ROOT_INDEX); root.OnEnter = () => { root.Location = flags.CurrentArea.GetDescription(); root.Icon = Areas.AreaList.AREA_SPRITES[flags.CurrentArea]; // If this isn't first Resting will advance to wrong time if (flags.ShouldAdvanceTimeInCamp) { AdvanceTime(root); flags.ShouldAdvanceTimeInCamp = false; } foreach (Character partyMember in party.Collection) { if (partyMember.Stats.HasUnassignedStatPoints) { root.AddText( string.Format( "<color=cyan>{0}</color> has unallocated stat points. Points can be allocated in the <color=yellow>Party</color> page.", partyMember.Look.DisplayName)); } } Model.Pages.PageGroup dungeonSelectionPage = new StagePages(root, party, flags); root.AddCharacters(Side.LEFT, party.Collection); root.Actions = new IButtonable[] { SubPageWrapper(dungeonSelectionPage, "Visit the stages for this World. When all stages are completed, the next World is unlocked."), SubPageWrapper(new PlacePages(root, flags, party), "Visit a place in this World. Places are unique to a world and can offer you a place to spend your wealth."), SubPageWrapper(new WorldPages(root, flags, party), "Return to a previously unlocked World. Worlds consist of unique Stages and Places."), SubPageWrapper(new LevelUpPages(Root, party), "View party member stats and distribute stat points."), PageUtil.GenerateGroupSpellBooks(root, root, party.Collection), SubPageWrapper(new InventoryPages(root, party), "View the party's shared inventory and use items."), SubPageWrapper(new EquipmentPages(root, party), "View and manage the equipment of your party members."), RestProcess(root), SubPageWrapper(new SavePages(root, party, flags), "Save and exit the game.") }; PostTime(root); }; } private Process SubPageWrapper(PageGroup pg, string description) { return new Process( pg.ButtonText, pg.Sprite, description, () => pg.Invoke(), () => pg.IsInvokable ); } /// <summary> /// Posts the time onto the textholder. /// </summary> /// <param name="current"></param> private void PostTime(Page current) { current.AddText(string.Format("{0} of day {1}.", flags.Time.GetDescription(), flags.DayCount)); if (flags.Time == TimeOfDay.NIGHT) { current.AddText("It is too dark to leave camp."); } } /// <summary> /// Creates the process for resting. /// </summary> /// <param name="current">Current page</param> /// <returns>A rest process.</returns> private Process RestProcess(Page current) { TimeOfDay[] times = Util.EnumAsArray<TimeOfDay>(); int currentIndex = (int)flags.Time; int newIndex = (currentIndex + 1) % times.Length; bool isLastTime = (currentIndex == (times.Length - 1)); return new Process( isLastTime ? "Sleep" : "Rest", isLastTime ? Util.GetSprite("bed") : Util.GetSprite("health-normal"), isLastTime ? string.Format("Sleep to the next day ({0}).\nFully restores most stats and removes most status conditions.", flags.DayCount + 1) : string.Format("Take a short break, advancing the time of day to {0}.\nSomewhat restores most stats.", times[newIndex].GetDescription()), () => { foreach (Character c in party) { c.Stats.RestoreResourcesByMissingPercentage(isLastTime ? 1 : MISSING_REST_RESTORE_PERCENTAGE); if (isLastTime) { c.Buffs.DispelAllBuffs(); } } if (isLastTime) { flags.DayCount %= int.MaxValue; flags.DayCount++; } flags.Time = times[newIndex]; current.AddText(string.Format("The party {0}s.", isLastTime ? "sleep" : "rest")); current.OnEnter(); } ); } /// <summary> /// Makes time go forward in camp. From visiting places. /// </summary> /// <param name="current">The current page.</param> private void AdvanceTime(Page current) { TimeOfDay[] times = Util.EnumAsArray<TimeOfDay>(); int currentIndex = (int)flags.Time; int newIndex = (currentIndex + 1) % times.Length; flags.Time = times[newIndex]; current.AddText("Some time has passed."); } } }
Java
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Rails::Rack</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> <link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> <link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> <script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> <script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> <script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> <script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> </head> <body> <div class="banner"> <span>Ruby on Rails 4.1.8</span><br /> <h1> <span class="type">Module</span> Rails::Rack </h1> <ul class="files"> <li><a href="../../files/__/__/__/__/usr/local/share/gems/gems/railties-4_1_8/lib/rails/rack_rb.html">/usr/local/share/gems/gems/railties-4.1.8/lib/rails/rack.rb</a></li> <li><a href="../../files/__/__/__/__/usr/local/share/gems/gems/railties-4_1_8/lib/rails/rack/debugger_rb.html">/usr/local/share/gems/gems/railties-4.1.8/lib/rails/rack/debugger.rb</a></li> <li><a href="../../files/__/__/__/__/usr/local/share/gems/gems/railties-4_1_8/lib/rails/rack/log_tailer_rb.html">/usr/local/share/gems/gems/railties-4.1.8/lib/rails/rack/log_tailer.rb</a></li> <li><a href="../../files/__/__/__/__/usr/local/share/gems/gems/railties-4_1_8/lib/rails/rack/logger_rb.html">/usr/local/share/gems/gems/railties-4.1.8/lib/rails/rack/logger.rb</a></li> </ul> </div> <div id="bodyContent"> <div id="content"> <!-- Namespace --> <div class="sectiontitle">Namespace</div> <ul> <li> <span class="type">CLASS</span> <a href="Rack/Debugger.html">Rails::Rack::Debugger</a> </li> <li> <span class="type">CLASS</span> <a href="Rack/LogTailer.html">Rails::Rack::LogTailer</a> </li> <li> <span class="type">CLASS</span> <a href="Rack/Logger.html">Rails::Rack::Logger</a> </li> </ul> <!-- Methods --> </div> </div> </body> </html>
Java
Unauthenticated REST Interface ============================== The REST API can be enabled with the `-rest` option. The interface runs on the same port as the JSON-RPC interface, by default port 8332 for mainnet and port 18332 for testnet. Supported API ------------- ####Transactions `GET /rest/tx/<TX-HASH>.<bin|hex|json>` Given a transaction hash: returns a transaction in binary, hex-encoded binary, or JSON formats. For full TX query capability, one must enable the transaction index via "txindex=1" command line / configuration option. ####Blocks `GET /rest/block/<BLOCK-HASH>.<bin|hex|json>` `GET /rest/block/notxdetails/<BLOCK-HASH>.<bin|hex|json>` Given a block hash: returns a block, in binary, hex-encoded binary or JSON formats. The HTTP request and response are both handled entirely in-memory, thus making maximum memory usage at least 2.66MB (1 MB max block, plus hex encoding) per request. With the /notxdetails/ option JSON response will only contain the transaction hash instead of the complete transaction details. The option only affects the JSON response. ####Blockheaders `GET /rest/headers/<COUNT>/<BLOCK-HASH>.<bin|hex|json>` Given a block hash: returns <COUNT> amount of blockheaders in upward direction. ####Chaininfos `GET /rest/chaininfo.json` Returns various state info regarding block chain processing. Only supports JSON as output format. * chain : (string) current network name as defined in BIP70 (main, test, regtest) * blocks : (numeric) the current number of blocks processed in the server * headers : (numeric) the current number of headers we have validated * bestblockhash : (string) the hash of the currently best block * difficulty : (numeric) the current difficulty * verificationprogress : (numeric) estimate of verification progress [0..1] * chainwork : (string) total amount of work in active chain, in hexadecimal * pruned : (boolean) if the blocks are subject to pruning * pruneheight : (numeric) heighest block available * softforks : (array) status of softforks in progress ####Query UTXO set `GET /rest/getutxos/<checkmempool>/<txid>-<n>/<txid>-<n>/.../<txid>-<n>.<bin|hex|json>` The getutxo command allows querying of the UTXO set given a set of outpoints. See BIP64 for input and output serialisation: https://github.com/bitcoin/bips/blob/master/bip-0064.mediawiki Example: ``` $ curl localhost:19332/rest/getutxos/checkmempool/b2cdfd7b89def827ff8af7cd9bff7627ff72e5e8b0f71210f92ea7a4000c5d75-0.json 2>/dev/null | json_pp { "chaintipHash" : "00000000fb01a7f3745a717f8caebee056c484e6e0bfe4a9591c235bb70506fb", "chainHeight" : 325347, "utxos" : [ { "scriptPubKey" : { "addresses" : [ "mi7as51dvLJsizWnTMurtRmrP8hG2m1XvD" ], "type" : "pubkeyhash", "hex" : "76a9141c7cebb529b86a04c683dfa87be49de35bcf589e88ac", "reqSigs" : 1, "asm" : "OP_DUP OP_HASH160 1c7cebb529b86a04c683dfa87be49de35bcf589e OP_EQUALVERIFY OP_CHECKSIG" }, "value" : 8.8687, "height" : 2147483647, "txvers" : 1 } ], "bitmap" : "1" } ``` ####Memory pool `GET /rest/mempool/info.json` Returns various information about the TX mempool. Only supports JSON as output format. * size : (numeric) the number of transactions in the TX mempool * bytes : (numeric) size of the TX mempool in bytes * usage : (numeric) total TX mempool memory usage `GET /rest/mempool/contents.json` Returns transactions in the TX mempool. Only supports JSON as output format. Risks ------------- Running a web browser on the same node with a REST enabled solarcoind can be a risk. Accessing prepared XSS websites could read out tx/block data of your node by placing links like `<script src="http://127.0.0.1:9332/rest/tx/1234567890.json">` which might break the nodes privacy.
Java
package org.jinstagram.auth.model; import org.jinstagram.http.Request; import org.jinstagram.http.Verbs; import java.util.HashMap; import java.util.Map; /** * The representation of an OAuth HttpRequest. * * Adds OAuth-related functionality to the {@link Request} */ public class OAuthRequest extends Request { private static final String OAUTH_PREFIX = "oauth_"; private Map<String, String> oauthParameters; /** * Default constructor. * * @param verb Http verb/method * @param url resource URL */ public OAuthRequest(Verbs verb, String url) { super(verb, url); this.oauthParameters = new HashMap<String, String>(); } /** * Adds an OAuth parameter. * * @param key name of the parameter * @param value value of the parameter * * @throws IllegalArgumentException if the parameter is not an OAuth * parameter */ public void addOAuthParameter(String key, String value) { oauthParameters.put(checkKey(key), value); } private static String checkKey(String key) { if (key.startsWith(OAUTH_PREFIX) || key.equals(OAuthConstants.SCOPE)) { return key; } else { throw new IllegalArgumentException(String.format( "OAuth parameters must either be '%s' or start with '%s'", OAuthConstants.SCOPE, OAUTH_PREFIX)); } } /** * Returns the {@link Map} containing the key-value pair of parameters. * * @return parameters as map */ public Map<String, String> getOauthParameters() { return oauthParameters; } @Override public String toString() { return String.format("@OAuthRequest(%s, %s)", getVerb(), getUrl()); } }
Java
package tracker.message.handlers; import elasta.composer.message.handlers.MessageHandler; import io.vertx.core.eventbus.Message; import io.vertx.core.json.JsonObject; /** * Created by sohan on 2017-07-26. */ public interface ReplayMessageHandler extends MessageHandler<JsonObject> { @Override void handle(Message<JsonObject> event); }
Java
# -*- coding: utf-8 -*- import pyqtgraph as pg from pyqtgraph.Qt import QtGui, QtCore import numpy as np import csv, gzip, os from pyqtgraph import Point class GlassDB: """ Database of dispersion coefficients for Schott glasses + Corning 7980 """ def __init__(self, fileName='schott_glasses.csv'): path = os.path.dirname(__file__) fh = gzip.open(os.path.join(path, 'schott_glasses.csv.gz'), 'rb') r = csv.reader(map(str, fh.readlines())) lines = [x for x in r] self.data = {} header = lines[0] for l in lines[1:]: info = {} for i in range(1, len(l)): info[header[i]] = l[i] self.data[l[0]] = info self.data['Corning7980'] = { ## Thorlabs UV fused silica--not in schott catalog. 'B1': 0.68374049400, 'B2': 0.42032361300, 'B3': 0.58502748000, 'C1': 0.00460352869, 'C2': 0.01339688560, 'C3': 64.49327320000, 'TAUI25/250': 0.95, ## transmission data is fabricated, but close. 'TAUI25/1400': 0.98, } for k in self.data: self.data[k]['ior_cache'] = {} def ior(self, glass, wl): """ Return the index of refraction for *glass* at wavelength *wl*. The *glass* argument must be a key in self.data. """ info = self.data[glass] cache = info['ior_cache'] if wl not in cache: B = list(map(float, [info['B1'], info['B2'], info['B3']])) C = list(map(float, [info['C1'], info['C2'], info['C3']])) w2 = (wl/1000.)**2 n = np.sqrt(1.0 + (B[0]*w2 / (w2-C[0])) + (B[1]*w2 / (w2-C[1])) + (B[2]*w2 / (w2-C[2]))) cache[wl] = n return cache[wl] def transmissionCurve(self, glass): data = self.data[glass] keys = [int(x[7:]) for x in data.keys() if 'TAUI25' in x] keys.sort() curve = np.empty((2,len(keys))) for i in range(len(keys)): curve[0][i] = keys[i] key = 'TAUI25/%d' % keys[i] val = data[key] if val == '': val = 0 else: val = float(val) curve[1][i] = val return curve GLASSDB = GlassDB() def wlPen(wl): """Return a pen representing the given wavelength""" l1 = 400 l2 = 700 hue = np.clip(((l2-l1) - (wl-l1)) * 0.8 / (l2-l1), 0, 0.8) val = 1.0 if wl > 700: val = 1.0 * (((700-wl)/700.) + 1) elif wl < 400: val = wl * 1.0/400. #print hue, val color = pg.hsvColor(hue, 1.0, val) pen = pg.mkPen(color) return pen class ParamObj(object): # Just a helper for tracking parameters and responding to changes def __init__(self): self.__params = {} def __setitem__(self, item, val): self.setParam(item, val) def setParam(self, param, val): self.setParams(**{param:val}) def setParams(self, **params): """Set parameters for this optic. This is a good function to override for subclasses.""" self.__params.update(params) self.paramStateChanged() def paramStateChanged(self): pass def __getitem__(self, item): # bug in pyside 1.2.2 causes getitem to be called inside QGraphicsObject.parentItem: return self.getParam(item) # PySide bug: https://bugreports.qt.io/browse/PYSIDE-441 def getParam(self, param): return self.__params[param] class Optic(pg.GraphicsObject, ParamObj): sigStateChanged = QtCore.Signal() def __init__(self, gitem, **params): ParamObj.__init__(self) pg.GraphicsObject.__init__(self) #, [0,0], [1,1]) self.gitem = gitem self.surfaces = gitem.surfaces gitem.setParentItem(self) self.roi = pg.ROI([0,0], [1,1]) self.roi.addRotateHandle([1, 1], [0.5, 0.5]) self.roi.setParentItem(self) defaults = { 'pos': Point(0,0), 'angle': 0, } defaults.update(params) self._ior_cache = {} self.roi.sigRegionChanged.connect(self.roiChanged) self.setParams(**defaults) def updateTransform(self): self.resetTransform() self.setPos(0, 0) self.translate(Point(self['pos'])) self.rotate(self['angle']) def setParam(self, param, val): ParamObj.setParam(self, param, val) def paramStateChanged(self): """Some parameters of the optic have changed.""" # Move graphics item self.gitem.setPos(Point(self['pos'])) self.gitem.resetTransform() self.gitem.rotate(self['angle']) # Move ROI to match try: self.roi.sigRegionChanged.disconnect(self.roiChanged) br = self.gitem.boundingRect() o = self.gitem.mapToParent(br.topLeft()) self.roi.setAngle(self['angle']) self.roi.setPos(o) self.roi.setSize([br.width(), br.height()]) finally: self.roi.sigRegionChanged.connect(self.roiChanged) self.sigStateChanged.emit() def roiChanged(self, *args): pos = self.roi.pos() # rotate gitem temporarily so we can decide where it will need to move self.gitem.resetTransform() self.gitem.rotate(self.roi.angle()) br = self.gitem.boundingRect() o1 = self.gitem.mapToParent(br.topLeft()) self.setParams(angle=self.roi.angle(), pos=pos + (self.gitem.pos() - o1)) def boundingRect(self): return QtCore.QRectF() def paint(self, p, *args): pass def ior(self, wavelength): return GLASSDB.ior(self['glass'], wavelength) class Lens(Optic): def __init__(self, **params): defaults = { 'dia': 25.4, ## diameter of lens 'r1': 50., ## positive means convex, use 0 for planar 'r2': 0, ## negative means convex 'd': 4.0, 'glass': 'N-BK7', 'reflect': False, } defaults.update(params) d = defaults.pop('d') defaults['x1'] = -d/2. defaults['x2'] = d/2. gitem = CircularSolid(brush=(100, 100, 130, 100), **defaults) Optic.__init__(self, gitem, **defaults) def propagateRay(self, ray): """Refract, reflect, absorb, and/or scatter ray. This function may create and return new rays""" """ NOTE:: We can probably use this to compute refractions faster: (from GLSL 120 docs) For the incident vector I and surface normal N, and the ratio of indices of refraction eta, return the refraction vector. The result is computed by k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I)) if (k < 0.0) return genType(0.0) else return eta * I - (eta * dot(N, I) + sqrt(k)) * N The input parameters for the incident vector I and the surface normal N must already be normalized to get the desired results. eta == ratio of IORs For reflection: For the incident vector I and surface orientation N, returns the reflection direction: I – 2 ∗ dot(N, I) ∗ N N must already be normalized in order to achieve the desired result. """ iors = [self.ior(ray['wl']), 1.0] for i in [0,1]: surface = self.surfaces[i] ior = iors[i] p1, ai = surface.intersectRay(ray) #print "surface intersection:", p1, ai*180/3.14159 #trans = self.sceneTransform().inverted()[0] * surface.sceneTransform() #p1 = trans.map(p1) if p1 is None: ray.setEnd(None) break p1 = surface.mapToItem(ray, p1) #print "adjusted position:", p1 #ior = self.ior(ray['wl']) rd = ray['dir'] a1 = np.arctan2(rd[1], rd[0]) ar = a1 - ai + np.arcsin((np.sin(ai) * ray['ior'] / ior)) #print [x for x in [a1, ai, (np.sin(ai) * ray['ior'] / ior), ar]] #print ai, np.sin(ai), ray['ior'], ior ray.setEnd(p1) dp = Point(np.cos(ar), np.sin(ar)) #p2 = p1+dp #p1p = self.mapToScene(p1) #p2p = self.mapToScene(p2) #dpp = Point(p2p-p1p) ray = Ray(parent=ray, ior=ior, dir=dp) return [ray] class Mirror(Optic): def __init__(self, **params): defaults = { 'r1': 0, 'r2': 0, 'd': 0.01, } defaults.update(params) d = defaults.pop('d') defaults['x1'] = -d/2. defaults['x2'] = d/2. gitem = CircularSolid(brush=(100,100,100,255), **defaults) Optic.__init__(self, gitem, **defaults) def propagateRay(self, ray): """Refract, reflect, absorb, and/or scatter ray. This function may create and return new rays""" surface = self.surfaces[0] p1, ai = surface.intersectRay(ray) if p1 is not None: p1 = surface.mapToItem(ray, p1) rd = ray['dir'] a1 = np.arctan2(rd[1], rd[0]) ar = a1 + np.pi - 2*ai ray.setEnd(p1) dp = Point(np.cos(ar), np.sin(ar)) ray = Ray(parent=ray, dir=dp) else: ray.setEnd(None) return [ray] class CircularSolid(pg.GraphicsObject, ParamObj): """GraphicsObject with two circular or flat surfaces.""" def __init__(self, pen=None, brush=None, **opts): """ Arguments for each surface are: x1,x2 - position of center of _physical surface_ r1,r2 - radius of curvature d1,d2 - diameter of optic """ defaults = dict(x1=-2, r1=100, d1=25.4, x2=2, r2=100, d2=25.4) defaults.update(opts) ParamObj.__init__(self) self.surfaces = [CircleSurface(defaults['r1'], defaults['d1']), CircleSurface(-defaults['r2'], defaults['d2'])] pg.GraphicsObject.__init__(self) for s in self.surfaces: s.setParentItem(self) if pen is None: self.pen = pg.mkPen((220,220,255,200), width=1, cosmetic=True) else: self.pen = pg.mkPen(pen) if brush is None: self.brush = pg.mkBrush((230, 230, 255, 30)) else: self.brush = pg.mkBrush(brush) self.setParams(**defaults) def paramStateChanged(self): self.updateSurfaces() def updateSurfaces(self): self.surfaces[0].setParams(self['r1'], self['d1']) self.surfaces[1].setParams(-self['r2'], self['d2']) self.surfaces[0].setPos(self['x1'], 0) self.surfaces[1].setPos(self['x2'], 0) self.path = QtGui.QPainterPath() self.path.connectPath(self.surfaces[0].path.translated(self.surfaces[0].pos())) self.path.connectPath(self.surfaces[1].path.translated(self.surfaces[1].pos()).toReversed()) self.path.closeSubpath() def boundingRect(self): return self.path.boundingRect() def shape(self): return self.path def paint(self, p, *args): p.setRenderHints(p.renderHints() | p.Antialiasing) p.setPen(self.pen) p.fillPath(self.path, self.brush) p.drawPath(self.path) class CircleSurface(pg.GraphicsObject): def __init__(self, radius=None, diameter=None): """center of physical surface is at 0,0 radius is the radius of the surface. If radius is None, the surface is flat. diameter is of the optic's edge.""" pg.GraphicsObject.__init__(self) self.r = radius self.d = diameter self.mkPath() def setParams(self, r, d): self.r = r self.d = d self.mkPath() def mkPath(self): self.prepareGeometryChange() r = self.r d = self.d h2 = d/2. self.path = QtGui.QPainterPath() if r == 0: ## flat surface self.path.moveTo(0, h2) self.path.lineTo(0, -h2) else: ## half-height of surface can't be larger than radius h2 = min(h2, abs(r)) #dx = abs(r) - (abs(r)**2 - abs(h2)**2)**0.5 #p.moveTo(-d*w/2.+ d*dx, d*h2) arc = QtCore.QRectF(0, -r, r*2, r*2) #self.surfaces.append((arc.center(), r, h2)) a1 = np.arcsin(h2/r) * 180. / np.pi a2 = -2*a1 a1 += 180. self.path.arcMoveTo(arc, a1) self.path.arcTo(arc, a1, a2) #if d == -1: #p1 = QtGui.QPainterPath() #p1.addRect(arc) #self.paths.append(p1) self.h2 = h2 def boundingRect(self): return self.path.boundingRect() def paint(self, p, *args): return ## usually we let the optic draw. #p.setPen(pg.mkPen('r')) #p.drawPath(self.path) def intersectRay(self, ray): ## return the point of intersection and the angle of incidence #print "intersect ray" h = self.h2 r = self.r p, dir = ray.currentState(relativeTo=self) # position and angle of ray in local coords. #print " ray: ", p, dir p = p - Point(r, 0) ## move position so center of circle is at 0,0 #print " adj: ", p, r if r == 0: #print " flat" if dir[0] == 0: y = 0 else: y = p[1] - p[0] * dir[1]/dir[0] if abs(y) > h: return None, None else: return (Point(0, y), np.arctan2(dir[1], dir[0])) else: #print " curve" ## find intersection of circle and line (quadratic formula) dx = dir[0] dy = dir[1] dr = (dx**2 + dy**2) ** 0.5 D = p[0] * (p[1]+dy) - (p[0]+dx) * p[1] idr2 = 1.0 / dr**2 disc = r**2 * dr**2 - D**2 if disc < 0: return None, None disc2 = disc**0.5 if dy < 0: sgn = -1 else: sgn = 1 br = self.path.boundingRect() x1 = (D*dy + sgn*dx*disc2) * idr2 y1 = (-D*dx + abs(dy)*disc2) * idr2 if br.contains(x1+r, y1): pt = Point(x1, y1) else: x2 = (D*dy - sgn*dx*disc2) * idr2 y2 = (-D*dx - abs(dy)*disc2) * idr2 pt = Point(x2, y2) if not br.contains(x2+r, y2): return None, None raise Exception("No intersection!") norm = np.arctan2(pt[1], pt[0]) if r < 0: norm += np.pi #print " norm:", norm*180/3.1415 dp = p - pt #print " dp:", dp ang = np.arctan2(dp[1], dp[0]) #print " ang:", ang*180/3.1415 #print " ai:", (ang-norm)*180/3.1415 #print " intersection:", pt return pt + Point(r, 0), ang-norm class Ray(pg.GraphicsObject, ParamObj): """Represents a single straight segment of a ray""" sigStateChanged = QtCore.Signal() def __init__(self, **params): ParamObj.__init__(self) defaults = { 'ior': 1.0, 'wl': 500, 'end': None, 'dir': Point(1,0), } self.params = {} pg.GraphicsObject.__init__(self) self.children = [] parent = params.get('parent', None) if parent is not None: defaults['start'] = parent['end'] defaults['wl'] = parent['wl'] self['ior'] = parent['ior'] self['dir'] = parent['dir'] parent.addChild(self) defaults.update(params) defaults['dir'] = Point(defaults['dir']) self.setParams(**defaults) self.mkPath() def clearChildren(self): for c in self.children: c.clearChildren() c.setParentItem(None) self.scene().removeItem(c) self.children = [] def paramStateChanged(self): pass def addChild(self, ch): self.children.append(ch) ch.setParentItem(self) def currentState(self, relativeTo=None): pos = self['start'] dir = self['dir'] if relativeTo is None: return pos, dir else: trans = self.itemTransform(relativeTo)[0] p1 = trans.map(pos) p2 = trans.map(pos + dir) return Point(p1), Point(p2-p1) def setEnd(self, end): self['end'] = end self.mkPath() def boundingRect(self): return self.path.boundingRect() def paint(self, p, *args): #p.setPen(pg.mkPen((255,0,0, 150))) p.setRenderHints(p.renderHints() | p.Antialiasing) p.setCompositionMode(p.CompositionMode_Plus) p.setPen(wlPen(self['wl'])) p.drawPath(self.path) def mkPath(self): self.prepareGeometryChange() self.path = QtGui.QPainterPath() self.path.moveTo(self['start']) if self['end'] is not None: self.path.lineTo(self['end']) else: self.path.lineTo(self['start']+500*self['dir']) def trace(rays, optics): if len(optics) < 1 or len(rays) < 1: return for r in rays: r.clearChildren() o = optics[0] r2 = o.propagateRay(r) trace(r2, optics[1:]) class Tracer(QtCore.QObject): """ Simple ray tracer. Initialize with a list of rays and optics; calling trace() will cause rays to be extended by propagating them through each optic in sequence. """ def __init__(self, rays, optics): QtCore.QObject.__init__(self) self.optics = optics self.rays = rays for o in self.optics: o.sigStateChanged.connect(self.trace) self.trace() def trace(self): trace(self.rays, self.optics)
Java
/******************************************************************************* *//** * @mainpage * @section section1 Introduction: * Having studied this LAB you will able to: \n * - Understand the GPIO functions \n * - Study the programs related to the LCD Display. * * @section section2 Example6 : * Objective: Program to display Empty Triangle for one character. * * @section section3 Program Description: * This program demonstrates interfacing of LCD display and display empty triangle on it * * @section section4 Included Files: * * | Header Files | Source Files | * | :------------------------:| :------------------------:| * | @ref stm32f4xx_hal_conf.h | @ref stm32f4xx_hal_msp.c | * | @ref stm32f4xx_it.h | @ref stm32f4xx_it.c | * | @ref stm32f4_ask25_lcd.h | @ref stm32f4_ask25_lcd.c | * | | @ref main.c | * * \n * * @section section5 Pin Assignments * * | STM32F407 Reference | Device(ASK-25-LCD) | * | :------------------:| :----------------: | * | P1.21 GPIOB.1 | RS | * | P2.25 GPIOB.4 | R/W | * | P2.26 GPIOB.5 | EN | * | P1.26 GPIOE.8 | D0 | * | P1.27 GPIOE.9 | D1 | * | P1.28 GPIOE.10 | D2 | * | P1.29 GPIOE.11 | D3 | * | P1.30 GPIOE.12 | D4 | * | P1.31 GPIOE.13 | D5 | * | P1.32 GPIOE.14 | D6 | * | P1.33 GPIOE.15 | D7 | * * @section section6 Connection * | STM32F407 Reference | Device | * | :------------------:| :-------------: | * | J6 | ASK-25 (PL3) | * * @section section7 Program Folder Location * <Eg6> * * * @section section8 Part List * - STM32F4Discovery Board \n * - Flat cable \n * - USB cable \n * - Eclipse IDE \n * - PC \n * - ASK-25 Rev2.0 \n * * @section section9 Hardware Configuration * - Connect ASK 25 to educational practice board using flat cable. * - Connect the board using USB port of PC using USB cable. * - Apply Reset condition by pressing the Reset switch to ensure proper communication. * - Using download tool (STM ST-LINK Utility) download the .hex file developed using available tools. * - Reset the board. * - Observe the Output. * * @section section10 Output: * On LCD display you will see a empty triangle for only one character on starting location *\n *\n *******************************************************************************/
Java
import logging from urllib.parse import urljoin import lxml.etree # noqa: S410 import requests from django.conf import settings as django_settings from django.utils import timezone logger = logging.getLogger(__name__) class ClientError(Exception): pass class ResponseParseError(ClientError): pass class ResponseStatusError(ClientError): pass class RequestError(ClientError): def __init__(self, message, response=None): super(RequestError, self).__init__(message) self.response = response class UnknownStatusError(ResponseParseError): pass class Response: ns_namespace = 'http://uri.etsi.org/TS102204/v1.1.2#' def __init__(self, content): etree = lxml.etree.fromstring(content) # noqa: S320 self.init_response_attributes(etree) def init_response_attributes(self, etree): """ Define response attributes based on valimo request content """ raise NotImplementedError class Request: url = NotImplemented template = NotImplemented response_class = NotImplemented settings = getattr(django_settings, 'WALDUR_AUTH_VALIMO', {}) @classmethod def execute(cls, **kwargs): url = cls._get_url() headers = { 'content-type': 'text/xml', 'SOAPAction': url, } data = cls.template.strip().format( AP_ID=cls.settings['AP_ID'], AP_PWD=cls.settings['AP_PWD'], Instant=cls._format_datetime(timezone.now()), DNSName=cls.settings['DNSName'], **kwargs ) cert = (cls.settings['cert_path'], cls.settings['key_path']) # TODO: add verification logger.debug( 'Executing POST request to %s with data:\n %s \nheaders: %s', url, data, headers, ) response = requests.post( url, data=data, headers=headers, cert=cert, verify=cls.settings['verify_ssl'], ) if response.ok: return cls.response_class(response.content) else: message = ( 'Failed to execute POST request against %s endpoint. Response [%s]: %s' % (url, response.status_code, response.content) ) raise RequestError(message, response) @classmethod def _format_datetime(cls, d): return d.strftime('%Y-%m-%dT%H:%M:%S.000Z') @classmethod def _format_transaction_id(cls, transaction_id): return ('_' + transaction_id)[:32] # such formation is required by server. @classmethod def _get_url(cls): return urljoin(cls.settings['URL'], cls.url) class SignatureResponse(Response): def init_response_attributes(self, etree): try: self.backend_transaction_id = etree.xpath('//MSS_SignatureResp')[0].attrib[ 'MSSP_TransID' ] self.status = etree.xpath( '//ns6:StatusCode', namespaces={'ns6': self.ns_namespace} )[0].attrib['Value'] except (IndexError, KeyError, lxml.etree.XMLSchemaError) as e: raise ResponseParseError( 'Cannot parse signature response: %s. Response content: %s' % (e, lxml.etree.tostring(etree)) ) class SignatureRequest(Request): url = '/MSSP/services/MSS_Signature' template = """ <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <MSS_Signature xmlns=""> <MSS_SignatureReq MajorVersion="1" MessagingMode="{MessagingMode}" MinorVersion="1" TimeOut="300"> <ns1:AP_Info AP_ID="{AP_ID}" AP_PWD="{AP_PWD}" AP_TransID="{AP_TransID}" Instant="{Instant}" xmlns:ns1="http://uri.etsi.org/TS102204/v1.1.2#"/> <ns2:MSSP_Info xmlns:ns2="http://uri.etsi.org/TS102204/v1.1.2#"> <ns2:MSSP_ID> <ns2:DNSName>{DNSName}</ns2:DNSName> </ns2:MSSP_ID> </ns2:MSSP_Info> <ns3:MobileUser xmlns:ns3="http://uri.etsi.org/TS102204/v1.1.2#"> <ns3:MSISDN>{MSISDN}</ns3:MSISDN> </ns3:MobileUser> <ns4:DataToBeSigned Encoding="UTF-8" MimeType="text/plain" xmlns:ns4="http://uri.etsi.org/TS102204/v1.1.2#"> {DataToBeSigned} </ns4:DataToBeSigned> <ns5:SignatureProfile xmlns:ns5="http://uri.etsi.org/TS102204/v1.1.2#"> <ns5:mssURI>{SignatureProfile}</ns5:mssURI> </ns5:SignatureProfile> <ns6:MSS_Format xmlns:ns6="http://uri.etsi.org/TS102204/v1.1.2#"> <ns6:mssURI>http://uri.etsi.org/TS102204/v1.1.2#PKCS7</ns6:mssURI> </ns6:MSS_Format> </MSS_SignatureReq> </MSS_Signature> </soapenv:Body> </soapenv:Envelope> """ response_class = SignatureResponse @classmethod def execute(cls, transaction_id, phone, message): kwargs = { 'MessagingMode': 'asynchClientServer', 'AP_TransID': cls._format_transaction_id(transaction_id), 'MSISDN': phone, 'DataToBeSigned': '%s %s' % (cls.settings['message_prefix'], message), 'SignatureProfile': cls.settings['SignatureProfile'], } return super(SignatureRequest, cls).execute(**kwargs) class Statuses: OK = 'OK' PROCESSING = 'Processing' ERRED = 'Erred' @classmethod def map(cls, status_code): if status_code == '502': return cls.OK elif status_code == '504': return cls.PROCESSING else: raise UnknownStatusError( 'Received unsupported status in response: %s' % status_code ) class StatusResponse(Response): def init_response_attributes(self, etree): try: status_code = etree.xpath( '//ns5:StatusCode', namespaces={'ns5': self.ns_namespace} )[0].attrib['Value'] except (IndexError, KeyError, lxml.etree.XMLSchemaError) as e: raise ResponseParseError( 'Cannot parse status response: %s. Response content: %s' % (e, lxml.etree.tostring(etree)) ) self.status = Statuses.map(status_code) try: civil_number_tag = etree.xpath( '//ns4:UserIdentifier', namespaces={'ns4': self.ns_namespace} )[0] except IndexError: # civil number tag does not exist - this is possible if request is still processing return else: try: self.civil_number = civil_number_tag.text.split('=')[1] except IndexError: raise ResponseParseError( 'Cannot get civil_number from tag text: %s' % civil_number_tag.text ) class ErredStatusResponse(Response): soapenv_namespace = 'http://www.w3.org/2003/05/soap-envelope' def init_response_attributes(self, etree): self.status = Statuses.ERRED try: self.details = etree.xpath( '//soapenv:Text', namespaces={'soapenv': self.soapenv_namespace} )[0].text except (IndexError, lxml.etree.XMLSchemaError) as e: raise ResponseParseError( 'Cannot parse error status response: %s. Response content: %s' % (e, lxml.etree.tostring(etree)) ) class StatusRequest(Request): url = '/MSSP/services/MSS_StatusPort' template = """ <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <MSS_StatusQuery xmlns=""> <MSS_StatusReq MajorVersion="1" MinorVersion="1"> <ns1:AP_Info AP_ID="{AP_ID}" AP_PWD="{AP_PWD}" AP_TransID="{AP_TransID}" Instant="{Instant}" xmlns:ns1="http://uri.etsi.org/TS102204/v1.1.2#"/> <ns2:MSSP_Info xmlns:ns2="http://uri.etsi.org/TS102204/v1.1.2#"> <ns2:MSSP_ID> <ns2:DNSName>{DNSName}</ns2:DNSName> </ns2:MSSP_ID> </ns2:MSSP_Info> <ns3:MSSP_TransID xmlns:ns3="http://uri.etsi.org/TS102204/v1.1.2#">{MSSP_TransID}</ns3:MSSP_TransID> </MSS_StatusReq> </MSS_StatusQuery> </soapenv:Body> </soapenv:Envelope> """ response_class = StatusResponse @classmethod def execute(cls, transaction_id, backend_transaction_id): kwargs = { 'AP_TransID': cls._format_transaction_id(transaction_id), 'MSSP_TransID': backend_transaction_id, } try: return super(StatusRequest, cls).execute(**kwargs) except RequestError as e: # If request was timed out or user canceled login - Valimo would return response with status 500 return ErredStatusResponse(e.response.content)
Java
#### Scripts ##### CrowdStrikeUrlParse - Updated the Docker image to: *demisto/python:2.7.18.24398*.
Java
<?php namespace Yandex\Locator\Exception; /** * Class ServerError * @package Yandex\Locator\Exception * @author Dmitry Kuznetsov <kuznetsov2d@gmail.com> * @license The MIT License (MIT) */ class ServerError extends \Yandex\Locator\Exception { }
Java